fix 同步niucloud

This commit is contained in:
CQ
2026-03-19 14:23:15 +08:00
parent 9f9ed9a0e3
commit ddf0fa3384
851 changed files with 1540 additions and 725 deletions

View File

@@ -0,0 +1,90 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\notice;
use app\service\admin\notice\BindMerchantService;
use core\base\BaseAdminController;
use think\Response;
class BindMerchant extends BaseAdminController
{
/**
* 获取商家绑定通知账户信息
* @description 获取商家绑定通知账户信息
* @return Response
*/
public function merchantBindInfo()
{
$res = (new BindMerchantService())->merchantBindInfo();
return success($res);
}
/**
* 接触商家绑定通知账户
* @description 接触商家绑定通知账户
* @return Response
*/
public function unBindMerchant()
{
$data = $this->request->params([
['unbind_type',[]]
]);
(new BindMerchantService())->unBindMerchant($data);
return success('SUCCESS');
}
/**
* 获取小程序二维码
* @return \think\Response
*/
public function getWeappQrcodeUrl()
{
$res = (new BindMerchantService())->getWeappQrcode();
return success($res);
}
/**
* 获取微信二维码地址
* @return \think\Response
*/
public function getWechatQrcodeUrl()
{
$res = (new BindMerchantService())->getWechatUrl();
return success($res);
}
/**
* 发送短信验证码
* @return Response
*/
public function sendBindSms()
{
$mobile = $this->request->param('mobile');
$res = (new BindMerchantService())->sendBindSms($mobile);
return success($res);
}
/**
* 检测短信验证码
* @return Response
*/
public function checkSmsCodeAndBind()
{
$params = $this->request->params([
['mobile_key',''],
['mobile_code',''],
['mobile','']
]);
$res = (new BindMerchantService())->checkMobileCode($params);
return success('SUCCESS');
}
}

View File

@@ -264,6 +264,15 @@ class NiuSms extends BaseAdminController
['signType', ""],
['imgUrl', ""],
['defaultSign', 0],
//新增字段
['bizLicenseUrl', ''],
['qccUrl', ''],
['tmnetUrl', ''],
['mobileIcpUrl', ''],
['telecomAppstoreUrl', ''],
['idcardFrontUrl', ''],
['idcardBackUrl', ''],
]);
(new NiuSmsService())->signCreate($username, $params);
return success("SUCCESS");

View File

@@ -88,6 +88,15 @@ Route::group('notice', function () {
});
});
//商家消息通知
Route::get('bind/weapp', 'notice.BindMerchant/getWeappQrcodeUrl');
Route::get('bind/wechat', 'notice.BindMerchant/getWechatQrcodeUrl');
Route::post('bind/sms/send', 'notice.BindMerchant/sendBindSms');
Route::post('bind/sms/bind', 'notice.BindMerchant/checkSmsCodeAndBind');
Route::get('bind/info', 'notice.BindMerchant/merchantBindInfo');
Route::post('bind/cancel', 'notice.BindMerchant/unBindMerchant');
})->middleware([
AdminCheckToken::class,
AdminCheckRole::class,

View File

@@ -78,8 +78,6 @@ Route::group('sys', function() {
//地图设置
Route::put('config/map', 'sys.Config/setMap');
//地图设置
Route::get('config/map', 'sys.Config/getMap');
//登录注册设置
Route::get('config/login', 'login.Config/getConfig');
@@ -339,6 +337,14 @@ Route::group('sys', function() {
AdminLog::class
]);
//检验登录但是不检验权限
Route::group('sys', function() {
//地图设置
Route::get('config/map', 'sys.Config/getMap');
})->middleware([
AdminCheckToken::class,
AdminLog::class
]);
//系统环境(不效验登录状态)
Route::group('sys', function() {
Route::get('web/website', 'sys.Config/getWebsite');

View File

@@ -21,6 +21,7 @@ use think\facade\Route;
Route::group('weapp', function() {
/***************************************************** 微信配置 ****************************************************/
Route::get('auth_url', 'weapp.Auth/getWeappQrcodeUrl');
Route::get('config', 'weapp.Config/get');
//设置微信配置
Route::put('config', 'weapp.Config/set');

View File

@@ -19,6 +19,7 @@ use think\facade\Route;
* 路由
*/
Route::group('wechat', function () {
Route::get('auth_url', 'wechat.Auth/getWechatQrcodeUrl');
/***************************************************** 微信配置 ****************************************************/
Route::get('config', 'wechat.Config/get');
@@ -76,4 +77,4 @@ Route::group('wechat', function () {
AdminCheckToken::class,
AdminCheckRole::class,
AdminLog::class
]);
]);