mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-13 19:22:48 +00:00
up
This commit is contained in:
parent
154a6b5e02
commit
ad6298a9a9
@ -25,16 +25,16 @@ class AddonDevelop extends BaseAdminController
|
||||
public function lists()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['search', '']
|
||||
[ 'search', '' ]
|
||||
]);
|
||||
return success((new AddonDevelopService())->getList($data['search']));
|
||||
return success(( new AddonDevelopService() )->getList($data[ 'search' ]));
|
||||
}
|
||||
|
||||
|
||||
public function info($key)
|
||||
{
|
||||
return success((new AddonDevelopService())->getInfo($key));
|
||||
return success(( new AddonDevelopService() )->getInfo($key));
|
||||
}
|
||||
|
||||
/**
|
||||
* 开发插件新增
|
||||
* @return Response
|
||||
@ -42,19 +42,19 @@ class AddonDevelop extends BaseAdminController
|
||||
public function add(string $key)
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['title', ''],
|
||||
['desc', ''],
|
||||
['icon', ''],
|
||||
['cover', ''],
|
||||
['key', ''],
|
||||
['author', ''],
|
||||
['version', ''],
|
||||
['type', ''],
|
||||
['support_app', ''],
|
||||
[ 'title', '' ],
|
||||
[ 'desc', '' ],
|
||||
[ 'icon', '' ],
|
||||
[ 'cover', '' ],
|
||||
[ 'key', '' ],
|
||||
[ 'author', '' ],
|
||||
[ 'version', '' ],
|
||||
[ 'type', '' ],
|
||||
[ 'support_app', '' ],
|
||||
], false);
|
||||
$data['key'] = $key;
|
||||
$data[ 'key' ] = $key;
|
||||
$this->validate($data, 'app\validate\addon\AddonDevelop.add');
|
||||
(new AddonDevelopService())->add($key, $data);
|
||||
( new AddonDevelopService() )->add($key, $data);
|
||||
return success('ADD_SUCCESS');
|
||||
}
|
||||
|
||||
@ -66,19 +66,19 @@ class AddonDevelop extends BaseAdminController
|
||||
public function edit(string $key)
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['title', ''],
|
||||
['desc', ''],
|
||||
['icon', ''],
|
||||
['cover', ''],
|
||||
['key', ''],
|
||||
['author', ''],
|
||||
['version', ''],
|
||||
['type', ''],
|
||||
['support_app', ''],
|
||||
[ 'title', '' ],
|
||||
[ 'desc', '' ],
|
||||
[ 'icon', '' ],
|
||||
[ 'cover', '' ],
|
||||
[ 'key', '' ],
|
||||
[ 'author', '' ],
|
||||
[ 'version', '' ],
|
||||
[ 'type', '' ],
|
||||
[ 'support_app', '' ],
|
||||
], false);
|
||||
$data['key'] = $key;
|
||||
$data[ 'key' ] = $key;
|
||||
$this->validate($data, 'app\validate\addon\AddonDevelop.edit');
|
||||
(new AddonDevelopService())->edit($key, $data);
|
||||
( new AddonDevelopService() )->edit($key, $data);
|
||||
return success('EDIT_SUCCESS');
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ class AddonDevelop extends BaseAdminController
|
||||
*/
|
||||
public function del(string $key)
|
||||
{
|
||||
(new AddonDevelopService())->del($key);
|
||||
( new AddonDevelopService() )->del($key);
|
||||
return success('DELETE_SUCCESS');
|
||||
}
|
||||
|
||||
@ -99,8 +99,9 @@ class AddonDevelop extends BaseAdminController
|
||||
* @param $key
|
||||
* @return void
|
||||
*/
|
||||
public function checkKey($key){
|
||||
return success(data:(new AddonDevelopService())->checkKey($key));
|
||||
public function checkKey($key)
|
||||
{
|
||||
return success(data:( new AddonDevelopService() )->checkKey($key));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -108,8 +109,9 @@ class AddonDevelop extends BaseAdminController
|
||||
* @param $key
|
||||
* @return Response
|
||||
*/
|
||||
public function build($key){
|
||||
(new AddonDevelopService())->build($key);
|
||||
public function build($key)
|
||||
{
|
||||
( new AddonDevelopService() )->build($key);
|
||||
return success();
|
||||
}
|
||||
|
||||
@ -118,16 +120,18 @@ class AddonDevelop extends BaseAdminController
|
||||
* @param $key
|
||||
* @return Response
|
||||
*/
|
||||
public function download($key){
|
||||
public function download($key)
|
||||
{
|
||||
|
||||
return success(data:(new AddonDevelopService())->download($key));
|
||||
return success(data:( new AddonDevelopService() )->download($key));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function keyBlackList() {
|
||||
public function keyBlackList()
|
||||
{
|
||||
return success(AddonDict::ADDON_KEY_BLACK_LIST);
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,8 +22,9 @@ class Upgrade extends BaseAdminController
|
||||
* @param $app_key
|
||||
* @return Response
|
||||
*/
|
||||
public function upgrade($addon = ''){
|
||||
return success(data:(new UpgradeService())->upgrade($addon));
|
||||
public function upgrade($addon = '')
|
||||
{
|
||||
return success(data:( new UpgradeService() )->upgrade($addon));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -31,8 +32,9 @@ class Upgrade extends BaseAdminController
|
||||
* @param $app_key
|
||||
* @return Response
|
||||
*/
|
||||
public function execute($addon = ''){
|
||||
return success(data:(new UpgradeService())->execute());
|
||||
public function execute($addon = '')
|
||||
{
|
||||
return success(data:( new UpgradeService() )->execute());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -40,16 +42,18 @@ class Upgrade extends BaseAdminController
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
public function getUpgradeContent($addon = '') {
|
||||
return success(data:(new UpgradeService())->getUpgradeContent($addon));
|
||||
public function getUpgradeContent($addon = '')
|
||||
{
|
||||
return success(data:( new UpgradeService() )->getUpgradeContent($addon));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取正在进行的升级任务
|
||||
* @return Response
|
||||
*/
|
||||
public function getUpgradeTask() {
|
||||
return success(data:(new UpgradeService())->getUpgradeTask());
|
||||
public function getUpgradeTask()
|
||||
{
|
||||
return success(data:( new UpgradeService() )->getUpgradeTask());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -57,15 +61,17 @@ class Upgrade extends BaseAdminController
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
public function upgradePreCheck($addon = '') {
|
||||
return success(data:(new UpgradeService())->upgradePreCheck($addon));
|
||||
public function upgradePreCheck($addon = '')
|
||||
{
|
||||
return success(data:( new UpgradeService() )->upgradePreCheck($addon));
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除
|
||||
* @return Response
|
||||
*/
|
||||
public function clearUpgradeTask() {
|
||||
return success(data:(new UpgradeService())->clearUpgradeTask());
|
||||
public function clearUpgradeTask()
|
||||
{
|
||||
return success(data:( new UpgradeService() )->clearUpgradeTask());
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,13 +26,13 @@ class Account extends BaseAdminController
|
||||
public function point()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
['from_type', ''],
|
||||
['create_time', []],
|
||||
['keywords', ''],
|
||||
[ 'member_id', '' ],
|
||||
[ 'from_type', '' ],
|
||||
[ 'create_time', [] ],
|
||||
[ 'keywords', '' ],
|
||||
]);
|
||||
$data['account_type'] = 'point';
|
||||
return success((new MemberAccountService())->getPage($data));
|
||||
$data[ 'account_type' ] = 'point';
|
||||
return success(( new MemberAccountService() )->getPage($data));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -41,22 +41,22 @@ class Account extends BaseAdminController
|
||||
public function sumPoint()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
[ 'member_id', '' ],
|
||||
]);
|
||||
$member_account_service = new MemberAccountService();
|
||||
$member_service = new MemberService();
|
||||
|
||||
if (empty($data['member_id'])) {
|
||||
if (empty($data[ 'member_id' ])) {
|
||||
$commission_data = [
|
||||
'point_get' => $member_service->getSum('point_get'),//累计
|
||||
'point_use' => abs($member_account_service->getExpensesSumAccount(MemberAccountTypeDict::POINT)),
|
||||
];
|
||||
return success($commission_data);
|
||||
} else {
|
||||
$info = $member_account_service->getMemberAccountInfo($data['member_id']);
|
||||
$info = $member_account_service->getMemberAccountInfo($data[ 'member_id' ]);
|
||||
$commission_data = [
|
||||
'point_get' => $info['point_get'],
|
||||
'point_use' => abs($member_account_service->getExpensesSumAccount(MemberAccountTypeDict::POINT, $data['member_id'])),
|
||||
'point_get' => $info[ 'point_get' ],
|
||||
'point_use' => abs($member_account_service->getExpensesSumAccount(MemberAccountTypeDict::POINT, $data[ 'member_id' ])),
|
||||
];
|
||||
return success($commission_data);
|
||||
}
|
||||
@ -69,13 +69,13 @@ class Account extends BaseAdminController
|
||||
public function balance()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
['from_type', ''],
|
||||
['create_time', []],
|
||||
['keywords', ''],
|
||||
[ 'member_id', '' ],
|
||||
[ 'from_type', '' ],
|
||||
[ 'create_time', [] ],
|
||||
[ 'keywords', '' ],
|
||||
]);
|
||||
$data['account_type'] = 'balance';
|
||||
return success((new MemberAccountService())->getPage($data));
|
||||
$data[ 'account_type' ] = 'balance';
|
||||
return success(( new MemberAccountService() )->getPage($data));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -85,28 +85,29 @@ class Account extends BaseAdminController
|
||||
public function money()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
['from_type', ''],
|
||||
['create_time', []],
|
||||
['keywords', ''],
|
||||
[ 'member_id', '' ],
|
||||
[ 'from_type', '' ],
|
||||
[ 'create_time', [] ],
|
||||
[ 'keywords', '' ],
|
||||
]);
|
||||
$data['account_type'] = 'money';
|
||||
return success((new MemberAccountService())->getPage($data));
|
||||
$data[ 'account_type' ] = 'money';
|
||||
return success(( new MemberAccountService() )->getPage($data));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成长值
|
||||
* @return Response
|
||||
*/
|
||||
public function growth() {
|
||||
public function growth()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
['from_type', ''],
|
||||
['create_time', []],
|
||||
['keywords', ''],
|
||||
[ 'member_id', '' ],
|
||||
[ 'from_type', '' ],
|
||||
[ 'create_time', [] ],
|
||||
[ 'keywords', '' ],
|
||||
]);
|
||||
$data['account_type'] = 'growth';
|
||||
return success((new MemberAccountService())->getPage($data));
|
||||
$data[ 'account_type' ] = 'growth';
|
||||
return success(( new MemberAccountService() )->getPage($data));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -115,12 +116,12 @@ class Account extends BaseAdminController
|
||||
public function adjustPoint()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
['account_data', 0],
|
||||
['memo', ''],
|
||||
[ 'member_id', '' ],
|
||||
[ 'account_data', 0 ],
|
||||
[ 'memo', '' ],
|
||||
]);
|
||||
$res = (new MemberAccountService())->adjustPoint($data);
|
||||
return success('SUCCESS', ['id' => $res]);
|
||||
$res = ( new MemberAccountService() )->adjustPoint($data);
|
||||
return success('SUCCESS', [ 'id' => $res ]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -129,12 +130,12 @@ class Account extends BaseAdminController
|
||||
public function adjustBalance()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
['account_data', 0],
|
||||
['memo', ''],
|
||||
[ 'member_id', '' ],
|
||||
[ 'account_data', 0 ],
|
||||
[ 'memo', '' ],
|
||||
]);
|
||||
$res = (new MemberAccountService())->adjustBalance($data);
|
||||
return success('SUCCESS', ['id' => $res]);
|
||||
$res = ( new MemberAccountService() )->adjustBalance($data);
|
||||
return success('SUCCESS', [ 'id' => $res ]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -144,12 +145,12 @@ class Account extends BaseAdminController
|
||||
public function adjustMoney()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
['account_data', 0],
|
||||
['memo', ''],
|
||||
[ 'member_id', '' ],
|
||||
[ 'account_data', 0 ],
|
||||
[ 'memo', '' ],
|
||||
]);
|
||||
$res = (new MemberAccountService())->adjustMoney($data);
|
||||
return success('SUCCESS', ['id' => $res]);
|
||||
$res = ( new MemberAccountService() )->adjustMoney($data);
|
||||
return success('SUCCESS', [ 'id' => $res ]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -159,13 +160,13 @@ class Account extends BaseAdminController
|
||||
public function commission()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
['from_type', ''],
|
||||
['create_time', []],
|
||||
['keywords', ''],
|
||||
[ 'member_id', '' ],
|
||||
[ 'from_type', '' ],
|
||||
[ 'create_time', [] ],
|
||||
[ 'keywords', '' ],
|
||||
]);
|
||||
$data['account_type'] = 'commission';
|
||||
return success((new MemberAccountService())->getPage($data));
|
||||
$data[ 'account_type' ] = 'commission';
|
||||
return success(( new MemberAccountService() )->getPage($data));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -174,12 +175,12 @@ class Account extends BaseAdminController
|
||||
public function sumCommission()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
[ 'member_id', '' ],
|
||||
]);
|
||||
$member_account_service = new MemberAccountService();
|
||||
$member_service = new MemberService();
|
||||
|
||||
if (empty($data['member_id'])) {
|
||||
if (empty($data[ 'member_id' ])) {
|
||||
$commission_data = [
|
||||
'total_commission' => $member_service->getSum('commission_get'),//累计
|
||||
'commission' => $member_service->getSum('commission'),//未提现
|
||||
@ -188,12 +189,12 @@ class Account extends BaseAdminController
|
||||
];
|
||||
return success($commission_data);
|
||||
} else {
|
||||
$info = $member_account_service->getMemberAccountInfo($data['member_id']);
|
||||
$info = $member_account_service->getMemberAccountInfo($data[ 'member_id' ]);
|
||||
$commission_data = [
|
||||
'commission' => $info['commission'],
|
||||
'commission_cash_outing' => $info['commission_cash_outing'],
|
||||
'withdrawn_commission' => $member_account_service->getWithdrawnCommission($data['member_id']),//已提现
|
||||
'total_commission' => $info['commission_get'],
|
||||
'commission' => $info[ 'commission' ],
|
||||
'commission_cash_outing' => $info[ 'commission_cash_outing' ],
|
||||
'withdrawn_commission' => $member_account_service->getWithdrawnCommission($data[ 'member_id' ]),//已提现
|
||||
'total_commission' => $info[ 'commission_get' ],
|
||||
];
|
||||
return success($commission_data);
|
||||
}
|
||||
@ -205,10 +206,10 @@ class Account extends BaseAdminController
|
||||
public function sumBalance()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['member_id', ''],
|
||||
[ 'member_id', '' ],
|
||||
]);
|
||||
$member_account_service = new MemberAccountService();
|
||||
if (empty($data['member_id'])) {
|
||||
if (empty($data[ 'member_id' ])) {
|
||||
|
||||
$balance_data = [
|
||||
MemberAccountTypeDict::BALANCE => number_format($member_account_service->getSumAccount(MemberAccountTypeDict::BALANCE), 2, '.', ''),
|
||||
@ -216,7 +217,7 @@ class Account extends BaseAdminController
|
||||
];
|
||||
return success($balance_data);
|
||||
} else {
|
||||
return success($member_account_service->getMemberAccountInfo($data['member_id']));
|
||||
return success($member_account_service->getMemberAccountInfo($data[ 'member_id' ]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,7 +228,7 @@ class Account extends BaseAdminController
|
||||
*/
|
||||
public function changeType(string $account_type)
|
||||
{
|
||||
$res = (new MemberAccountService())->getFromType($account_type);
|
||||
$res = ( new MemberAccountService() )->getFromType($account_type);
|
||||
return success($res);
|
||||
}
|
||||
|
||||
@ -239,5 +240,4 @@ class Account extends BaseAdminController
|
||||
return success(MemberAccountTypeDict::getType());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@ class Config extends BaseAdminController
|
||||
[ 'is_username', 1 ],
|
||||
[ 'is_mobile', 0 ],
|
||||
[ 'is_auth_register', 1 ],
|
||||
[ 'is_force_access_user_info', 0 ],
|
||||
[ 'is_bind_mobile', 0 ],
|
||||
[ 'agreement_show', 0 ],
|
||||
[ 'bg_url', '' ],
|
||||
|
||||
@ -32,18 +32,6 @@ class MemberLevel extends BaseAdminController
|
||||
return success(( new MemberLevelService() )->getPage($data));
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员等级列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
[ 'level_name', '' ],
|
||||
]);
|
||||
return success(( new MemberLevelService() )->getList($data));
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员等级详情
|
||||
* @param int $id
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
||||
// | Niucloud-admin 企业快速开发的saas管理平台
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网址:https://www.niucloud.com
|
||||
// +----------------------------------------------------------------------
|
||||
@ -36,4 +36,30 @@ class ScheduleLog extends BaseAdminController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计划任务执行记录
|
||||
* @return Response
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
[ 'ids', '' ],
|
||||
]);
|
||||
(new ScheduleLogService())->del($data[ 'ids' ]);
|
||||
return success('DELETE_SUCCESS');
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空计划任务执行记录
|
||||
* @return Response
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
[ 'schedule_id', '' ],
|
||||
]);
|
||||
(new ScheduleLogService())->clear($data);
|
||||
return success('SUCCESS');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -34,8 +34,8 @@ class Reply extends BaseAdminController
|
||||
public function getKeywordLists()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['keyword', ''],
|
||||
['name', '']
|
||||
[ 'keyword', '' ],
|
||||
[ 'name', '' ]
|
||||
]);
|
||||
$wechat_reply_service = new WechatReplyService();
|
||||
return success($wechat_reply_service->getKeywordPage($data));
|
||||
@ -49,12 +49,12 @@ class Reply extends BaseAdminController
|
||||
{
|
||||
$wechat_reply_service = new WechatReplyService();
|
||||
$data = $this->request->params([
|
||||
['name', ''],
|
||||
['keyword', ''],
|
||||
['matching_type', '', false],
|
||||
['reply_method', ''],
|
||||
['content', ''],
|
||||
['sort', ''],
|
||||
[ 'name', '' ],
|
||||
[ 'keyword', '' ],
|
||||
[ 'matching_type', '', false ],
|
||||
[ 'reply_method', '' ],
|
||||
[ 'content', '' ],
|
||||
[ 'sort', '' ],
|
||||
]);
|
||||
$wechat_reply_service->addKeyword($data);
|
||||
return success('ADD_SUCCESS');
|
||||
@ -68,12 +68,12 @@ class Reply extends BaseAdminController
|
||||
{
|
||||
$wechat_reply_service = new WechatReplyService();
|
||||
$data = $this->request->params([
|
||||
['name', ''],
|
||||
['keyword', ''],
|
||||
['matching_type', '', false],
|
||||
['reply_method', ''],
|
||||
['content', ''],
|
||||
['sort', ''],
|
||||
[ 'name', '' ],
|
||||
[ 'keyword', '' ],
|
||||
[ 'matching_type', '', false ],
|
||||
[ 'reply_method', '' ],
|
||||
[ 'content', '' ],
|
||||
[ 'sort', '' ],
|
||||
]);
|
||||
$wechat_reply_service->editKeyword($id, $data);
|
||||
return success('EDIT_SUCCESS');
|
||||
@ -107,7 +107,7 @@ class Reply extends BaseAdminController
|
||||
public function editDefault()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['content', ''],
|
||||
[ 'content', '' ],
|
||||
]);
|
||||
$wechat_reply_service = new WechatReplyService();
|
||||
$wechat_reply_service->editDefault($data);
|
||||
@ -131,12 +131,11 @@ class Reply extends BaseAdminController
|
||||
public function editSubscribe()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['content', ''],
|
||||
[ 'content', '' ],
|
||||
]);
|
||||
$wechat_reply_service = new WechatReplyService();
|
||||
$wechat_reply_service->editSubscribe($data);
|
||||
return success('SET_SUCCESS');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -28,10 +28,10 @@ class Template extends BaseAdminController
|
||||
public function sync()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['keys', []]
|
||||
[ 'keys', [] ]
|
||||
]);
|
||||
$wechat_template_service = new WechatTemplateService();
|
||||
return success(data:$wechat_template_service->syncAll($data['keys']));
|
||||
return success(data:$wechat_template_service->syncAll($data[ 'keys' ]));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -44,5 +44,4 @@ class Template extends BaseAdminController
|
||||
return success($wechat_template_service->getList());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -131,8 +131,6 @@ Route::group('member', function() {
|
||||
/***************************************************** 会员等级 ****************************************************/
|
||||
//会员等级分页列表
|
||||
Route::get('level', 'member.MemberLevel/pages');
|
||||
//会员等级列表
|
||||
Route::get('level/list', 'member.MemberLevel/lists');
|
||||
//会员等级详情
|
||||
Route::get('level/:id', 'member.MemberLevel/info');
|
||||
//会员等级添加
|
||||
|
||||
@ -191,6 +191,10 @@ Route::group('sys', function() {
|
||||
|
||||
//任务执行记录列表
|
||||
Route::get('schedule/log/list', 'sys.ScheduleLog/lists');
|
||||
//删除执行记录
|
||||
Route::put('schedule/log/delete', 'sys.ScheduleLog/del');
|
||||
//清空执行记录
|
||||
Route::put('schedule/log/clear', 'sys.ScheduleLog/clear');
|
||||
|
||||
/***************************************************** 应用管理 ****************************************************/
|
||||
Route::get('applist', 'sys.App/getAppList');
|
||||
|
||||
@ -23,9 +23,10 @@ class Config extends BaseController
|
||||
*/
|
||||
public function getLoginConfig()
|
||||
{
|
||||
|
||||
return success((new MemberConfigService())->getLoginConfig());
|
||||
$data = $this->request->params([
|
||||
[ 'url', '' ],
|
||||
]);
|
||||
return success(( new MemberConfigService() )->getLoginConfig($data[ 'url' ]));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -14,7 +14,10 @@ namespace app\api\controller\sys;
|
||||
use app\service\api\diy\DiyConfigService;
|
||||
use app\service\api\member\MemberConfigService;
|
||||
use app\service\api\member\MemberLevelService;
|
||||
use app\service\api\member\MemberService;
|
||||
use app\service\api\site\SiteService;
|
||||
use app\service\api\sys\ConfigService;
|
||||
use app\service\api\wechat\WechatAuthService;
|
||||
use core\base\BaseApiController;
|
||||
use think\Response;
|
||||
|
||||
@ -75,13 +78,18 @@ class Config extends BaseApiController
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
[ 'url', '' ],
|
||||
]);
|
||||
|
||||
$res = [];
|
||||
$res[ 'tabbar_list' ] = ( new DiyConfigService() )->getBottomList();
|
||||
$res[ 'map_config' ] = ( new ConfigService() )->getMap();
|
||||
$res[ 'site_info' ] = ( new ConfigService() )->getWebSite();
|
||||
$res[ 'member_level' ] = ( new MemberLevelService() )->getList();
|
||||
$res[ 'login_config' ] = ( new MemberConfigService() )->getLoginConfig();
|
||||
$res[ 'login_config' ] = ( new MemberConfigService() )->getLoginConfig($data[ 'url' ]);
|
||||
|
||||
( new MemberService() )->initMemberData();
|
||||
return success($res);
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,6 +224,21 @@ function get_start_and_end_time_by_day($day = '')
|
||||
return [ $day_start_time, $day_end_time ];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本周的 开始、结束时间
|
||||
* @param data 日期
|
||||
*/
|
||||
function get_weekinfo_by_time($date)
|
||||
{
|
||||
$idx = strftime("%u", strtotime($date));
|
||||
$mon_idx = $idx - 1;
|
||||
$sun_idx = $idx - 7;
|
||||
return array(
|
||||
'week_start_day' => strftime('%Y-%m-%d', strtotime($date) - $mon_idx * 86400),
|
||||
'week_end_day' => strftime('%Y-%m-%d', strtotime($date) - $sun_idx * 86400),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 路径转链接
|
||||
* @param $path
|
||||
|
||||
@ -190,6 +190,20 @@ class ComponentDict
|
||||
]
|
||||
]
|
||||
],
|
||||
// 轮播图设置
|
||||
'swiper' => [
|
||||
'indicatorColor' => 'rgba(0, 0, 0, 0.3)', // 未选中颜色
|
||||
"indicatorActiveColor" => '#FF0E0E',
|
||||
'indicatorStyle' => 'style-1',
|
||||
'indicatorAlign' => 'center'
|
||||
],
|
||||
'template' => [
|
||||
"margin" => [
|
||||
"top" => 10, // 上边距
|
||||
"bottom" => 10, // 下边距
|
||||
"both" => 0 // 左右边距
|
||||
],
|
||||
],
|
||||
]
|
||||
],
|
||||
'RubikCube' => [
|
||||
@ -261,7 +275,28 @@ class ComponentDict
|
||||
'value' => [
|
||||
"style" => "style-1",
|
||||
"styleName" => "风格1"
|
||||
],
|
||||
],// 组件属性
|
||||
'template' => [
|
||||
"textColor" => "#303133", // 文字颜色
|
||||
'pageStartBgColor' => '', // 底部背景颜色(开始)
|
||||
'pageEndBgColor' => '', // 底部背景颜色(结束)
|
||||
'pageGradientAngle' => 'to bottom', // 渐变角度,从上到下(to bottom)、从左到右(to right)
|
||||
'componentBgUrl' => '', // 组件背景图片
|
||||
'componentBgAlpha' => 2, // 组件背景图片的透明度,0~10
|
||||
"componentStartBgColor" => '', // 组件背景颜色(开始)
|
||||
"componentEndBgColor" => '', // 组件背景颜色(结束)
|
||||
"componentGradientAngle" => 'to bottom', // 渐变角度,上下(to bottom)、左右(to right)
|
||||
"topRounded" => 12, // 组件上圆角
|
||||
"bottomRounded" => 0, // 组件下圆角
|
||||
"elementBgColor" => '', // 元素背景颜色
|
||||
"topElementRounded" => 0,// 元素上圆角
|
||||
"bottomElementRounded" => 0, // 元素下圆角
|
||||
"margin" => [
|
||||
"top" => 0, // 上边距
|
||||
"bottom" => 0, // 下边距
|
||||
"both" => 10 // 左右边距
|
||||
]
|
||||
]
|
||||
],
|
||||
'Notice' => [
|
||||
'title' => '公告',
|
||||
@ -314,6 +349,7 @@ class ComponentDict
|
||||
'value' => 'style-1'
|
||||
],
|
||||
'text' => '超值爆款',
|
||||
'textImg' => 'static/resource/images/diy/active_cube/active_cube_text1.png',
|
||||
"textLink" => [
|
||||
"name" => ""
|
||||
],
|
||||
@ -330,7 +366,8 @@ class ComponentDict
|
||||
"blockStyle" => [
|
||||
'title' => '风格1',
|
||||
'value' => 'style-1',
|
||||
'fontWeight' => 'normal'
|
||||
'fontWeight' => 'normal',
|
||||
'btnText' => 'normal'
|
||||
],
|
||||
'list' => [
|
||||
[
|
||||
@ -350,8 +387,8 @@ class ComponentDict
|
||||
"endColor" => "#FE1E00",
|
||||
],
|
||||
"listFrame" => [
|
||||
"startColor" => "#FEA715",
|
||||
"endColor" => "#FE1E00",
|
||||
"startColor" => "#FFFAF5",
|
||||
"endColor" => "#FFFFFF"
|
||||
],
|
||||
"link" => [
|
||||
"name" => ""
|
||||
@ -375,8 +412,8 @@ class ComponentDict
|
||||
"endColor" => "#FF9E03",
|
||||
],
|
||||
"listFrame" => [
|
||||
"startColor" => "#FFBF50",
|
||||
"endColor" => "#FF9E03",
|
||||
"startColor" => "#FFFAF5",
|
||||
"endColor" => "#FFFFFF"
|
||||
],
|
||||
"link" => [
|
||||
"name" => ""
|
||||
@ -400,8 +437,8 @@ class ComponentDict
|
||||
"endColor" => "#49CD2D",
|
||||
],
|
||||
"listFrame" => [
|
||||
"startColor" => "#A2E792",
|
||||
"endColor" => "#49CD2D",
|
||||
"startColor" => "#FFFAF5",
|
||||
"endColor" => "#FFFFFF"
|
||||
],
|
||||
"link" => [
|
||||
"name" => ""
|
||||
@ -425,8 +462,8 @@ class ComponentDict
|
||||
"endColor" => "#1D7CFF",
|
||||
],
|
||||
"listFrame" => [
|
||||
"startColor" => "#4AC1FF",
|
||||
"endColor" => "#1D7CFF",
|
||||
"startColor" => "#FFFAF5",
|
||||
"endColor" => "#FFFFFF"
|
||||
],
|
||||
"link" => [
|
||||
"name" => ""
|
||||
@ -474,13 +511,26 @@ class ComponentDict
|
||||
'search' => [
|
||||
'logo' => '',
|
||||
'text' => '请输入搜索关键词',
|
||||
"link" => [
|
||||
"name" => ""
|
||||
'link' => [
|
||||
'name' => ''
|
||||
],
|
||||
'style' => 'style-1',
|
||||
'styleName' => '风格一',
|
||||
"subTitle" => [
|
||||
"text" => "本地好价·优选生活",
|
||||
"textColor" => "#000000",
|
||||
"startColor" => "rgba(255,255,255,0.7)",
|
||||
"endColor" => "",
|
||||
],
|
||||
'positionColor' => '#ffffff',
|
||||
'hotWord' => [
|
||||
"interval" => 3,
|
||||
'list' => []
|
||||
]
|
||||
],
|
||||
'color' => '#999999',
|
||||
'btnColor' => '#ffffff',
|
||||
'bgColor' => '#ffffff',
|
||||
'btnBgColor' => '#ff3434'
|
||||
],
|
||||
// 选项卡设置
|
||||
'tab' => [
|
||||
@ -590,7 +640,115 @@ class ComponentDict
|
||||
'borderStyle' => 'solid'
|
||||
],
|
||||
],
|
||||
|
||||
'PictureShow' => [
|
||||
'title' => '图片展播',
|
||||
'icon' => 'iconfont icona-tupianzhanbopc302',
|
||||
'path' => 'edit-picture-show',
|
||||
'support_page' => [],
|
||||
'uses' => 0,
|
||||
'sort' => 10017,
|
||||
'value' => [
|
||||
'moduleOne' => [
|
||||
'head' => [
|
||||
"textImg" => "static/resource/images/diy/picture_show/picture_show_head_text3.png",
|
||||
"subText" => "最高补1200元",
|
||||
"subTextColor" => "#666666"
|
||||
],
|
||||
'list' => [
|
||||
[
|
||||
"btnTitle" => [
|
||||
"text" => "全网低价",
|
||||
"color" => "#ffffff",
|
||||
"startColor" => "#F5443E",
|
||||
"endColor" => "#F5443E"
|
||||
],
|
||||
"link" => [
|
||||
"name" => ""
|
||||
],
|
||||
"imageUrl" => "static/resource/images/diy/picture_show/picture_05.png"
|
||||
],
|
||||
[
|
||||
"btnTitle" => [
|
||||
"text" => "大牌特惠",
|
||||
"color" => "#ffffff",
|
||||
"startColor" => "#F5443E",
|
||||
"endColor" => "#F5443E"
|
||||
],
|
||||
"link" => [
|
||||
"name" => ""
|
||||
],
|
||||
"imageUrl" => "static/resource/images/diy/picture_show/picture_06.png"
|
||||
]
|
||||
],
|
||||
"listFrame" => [
|
||||
"startColor" => "#D4EFFF",
|
||||
"endColor" => "#EBF4FA"
|
||||
]
|
||||
],
|
||||
'moduleTwo' => [
|
||||
'head' => [
|
||||
"textImg" => "static/resource/images/diy/picture_show/picture_show_head_text4.png",
|
||||
"subText" => "每日上新",
|
||||
"subTextColor" => "#666666"
|
||||
],
|
||||
'list' => [
|
||||
[
|
||||
"btnTitle" => [
|
||||
"text" => "人气爆款",
|
||||
"color" => "#ffffff",
|
||||
"startColor" => "#F5443E",
|
||||
"endColor" => "#F5443E"
|
||||
],
|
||||
"link" => [
|
||||
"name" => ""
|
||||
],
|
||||
"imageUrl" => "static/resource/images/diy/picture_show/picture_07.png"
|
||||
],
|
||||
[
|
||||
"btnTitle" => [
|
||||
"text" => "官方正品",
|
||||
"color" => "#ffffff",
|
||||
"startColor" => "#F5443E",
|
||||
"endColor" => "#F5443E"
|
||||
],
|
||||
"link" => [
|
||||
"name" => ""
|
||||
],
|
||||
"imageUrl" => "static/resource/images/diy/picture_show/picture_08.png"
|
||||
]
|
||||
],
|
||||
"listFrame" => [
|
||||
"startColor" => "#FFF1D4",
|
||||
"endColor" => "#F9F2E5"
|
||||
]
|
||||
],
|
||||
"moduleRounded" => [
|
||||
"topRounded" => 10,
|
||||
"bottomRounded" => 10
|
||||
],
|
||||
],// 组件属性
|
||||
'template' => [
|
||||
"textColor" => "#303133", // 文字颜色
|
||||
'pageStartBgColor' => '', // 底部背景颜色(开始)
|
||||
'pageEndBgColor' => '', // 底部背景颜色(结束)
|
||||
'pageGradientAngle' => 'to bottom', // 渐变角度,从上到下(to bottom)、从左到右(to right)
|
||||
'componentBgUrl' => '', // 组件背景图片
|
||||
'componentBgAlpha' => 2, // 组件背景图片的透明度,0~10
|
||||
"componentStartBgColor" => '', // 组件背景颜色(开始)
|
||||
"componentEndBgColor" => '', // 组件背景颜色(结束)
|
||||
"componentGradientAngle" => 'to bottom', // 渐变角度,上下(to bottom)、左右(to right)
|
||||
"topRounded" => 0, // 组件上圆角
|
||||
"bottomRounded" => 0, // 组件下圆角
|
||||
"elementBgColor" => '', // 元素背景颜色
|
||||
"topElementRounded" => 0,// 元素上圆角
|
||||
"bottomElementRounded" => 0, // 元素下圆角
|
||||
"margin" => [
|
||||
"top" => 0, // 上边距
|
||||
"bottom" => 0, // 下边距
|
||||
"both" => 10 // 左右边距
|
||||
],
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@ -65,7 +65,14 @@ class PagesDict
|
||||
"both" => 10
|
||||
],
|
||||
"ignore" => [],
|
||||
"list" => []
|
||||
"list" => [],
|
||||
// 轮播图设置
|
||||
'swiper' => [
|
||||
'indicatorColor' => 'rgba(0, 0, 0, 0.3)', // 未选中颜色
|
||||
"indicatorActiveColor" => '#FF0E0E',
|
||||
'indicatorStyle' => 'style-1',
|
||||
'indicatorAlign' => 'center'
|
||||
]
|
||||
];
|
||||
|
||||
$wap_index_list = ( new ConfigService() )->getWapIndexList();
|
||||
@ -487,6 +494,13 @@ class PagesDict
|
||||
"imgWidth" => 100,
|
||||
"imgHeight" => 100
|
||||
]
|
||||
],
|
||||
// 轮播图设置
|
||||
'swiper' => [
|
||||
'indicatorColor' => 'rgba(0, 0, 0, 0.3)', // 未选中颜色
|
||||
"indicatorActiveColor" => '#FF0E0E',
|
||||
'indicatorStyle' => 'style-1',
|
||||
'indicatorAlign' => 'center'
|
||||
]
|
||||
],
|
||||
[
|
||||
@ -612,6 +626,13 @@ class PagesDict
|
||||
]
|
||||
]
|
||||
],
|
||||
// 轮播图设置
|
||||
'swiper' => [
|
||||
'indicatorColor' => 'rgba(0, 0, 0, 0.3)', // 未选中颜色
|
||||
"indicatorActiveColor" => '#FF0E0E',
|
||||
'indicatorStyle' => 'style-1',
|
||||
'indicatorAlign' => 'center'
|
||||
],
|
||||
'pageStartBgColor' => '',
|
||||
'pageEndBgColor' => '',
|
||||
'pageGradientAngle' => 'to bottom',
|
||||
@ -938,6 +959,13 @@ class PagesDict
|
||||
"imgWidth" => 100,
|
||||
"imgHeight" => 100
|
||||
]
|
||||
],
|
||||
// 轮播图设置
|
||||
'swiper' => [
|
||||
'indicatorColor' => 'rgba(0, 0, 0, 0.3)', // 未选中颜色
|
||||
"indicatorActiveColor" => '#FF0E0E',
|
||||
'indicatorStyle' => 'style-1',
|
||||
'indicatorAlign' => 'center'
|
||||
]
|
||||
],
|
||||
[
|
||||
@ -1063,6 +1091,13 @@ class PagesDict
|
||||
]
|
||||
]
|
||||
],
|
||||
// 轮播图设置
|
||||
'swiper' => [
|
||||
'indicatorColor' => 'rgba(0, 0, 0, 0.3)', // 未选中颜色
|
||||
"indicatorActiveColor" => '#FF0E0E',
|
||||
'indicatorStyle' => 'style-1',
|
||||
'indicatorAlign' => 'center'
|
||||
],
|
||||
'pageStartBgColor' => '',
|
||||
'pageEndBgColor' => '',
|
||||
'pageGradientAngle' => 'to bottom',
|
||||
|
||||
@ -58,7 +58,7 @@ class PayDict
|
||||
'key' => self::WECHATPAY,
|
||||
'icon' => self::WECHATPAY_ICON,
|
||||
'setting_component' => '/src/app/views/setting/components/pay-wechatpay.vue',
|
||||
'encrypt_params' => ['mch_public_cert_path', 'mch_secret_cert', 'mch_secret_key'],
|
||||
'encrypt_params' => ['mch_public_cert_path', 'mch_secret_cert', 'mch_secret_key', 'wechat_public_cert_path'],
|
||||
],//微信支付
|
||||
self::ALIPAY => [
|
||||
'name' => get_lang('dict_pay.type_alipay'),
|
||||
|
||||
@ -422,7 +422,7 @@ CREATE TABLE `pay_refund` (
|
||||
`main_id` int NOT NULL DEFAULT 0 COMMENT '操作人',
|
||||
`pay_refund_no` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '外部支付方式的退款单号',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '退款记录表' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '支付退款记录表' ROW_FORMAT = Dynamic;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `pay_transfer`;
|
||||
@ -827,7 +827,7 @@ CREATE TABLE `sys_user` (
|
||||
`create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
|
||||
`login_count` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录次数',
|
||||
`is_del` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`delete_time` tinyint(4) NOT NULL DEFAULT 0 COMMENT '删除时间',
|
||||
`delete_time` int(11) NOT NULL DEFAULT 0 COMMENT '删除时间',
|
||||
`update_time` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间',
|
||||
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '后台管理员状态 1有效0无效',
|
||||
`role_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '权限组',
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
content: `
|
||||
<div class="pop-link-wrap">
|
||||
<p class="link-text">首次运行,请配置伪静态,才能正常使用。</p>
|
||||
<p class="link-text">伪静态如何配置请<a href="https://www.kancloud.cn/niushop/niucloud-admin-app/3199831" class="other-links-text" target="_blank">参考手册</a></p>
|
||||
<p class="link-text">伪静态如何配置请<a href="https://www.kancloud.cn/niushop/niushop_v6/3226724" class="other-links-text" target="_blank">参考手册</a></p>
|
||||
<p class="link-btn">
|
||||
<button onclick="pageToLink('${type}')" class="layui-btn visit-btn layui-border">确定</button>
|
||||
<button onclick="pageToLink('${type}', ${true})" class="layui-btn visit-btn layui-border">已配置,不需要在提示</button>
|
||||
@ -131,7 +131,7 @@
|
||||
}
|
||||
if(type == 'admin'){
|
||||
layer.closeAll()
|
||||
window.open('{$root_url}/admin/login')
|
||||
window.open('{$root_url}/admin/')
|
||||
}else if(type == 'web'){
|
||||
layer.closeAll()
|
||||
window.open('{$root_url}/web/')
|
||||
|
||||
@ -75,6 +75,8 @@ return [
|
||||
'is_mobile_between' => 'is_mobile must be 0 or 1',
|
||||
'is_auth_register_number' => 'is_auth_register must be a number',
|
||||
'is_auth_register_between' => 'is_auth_register must be 0 or 1',
|
||||
'is_force_access_user_info_number' => 'is_force_access_user_info must be a number',
|
||||
'is_force_access_user_info_between' => 'is_force_access_user_info must be 0 or 1',
|
||||
'is_bind_mobile_number' => 'is_bind_mobile must be a number',
|
||||
'is_bind_mobile_between' => 'is_bind_mobile must be 0 or 1',
|
||||
'username_cannot_pure_number' => 'The account cannot be a pure number'
|
||||
|
||||
@ -282,6 +282,7 @@ return [
|
||||
'SIGN_AWARD' => '签到奖励',
|
||||
'GET_AWARD' => '恭喜您获得以下奖励',
|
||||
'WILL_GET_AWARD' => '您将获得以下奖励',
|
||||
'SIGN_PERIOD_GREATER_THAN' => '签到周期必须大于0天',
|
||||
|
||||
//导出相关
|
||||
'EXPORT_SUCCESS' => '导出成功',
|
||||
|
||||
@ -78,6 +78,8 @@ return [
|
||||
'is_mobile_between' => '手机验证码登录参数必须是0或1',
|
||||
'is_auth_register_number' => '第三方自动注册参数必须是整数',
|
||||
'is_auth_register_between' => '第三方自动注册参数必须是0或1',
|
||||
'is_force_access_user_info_number' => '强制获取用户信息参数必须是整数',
|
||||
'is_force_access_user_info_between' => '强制获取用户信息参数必须是0或1',
|
||||
'is_bind_mobile_number' => '强制绑定手机参数必须是整数',
|
||||
'is_bind_mobile_between' => '强制绑定手机参数必须是0或1',
|
||||
'cash_out_is_open_in' => '是否启用必须是0或者1',
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
namespace app\listener\member;
|
||||
|
||||
/**
|
||||
* 会员登录时间
|
||||
* Class MemberLogin
|
||||
* 会员登录事件
|
||||
* Class MemberLoginListener
|
||||
* @package app\listener\member
|
||||
*/
|
||||
class MemberLoginListener
|
||||
@ -24,6 +24,8 @@ class MemberLoginListener
|
||||
*/
|
||||
public function handle(object $member)
|
||||
{
|
||||
// 新人专享活动
|
||||
event("MemberLoginAfter", [ 'member_id' => $member[ 'member_id' ] ]);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ use app\service\core\member\CoreMemberService;
|
||||
|
||||
/**
|
||||
* 会员注册成功事件
|
||||
* Class MemberRegister
|
||||
* Class MemberRegisterListener
|
||||
* @package app\listener\member
|
||||
*/
|
||||
class MemberRegisterListener
|
||||
@ -27,9 +27,11 @@ class MemberRegisterListener
|
||||
public function handle($member)
|
||||
{
|
||||
// 注册发放成长值
|
||||
CoreMemberService::sendGrowth($member['member_id'], 'member_register', ['from_type' => 'member_register']);
|
||||
CoreMemberService::sendGrowth($member[ 'member_id' ], 'member_register', [ 'from_type' => 'member_register' ]);
|
||||
// 注册发放积分
|
||||
CoreMemberService::sendPoint($member['member_id'], 'member_register', ['from_type' => 'member_register']);
|
||||
CoreMemberService::sendPoint($member[ 'member_id' ], 'member_register', [ 'from_type' => 'member_register' ]);
|
||||
// 新人专享活动
|
||||
event("MemberLoginAfter", [ 'member_id' => $member[ 'member_id' ] ]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
||||
// | Niucloud-admin 企业快速开发的saas管理平台
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网址:https://www.niucloud.com
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@ -29,6 +29,7 @@ class BottomNavigationListener
|
||||
|
||||
$addon_info = [
|
||||
'title' => '系统',
|
||||
'type' => 'app'
|
||||
];
|
||||
return [
|
||||
'key' => $key,
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
|
||||
namespace app\model\wechat;
|
||||
|
||||
use app\dict\channel\ReplyDict;
|
||||
use core\base\BaseModel;
|
||||
|
||||
/**
|
||||
|
||||
@ -187,7 +187,7 @@ class GenerateService extends BaseAdminService
|
||||
$table_info = $tables[0] ?? [];
|
||||
if(empty($table_info)) throw new AdminException('DATA_NOT_EXIST');
|
||||
|
||||
$table_name = str_replace($tablePrefix, '', $table_info['Name']);
|
||||
$table_name = preg_replace("/^{$tablePrefix}/", '', $table_info['Name'], 1);
|
||||
$fields = Db::name($table_name)->getFields();
|
||||
|
||||
$add_table_data = [
|
||||
@ -556,7 +556,7 @@ class GenerateService extends BaseAdminService
|
||||
$tables = Db::query($sql);
|
||||
$table_info = $tables[0] ?? [];
|
||||
if(empty($table_info)) throw new AdminException('DATA_NOT_EXIST');
|
||||
$table_name = str_replace($tablePrefix, '', $table_info['Name']);
|
||||
$table_name = preg_replace("/^{$tablePrefix}/", '', $table_info['Name'], 1);
|
||||
return Db::name($table_name)->getFields();
|
||||
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ abstract class BaseGenerator
|
||||
public function getTableName()
|
||||
{
|
||||
$tablePrefix = config('database.connections.mysql.prefix');
|
||||
return str_replace($tablePrefix, '', $this->table['table_name']);
|
||||
return preg_replace("/^{$tablePrefix}/", '', $this->table['table_name'], 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -372,7 +372,7 @@ class ServiceGenerator extends BaseGenerator
|
||||
{
|
||||
foreach ($col as $v)
|
||||
{
|
||||
$content.= PHP_EOL.' $info['."'".$v."'".'] = strval($info['."'".$v."'])";
|
||||
$content.= PHP_EOL.' $info['."'".$v."'".'] = strval($info['."'".$v."']);";
|
||||
}
|
||||
|
||||
}
|
||||
@ -381,7 +381,7 @@ class ServiceGenerator extends BaseGenerator
|
||||
|
||||
/**
|
||||
* 关联表方法
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getWithAllFunction()
|
||||
{
|
||||
|
||||
@ -164,6 +164,8 @@ class PayChannelService extends BaseAdminService
|
||||
'mch_secret_key' => $data[ 'mch_secret_key' ] ?? '',//商户秘钥 现在默认认为是v3版
|
||||
'mch_secret_cert' => $data[ 'mch_secret_cert' ] ?? '',//商户私钥 字符串或路径
|
||||
'mch_public_cert_path' => $data[ 'mch_public_cert_path' ] ?? '',//商户公钥证书路径
|
||||
'wechat_public_cert_path' => $data['wechat_public_cert_path'] ?? '', // 微信支付公钥
|
||||
'wechat_public_cert_id' => $data['wechat_public_cert_id'] ?? '' // 微信支付公钥id
|
||||
];
|
||||
break;
|
||||
case PayDict::ALIPAY:
|
||||
|
||||
@ -51,4 +51,24 @@ class ScheduleLogService extends BaseAdminService
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计划任务执行记录
|
||||
* @param $ids
|
||||
* @return bool
|
||||
*/
|
||||
public function del($ids)
|
||||
{
|
||||
return (new CoreScheduleLogService())->del($ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空计划任务执行记录
|
||||
* @param $data
|
||||
* @return bool
|
||||
*/
|
||||
public function clear($data)
|
||||
{
|
||||
return (new CoreScheduleLogService())->clear($data);
|
||||
}
|
||||
|
||||
}
|
||||
@ -68,7 +68,7 @@ class AttachmentService extends BaseAdminService
|
||||
*/
|
||||
public function modifyCategory($att_id, $cate_id)
|
||||
{
|
||||
$where = array (
|
||||
$where = array(
|
||||
[ 'att_id', '=', $att_id ],
|
||||
);
|
||||
$this->model->where($where)->update([ 'cate_id' => $cate_id, 'update_time' => time() ]);
|
||||
@ -84,7 +84,7 @@ class AttachmentService extends BaseAdminService
|
||||
public function batchModifyCategory($att_ids, $cate_id)
|
||||
{
|
||||
|
||||
$where = array (
|
||||
$where = array(
|
||||
[ 'att_id', 'in', is_string($att_ids) ? explode($att_ids) : $att_ids ],
|
||||
);
|
||||
$this->model->where($where)->update([ 'cate_id' => $cate_id, 'update_time' => time() ]);
|
||||
@ -118,7 +118,7 @@ class AttachmentService extends BaseAdminService
|
||||
*/
|
||||
public function getPage(array $data)
|
||||
{
|
||||
$where = array ();
|
||||
$where = array();
|
||||
if (!empty($data[ 'att_type' ])) {
|
||||
$where[] = [ 'att_type', '=', $data[ 'att_type' ] ];
|
||||
}
|
||||
@ -145,7 +145,7 @@ class AttachmentService extends BaseAdminService
|
||||
$attachment = $category_model->create($data);
|
||||
if (!$attachment->id)
|
||||
throw new AdminException('ADD_FAIL');//创建失败
|
||||
return $attachment->att_id;
|
||||
return $attachment->id;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -155,7 +155,7 @@ class AttachmentService extends BaseAdminService
|
||||
*/
|
||||
public function findCategory(int $id)
|
||||
{
|
||||
$where = array (
|
||||
$where = array(
|
||||
[ 'id', '=', $id ]
|
||||
);
|
||||
$category_model = new SysAttachmentCategory();
|
||||
@ -173,7 +173,7 @@ class AttachmentService extends BaseAdminService
|
||||
*/
|
||||
public function editCategory(int $id, array $data)
|
||||
{
|
||||
$where = array (
|
||||
$where = array(
|
||||
[ 'id', '=', $id ]
|
||||
);
|
||||
$category_model = new SysAttachmentCategory();
|
||||
@ -206,7 +206,7 @@ class AttachmentService extends BaseAdminService
|
||||
*/
|
||||
public function getCategoryPage(array $data)
|
||||
{
|
||||
$where = array ();
|
||||
$where = array();
|
||||
if (!empty($data[ 'type' ])) {
|
||||
$where[] = [ 'type', '=', $data[ 'type' ] ];
|
||||
}
|
||||
@ -226,7 +226,7 @@ class AttachmentService extends BaseAdminService
|
||||
*/
|
||||
public function getCategoryList(array $data)
|
||||
{
|
||||
$where = array ();
|
||||
$where = array();
|
||||
if (!empty($data[ 'type' ])) {
|
||||
$where[] = [ 'type', '=', $data[ 'type' ] ];
|
||||
}
|
||||
@ -246,7 +246,7 @@ class AttachmentService extends BaseAdminService
|
||||
$icon_list = IconDict::getIcon();
|
||||
foreach ($icon_list as $k => $v) {
|
||||
unset($icon_list[ $k ][ 'glyphs' ]);
|
||||
if (isset($data[ 'name' ]) && $data[ 'name' ] !='' && !str_contains($v['name'], $data['name'])) {
|
||||
if (isset($data[ 'name' ]) && $data[ 'name' ] != '' && !str_contains($v[ 'name' ], $data[ 'name' ])) {
|
||||
unset($icon_list[ $k ]);
|
||||
}
|
||||
}
|
||||
@ -282,7 +282,7 @@ class AttachmentService extends BaseAdminService
|
||||
$icon[ $ck ][ 'real_name' ] = $cv[ 'name' ];
|
||||
|
||||
// 查询名称
|
||||
if (!empty($data[ 'real_name' ]) && !str_contains($cv['name'], $data['real_name'])) {
|
||||
if (!empty($data[ 'real_name' ]) && !str_contains($cv[ 'name' ], $data[ 'real_name' ])) {
|
||||
unset($icon[ $ck ]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,28 +25,29 @@ class BackupService extends UpgradeService
|
||||
* 备份代码
|
||||
* @return void
|
||||
*/
|
||||
public function backupCode() {
|
||||
$backup_dir = $this->upgrade_dir .$this->upgrade_task['key'] . DIRECTORY_SEPARATOR . 'backup' . DIRECTORY_SEPARATOR . 'code' . DIRECTORY_SEPARATOR;
|
||||
public function backupCode()
|
||||
{
|
||||
$backup_dir = $this->upgrade_dir . $this->upgrade_task[ 'key' ] . DIRECTORY_SEPARATOR . 'backup' . DIRECTORY_SEPARATOR . 'code' . DIRECTORY_SEPARATOR;
|
||||
|
||||
// 创建目录
|
||||
dir_mkdir($backup_dir);
|
||||
// 备份admin
|
||||
dir_copy($this->root_path . 'admin', $backup_dir . 'admin', exclude_dirs:[ '.vscode', 'node_modules', 'dist']);
|
||||
dir_copy($this->root_path . 'admin', $backup_dir . 'admin', exclude_dirs:[ '.vscode', 'node_modules', 'dist' ]);
|
||||
// 备份uni-app
|
||||
dir_copy($this->root_path . 'uni-app', $backup_dir . 'uni-app', exclude_dirs:['node_modules', 'dist']);
|
||||
dir_copy($this->root_path . 'uni-app', $backup_dir . 'uni-app', exclude_dirs:[ 'node_modules', 'dist' ]);
|
||||
// 备份web
|
||||
dir_copy($this->root_path . 'web', $backup_dir . 'web', exclude_dirs:['node_modules', '.nuxt', '.output']);
|
||||
dir_copy($this->root_path . 'web', $backup_dir . 'web', exclude_dirs:[ 'node_modules', '.nuxt', '.output' ]);
|
||||
|
||||
// 备份niucloud
|
||||
$niucloud_dir = $backup_dir . 'niucloud' . DIRECTORY_SEPARATOR;
|
||||
if ($this->upgrade_task['upgrade']['app_key'] == AddonDict::FRAMEWORK_KEY) {
|
||||
dir_copy($this->root_path . 'niucloud', $niucloud_dir, exclude_dirs:['addon', 'config', 'public', 'vendor', 'runtime']);
|
||||
if ($this->upgrade_task[ 'upgrade' ][ 'app_key' ] == AddonDict::FRAMEWORK_KEY) {
|
||||
dir_copy($this->root_path . 'niucloud', $niucloud_dir, exclude_dirs:[ 'addon', 'config', 'public', 'vendor', 'runtime' ]);
|
||||
// 备份版本文件
|
||||
$version_file = $this->root_path . 'niucloud' .DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'version.php';
|
||||
$version_file = $this->root_path . 'niucloud' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'version.php';
|
||||
$to_version_file = $niucloud_dir . 'config' . DIRECTORY_SEPARATOR . 'version.php';
|
||||
file_copy($version_file, $to_version_file);
|
||||
} else {
|
||||
$addon = $this->upgrade_task['upgrade']['app_key'];
|
||||
$addon = $this->upgrade_task[ 'upgrade' ][ 'app_key' ];
|
||||
$addon_dir = $this->root_path . 'niucloud' . DIRECTORY_SEPARATOR . 'addon' . DIRECTORY_SEPARATOR . $addon;
|
||||
$to_addon_dir = $niucloud_dir . 'addon' . DIRECTORY_SEPARATOR . $addon;
|
||||
dir_copy($addon_dir, $to_addon_dir);
|
||||
@ -69,8 +70,9 @@ class BackupService extends UpgradeService
|
||||
* 备份数据库
|
||||
* @return void
|
||||
*/
|
||||
public function backupSql() {
|
||||
$backup_dir = $this->upgrade_dir .$this->upgrade_task['key'] . DIRECTORY_SEPARATOR . 'backup' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR;
|
||||
public function backupSql()
|
||||
{
|
||||
$backup_dir = $this->upgrade_dir . $this->upgrade_task[ 'key' ] . DIRECTORY_SEPARATOR . 'backup' . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR;
|
||||
// 创建目录
|
||||
dir_mkdir($backup_dir);
|
||||
|
||||
@ -82,11 +84,11 @@ class BackupService extends UpgradeService
|
||||
]);
|
||||
|
||||
$tables = [];
|
||||
$prefix = config('database.connections.'.config('database.default'))['prefix'];
|
||||
if ($this->upgrade_task['upgrade']['app_key'] == AddonDict::FRAMEWORK_KEY) {
|
||||
$prefix = config('database.connections.' . config('database.default'))[ 'prefix' ];
|
||||
if ($this->upgrade_task[ 'upgrade' ][ 'app_key' ] == AddonDict::FRAMEWORK_KEY) {
|
||||
// 不需要备份的表
|
||||
$noot_need_backup = ["{$prefix}sys_user_log", "{$prefix}jobs", "{$prefix}jobs_failed"];
|
||||
$sys_models = (new GenerateService())->getModels(['addon' => 'system']);
|
||||
$noot_need_backup = [ "{$prefix}sys_user_log", "{$prefix}jobs", "{$prefix}jobs_failed" ];
|
||||
$sys_models = ( new GenerateService() )->getModels([ 'addon' => 'system' ]);
|
||||
foreach ($sys_models as $model) {
|
||||
$name = "\\$model";
|
||||
$class = new $name();
|
||||
@ -96,11 +98,14 @@ class BackupService extends UpgradeService
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$addon_models = (new GenerateService())->getModels(['addon' => $this->upgrade_task['upgrade']['app_key']]);
|
||||
$addon_models = ( new GenerateService() )->getModels([ 'addon' => $this->upgrade_task[ 'upgrade' ][ 'app_key' ] ]);
|
||||
foreach ($addon_models as $model) {
|
||||
try {
|
||||
$name = "\\$model";
|
||||
$class = new $name();
|
||||
$tables[] = $class->getTable();
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -28,9 +28,9 @@ class RestoreService extends UpgradeService
|
||||
$backup_dir = $this->upgrade_dir .$this->upgrade_task['key'] . DIRECTORY_SEPARATOR . 'backup' . DIRECTORY_SEPARATOR . 'code' . DIRECTORY_SEPARATOR;
|
||||
if (is_dir($backup_dir)) {
|
||||
// 删除前端文件
|
||||
if (is_dir(public_path() . 'admin')) del_target_dir(public_path() . 'admin', true);
|
||||
if (is_dir(public_path() . 'wap')) del_target_dir(public_path() . 'wap', true);
|
||||
if (is_dir(public_path() . 'web')) del_target_dir(public_path() . 'web', true);
|
||||
// if (is_dir(public_path() . 'admin')) del_target_dir(public_path() . 'admin', true);
|
||||
// if (is_dir(public_path() . 'wap')) del_target_dir(public_path() . 'wap', true);
|
||||
// if (is_dir(public_path() . 'web')) del_target_dir(public_path() . 'web', true);
|
||||
|
||||
dir_copy($backup_dir, rtrim($this->root_path, DIRECTORY_SEPARATOR));
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ class UpgradeService extends BaseAdminService
|
||||
$version_item = $version_list[$index];
|
||||
$version_no = $version_item['version_no'];
|
||||
|
||||
$to_dir = $addon == AddonDict::FRAMEWORK_KEY ? $this->root_path : $this->root_path . 'niucloud' . DIRECTORY_SEPARATOR . 'addon' . DIRECTORY_SEPARATOR . $addon;
|
||||
$to_dir = $addon == AddonDict::FRAMEWORK_KEY ? rtrim($this->root_path, DIRECTORY_SEPARATOR) : $this->root_path . 'niucloud' . DIRECTORY_SEPARATOR . 'addon' . DIRECTORY_SEPARATOR . $addon;
|
||||
|
||||
// 获取文件变更记录
|
||||
if (file_exists($code_dir . $version_no . '.txt')) {
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
|
||||
namespace app\service\api\member;
|
||||
|
||||
use app\service\api\wechat\WechatAuthService;
|
||||
use app\service\core\member\CoreMemberConfigService;
|
||||
use core\base\BaseApiService;
|
||||
|
||||
@ -23,10 +24,22 @@ class MemberConfigService extends BaseApiService
|
||||
{
|
||||
/**
|
||||
* 获取注册与登录设置
|
||||
* @param $url
|
||||
* @return array
|
||||
*/
|
||||
public function getLoginConfig(){
|
||||
|
||||
return (new CoreMemberConfigService())->getLoginConfig();
|
||||
public function getLoginConfig($url = '')
|
||||
{
|
||||
$res = ( new CoreMemberConfigService() )->getLoginConfig();
|
||||
if (!empty($url)) {
|
||||
try {
|
||||
// 检测公众号配置是否成功
|
||||
$wechat_auth = ( new WechatAuthService() )->jssdkConfig($url);
|
||||
} catch (\Exception $e) {
|
||||
$res[ 'is_auth_register' ] = 0;
|
||||
$res[ 'is_force_access_user_info' ] = 0;
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
}
|
||||
@ -139,4 +139,13 @@ class MemberService extends BaseApiService
|
||||
$detail['verify_code_barcode'] = image_to_base64($barcode_path);
|
||||
return $detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化会员数据
|
||||
*/
|
||||
public function initMemberData(){
|
||||
if ($this->member_id) {
|
||||
event("MemberLoginAfter", ['member_id' => $this->member_id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
||||
// | Niucloud-admin 企业快速开发的saas管理平台
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网址:https://www.niucloud.com
|
||||
// +----------------------------------------------------------------------
|
||||
@ -11,6 +11,7 @@
|
||||
|
||||
namespace app\service\api\member;
|
||||
|
||||
use app\job\member\MemberGiftGrantJob;
|
||||
use app\model\member\MemberSign;
|
||||
use app\service\core\member\CoreMemberService;
|
||||
use app\service\core\sys\CoreConfigService;
|
||||
@ -109,19 +110,18 @@ class MemberSignService extends BaseApiService
|
||||
$res = $this->model->create($data);
|
||||
if ($res) {
|
||||
//日签奖励发放
|
||||
$param = [
|
||||
MemberGiftGrantJob::dispatch([
|
||||
'member_id' => $this->member_id,
|
||||
'gift' => $sign_config['day_award'],
|
||||
'param' => [
|
||||
'from_type' => 'day_sign_award',
|
||||
'memo' => '日签奖励'
|
||||
];
|
||||
(new CoreMemberService())->memberGiftGrant($this->member_id, $sign_config['day_award'], $param);
|
||||
]
|
||||
]);
|
||||
$awards['day_award'] = $sign_config['day_award'];
|
||||
|
||||
//签到成功后判断连签天数是否满足连签奖励发放条件
|
||||
if (!empty($sign_config['continue_award'])) {
|
||||
$param = [
|
||||
'from_type' => 'continue_sign_award',
|
||||
'memo' => '连签奖励'
|
||||
];
|
||||
foreach ($sign_config['continue_award'] as $key => $value) {
|
||||
$continue_sign = intval($value['continue_sign']);//连续签到天数要求
|
||||
//如果连签天数满足配置条件,发放连签奖励
|
||||
@ -142,7 +142,14 @@ class MemberSignService extends BaseApiService
|
||||
->whereBetweenTime('create_time', $period_start_time, $period_end_time)->count('sign_id');
|
||||
if ($receive_count < $value['receive_num']) {
|
||||
//连签奖励发放
|
||||
(new CoreMemberService())->memberGiftGrant($this->member_id, $gifts, $param);
|
||||
MemberGiftGrantJob::dispatch([
|
||||
'member_id' => $this->member_id,
|
||||
'gift' => $gifts,
|
||||
'param' => [
|
||||
'from_type' => 'continue_sign_award',
|
||||
'memo' => '连签奖励'
|
||||
]
|
||||
]);
|
||||
$awards['continue_award'] = $gifts;
|
||||
$continue_text = get_lang('CONTINUE_SIGN').$res->days.get_lang('DAYS');
|
||||
//更新连签发放记录
|
||||
@ -150,7 +157,14 @@ class MemberSignService extends BaseApiService
|
||||
}
|
||||
} else { //不限制
|
||||
//连签奖励发放
|
||||
(new CoreMemberService())->memberGiftGrant($this->member_id, $gifts, $param);
|
||||
MemberGiftGrantJob::dispatch([
|
||||
'member_id' => $this->member_id,
|
||||
'gift' => $gifts,
|
||||
'param' => [
|
||||
'from_type' => 'continue_sign_award',
|
||||
'memo' => '连签奖励'
|
||||
]
|
||||
]);
|
||||
$awards['continue_award'] = $gifts;
|
||||
$continue_text = get_lang('CONTINUE_SIGN').$res->days.get_lang('DAYS');
|
||||
//更新连签发放记录
|
||||
@ -407,6 +421,15 @@ class MemberSignService extends BaseApiService
|
||||
$is_use_point = ($is_use_point_day || $is_use_point_continue) ? 1 : 0;
|
||||
$is_use_balance = ($is_use_balance_day || $is_use_balance_continue) ? 1 : 0;
|
||||
$is_use_coupon = ($is_use_coupon_day || $is_use_coupon_continue) ? 1 : 0;
|
||||
$coupon_check_data = array_filter(event('CouponCheck', ['is_use_coupon' => $is_use_coupon, 'coupon_id' => $coupon_id, 'coupon_list' => $coupon_list]))[0] ?? [];
|
||||
if (empty($coupon_check_data)) {
|
||||
$is_use_coupon = false;
|
||||
$coupon_check_data = [
|
||||
'coupon_id' => [],
|
||||
'coupon_list' => []
|
||||
];
|
||||
}
|
||||
$is_use_coupon = empty($coupon_check_data['coupon_id']) ? false : $is_use_coupon;
|
||||
//相同奖励合并
|
||||
$awards_total = [
|
||||
'point' => [
|
||||
@ -419,8 +442,8 @@ class MemberSignService extends BaseApiService
|
||||
],
|
||||
'shop_coupon' => [
|
||||
'is_use' => $is_use_coupon,
|
||||
'coupon_id' => $coupon_id,
|
||||
'coupon_list' => $coupon_list,
|
||||
'coupon_id' => $coupon_check_data['coupon_id'],
|
||||
'coupon_list' => $coupon_check_data['coupon_list'],
|
||||
]
|
||||
];
|
||||
return (new CoreMemberService())->getGiftContent($awards_total, 'member_sign');
|
||||
|
||||
@ -110,10 +110,10 @@ class AreaService extends BaseApiService
|
||||
$url = 'https://apis.map.qq.com/ws/geocoder/v1/';
|
||||
$map = ( new ConfigService() )->getMap();
|
||||
|
||||
$get_data = array (
|
||||
'location' => $params[ 'latlng' ],
|
||||
$get_data = array(
|
||||
'key' => $map[ 'key' ],
|
||||
'get_poi' => 0,//是否返回周边POI列表:1.返回;0不返回(默认)
|
||||
'location' => $params[ 'latlng' ],
|
||||
'get_poi' => 0, // 是否返回周边POI列表:1.返回;0不返回(默认)
|
||||
);
|
||||
|
||||
$url = $url . '?' . http_build_query($get_data);
|
||||
@ -131,12 +131,32 @@ class AreaService extends BaseApiService
|
||||
curl_close($curl);
|
||||
|
||||
if ($res[ 'status' ] == 0) {
|
||||
$return_array = $res[ 'result' ][ 'address_component' ] ?? [];
|
||||
$address_data = array (
|
||||
'province' => $return_array[ 'province' ] ?? '',
|
||||
'city' => $return_array[ 'city' ] ?? '',
|
||||
'district' => $return_array[ 'district' ] ?? '',
|
||||
'address' => $return_array[ 'street_number' ] ?? '',
|
||||
$return_array = $res[ 'result' ][ 'address_component' ] ?? []; // 地址部件,address不满足需求时可自行拼接
|
||||
$address_reference = $res[ 'result' ][ 'address_reference' ] ?? [];
|
||||
$address = $return_array[ 'street_number' ] ?? ''; // 门牌,可能为空字串
|
||||
if (empty($address)) {
|
||||
$address = $return_array[ 'street' ] ?? ''; // 道路,可能为空字串
|
||||
}
|
||||
|
||||
$town = $address_reference[ 'town' ] ?? [];
|
||||
$landmark_l1 = $address_reference[ 'landmark_l1' ] ?? [];
|
||||
$landmark_l2 = $address_reference[ 'landmark_l2' ] ?? [];
|
||||
|
||||
$community = '';
|
||||
if (!empty($landmark_l2[ 'title' ])) {
|
||||
$community = $landmark_l2[ 'title' ]; // 二级地标,较一级地标更为精确,规模更小
|
||||
} elseif (!empty($landmark_l1[ 'title' ])) {
|
||||
$community = $landmark_l1[ 'title' ]; // 一级地标,可识别性较强、规模较大的地点、小区等
|
||||
} elseif (!empty($town[ 'title' ])) {
|
||||
$community = $town[ 'title' ]; // 乡镇/街道(四级行政区划)
|
||||
}
|
||||
|
||||
$address_data = array(
|
||||
'province' => $return_array[ 'province' ] ?? '', // 省
|
||||
'city' => $return_array[ 'city' ] ?? '', // 市
|
||||
'district' => $return_array[ 'district' ] ?? '', // 区
|
||||
'community' => $community,
|
||||
'address' => $address,
|
||||
'full_address' => $res[ 'result' ][ 'address' ] ?? '',
|
||||
'formatted_addresses' => $res[ 'result' ][ 'formatted_addresses' ] ?? []
|
||||
);
|
||||
@ -146,19 +166,20 @@ class AreaService extends BaseApiService
|
||||
$province = str_replace('省', '', $address_data[ 'province' ]);
|
||||
$province = str_replace('市', '', $province);
|
||||
}
|
||||
|
||||
$city = $address_data[ 'city' ] ?? '';
|
||||
$district = $address_data[ 'district' ] ?? '';
|
||||
|
||||
$province_info = $this->model->where([ [ 'name', 'like', '%' . $province . '%' ], [ 'level', '=', 1 ] ])->field('id,name')->select()->toArray()[ 0 ] ?? [];
|
||||
|
||||
$province_id = 0;
|
||||
$province_name = '';
|
||||
$province_name = $address_data[ 'province' ];
|
||||
|
||||
$city_id = 0;
|
||||
$city_name = '';
|
||||
$city_name = $address_data[ 'city' ];
|
||||
|
||||
$district_id = 0;
|
||||
$district_name = '';
|
||||
$district_name = $address_data[ 'district' ];
|
||||
|
||||
if (!empty($province_info)) {
|
||||
$province_id = $province_info[ 'id' ];
|
||||
@ -193,9 +214,10 @@ class AreaService extends BaseApiService
|
||||
'district_id' => $district_id,
|
||||
'district' => $district_name,
|
||||
|
||||
'community' => $address_data[ 'community' ],
|
||||
|
||||
'full_address' => $address_data[ 'full_address' ],
|
||||
'formatted_addresses' => $address_data[ 'formatted_addresses' ]
|
||||
|
||||
];
|
||||
} else {
|
||||
throw new ApiException($res[ 'message' ]);
|
||||
|
||||
@ -99,7 +99,7 @@ class WeappAuthService extends BaseApiService
|
||||
}
|
||||
}
|
||||
if ($member_info->isEmpty()) {
|
||||
$config = ( new MemberConfigService() )->getLoginConfig();
|
||||
// $config = ( new MemberConfigService() )->getLoginConfig();
|
||||
// $is_auth_register = $config[ 'is_auth_register' ];
|
||||
// 去掉强制绑定手机号判断,否则开启强制绑定的情况下小程序第三方注册无法注册
|
||||
// 现在不需要控制自动注册,分为两种情况,一种自动注册,另一种手动点击授权登录注册
|
||||
|
||||
@ -122,7 +122,7 @@ class WechatAuthService extends BaseApiService
|
||||
}
|
||||
}
|
||||
if ($member_info->isEmpty()) {
|
||||
$config = ( new MemberConfigService() )->getLoginConfig();
|
||||
// $config = ( new MemberConfigService() )->getLoginConfig();
|
||||
// $is_auth_register = $config[ 'is_auth_register' ];
|
||||
// 去掉强制绑定手机号判断,否则开启强制绑定的情况下公众号第三方注册无法注册
|
||||
// 现在不需要控制自动注册,分为两种情况,一种自动注册,另一种手动点击授权登录注册
|
||||
@ -134,6 +134,11 @@ class WechatAuthService extends BaseApiService
|
||||
} else {
|
||||
//可能会更新用户和粉丝表
|
||||
$login_service = new LoginService();
|
||||
// 若用户头像为空,那么从微信获取头像和昵称,然后进行更新
|
||||
if (empty($member_info->headimg)) {
|
||||
$member_info->headimg = $avatar;
|
||||
$member_info->nickname = $nickname;
|
||||
}
|
||||
return $login_service->login($member_info, MemberLoginTypeDict::WECHAT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@ class CoreMemberConfigService extends BaseCoreService
|
||||
'is_username' => $info[ 'is_username' ] ?? 1, // 是否用户名密码登录
|
||||
'is_mobile' => $info[ 'is_mobile' ] ?? 0, // 是否手机验证码登录
|
||||
'is_auth_register' => $info[ 'is_auth_register' ] ?? 1, // 是否第三方自动注册
|
||||
'is_force_access_user_info' => $info[ 'is_force_access_user_info' ] ?? 0, // 是否强制获取用户信息
|
||||
'is_bind_mobile' => $info[ 'is_bind_mobile' ] ?? 0, // 是否强制绑定手机
|
||||
'agreement_show' => $info[ 'agreement_show' ] ?? 0, // 政策协议是否展示
|
||||
'bg_url' => $info[ 'bg_url' ] ?? '', // 背景图片
|
||||
@ -50,10 +51,11 @@ class CoreMemberConfigService extends BaseCoreService
|
||||
public function setLoginConfig(array $data)
|
||||
{
|
||||
$config = [
|
||||
'is_username' => $data[ 'is_username' ] ?? 1,//是否用户名密码登录
|
||||
'is_mobile' => $data[ 'is_mobile' ] ?? 0,//是否手机验证码登录
|
||||
'is_auth_register' => $data[ 'is_auth_register' ] ?? 1,//是否第三方自动注册
|
||||
'is_bind_mobile' => $data[ 'is_bind_mobile' ] ?? 0,//是否强制绑定手机
|
||||
'is_username' => $data[ 'is_username' ] ?? 1,// 是否用户名密码登录
|
||||
'is_mobile' => $data[ 'is_mobile' ] ?? 0, // 是否手机验证码登录
|
||||
'is_auth_register' => $data[ 'is_auth_register' ] ?? 1,// 是否第三方自动注册
|
||||
'is_force_access_user_info' => $data[ 'is_force_access_user_info' ] ?? 0, // 是否强制获取用户信息
|
||||
'is_bind_mobile' => $data[ 'is_bind_mobile' ] ?? 0, // 是否强制绑定手机
|
||||
'agreement_show' => $data[ 'agreement_show' ] ?? 0, // 政策协议是否展示
|
||||
'bg_url' => $data[ 'bg_url' ] ?? '', // 背景图片
|
||||
'desc' => $data[ 'desc' ] ?? '' // 描述
|
||||
|
||||
@ -16,6 +16,7 @@ use app\model\member\Member;
|
||||
use app\service\core\sys\CoreConfigService;
|
||||
use core\base\BaseCoreService;
|
||||
use core\dict\DictLoader;
|
||||
use core\exception\CommonException;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
@ -239,16 +240,19 @@ class CoreMemberService extends BaseCoreService
|
||||
|
||||
foreach ($gifts as $key => $item) {
|
||||
if (!$item['is_use'] || !isset($dict[$key]) || !isset($dict[$key]['grant']) || empty($dict[$key]['grant'])) continue;
|
||||
|
||||
try {
|
||||
$grant = $dict[$key]['grant'];
|
||||
if ($grant instanceof \Closure) {
|
||||
$grant($member_id, $item, $param);
|
||||
} else if (class_exists($grant)) {
|
||||
(new $grant())->handle($member_id, $item, $param);
|
||||
}
|
||||
} catch (CommonException $e) {
|
||||
Log::write('会员礼包'.$key.'发放失败,错误原因:'. $e->getMessage().$e->getFile().$e->getLine());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
} catch (CommonException $e) {
|
||||
Log::write('会员礼包发放失败,错误原因:'. $e->getMessage().$e->getFile().$e->getLine());
|
||||
Log::write('参数:'. json_encode([
|
||||
'member_id' => $member_id,
|
||||
|
||||
@ -60,6 +60,7 @@ class CoreOfflineService extends BaseCoreService
|
||||
$refund_no = $params['refund_no'];//交易流水号
|
||||
$voucher = $params['voucher'] ?? '';
|
||||
|
||||
//线下退款凭证校验
|
||||
if (empty($voucher)) throw new CommonException('VOUCHER_NOT_EMPTY');
|
||||
|
||||
$pay = (new CoreRefundService())->findByRefundNo($refund_no);
|
||||
|
||||
@ -40,6 +40,17 @@ class CorePosterService extends BaseCoreService
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param $condition
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function del($condition)
|
||||
{
|
||||
( new Poster() )->delete($condition);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 海报类型
|
||||
* @param string $type
|
||||
@ -129,7 +140,7 @@ class CorePosterService extends BaseCoreService
|
||||
$dir = 'upload/poster';
|
||||
$temp1 = md5(json_encode($poster));
|
||||
$temp2 = md5(json_encode($poster_data));
|
||||
$file_path = 'poster' . $temp1 . '_' . $temp2 . '_' . $channel . '.png';
|
||||
$file_path = 'poster' . $temp1 . '_' . $temp2 .'_'.$channel. '.png';
|
||||
$path = $dir . '/' . $file_path;
|
||||
|
||||
//判断当前海报是否存在,存在直接返回地址,不存在的话则创建
|
||||
|
||||
@ -51,4 +51,34 @@ class CoreScheduleLogService extends BaseCoreService
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计划任务执行记录
|
||||
* @param $ids
|
||||
* @return bool
|
||||
*/
|
||||
public function del($ids)
|
||||
{
|
||||
$res = $this->model::destroy(function($query) use ($ids) {
|
||||
$query->where([ [ 'id', 'in', $ids ] ]);
|
||||
});
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空计划任务执行记录
|
||||
* @param $data
|
||||
* @return bool
|
||||
*/
|
||||
public function clear($data)
|
||||
{
|
||||
$where = [];
|
||||
if ($data[ 'schedule_id' ]) {
|
||||
$where[] = [ 'schedule_id', '=', $data[ 'schedule_id' ] ];
|
||||
}
|
||||
$res = $this->model::destroy(function($query) use ($where) {
|
||||
$query->where($where);
|
||||
});
|
||||
return $res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ class CoreWechatServeService extends BaseCoreService
|
||||
public function authorization(string $url = '', string $scopes = 'snsapi_base')
|
||||
{
|
||||
$oauth = CoreWechatService::app()->getOauth();
|
||||
return $oauth->scopes([$scopes])->redirect($url);
|
||||
return $oauth->scopes([ $scopes ])->redirect($url);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -52,7 +52,7 @@ class CoreWechatServeService extends BaseCoreService
|
||||
$oauth = CoreWechatService::app()->getOauth();
|
||||
return $oauth->userFromCode($code);
|
||||
} catch (\Exception $e) {
|
||||
throw new CommonException($e->getCode());
|
||||
throw new CommonException($e->getCode() . ':' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ class CoreWechatServeService extends BaseCoreService
|
||||
$server = $app->getServer();
|
||||
$server->with(function($message, \Closure $next) {
|
||||
// 你的自定义逻辑
|
||||
return (new CoreWechatMessageService)->message($message);
|
||||
return ( new CoreWechatMessageService )->message($message);
|
||||
});
|
||||
$response = $server->serve();
|
||||
return $response;
|
||||
@ -126,7 +126,8 @@ class CoreWechatServeService extends BaseCoreService
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface
|
||||
*/
|
||||
public function scan(string $key, int $expire_seconds = 6 * 24 * 3600, $params = []){
|
||||
public function scan(string $key, int $expire_seconds = 6 * 24 * 3600, $params = [])
|
||||
{
|
||||
$api = CoreWechatService::appApiClient();
|
||||
if (is_int($key) && $key > 0) {
|
||||
$type = 'QR_SCENE';
|
||||
@ -135,7 +136,7 @@ class CoreWechatServeService extends BaseCoreService
|
||||
$type = 'QR_STR_SCENE';
|
||||
$sceneKey = 'scene_str';
|
||||
}
|
||||
$scene = [$sceneKey => $key];
|
||||
$scene = [ $sceneKey => $key ];
|
||||
$param = [
|
||||
'expire_seconds' => $expire_seconds,
|
||||
'action_name' => $type,
|
||||
|
||||
230
niucloud/app/upgrade/v142/Upgrade.php
Normal file
230
niucloud/app/upgrade/v142/Upgrade.php
Normal file
@ -0,0 +1,230 @@
|
||||
<?php
|
||||
|
||||
namespace app\upgrade\v142;
|
||||
|
||||
use app\model\diy\Diy;
|
||||
|
||||
class Upgrade
|
||||
{
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$this->handleDiyData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理自定义数据
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
private function handleDiyData()
|
||||
{
|
||||
$diy_model = new Diy();
|
||||
$where = [
|
||||
[ 'value', '<>', '' ]
|
||||
];
|
||||
$field = 'id,name,title,template,value';
|
||||
$list = $diy_model->where($where)->field($field)->select()->toArray();
|
||||
|
||||
if (!empty($list)) {
|
||||
foreach ($list as $k => $v) {
|
||||
$diy_data = json_decode($v[ 'value' ], true);
|
||||
|
||||
foreach ($diy_data[ 'value' ] as $ck => $cv) {
|
||||
|
||||
// 轮播搜索 组件
|
||||
if ($cv[ 'componentName' ] == 'CarouselSearch') {
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'search' ][ 'color' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'search' ][ 'color' ] = '#999999';
|
||||
}
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'search' ][ 'btnColor' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'search' ][ 'btnColor' ] = '#FFFFFF';
|
||||
}
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'search' ][ 'bgColor' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'search' ][ 'bgColor' ] = '#FFFFFF';
|
||||
}
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'search' ][ 'btnBgColor' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'search' ][ 'btnBgColor' ] = '#FF3434';
|
||||
}
|
||||
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'search' ][ 'style' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'search' ][ 'style' ] = 'style-1';
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'search' ][ 'styleName' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'search' ][ 'styleName' ] = '风格一';
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'search' ][ 'subTitle' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'search' ][ 'subTitle' ] = [
|
||||
"text" => "本地好价·优选生活",
|
||||
"textColor" => "#000000",
|
||||
"startColor" => "rgba(255,255,255,0.7)",
|
||||
"endColor" => "",
|
||||
];
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'search' ][ 'positionColor' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'search' ][ 'positionColor' ] = '#FFFFFF';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 活动魔方 组件
|
||||
if ($cv[ 'componentName' ] == 'ActiveCube') {
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'textImg' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'textImg' ] = 'static/resource/images/diy/active_cube/active_cube_text1.png';
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'blockStyle' ][ 'btnText' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'blockStyle' ] [ 'btnText' ] = 'normal';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 优惠券 组件
|
||||
if ($cv[ 'componentName' ] == 'GoodsCoupon') {
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'titleColor' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'titleColor' ] = '#FFFFFF';
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'subTitleColor' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'subTitleColor' ] = '#FFFFFF';
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'couponItem' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'couponItem' ] = [
|
||||
"bgColor" => "#FFFFFF",
|
||||
"textColor" => "#333333",
|
||||
"subTextColor" => "#666666",
|
||||
"moneyColor" => "#333333",
|
||||
"aroundRadius" => 12
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
// 商品列表、多商品组
|
||||
if ($cv[ 'componentName' ] == 'GoodsList' || $cv[ 'componentName' ] == 'ManyGoodsList') {
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'goodsNameStyle' ][ 'isShow' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'goodsNameStyle' ][ 'isShow' ] = true;
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'isShow' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'isShow' ] = true;
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'control' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'control' ] = true;
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'color' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'color' ] = '#FF4142';
|
||||
}
|
||||
|
||||
if (isset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'mainColor' ])) {
|
||||
unset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'mainColor' ]);
|
||||
}
|
||||
|
||||
if (isset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'mainControl' ])) {
|
||||
unset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'mainControl' ]);
|
||||
}
|
||||
|
||||
if (isset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'lineColor' ])) {
|
||||
unset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'lineColor' ]);
|
||||
}
|
||||
|
||||
if (isset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'lineControl' ])) {
|
||||
unset($diy_data[ 'value' ][ $ck ][ 'priceStyle' ][ 'lineControl' ]);
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'saleStyle' ][ 'isShow' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'saleStyle' ][ 'isShow' ] = true;
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'labelStyle' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'labelStyle' ] = [
|
||||
"control" => true,
|
||||
"isShow" => true
|
||||
];
|
||||
}
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'btnStyle' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'btnStyle' ] = [
|
||||
"fontWeight" => false,
|
||||
"padding" => 0,
|
||||
"aroundRadius" => 25,
|
||||
"cartEvent" => "detail",
|
||||
"text" => "购买",
|
||||
"textColor" => "#FFFFFF",
|
||||
"startBgColor" => "#FF4142",
|
||||
"endBgColor" => "#FF4142",
|
||||
"style" => "button",
|
||||
"control" => true
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 图片展播 组件
|
||||
if ($cv[ 'componentName' ] == 'PictureShow') {
|
||||
if ($diy_data[ 'value' ][ $ck ][ 'moduleOne' ][ 'head' ][ 'textImg' ] == 'addon/shop/diy/index/style3/picture_show_head_text3.png') {
|
||||
$diy_data[ 'value' ][ $ck ][ 'moduleOne' ][ 'head' ][ 'textImg' ] = 'static/resource/images/diy/picture_show/picture_show_head_text3.png';
|
||||
}
|
||||
|
||||
if ($diy_data[ 'value' ][ $ck ][ 'moduleOne' ][ 'list' ]) {
|
||||
|
||||
foreach ($diy_data[ 'value' ][ $ck ][ 'moduleOne' ][ 'list' ] as $ps_k => $ps_v) {
|
||||
if ($ps_v[ 'imageUrl' ] == 'addon/shop/diy/index/style3/picture_show_goods5.png') {
|
||||
$diy_data[ 'value' ][ $ck ][ 'moduleOne' ][ 'list' ][ $ps_k ][ 'imageUrl' ] = 'static/resource/images/diy/picture_show/picture_05.png';
|
||||
}
|
||||
if ($ps_v[ 'imageUrl' ] == 'addon/shop/diy/index/style3/picture_show_goods6.png') {
|
||||
$diy_data[ 'value' ][ $ck ][ 'moduleOne' ][ 'list' ][ $ps_k ][ 'imageUrl' ] = 'static/resource/images/diy/picture_show/picture_06.png';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($diy_data[ 'value' ][ $ck ][ 'moduleTwo' ][ 'head' ][ 'textImg' ] == 'addon/shop/diy/index/style3/picture_show_head_text4.png') {
|
||||
$diy_data[ 'value' ][ $ck ][ 'moduleTwo' ][ 'head' ][ 'textImg' ] = 'static/resource/images/diy/picture_show/picture_show_head_text4.png';
|
||||
}
|
||||
|
||||
if ($diy_data[ 'value' ][ $ck ][ 'moduleTwo' ][ 'list' ]) {
|
||||
|
||||
foreach ($diy_data[ 'value' ][ $ck ][ 'moduleTwo' ][ 'list' ] as $ps_k => $ps_v) {
|
||||
if ($ps_v[ 'imageUrl' ] == 'addon/shop/diy/index/style3/picture_show_goods7.png') {
|
||||
$diy_data[ 'value' ][ $ck ][ 'moduleTwo' ][ 'list' ][ $ps_k ][ 'imageUrl' ] = 'static/resource/images/diy/picture_show/picture_07.png';
|
||||
}
|
||||
if ($ps_v[ 'imageUrl' ] == 'addon/shop/diy/index/style3/picture_show_goods8.png') {
|
||||
$diy_data[ 'value' ][ $ck ][ 'moduleTwo' ][ 'list' ][ $ps_k ][ 'imageUrl' ] = 'static/resource/images/diy/picture_show/picture_08.png';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 图文导航 组件
|
||||
if ($cv[ 'componentName' ] == 'GraphicNav') {
|
||||
|
||||
if (!isset($diy_data[ 'value' ][ $ck ][ 'swiper' ])) {
|
||||
$diy_data[ 'value' ][ $ck ][ 'swiper' ] = [
|
||||
'indicatorColor' => 'rgba(0, 0, 0, 0.3)', // 未选中颜色
|
||||
"indicatorActiveColor" => '#FF0E0E',
|
||||
'indicatorStyle' => 'style-1',
|
||||
'indicatorAlign' => 'center',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
unset($diy_data[ 'global' ][ 'topStatusBar' ][ 'isTransparent' ]);
|
||||
|
||||
$diy_data = json_encode($diy_data);
|
||||
$diy_model->where([ [ 'id', '=', $v[ 'id' ] ] ])->update([ 'value' => $diy_data ]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -26,6 +26,7 @@ class LoginConfig extends Validate
|
||||
'is_username' => 'number|between:0,1',
|
||||
'is_mobile' => 'number|between:0,1',
|
||||
'is_auth_register' => 'number|between:0,1',
|
||||
'is_force_access_user_info' => 'number|between:0,1',
|
||||
'is_bind_mobile' => 'number|between:0,1',
|
||||
|
||||
];
|
||||
@ -37,11 +38,13 @@ class LoginConfig extends Validate
|
||||
'is_mobile.between' => 'validate_member.is_mobile_between',
|
||||
'is_auth_register.number' => 'validate_member.is_auth_register_number',
|
||||
'is_auth_register.between' => 'validate_member.is_auth_register_between',
|
||||
'is_force_access_user_info.number' => 'validate_member.is_force_access_user_info_number',
|
||||
'is_force_access_user_info.between' => 'validate_member.is_force_access_user_info_between',
|
||||
'is_bind_mobile.number' => 'validate_member.is_bind_mobile_number',
|
||||
'is_bind_mobile.between' => 'validate_member.is_bind_mobile_between',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'set' => ['is_username', 'is_mobile', 'is_auth_register', 'is_bind_mobile'],
|
||||
'set' => [ 'is_username', 'is_mobile', 'is_auth_register', 'is_force_access_user_info', 'is_bind_mobile' ],
|
||||
];
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'version' => '1.4.1',
|
||||
'code' => '202409270001'
|
||||
'version' => '1.4.2',
|
||||
'code' => '202411210001'
|
||||
];
|
||||
|
||||
@ -32,7 +32,7 @@ class BaseModel extends Model
|
||||
}
|
||||
$tables = Db::query($sql);
|
||||
$table_info = $tables[0] ?? [];
|
||||
$table_name = str_replace($tablePrefix, '', $table_info['Name']);
|
||||
$table_name = preg_replace("/^{$tablePrefix}/", '', $table_info['Name'], 1);
|
||||
return Db::name($table_name)->getFields();
|
||||
}
|
||||
|
||||
|
||||
@ -39,6 +39,14 @@ class Wechatpay extends BasePay
|
||||
$config['mch_public_cert_path'] = url_to_path($config['mch_public_cert_path'] ?? '');
|
||||
// 选填-默认为正常模式。可选为: MODE_NORMAL, MODE_SERVICE
|
||||
$config['mode'] = Pay::MODE_NORMAL;
|
||||
if (!empty($config['wechat_public_cert_path']) && !empty($config['wechat_public_cert_id'])) {
|
||||
$config['wechat_public_cert_path'] = [
|
||||
$config['wechat_public_cert_id'] => url_to_path($config['wechat_public_cert_path'])
|
||||
];
|
||||
} else {
|
||||
unset($config['wechat_public_cert_path']);
|
||||
unset($config['wechat_public_cert_id']);
|
||||
}
|
||||
Pay::config($this->payConfig($config, 'wechat'));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user