mirror of
https://gitee.com/niucloud-team/niucloud
synced 2026-08-14 17:35:36 +08:00
0.0.3
This commit is contained in:
@@ -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);
|
||||
|
||||
87
niucloud/app/adminapi/controller/weapp/Version.php
Normal file
87
niucloud/app/adminapi/controller/weapp/Version.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?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', '']
|
||||
]);
|
||||
return success(data:(new WeappVersionService())->add($data));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取预览码
|
||||
* @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 string $key
|
||||
* @return Response
|
||||
*/
|
||||
public function uploadLog(string $key) {
|
||||
return success(data: (new WeappVersionService())->getUploadLog($key));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user