This commit is contained in:
wangchen147
2023-11-25 17:40:50 +08:00
parent 36967076d4
commit a0c9a04155
1366 changed files with 58386 additions and 70209 deletions

View File

@@ -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

@@ -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));
}
}