update niucloud

This commit is contained in:
全栈小学生 2023-09-06 18:49:12 +08:00
parent 2ebaa66ec3
commit f841ed11e5
27416 changed files with 12433 additions and 2932556 deletions

View File

@ -1 +1 @@
APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai AUTH_KEY = [REDIS] REDIS_HOSTNAME = 127.0.0.1 PORT = 6379 REDIS_PASSWORD = SELECT = 0 [LANG] default_lang = zh-cn [SYSTEM] ADMIN_TOKEN_NAME = token API_TOKEN_NAME = token ADMIN_SITE_ID_NAME = site-id API_SITE_ID_NAME = site-id ADMIN_TOKEN_EXPIRE_TIME = 604800 API_TOKEN_EXPIRE_TIME = 86400 LANG_NAME = lang CHANNEL_NAME = channel ADMIN_DOMAIN = WAP_DOMAIN = WEB_DOMAIN = [NIUCLOUD] code = secret =
APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai AUTH_KEY = asdaweasdasdawdadsdawdawd [DATABASE] TYPE = mysql HOSTNAME = rm-8vbdf411n2915eq38xo.mysql.zhangbei.rds.aliyuncs.com DATABASE = niucloud_v3 USERNAME = liebian_release PASSWORD = kt52AL@db6uHrmpg0n23 HOSTPORT = 3306 CHARSET = utf8mb4 DEBUG = true PREFIX = ns_ [REDIS] REDIS_HOSTNAME = 127.0.0.1 PORT = 6379 REDIS_PASSWORD = niushop123!@# SELECT = 0 [LANG] default_lang = zh-cn [SYSTEM] ADMIN_TOKEN_NAME = token API_TOKEN_NAME = token ADMIN_TOKEN_EXPIRE_TIME = 604800 API_TOKEN_EXPIRE_TIME = 86400 LANG_NAME = lang CHANNEL_NAME = channel ADMIN_DOMAIN = WAP_DOMAIN = WEB_DOMAIN =

View File

@ -1 +1 @@
APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai AUTH_KEY = {auth_key} [DATABASE] TYPE = mysql HOSTNAME = {dbhost} DATABASE = {dbname} USERNAME = {dbuser} PASSWORD = {dbpwd} HOSTPORT = {dbport} PREFIX = {dbprefix} CHARSET = utf8 DEBUG = false [REDIS] REDIS_HOSTNAME = 127.0.0.1 PORT = 6379 REDIS_PASSWORD = SELECT = 0 [LANG] default_lang = zh-cn [SYSTEM] ADMIN_TOKEN_NAME = token API_TOKEN_NAME = token ADMIN_SITE_ID_NAME = site-id API_SITE_ID_NAME = site-id ADMIN_TOKEN_EXPIRE_TIME = 604800 API_TOKEN_EXPIRE_TIME = 86400 LANG_NAME = lang CHANNEL_NAME = channel ADMIN_DOMAIN = WAP_DOMAIN = WEB_DOMAIN = [NIUCLOUD] code = secret =
APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai AUTH_KEY = {auth_key} [DATABASE] TYPE = mysql HOSTNAME = {dbhost} DATABASE = {dbname} USERNAME = {dbuser} PASSWORD = {dbpwd} HOSTPORT = {dbport} PREFIX = {dbprefix} CHARSET = utf8 DEBUG = false [REDIS] REDIS_HOSTNAME = 127.0.0.1 PORT = 6379 REDIS_PASSWORD = SELECT = 0 [LANG] default_lang = zh-cn [SYSTEM] ADMIN_TOKEN_NAME = token API_TOKEN_NAME = token ADMIN_TOKEN_EXPIRE_TIME = 604800 API_TOKEN_EXPIRE_TIME = 86400 LANG_NAME = lang CHANNEL_NAME = channel ADMIN_DOMAIN = WAP_DOMAIN = WEB_DOMAIN = [NIUCLOUD] code = secret =

View File

@ -1,36 +0,0 @@
<?php
namespace addon\hello_world;
/**
* 插件安装之后单独的插件方法
* Class HelloWorld
* @package addon\hello_world
*/
class HelloWorld
{
/**
* 插件安装执行
*/
public function install()
{
return true;
}
/**
* 插件卸载执行
*/
public function uninstall()
{
return true;
}
/**
* 插件升级执行
*/
public function upgrade()
{
return true;
}
}

View File

@ -0,0 +1,36 @@
<?php
namespace addon\hello_world;
/**
* 插件安装之后单独的插件方法
* Class HelloWorld
* @package addon\hello_world
*/
class Manage
{
/**
* 插件安装执行
*/
public function install()
{
return true;
}
/**
* 插件卸载执行
*/
public function uninstall()
{
return true;
}
/**
* 插件升级执行
*/
public function upgrade()
{
return true;
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,25 +1,24 @@
<?php
return [
'SYSTEM_LINK' => [
'title' => get_lang('dict_diy.system_link'),
'child_list' => [
[
'name' => 'HELLO_WORLD_INFO',
'title' => get_lang('dict_diy.hello_world_info'),
'url' => '/pages/hello_world/info',
'is_share' => 1
],
]
],
'HELLO_WORLD_LINK' => [
'key' => 'hello_world',
'addon_title' => get_lang('dict_diy.hello_world_title'),
'title' => get_lang('dict_diy.hello_world_link'),
'child_list' => [
[
'name' => 'HELLO_WORLD_INDEX',
'title' => get_lang('dict_diy.hello_world_index'),
'url' => '/pages/hello_world/index',
'is_share' => 1
'url' => '/hello_world/pages/index',
'is_share' => 1,
'action' => ''
],
[
'name' => 'HELLO_WORLD_INFO',
'title' => get_lang('dict_diy.hello_world_info'),
'url' => '/hello_world/pages/info',
'is_share' => 1,
'action' => ''
],
]
],

View File

@ -3,12 +3,12 @@
return [
'DIY_HELLO_WORLD_INDEX' => [
'title' => get_lang('dict_diy.page_hello_world_index'),
'page' => 'pages/hello_world/index',
'page' => 'hello_world/pages/index',
'action' => ''
],
'DIY_HELLO_WORLD_INFO' => [
'title' => get_lang('dict_diy.page_hello_world_info'),
'page' => 'pages/hello_world/info',
'page' => 'hello_world/pages/info',
'action' => ''
],
];

View File

@ -1,15 +1,18 @@
<?php
return [
'hello_world_test' => [
'key' => 'hello_world_test',
'app_type' => 'site',
//充值成功通知,站点端发送
'recharge_success' => [
'key' => 'recharge_success',
'receiver_type' => 1,
'async' => false,
'name' => 'hello world消息',
'title' => 'hello world演示插件消息',
'variable' =>[
'name' => '消息内容'
'name' => '充值成功通知',
'title' => '会员充值成功后发送',
'async' => true,
'variable' => [
'price' => '充值金额',
'balance' => '充值后账户',
'time' => '充值时间',
'trade_no' => '交易单号'
],
],
]
];
];

View File

@ -1,7 +1,7 @@
<?php
return [
'hello_world_test' => [
'content' => '检测发送信息:{name}',
'recharge_success' => [
'content' => '您充值金额¥{price}, 充值后金额¥{balance}',
]
];
];

View File

@ -1,9 +1,12 @@
<?php
return [
'recharge_success' => [
'tid' => '111',
'tid' => '755',
'content' => [
['消息内容', '{name}', 'keyword1'],
['交易单号', '{trade_no}', 'keyword1'],
['充值金额', '{price}', 'keyword2'],
['账户余额', '{balance}', 'keyword3'],
['充值时间', '{time}', 'keyword4'],
],
'kid_list' => [1, 3, 4, 2],
'scene_desc' => ''

View File

@ -1,11 +1,11 @@
<?php
return [
'recharge_success' => [
'temp_key' => 'OPENTM111',
'first' => '',
'temp_key' => '52552',
'keyword_name_list' => [ '充值时间', '充值金额' ],
'content' => [
['消息内容', '{name}', 'keyword1'],
],
'remark' => ''
[ '充值时间', '{time}', 'time1' ],
[ '充值金额', '{price}', 'amount3' ],
]
]
];

View File

@ -9,7 +9,6 @@ return [
//应用管理
'AppManage' => ['addon\hello_world\app\listener\AppManageListener'],
'SiteLayout' => ['addon\hello_world\app\listener\SiteLayout']
],
'subscribe' => [

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -16,6 +16,7 @@ return [
'dict_diy' => [
'page_hello_world_index' => 'hello 首页',
'page_hello_world_info' => 'hello 信息',
'hello_world_title' => 'hello world',
'hello_world_link' => 'hello world链接',
'hello_world_index' => 'hello world index 插件',
'hello_world_info' => 'hello world info 插件'

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,29 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace addon\hello_world\app\listener;
/**
* 站点端布局
*/
class SiteLayout
{
public function handle()
{
return [
"name" => get_lang("dict_site_layout.hellow_world"),
"key" => "hellow",
"image" => "static/resource/images/system/layout-hellow.jpg",
"sort" => 1
];
}
}

View File

@ -1,5 +1,4 @@
{
"dependencies": {
"@vueuse/core": "^9.12.0"
}
}

View File

@ -1,6 +1,5 @@
{
"require": {
"firebase/php-jwt": "^5.0"
}
}

View File

@ -3,21 +3,21 @@ return [
'pages' => <<<EOT
// PAGE_BEGIN
{
"path": "pages/hello_world/index",
"path": "{{addon_name}}/pages/index",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "%pages.hello_world.index%"
"navigationBarTitleText": "%{{addon_name}}.pages.index%"
}
},
{
"path": "pages/hello_world/info",
"path": "{{addon_name}}/pages/info",
"style": {
// #ifdef H5
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "%pages.hello_world.info%"
"navigationBarTitleText": "%{{addon_name}}.pages.info%"
}
}
// PAGE_END

View File

@ -1,5 +1,4 @@
{
"dependencies": {
"sass": "^1.60.0"
}
}

View File

@ -1,6 +1,6 @@
CREATE TABLE IF NOT EXISTS `{{prefix}}hello_world` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
PRIMARY KEY (`id`)
`id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='演示插件表';
INSERT INTO `{{prefix}}hello_world`(`name`) VALUES ('名称');

View File

@ -6,7 +6,7 @@
<script setup lang="ts">
import { computed } from 'vue';
import useDiyStore from '@/stores/diy';
import useDiyStore from '@/app/stores/diy';
const props = defineProps(['component', 'index']);

View File

@ -0,0 +1,14 @@
<template>
<view>
hello-index固定模板示例我也可以装修
<!-- 自定义模板渲染 -->
<diy-group :data="props.data" :pullDownRefresh="props.pullDownRefresh"></diy-group>
</view>
</template>
<script setup lang="ts">
import { computed, watch } from 'vue';
const props = defineProps(['data', 'pullDownRefresh']);
</script>
<style></style>

View File

@ -0,0 +1,4 @@
{
"pages.index": "hello_world index",
"pages.info": "hello_world info"
}

View File

@ -0,0 +1,4 @@
{
"pages.index": "hello_world首页",
"pages.info": "hello_world详情"
}

View File

@ -0,0 +1,7 @@
{
"list": "文章列表",
"noData": "~ 暂无数据 ~",
"all": "全部",
"end": "-- 到底了 --",
"searchPlaceholder": "请输入搜索关键词"
}

View File

@ -1,166 +0,0 @@
<template>
<view class="bg-gray-100 min-h-[100vh]">
<view class="fixed top-0 inset-x-0 z-10">
<view
class='p-[10px] bg-white border-solid border-t-0 border-l-0 border-r-0 border-b-[1px] border-gray-200'>
<u-search :placeholder="t('searchPlaceholder')" actionText :actionStyle="{'width':0,'margin':0}"
v-model="articleTitle" @clickIcon="searchFn"></u-search>
</view>
<scroll-view :scroll-x="true" :enable-flex="true"
class="nav-list bg-white align-center px-[10px] box-border">
<view class="flex scroll-view-wrap">
<view
:class="['nav-item text-[14px] mx-[5px] h-[30px] leading-[30px] my-[5px] border-t-0 border-l-0 border-r-0',{'border-solid border-b-[2px] active': currCategoryId==item.category_id}]"
@click="loadCategory(item.category_id)" v-for="(item,index) in categoryList"
:key="item.category_id">
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<mescroll-body ref="mescrollRef" @init="mescrollInit" top="220rpx" @down="downCallback" @up="getArticleListFn">
<view v-for="(item,index) in articleList" :key="item.id"
:class="['bg-white flex align-center p-[10px]',{'border-solid border-t-0 border-l-0 border-r-0 border-b-[1px] border-gray-200': articleList.length-1 !== index}] "
@click="toLink(item.id)">
<u--image width="260rpx" height="200rpx" :src="img(item.image)" v-if="item.image" model="aspectFill">
<template #error>
<u-icon name="photo" color="#999" size="50"></u-icon>
</template>
</u--image>
<view class="flex-1 flex flex-col justify-between ml-[10px]">
<view class="text-[16px] leading-[1.3] multi-hidden mt-[2px]">{{item.title}}</view>
<view class="text-[14px] using-hidden mb-[auto] mt-[10px] text-gray-500">{{item.summary}}</view>
<view class="text-[12px] text-gray-400 flex justify-between mb-[5px]">
<text class="">{{item.create_time}}</text>
</view>
</view>
</view>
<mescroll-empty v-if="!articleList.length && loading"></mescroll-empty>
</mescroll-body>
<tabbar />
</view>
</template>
<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { t } from '@/locale'
import { redirect, img } from '@/utils/common';
import { getArticleList, getArticleCategory } from '@/api/article';
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app';
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom);
import { useShare } from '@/hooks/useShare'
const { setShare, onShareAppMessage, onShareTimeline } = useShare()
setShare()
onShareAppMessage()
onShareTimeline()
let categoryList = ref<Array<Object>>([]);
let articleList = ref<Array<any>>([]);
let currCategoryId = ref<number | string>('');
let articleTitle = ref<string>('');
let mescrollRef = ref(null);
let loading = ref<boolean>(false);
interface acceptingDataStructure {
data : acceptingDataItemStructure,
msg : string,
code : number
}
interface acceptingDataItemStructure {
data : object,
[propName : string] : number | string | object
}
onLoad(async () => {
await getArticleCategory().then((res : acceptingDataStructure) => {
const initData = { name: t("all"), category_id: '' };
categoryList.value.push(initData);
categoryList.value = categoryList.value.concat(res.data.data);
});
})
interface mescrollStructure {
num : number,
size : number,
endSuccess : Function,
[propName : string] : any
}
const getArticleListFn = (mescroll : mescrollStructure) => {
loading.value = false;
let data : object = {
category_id: currCategoryId.value,
title: articleTitle.value,
page: mescroll.num,
limit: mescroll.size
};
getArticleList(data).then((res : acceptingDataStructure) => {
let newArr = (res.data.data as Array<Object>);
//
if (mescroll.num == 1) {
articleList.value = []; //
}
articleList.value = articleList.value.concat(newArr);
mescroll.endSuccess(newArr.length);
loading.value = true;
}).catch(() => {
loading.value = true;
mescroll.endErr(); // ,
})
}
const loadCategory = (id : string) => {
currCategoryId.value = id;
getMescroll().resetUpScroll();
}
const searchFn = () => {
getMescroll().resetUpScroll();
}
const toLink = (id : string) => {
redirect({ url: '/pages/article/detail', param: { id } })
}
onMounted(() => {
setTimeout(() => {
getMescroll().optUp.textNoMore = t("end");
}, 500)
});
</script>
<style lang="scss" scoped>
.nav-item.active {
color: $u-primary;
}
.scroll-view-wrap {
word-break: keep-all;
}
/* 单行超出隐藏 */
.using-hidden {
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
white-space: break-spaces;
}
/* 多行超出隐藏 */
.multi-hidden {
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>

View File

@ -0,0 +1,166 @@
<template>
<view class="bg-gray-100 min-h-[100vh]">
<view class="fixed top-0 inset-x-0 z-10">
<view
class='p-[10px] bg-white border-solid border-t-0 border-l-0 border-r-0 border-b-[1px] border-gray-200'>
<u-search :placeholder="t('searchPlaceholder')" actionText :actionStyle="{'width':0,'margin':0}"
v-model="articleTitle" @clickIcon="searchFn"></u-search>
</view>
<scroll-view :scroll-x="true" :enable-flex="true"
class="nav-list bg-white align-center px-[10px] box-border">
<view class="flex scroll-view-wrap">
<view
:class="['nav-item text-[14px] mx-[5px] h-[30px] leading-[30px] my-[5px] border-t-0 border-l-0 border-r-0',{'border-solid border-b-[2px] active': currCategoryId==item.category_id}]"
@click="loadCategory(item.category_id)" v-for="(item,index) in categoryList"
:key="item.category_id">
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<mescroll-body ref="mescrollRef" @init="mescrollInit" top="220rpx" @down="downCallback" @up="getArticleListFn">
<view v-for="(item,index) in articleList" :key="item.id"
:class="['bg-white flex align-center p-[10px]',{'border-solid border-t-0 border-l-0 border-r-0 border-b-[1px] border-gray-200': articleList.length-1 !== index}] "
@click="toLink(item.id)">
<u--image width="260rpx" height="200rpx" :src="img(item.image)" v-if="item.image" model="aspectFill">
<template #error>
<u-icon name="photo" color="#999" size="50"></u-icon>
</template>
</u--image>
<view class="flex-1 flex flex-col justify-between ml-[10px]">
<view class="text-[16px] leading-[1.3] multi-hidden mt-[2px]">{{item.title}}</view>
<view class="text-[14px] using-hidden mb-[auto] mt-[10px] text-gray-500">{{item.summary}}</view>
<view class="text-[12px] text-gray-400 flex justify-between mb-[5px]">
<text class="">{{item.create_time}}</text>
</view>
</view>
</view>
<mescroll-empty v-if="!articleList.length && loading"></mescroll-empty>
</mescroll-body>
<tabbar />
</view>
</template>
<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { t } from '@/locale'
import { redirect, img } from '@/utils/common';
import { getArticleList, getArticleCategory } from '@/cms/api/article';
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app';
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom);
import { useShare } from '@/hooks/useShare'
const { setShare, onShareAppMessage, onShareTimeline } = useShare()
setShare()
onShareAppMessage()
onShareTimeline()
let categoryList = ref<Array<Object>>([]);
let articleList = ref<Array<any>>([]);
let currCategoryId = ref<number | string>('');
let articleTitle = ref<string>('');
let mescrollRef = ref(null);
let loading = ref<boolean>(false);
interface acceptingDataStructure {
data : acceptingDataItemStructure,
msg : string,
code : number
}
interface acceptingDataItemStructure {
data : object,
[propName : string] : number | string | object
}
onLoad(async () => {
await getArticleCategory().then((res : acceptingDataStructure) => {
const initData = { name: t("all"), category_id: '' };
categoryList.value.push(initData);
categoryList.value = categoryList.value.concat(res.data.data);
});
})
interface mescrollStructure {
num : number,
size : number,
endSuccess : Function,
[propName : string] : any
}
const getArticleListFn = (mescroll : mescrollStructure) => {
loading.value = false;
let data : object = {
category_id: currCategoryId.value,
title: articleTitle.value,
page: mescroll.num,
limit: mescroll.size
};
getArticleList(data).then((res : acceptingDataStructure) => {
let newArr = (res.data.data as Array<Object>);
//
if (mescroll.num == 1) {
articleList.value = []; //
}
articleList.value = articleList.value.concat(newArr);
mescroll.endSuccess(newArr.length);
loading.value = true;
}).catch(() => {
loading.value = true;
mescroll.endErr(); // ,
})
}
const loadCategory = (id : string) => {
currCategoryId.value = id;
getMescroll().resetUpScroll();
}
const searchFn = () => {
getMescroll().resetUpScroll();
}
const toLink = (id : string) => {
redirect({ url: '/cms/pages/detail', param: { id } })
}
onMounted(() => {
setTimeout(() => {
getMescroll().optUp.textNoMore = t("end");
}, 500)
});
</script>
<style lang="scss" scoped>
.nav-item.active {
color: $u-primary;
}
.scroll-view-wrap {
word-break: keep-all;
}
/* 单行超出隐藏 */
.using-hidden {
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
white-space: break-spaces;
}
/* 多行超出隐藏 */
.multi-hidden {
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>

View File

@ -47,7 +47,7 @@
import { onLoad } from '@dcloudio/uni-app'
import { t } from '@/locale'
import { redirect, img } from '@/utils/common';
import { getArticleList, getArticleCategory } from '@/api/article';
import { getArticleList, getArticleCategory } from '@/cms/api/article';
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
@ -124,7 +124,7 @@
}
const toLink = (id : string) => {
redirect({ url: '/pages/article/detail', param: { id } })
redirect({ url: '/cms/pages/detail', param: { id } })
}
onMounted(() => {

View File

@ -13,7 +13,6 @@ class Request extends \think\Request
//认证信息
protected static $auth_info = [];
protected static $site_id = 0;
/**
* 获取请求参数
@ -36,7 +35,7 @@ class Request extends \think\Request
}
$default = $param[1];
$item_filter = $param[2] ?? $filter;
$input[$key] = $this->paramFilter($this->param($key, $default, $filter_rule ?? ''), $item_filter);
$input[$name] = $this->paramFilter($this->param($key, $default, $filter_rule ?? ''), $item_filter);
//过滤后产生空字符串,按照默认值
if($input[$name] === '')
{
@ -91,19 +90,7 @@ class Request extends \think\Request
}
}
/**
* 站点id
* @param int|string|null $site_id
* @return int
*/
public function siteId(int|string|null $site_id = 0)
{
if ($site_id > 0) {
static::$site_id = (int)$site_id;
} else {
return static::$site_id ?? $this->defaultSiteId();
}
}
/**
* 用户账号
@ -120,18 +107,7 @@ class Request extends \think\Request
}
/**
* 定义站点类型
* @param string $app_type
* @return mixed|string
*/
public function appType(string $app_type = ''){
if (!empty($app_type)) {
static::$auth_info['app_type'] = $app_type;
} else {
return static::$auth_info['app_type'] ?? '';
}
}
/**
* 获取管理端token
@ -150,21 +126,8 @@ class Request extends \think\Request
return $this->header(system_name('api_token_name'));
}
/**
* 平台site_id
* @return array|string|null
*/
public function adminSiteId(){
return $this->header(system_name('admin_site_id_name'));
}
/**
* 客户端site_id
* @return array|string|null
*/
public function apiSiteId(){
return $this->header(system_name('api_site_id_name'));
}
/**
* 获取场景
@ -174,13 +137,6 @@ class Request extends \think\Request
return $this->header(system_name('channel_name'), ChannelDict::H5);
}
/**
* 获取默认站点
* @return int
*/
public function defaultSiteId(){
return 0;
}
/**
* get传参追加值
@ -215,4 +171,17 @@ class Request extends \think\Request
return static::$auth_info[$key] ?? '';
}
}
/**
* 定义站点类型
* @param string $app_type
* @return mixed|string
*/
public function appType(string $app_type = ''){
if (!empty($app_type)) {
static::$auth_info['app_type'] = $app_type;
} else {
return static::$auth_info['app_type'] ?? '';
}
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -11,6 +11,7 @@
namespace app\adminapi\controller\addon;
use app\dict\addon\AddonDict;
use app\service\admin\addon\AddonService;
use app\service\core\addon\CoreAddonService;
use core\base\BaseAdminController;
@ -126,9 +127,28 @@ class Addon extends BaseAdminController
* @param $app_key
* @return Response
*/
public function update($addon){
(new AddonService())->update($addon);
public function upgrade($addon){
(new AddonService())->upgrade($addon);
return success('DOWNLOAD_SUCCESS');
}
/**
* 查询已安装有效应用
*/
public function getAddonList()
{
return success((new CoreAddonService())->getInstallAddonList());
}
public function getAddonByKey($key){
return success((new AddonService())->getInfoByKey($key));
}
/**
* 插件类型
* @return Response
*/
public function getType(){
return success(AddonDict::getType());
}
}

View File

@ -0,0 +1,127 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\addon;
use app\service\admin\addon\AddonDevelopService;
use app\service\admin\niucloud\AppService;
use core\base\BaseAdminController;
use think\Response;
class AddonDevelop extends BaseAdminController
{
/**
* 开发插件列表
*/
public function lists()
{
$data = $this->request->params([
['search', '']
]);
return success((new AddonDevelopService())->getList($data['search']));
}
public function info($key)
{
return success((new AddonDevelopService())->getInfo($key));
}
/**
* 开发插件新增
* @return Response
*/
public function add(string $key)
{
$data = $this->request->params([
['title', ''],
['desc', ''],
['icon', ''],
['cover', ''],
['key', ''],
['author', ''],
['version', ''],
['type', ''],
['support_app', ''],
], false);
$data['key'] = $key;
$this->validate($data, 'app\validate\addon\AddonDevelop.add');
(new AddonDevelopService())->add($key, $data);
return success('ADD_SUCCESS');
}
/**
* 开发插件更新
* @param string $id
* @return Response
*/
public function edit(string $key)
{
$data = $this->request->params([
['title', ''],
['desc', ''],
['icon', ''],
['cover', ''],
['key', ''],
['author', ''],
['version', ''],
['type', ''],
['support_app', ''],
], false);
$data['key'] = $key;
$this->validate($data, 'app\validate\addon\AddonDevelop.edit');
(new AddonDevelopService())->edit($key, $data);
return success('EDIT_SUCCESS');
}
/**
* 删除开发插件
* @param $key
* @return Response
*/
public function del(string $key)
{
(new AddonDevelopService())->del($key);
return success('DELETE_SUCCESS');
}
/**
*校验key是否被占用
* @param $key
* @return void
*/
public function checkKey($key){
return success(data:(new AppService())->checkKey($key));
}
/**
* 打包
* @param $key
* @return Response
*/
public function build($key){
(new AddonDevelopService())->build($key);
return success();
}
/**
* 下载
* @param $key
* @return Response
*/
public function download($key){
return (new AddonDevelopService())->download($key);
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,110 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\article;
use app\service\admin\article\ArticleService;
use core\base\BaseAdminController;
use think\Response;
/**
* 文章控制器
* Class Article
* @package app\adminapi\controller\article
*/
class Article extends BaseAdminController
{
/**
* 文章列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
['title', ''],
['category_id', ''],
['sort', ''],
['is_show', ''],
]);
return success((new ArticleService())->getPage($data));
}
/**
* 文章详情
* @param int $id
* @return Response
*/
public function info(int $id)
{
return success((new ArticleService())->getInfo($id));
}
/**
* 添加文章
* @return Response
*/
public function add()
{
$data = $this->request->params([
['title', ''],
['category_id', ''],
['intro', ''],
['summary', ''],
['image', ''],
['author', ''],
['content', '', false],
['visit_virtual', 0],
['is_show', 1],
['sort', 0],
]);
$this->validate($data, 'app\validate\article\Article.add');
$id = (new ArticleService())->add($data);
return success('ADD_SUCCESS', ['id' => $id]);
}
/**
* 文章编辑
* @param int $id
* @return Response
*/
public function edit(int $id)
{
$data = $this->request->params([
['title', ''],
['category_id', ''],
['intro', ''],
['summary', ''],
['image', ''],
['author', ''],
['content', '', false],
['visit_virtual', 0],
['is_show', 1],
['sort', 0],
]);
$this->validate($data, 'app\validate\article\Article.edit');
(new ArticleService())->edit($id, $data);
return success('EDIT_SUCCESS');
}
/**
* 文章删除
* @param int $id
* @return Response
*/
public function del(int $id)
{
(new ArticleService())->del($id);
return success('DELETE_SUCCESS');
}
}

View File

@ -1,95 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\article;
use app\service\admin\article\ArticleCategoryService;
use core\base\BaseAdminController;
use think\Response;
class ArticleCategory extends BaseAdminController
{
/**
* 文章分类列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
['name', ''],
]);
return success((new ArticleCategoryService())->getPage($data));
}
/**
* 查询所有分类(文章添加,编辑,索引)
* @return Response
*/
public function all()
{
return success((new ArticleCategoryService())->getAll());
}
/**
* 文章分类详情
* @param int $id
* @return Response
*/
public function info(int $id)
{
return success((new ArticleCategoryService())->getInfo($id));
}
/**
* 添加文章分类
* @return Response
*/
public function add()
{
$data = $this->request->params([
['name', ''],
['is_show', 1],
['sort', 0],
]);
$this->validate($data, 'app\validate\article\ArticleCategory.add');
$id = (new ArticleCategoryService())->add($data);
return success('ADD_SUCCESS', ['id' => $id]);
}
/**
* 文章分类编辑
* @param int $category_id //分类id
* @return Response
*/
public function edit(int $category_id)
{
$data = $this->request->params([
['name', ''],
['is_show', 1],
['sort', 0],
]);
$this->validate($data, 'app\validate\article\ArticleCategory.edit');
(new ArticleCategoryService())->edit($category_id, $data);
return success('EDIT_SUCCESS');
}
/**
* 文章分类删除
* @param int $category_id
* @return Response
*/
public function del(int $category_id)
{
(new ArticleCategoryService())->del($category_id);
return success('DELETE_SUCCESS');
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -12,11 +12,7 @@
namespace app\adminapi\controller\auth;
use app\service\admin\auth\AuthService;
use app\service\admin\auth\AuthSiteService;
use core\base\BaseAdminController;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\Response;
@ -28,7 +24,23 @@ class Auth extends BaseAdminController
*/
public function authMenuList()
{
return success((new AuthService())->getAuthMenuList(1));
$data = $this->request->params([
['addon', 'all'],
]);
return success((new AuthService())->getAuthMenuList(1, $data['addon']));
}
/**
* 获取授权应用
* @return void
*/
public function getAuthAddonList(){
$data = $this->request->params([
['type', ''],
['title', ''],
]);
return success((new AuthService())->getAuthAddonList($data));
}
/**
@ -74,23 +86,13 @@ class Auth extends BaseAdminController
}
/**
* 获取当前登录站点信息
* @return Response
* 授权应用加星
*/
public function site()
{
return success((new AuthSiteService())->getSiteInfo());
}
/**
* 选择可以选择的页面
* @return Response
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
*/
public function getShowMenuList()
{
return success((new AuthSiteService())->getShowMenuList());
public function setStar(){
$data = $this->request->params([
['key', ''],
]);
(new AuthService())->setAddonStat($data['key']);
return success('SUCCESS');
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -13,10 +13,6 @@ namespace app\adminapi\controller\diy;
use app\service\admin\diy\DiyService;
use core\base\BaseAdminController;
use Exception;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\Response;
@ -28,34 +24,31 @@ use think\Response;
class Diy extends BaseAdminController
{
/**
* @notes 获取自定义页面分页列表
* 获取自定义页面分页列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
["title", ""],
["type", ""],
['mode', '']
[ "title", "" ],
[ "type", "" ],
[ 'mode', '' ]
]);
return success((new DiyService())->getPage($data));
return success(( new DiyService() )->getPage($data));
}
/**
* @notes 获取自定义页面列表
* @return Response
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
*/
public function getList()
{
$data = $this->request->params([
["title", ""],
["type", ""],
['mode', '']
[ "title", "" ],
[ "type", "" ],
[ 'mode', '' ]
]);
return success((new DiyService())->getList($data));
return success(( new DiyService() )->getList($data));
}
/**
@ -65,7 +58,7 @@ class Diy extends BaseAdminController
*/
public function info(int $id)
{
return success((new DiyService())->getInfo($id));
return success(( new DiyService() )->getInfo($id));
}
/**
@ -75,19 +68,19 @@ class Diy extends BaseAdminController
public function add()
{
$data = $this->request->params([
["title", ""],
["name", ""],
["type", ""],
['template', ''],
['mode', 'diy'], // 页面展示模式diy自定义fixed固定
["value", ""],
['is_default', 0],
['is_change', '']
[ "title", "" ],
[ "name", "" ],
[ "type", "" ],
[ 'template', '' ],
[ 'mode', 'diy' ], // 页面展示模式diy自定义fixed固定
[ "value", "" ],
[ 'is_default', 0 ],
[ 'is_change', '' ]
]);
$this->validate($data, 'app\validate\diy\Diy.add');
$id = (new DiyService())->add($data);
return success('ADD_SUCCESS', ['id' => $id]);
$id = ( new DiyService() )->add($data);
return success('ADD_SUCCESS', [ 'id' => $id ]);
}
/**
@ -98,13 +91,13 @@ class Diy extends BaseAdminController
public function edit($id)
{
$data = $this->request->params([
["title", ""],
["name", ""],
["value", ""],
['is_change', '']
[ "title", "" ],
[ "name", "" ],
[ "value", "" ],
[ 'is_change', '' ]
]);
$this->validate($data, 'app\validate\diy\Diy.edit');
(new DiyService())->edit($id, $data);
( new DiyService() )->edit($id, $data);
return success('MODIFY_SUCCESS');
}
@ -115,7 +108,7 @@ class Diy extends BaseAdminController
*/
public function del(int $id)
{
(new DiyService())->del($id);
( new DiyService() )->del($id);
return success('DELETE_SUCCESS');
}
@ -123,11 +116,10 @@ class Diy extends BaseAdminController
* 设为使用
* @param $id
* @return Response
* @throws Exception
*/
public function setUse($id)
{
(new DiyService())->setUse($id);
( new DiyService() )->setUse($id);
return success('MODIFY_SUCCESS');
}
@ -138,11 +130,12 @@ class Diy extends BaseAdminController
public function getPageInit()
{
$params = $this->request->params([
['id', ""],
["name", ""],
["type", ""],
['template', ''],
["title", ""],
[ 'id', "" ],
[ "name", "" ],
[ "url", "" ],
[ "type", "" ],
[ 'template', '' ],
[ "title", "" ],
]);
$diy_service = new DiyService();
@ -165,9 +158,9 @@ class Diy extends BaseAdminController
public function getTemplate()
{
$params = $this->request->params([
['type', ""], // 页面类型模板
['action', ''], // 页面是否装修标识为空标识不装修decorate装修
['mode', ''] // 页面展示模式diy自定义fixed固定
[ 'type', [] ], // 页面类型模板
[ 'action', '' ], // 页面是否装修标识为空标识不装修decorate装修
[ 'mode', '' ] // 页面展示模式diy自定义fixed固定
]);
$diy_service = new DiyService();
return success($diy_service->getTemplate($params));
@ -181,9 +174,9 @@ class Diy extends BaseAdminController
public function modifyShare(int $id)
{
$data = $this->request->params([
["share", ""],
[ "share", "" ],
]);
(new DiyService())->modifyShare($id, $data);
( new DiyService() )->modifyShare($id, $data);
return success('MODIFY_SUCCESS');
}
@ -192,7 +185,7 @@ class Diy extends BaseAdminController
*/
public function getDecoratePage()
{
return success((new DiyService())->getDecoratePage());
return success(( new DiyService() )->getDecoratePage());
}
/**
@ -201,12 +194,15 @@ class Diy extends BaseAdminController
public function changeTemplate()
{
$data = $this->request->params([
["id", ""],
['type', ''], // 页面类型
['mode', ''], // 页面展示模式diy自定义fixed固定
['template', ''] // 模板名称
[ "id", "" ],
[ 'type', '' ], // 页面类型
[ 'mode', '' ], // 页面展示模式diy自定义fixed固定other其他页面
[ 'template', '' ], // 模板名称
[ 'page', '' ], // 页面路由
[ 'title', '' ], // 页面标题
[ 'action', '' ] // 是否存在操作decorate 表示支持装修
]);
return success((new DiyService())->changeTemplate($data));
return success(( new DiyService() )->changeTemplate($data));
}
/**
@ -215,10 +211,10 @@ class Diy extends BaseAdminController
public function getPreviewData()
{
$data = $this->request->params([
["id", ""],
['name', '']
[ "id", "" ],
[ 'name', '' ]
]);
$res = (new DiyService())->getPreviewData($data);
$res = ( new DiyService() )->getPreviewData($data);
return success($res);
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -53,6 +53,17 @@ class Generator extends BaseController
return success((new GenerateService())->getInfo($id));
}
/**
* 代码预览
* @param int $id
* @return Response
*/
public function preview(int $id)
{
$data = (new GenerateService())->preview(['id' => $id]);
return success('ADD_SUCCESS', $data);
}
/**
* 添加代码生成
* @return Response
@ -80,8 +91,15 @@ class Generator extends BaseController
["table_content", ""],
["class_name", ""],
["module_name", ""],
['addon_name',''],
["edit_type", "1"],
["table_column", ""],
["is_delete",""],
['delete_column_name',''],
['order_type',"0"],
['order_column_name',''],
['parent_menu',''],
['relations',[]]
], false);
$this->validate($data, 'app\validate\generator\Generator.edit');
(new GenerateService())->edit($id, $data);
@ -107,6 +125,7 @@ class Generator extends BaseController
{
$data = $this->request->params([
['id', ''],
['generate_type', '3']
]);
$data = (new GenerateService())->generate($data);
@ -127,4 +146,39 @@ class Generator extends BaseController
return success('ADD_SUCCESS', $list);
}
/**
* 代码生成检测
*/
public function checkFile()
{
$data = $this->request->params([
["id",'']
]);
return success((new GenerateService())->checkFile($data));
}
/**
* 获取表字段
*/
public function getTableColumn()
{
$data = $this->request->params([
["table_name", ""],
]);
return success((new GenerateService())->getTableColumn($data));
}
/**
* 获取全部模型
*/
public function getModels()
{
$data = $this->request->params([
["addon","system"]
]);
return success((new GenerateService())->getModels($data));
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -37,9 +37,7 @@ class Config extends BaseAdminController
{
$data = $this->request->params([
['is_captcha', 0],
['is_site_captcha', 0],
['bg', ''],
['site_bg', ''],
]);
(new ConfigService())->setConfig($data);
return success('MODIFY_SUCCESS');

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -13,6 +13,7 @@ namespace app\adminapi\controller\login;
use app\service\admin\auth\ConfigService;
use app\service\admin\auth\LoginService;
use app\service\core\menu\CoreMenuService;
use core\base\BaseAdminController;
use think\Response;
@ -22,7 +23,7 @@ class Login extends BaseAdminController
* 登录
* @return Response
*/
public function login($app_type)
public function login()
{
$data = $this->request->params([
@ -31,7 +32,7 @@ class Login extends BaseAdminController
]);
//参数验证
//验证码验证
$result = (new LoginService())->login($data['username'], $data['password'], $app_type);
$result = (new LoginService())->login($data['username'], $data['password']);
if (!$result) {
//账号密码错误...., 重置验证码
return fail('USER_ERROR');
@ -59,4 +60,8 @@ class Login extends BaseAdminController
{
return success((new ConfigService())->getConfig());
}
public function test() {
(new CoreMenuService())->refreshAddonMenu('recharge');
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -0,0 +1,69 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\member;
use app\service\admin\member\MemberCollectService;
use core\base\BaseAdminController;
use think\Response;
class Collect extends BaseAdminController
{
/**
* 添加收藏
* @return Response
*/
public function setMemberCollect()
{
$data = $this->request->params([
['member_id', 0],
['goods_id', 0],
['type', ''],
]);
(new MemberCollectService())->setMemberCollect($data);
return success('MODIFY_SUCCESS');
}
/**
* 获取收藏信息(单条)
* @return Response
*/
public function getCollect()
{
$data = $this->request->params([
['member_id', 0],
['goods_id', 0],
['type', ''],
]);
return success((new MemberCollectService())->getCollectOne($data));
}
/**
* 获取提现设置
* @return Response
*/
public function getList()
{
$data = $this->request->params([
['member_id', ''],
['type', ''],
]);
return success((new MemberCollectService())->getCollectList($data));
}
/**
* 取消收藏
*/
public function del($id)
{
return success((new MemberCollectService())->del($id));
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -35,6 +35,7 @@ class Member extends BaseAdminController
['register_channel', ''],
['create_time', []],
['member_label', 0],
['status', 0],
]);
return success((new MemberService())->getPage($data));
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -14,7 +14,6 @@ namespace app\adminapi\controller\niucloud;
use app\service\admin\niucloud\NiucloudService;
use app\service\core\niucloud\CoreAuthService;
use core\base\BaseAdminController;
use think\Response;
class Module extends BaseAdminController
{
@ -32,7 +31,7 @@ class Module extends BaseAdminController
['auth_code', ''],
['auth_secret', '']
]);
$this->validate($data, 'app\validate\niucloud\Module.set');
return success("SUCCESS", (new NiucloudService())->setAuthorize($data));
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,119 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\order;
use app\service\admin\order\RechargeOrderRefundService;
use app\service\admin\order\RechargeOrderService;
use core\base\BaseAdminController;
use think\Response;
class Recharge extends BaseAdminController
{
/**
* 充值订单列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
['order_no', ''],
['order_status', ''],
['order_from', ''],
['create_time', []],
['pay_time', []],
['member_id', ''],
['start_money', 0],
['end_money', 0]
]);
return success((new RechargeOrderService())->getPage($data));
}
/**
* 充值订单详情
* @param int $order_id
* @return Response
*/
public function detail(int $order_id)
{
return success((new RechargeOrderService())->getDetail($order_id));
}
public function status()
{
return success((new RechargeOrderService())->getStatus());
}
public function refund($order_id)
{
$res = (new RechargeOrderRefundService())->create($order_id);
if ($res === true) return success();
return fail($res);
}
/**
* 退款列表
* @return Response
*/
public function refundLists()
{
$data = $this->request->params([
['create_time', []],
['member_id', ''],
['refund_no', ''],
['status', ''],
['keywords', ''],
['order_no', ''],
]);
return success((new RechargeOrderRefundService())->getPage($data));
}
/**
* 退款详情
* @param int $refund_id
* @return Response
*/
public function refundDetail(int $refund_id)
{
return success((new RechargeOrderRefundService())->getDetail($refund_id));
}
/**
* 查询退款状态
* @return Response
*/
public function refundStatus()
{
return success((new RechargeOrderRefundService())->getStatus());
}
/**
* 退款统计
*/
public function refundStat()
{
return success((new RechargeOrderRefundService())->stat());
}
/**
* 充值统计
*/
public function stat()
{
$data = $this->request->params([
['member_id', ''],
]);
$res = (new RechargeOrderService())->stat($data);
return success($res);
}
}

View File

@ -0,0 +1,56 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\pay;
use app\dict\pay\AccountLogDict;
use app\service\admin\pay\AccountLogService;
use core\base\BaseAdminController;
use think\Response;
class Account extends BaseAdminController
{
/**
* 账单列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
['type', ''],
['create_time', []],
]);
return success((new AccountLogService())->getPage($data));
}
/**
* 账单详情
* @param int $id
* @return Response
*/
public function info(int $id)
{
return success((new AccountLogService())->getInfo($id));
}
/**
* 累计账单
*/
public function stat()
{
return success((new AccountLogService())->stat());
}
public function accountType()
{
return success(AccountLogDict::getType());
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -11,7 +11,6 @@
namespace app\adminapi\controller\pay;
use app\dict\pay\PayDict;
use app\service\admin\pay\PayService;
use core\base\BaseAdminController;

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,130 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\site;
use app\dict\site\SiteDict;
use app\service\admin\auth\AuthSiteService;
use app\service\admin\site\SiteService;
use core\base\BaseAdminController;
use think\Response;
class Site extends BaseAdminController
{
/**
* 站点列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
['keywords', ''],
['status', ""],
['group_id', 0],
['create_time', []],
['expire_time', []],
]);
return success((new SiteService())->getPage($data));
}
/**
* 站点详情
* @param int $id
* @return Response
*/
public function info(int $id)
{
return success((new SiteService())->getInfo($id));
}
/**
* 添加站点
* ['site_name' => '', 'username' => '', 'head_img' => '', 'real_name' => '', 'password' => '', 'expire_time' => 0]
* @return Response
*/
public function add()
{
$data = $this->request->params([
['site_name', ''],
['username', ''],
['real_name', ''],
['password', ''],
['group_id', 0],
['expire_time', 0]
]);
$this->validate($data, 'app\validate\site\Site.add');
$this->validate($data, 'app\validate\sys\User.add');
$site_id = (new SiteService())->add($data);
return success('ADD_SUCCESS', ['site_id' => $site_id]);
}
/**
* 站点状态
* @return Response
*/
public function getStatuList()
{
return success(SiteDict::getStatus());
}
/**
* 站点菜单
* @return Response
*/
public function menu()
{
return success((new AuthSiteService())->getMenuList(1, 'all'));
}
/**
* 关闭站点
*/
public function closeSite($id)
{
$data = $this->request->params([
['status', SiteDict::CLOSE],
]);
(new SiteService())->edit($id, $data);
return success();
}
/**
* 菜单或接口更新
*/
public function edit($id)
{
$data = $this->request->params([
['site_name', ''],
['group_id', 0],
['expire_time', 0]
]);
$this->validate($data, 'app\validate\site\Site.edit');
(new SiteService())->edit($id, $data);
return success('MODIFY_SUCCESS');
}
/**
* 开启站点
*/
public function openSite($id)
{
$data = $this->request->params([
['status', SiteDict::ON],
]);
(new SiteService())->edit($id, $data);
return success();
}
public function indexConfig()
{
}
}

View File

@ -1,56 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\site;
use app\dict\site\SiteAccountLogDict;
use app\service\admin\site\SiteAccountLogService;
use core\base\BaseAdminController;
use think\Response;
class SiteAccount extends BaseAdminController
{
/**
* 账单列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
['type', ''],
['create_time', []],
]);
return success((new SiteAccountLogService())->getPage($data));
}
/**
* 账单详情
* @param int $id
* @return Response
*/
public function info(int $id)
{
return success((new SiteAccountLogService())->getInfo($id));
}
/**
* 累计账单
*/
public function stat()
{
return success((new SiteAccountLogService())->stat());
}
public function accountType()
{
return success(SiteAccountLogDict::getType());
}
}

View File

@ -1,103 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\site;
use app\service\admin\site\SiteGroupService;
use core\base\BaseAdminController;
use Exception;
use think\Response;
/**
* 站点分组
* Class SiteGroup
* @package app\adminapi\controller\site
*/
class SiteGroup extends BaseAdminController
{
/**
* 站点列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
['keywords', ''],
]);
return success((new SiteGroupService())->getPage($data));
}
/**
* 分组详情
* @param int $group_id
* @return Response
*/
public function info(int $group_id)
{
return success((new SiteGroupService())->getInfo($group_id));
}
/**
* 添加分组
* @return Response
* @throws Exception
*/
public function add()
{
$data = $this->request->params([
['group_name', ''],
['group_desc', ''],
['group_roles', ''],
]);
$this->validate($data, 'app\validate\site\SiteGroup.add');
$group_id = (new SiteGroupService())->add($data);
return success('ADD_SUCCESS', ['group_id' => $group_id]);
}
/**
* 编辑分组
* @param $group_id
* @return Response
*/
public function edit($group_id)
{
$data = $this->request->params([
['group_name', ''],
['group_desc', ''],
['group_roles', ''],
]);
$this->validate($data, 'app\validate\site\SiteGroup.add');
(new SiteGroupService())->edit($group_id, $data);
return success('EDIT_SUCCESS');
}
/**
* 删除分组
* @param $group_id
* @return Response
*/
public function del($group_id)
{
(new SiteGroupService())->del($group_id);
return success('DELETE_SUCCESS');
}
/**
* 所有分组
* @return Response
*/
public function all()
{
return success((new SiteGroupService())->getAll());
}
}

View File

@ -1,138 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\site;
use app\dict\sys\UserDict;
use app\service\admin\site\SiteUserService;
use app\service\admin\user\UserService;
use core\base\BaseAdminController;
use Exception;
use think\Response;
/**
* 站点用户接口
* Class User
* @package app\adminapi\controller\site
*/
class User extends BaseAdminController
{
public function lists()
{
$data = $this->request->params([
['username', ''],
['realname', ''],
['role', ''],
['create_time', []],
]);
$list = (new SiteUserService())->getPage($data);
return success($list);
}
/**
* 用户详情
* @param $uid
* @return Response
*/
public function info($uid)
{
return success((new SiteUserService())->getInfo($uid));
}
/**
* 新增用户
* @return Response
* @throws Exception
*/
public function add()
{
$data = $this->request->params([
['username', ''],
['password', ''],
['real_name', ''],
['head_img', ''],
['status', UserDict::ON],
['role_ids', []]
]);
$this->validate($data, 'app\validate\sys\User.add');
$uid = (new SiteUserService())->add($data);
return success('ADD_SUCCESS', ['uid' => $uid]);
}
/**
* 更新用户
*/
public function edit($uid)
{
$data = $this->request->params([
['real_name', ''],
['head_img', ''],
['status', UserDict::ON],
['role_ids', []],
['password', '']
]);
(new SiteUserService())->edit($uid, $data);
return success('MODIFY_SUCCESS');
}
/**
* 更新字段
* @param $uid
* @param $field
* @return Response
*/
public function modify($uid, $field)
{
$data = $this->request->params([
['value', ''],
['field', $field]
]);
$data[$field] = $data['value'];
// $this->validate($data, 'app\validate\sys\User.modify');
(new SiteUserService())->modify($uid, $field, $data['value']);
return success('MODIFY_SUCCESS');
}
/**
* 删除单个用户
* @param $uid
* @return Response
*/
public function del($uid)
{
(new UserService())->del($uid);
return success('DELETE_SUCCESS');
}
/**
* 锁定用户
*/
public function lock($uid)
{
(new SiteUserService())->lock($uid);
return success('MODIFY_SUCCESS');
}
/**
* 解锁用户
*/
public function unlock($uid)
{
(new SiteUserService())->unlock($uid);
return success('MODIFY_SUCCESS');
}
}

View File

@ -1,35 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\stat;
use app\service\admin\stat\SiteStatService;
use core\base\BaseAdminController;
use think\Response;
/**
* 统计数据
* Class Stat
* @package app\adminapi\controller\stat
*/
class SiteStat extends BaseAdminController
{
/**
* 首页数据
* @return Response
*/
public function index()
{
$data = (new SiteStatService())->getIndexData();
return success($data);
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -23,7 +23,7 @@ class Config extends BaseAdminController
*/
public function getWebsite()
{
return success((new ConfigService())->getWebSite());
return success(( new ConfigService() )->getWebSite());
}
/**
@ -33,35 +33,25 @@ class Config extends BaseAdminController
public function setWebsite()
{
$data = $this->request->params([
["site_name", ""],
["logo", ""],
["keywords", ""],
["desc", ""],
["latitude", ""],
["longitude", ""],
["province_id", 0],
["city_id", 0],
["district_id", 0],
["address", ""],
["full_address", ""],
["phone", ""],
["business_hours", ""],
["site_name", ""],
["logo", ""],
["front_end_name", ""],
["front_end_logo", ""],
["icon", ""]
[ 'site_name', '' ],
[ 'logo', '' ],
[ 'keywords', '' ],
[ 'desc', '' ],
[ 'latitude', '' ],
[ 'longitude', '' ],
[ 'province_id', 0 ],
[ 'city_id', 0 ],
[ 'district_id', 0 ],
[ 'address', '' ],
[ 'full_address', '' ],
[ 'phone', '' ],
[ 'business_hours', '' ],
[ 'front_end_name', '' ],
[ 'front_end_logo', '' ],
[ 'icon', '' ],
]);
$this->validate($data, 'app\validate\site\Site.edit');
(new ConfigService())->setWebSite($data);
$service_data = $this->request->params([
["wechat_code", ""],
["enterprise_wechat", ""],
["tel", ""],
]);
(new ConfigService())->setService($service_data);
( new ConfigService() )->setWebSite($data);
return success();
}
@ -71,7 +61,7 @@ class Config extends BaseAdminController
*/
public function getCopyright()
{
return success((new ConfigService())->getCopyright());
return success(( new ConfigService() )->getCopyright());
}
/**设置版权信息
@ -80,16 +70,16 @@ class Config extends BaseAdminController
public function setCopyright()
{
$data = $this->request->params([
['icp', ''],
['gov_record', ''],
['gov_url', ''],
['market_supervision_url', ''],
['logo', ''],
['company_name', ''],
['copyright_link', ''],
['copyright_desc', ''],
[ 'icp', '' ],
[ 'gov_record', '' ],
[ 'gov_url', '' ],
[ 'market_supervision_url', '' ],
[ 'logo', '' ],
[ 'company_name', '' ],
[ 'copyright_link', '' ],
[ 'copyright_desc', '' ],
]);
(new ConfigService())->setCopyright($data);
( new ConfigService() )->setCopyright($data);
return success();
}
@ -99,16 +89,7 @@ class Config extends BaseAdminController
*/
public function getSceneDomain()
{
return success((new ConfigService())->getSceneDomain());
}
/**
* 获取服务信息
* @return Response
*/
public function getServiceInfo()
{
return success((new ConfigService())->getService());
return success(( new ConfigService() )->getSceneDomain());
}
/**设置版权信息
@ -117,9 +98,9 @@ class Config extends BaseAdminController
public function setMap()
{
$data = $this->request->params([
['key', ''],
[ 'key', '' ],
]);
(new ConfigService())->setMap($data);
( new ConfigService() )->setMap($data);
return success();
}
@ -129,27 +110,7 @@ class Config extends BaseAdminController
*/
public function getMap()
{
return success((new ConfigService())->getMap());
}
/**
* 获取站点首页列表如果正在使用is_use = 1
*/
public function getSiteIndexList()
{
return success((new ConfigService())->getSiteIndexList());
}
/**
* 首页配置
*/
public function setSiteIndex()
{
$data = $this->request->params([
['view_path', ''],
]);
(new ConfigService())->setSiteIndexConfig($data);
return success();
return success(( new ConfigService() )->getMap());
}
/**
@ -157,7 +118,19 @@ class Config extends BaseAdminController
*/
public function getAdminIndexList()
{
return success((new ConfigService())->getAdminIndexList());
return success(( new ConfigService() )->getAdminIndexList());
}
/**
* 获取手机端首页列表
*/
public function getWapIndexList()
{
$data = $this->request->params([
[ 'title', '' ],
[ 'key', '' ] // 多个查询,逗号隔开
]);
return success(( new ConfigService() )->getWapIndexList($data));
}
/**
@ -166,9 +139,9 @@ class Config extends BaseAdminController
public function setAdminIndex()
{
$data = $this->request->params([
['view_path', ''],
[ 'view_path', '' ],
]);
(new ConfigService())->setAdminIndexConfig($data);
( new ConfigService() )->setAdminIndexConfig($data);
return success();
}
@ -178,9 +151,9 @@ class Config extends BaseAdminController
public function setShortcutMenu()
{
$data = $this->request->params([
['menu', []],
[ 'menu', [] ],
]);
(new ConfigService())->setShortcutMenu($data['menu']);
( new ConfigService() )->setShortcutMenu($data[ 'menu' ]);
return success();
}
@ -189,6 +162,6 @@ class Config extends BaseAdminController
*/
public function getShortcutMenu()
{
return success(data: (new ConfigService())->getShortcutMenu());
return success(data: ( new ConfigService() )->getShortcutMenu());
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -23,13 +23,12 @@ class Menu extends BaseAdminController
{
/**
* 菜单列表(todo 限制只有平台端可以访问)
* 菜单列表
* @return Response
*/
public function lists($app_type)
public function lists()
{
return success((new MenuService())->getAllMenuList($app_type, 'all', 1));
return success((new MenuService())->getAllMenuList('all', 1));
}
/**
@ -53,7 +52,6 @@ class Menu extends BaseAdminController
['menu_type', 0],
['menu_key', ''],
['parent_key', ''],
['app_type', ''],
['icon', ''],
['api_url', ''],
['view_path', ''],
@ -64,6 +62,8 @@ class Menu extends BaseAdminController
['status', MenuDict::ON],
['is_show', 0],
['addon', ''],
]);
$this->validate($data, 'app\validate\sys\Menu.add');
(new MenuService())->add($data);
@ -90,6 +90,8 @@ class Menu extends BaseAdminController
['status', MenuDict::ON],
['is_show', 0],
['addon', ''],
]);
$this->validate($data, 'app\validate\sys\Menu.edit');
(new MenuService())->edit($menu_key, $data);
@ -131,4 +133,24 @@ class Menu extends BaseAdminController
(new InstallSystemService())->install();
return success('REFRESH_SUCCESS');
}
/**
* 查询菜单信息
*/
public function getSystem()
{
return success( (new MenuService())->getSystemMenu('all', 1));
}
/**
* 查询应用权限信息
*/
public function getAddonMenu($app_key)
{
return success( (new MenuService())->getAddonMenu($app_key,'all', 1));
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -60,6 +60,7 @@ class Role extends BaseAdminController
['status', RoleStatusDict::ON],
]);
$this->validate($data, 'app\validate\sys\Role.add');
(new RoleService())->add($data);
return success('ADD_SUCCESS');
}
@ -93,4 +94,12 @@ class Role extends BaseAdminController
return success('DELETE_SUCCESS');
}
/**
* 状态修改
*/
public function setStatus(int $id, int $status)
{
(new RoleService())->setStatus($id, $status);
return success('SET_SUCCESS');
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -28,7 +28,7 @@ class System extends BaseAdminController
*/
public function info()
{
return success((new SystemService())->getInfo());
return success(( new SystemService() )->getInfo());
}
/**
@ -37,7 +37,7 @@ class System extends BaseAdminController
*/
public function url()
{
return success((new SystemService())->getUrl());
return success(( new SystemService() )->getUrl());
}
/**
@ -46,7 +46,7 @@ class System extends BaseAdminController
*/
public function getSystemInfo()
{
return success((new SystemService())->getSystemInfo());
return success(( new SystemService() )->getSystemInfo());
}
/**
@ -55,7 +55,7 @@ class System extends BaseAdminController
public function schemaCache()
{
return success((new SystemService())->schemaCache());
return success(( new SystemService() )->schemaCache());
}
/**
@ -64,7 +64,7 @@ class System extends BaseAdminController
*/
public function checkJob()
{
return success(data: (new SystemService())->checkJob());
return success(data: ( new SystemService() )->checkJob());
}
/**
@ -73,14 +73,15 @@ class System extends BaseAdminController
*/
public function checkSchedule()
{
return success(data: (new SystemService())->checkSchedule());
return success(data: ( new SystemService() )->checkSchedule());
}
/**
* 获取布局
* @return Response
*/
public function layout() {
public function layout()
{
$layouts = event('SiteLayout');
if (count($layouts) > 1) {
array_multisort(array_column($layouts, 'sort'), SORT_ASC, $layouts);
@ -93,8 +94,9 @@ class System extends BaseAdminController
* 设置布局
* @return Response
*/
public function setLayout(){
public function setLayout()
{
$key = input('key', '');
return success(data: (new SystemService())->setLayout($key));
return success(data: ( new SystemService() )->setLayout($key));
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -11,20 +11,27 @@
namespace app\adminapi\controller\user;
use app\dict\sys\UserDict;
use app\service\admin\user\UserService;
use core\base\BaseAdminController;
use Exception;
use think\Response;
/**
* 站点用户接口
* Class User
*/
class User extends BaseAdminController
{
public function lists()
{
$data = $this->request->params([
['username', ''],
['real_name', '']
['realname', ''],
['role', ''],
['create_time', []],
]);
$list = (new UserService())->getUserAdminPage($data);
$list = (new UserService())->getPage($data);
return success($list);
}
@ -36,7 +43,95 @@ class User extends BaseAdminController
*/
public function info($uid)
{
return success((new UserService())->getUserAdminInfo($uid));
if(!is_numeric($uid))
{
$uid = 0;
}
return success((new UserService())->getInfo($uid));
}
/**
* 新增用户
* @return Response
* @throws Exception
*/
public function add()
{
$data = $this->request->params([
['username', ''],
['password', ''],
['real_name', ''],
['head_img', ''],
['status', UserDict::ON],
['role_ids', []]
]);
$this->validate($data, 'app\validate\sys\User.add');
$uid = (new UserService())->addUser($data);
return success('ADD_SUCCESS', ['uid' => $uid]);
}
/**
* 更新用户
*/
public function edit($uid)
{
$data = $this->request->params([
['real_name', ''],
['head_img', ''],
['status', UserDict::ON],
['role_ids', []],
['password', '']
]);
(new UserService())->editUser($uid, $data);
return success('MODIFY_SUCCESS');
}
/**
* 更新字段
* @param $uid
* @param $field
* @return Response
*/
public function modify($uid, $field)
{
$data = $this->request->params([
['value', ''],
['field', $field]
]);
$data[$field] = $data['value'];
// $this->validate($data, 'app\validate\sys\User.modify');
(new UserService())->modify($uid, $field, $data['value']);
return success('MODIFY_SUCCESS');
}
/**
* 删除单个用户
* @param $uid
* @return Response
*/
public function del($uid)
{
(new UserService())->del($uid);
return success('DELETE_SUCCESS');
}
/**
* 锁定用户
*/
public function lock($uid)
{
(new UserService())->lock($uid);
return success('MODIFY_SUCCESS');
}
/**
* 解锁用户
*/
public function unlock($uid)
{
(new UserService())->unlock($uid);
return success('MODIFY_SUCCESS');
}

View File

@ -1,17 +1,17 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\site;
namespace app\adminapi\controller\user;
use app\service\admin\site\UserLogService;
use app\service\admin\user\UserLogService;
use core\base\BaseAdminController;
use think\Response;

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -40,7 +40,8 @@ class Config extends BaseAdminController
['token', ''],
['encoding_aes_key', ''],
['qr_code', ''],
['encryption_type', '']
['encryption_type', ''],
['upload_private_key', '']
]);
$this->validate($data, 'app\validate\channel\Weapp.set');
(new WeappConfigService())->setWeappConfig($data);

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
@ -11,25 +11,59 @@
namespace app\adminapi\controller\weapp;
use app\dict\sys\FileDict;
use core\base\BaseAdminController;
use app\service\admin\weapp\WeappPackageService;
class Package extends BaseAdminController
{
/**
* 版本列表
* @return Response
*/
public function lists()
{
return success();
$data = $this->request->params([
]);
return success((new WeappPackageService())->getPage($data));
}
/**
* 版本详情
* @param int $id
* @return Response
*/
public function info(int $id)
{
return success((new WeappPackageService())->getInfo($id));
}
/**
* 添加版本
* @return Response
*/
public function add()
{
$data = $this->request->params([
['version', ''],
['code', ''],
['path', ''],
['desc', ''],
['config', []],
['content', '']
]);
$id = (new WeappPackageService())->add($data);
return success('ADD_SUCCESS', ['id' => $id]);
}
/**
* 文件上传(默认不上云)
* @return Response
*/
public function document()
{
$data = $this->request->params([
['file', 'file'],
]);
$upload_service = new WeappPackageService();
return success($upload_service->document($data['file'], FileDict::APPLET));
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -0,0 +1,112 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\weapp;
use app\service\admin\weapp\WeappVersionService;
use core\base\BaseAdminController;
use Exception;
use think\Response;
/**
* 小程序版本管理控制器
*/
class Version extends BaseAdminController
{
/**
* 列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
]);
return success((new WeappVersionService())->getPage($data));
}
/**
* 详情
* @param int $id
* @return Response
*/
public function info(int $id)
{
return success((new WeappVersionService())->getInfo($id));
}
/**
* 添加
* @return Response
*/
public function add()
{
$data = $this->request->params([
['desc', '']
]);
$id = (new WeappVersionService())->add($data);
return success('ADD_SUCCESS');
}
/**
* 获取预览码
* @param int $id
* @return Response
*/
public function preview()
{
return success(data:(new WeappVersionService())->getPreviewImage());
}
/**
* 删除
* @param int $id
* @return Response
*/
public function del(int $id)
{
(new WeappVersionService())->del($id);
return success('DELETE_SUCCESS');
}
/**
* 设置状态
* @param int $id
* @param $status
* @return Response
*/
public function setStatus(int $id, $status)
{
(new WeappVersionService())->setStatus($id, $status);
return success('EDIT_SUCCESS');
}
/**
* 小程序包上传
* @return Response
* @throws Exception
*/
public function document()
{
$data = $this->request->params([
['file', 'file'],
]);
return success(data: (new WeappVersionService())->document($data['file']));
}
public function examine()
{
$data = $this->request->params([
['id', ''],
]);
(new WeappVersionService())->weappExamine($data['id']);
}
}

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show More