mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev
This commit is contained in:
commit
204cb786bf
@ -257,9 +257,20 @@ class SystemCrud extends AuthController
|
||||
|
||||
//调整排序
|
||||
$makeData = [];
|
||||
$names = ['controller', 'validate', 'service', 'dao', 'model', 'route', 'router', 'api', 'pages'];
|
||||
foreach ($names as $name) {
|
||||
$names = [
|
||||
'controller' => '控制器',
|
||||
'validate' => '验证器',
|
||||
'service' => '逻辑层',
|
||||
'dao' => '数据库操作',
|
||||
'model' => '模型层',
|
||||
'route' => '后端路由',
|
||||
'router' => '前端路由',
|
||||
'api' => '前端接口',
|
||||
'pages' => '前端页面'
|
||||
];
|
||||
foreach ($names as $name => $value) {
|
||||
if (isset($data[$name])) {
|
||||
$data[$name]['file_name'] = $value;
|
||||
$makeData[] = $data[$name];
|
||||
}
|
||||
}
|
||||
@ -341,6 +352,15 @@ class SystemCrud extends AuthController
|
||||
{
|
||||
$comment = $request->param('comment');
|
||||
$filepath = $request->param('filepath');
|
||||
$pwd = $request->param('pwd');
|
||||
|
||||
if ($pwd == '') {
|
||||
return app('json')->fail('请输入文件管理密码');
|
||||
}
|
||||
if (config('filesystem.password') != $pwd) {
|
||||
return app('json')->fail('文件管理密码错误');
|
||||
}
|
||||
|
||||
if (empty($filepath) || !$id) {
|
||||
return app('json')->fail(410087);
|
||||
}
|
||||
|
||||
@ -502,7 +502,7 @@ class SystemCrudServices extends BaseServices
|
||||
|
||||
$data['softDelete'] = false;
|
||||
|
||||
$tableInfo = null;
|
||||
//先检查表存在则
|
||||
if ($id) {
|
||||
$this->updateFromCommon($tableName, $tableComment);
|
||||
//删除数据库表
|
||||
@ -516,7 +516,9 @@ class SystemCrudServices extends BaseServices
|
||||
throw new AdminException('表已经被生成过,请在列表中进行修改');
|
||||
}
|
||||
}
|
||||
|
||||
//创建数据库
|
||||
$tableCreateInfo = null;
|
||||
if ($tableField && (!$data['isTable'] || !$tableInfo)) {
|
||||
$tableCreateInfo = $this->makeDatebase($tableName, $tableComment, $tableField);
|
||||
if ($tableCreateInfo['softDelete']) {
|
||||
@ -530,6 +532,7 @@ class SystemCrudServices extends BaseServices
|
||||
throw new AdminException(500049, ['_name' => $tableName]);
|
||||
}
|
||||
|
||||
//读取字段
|
||||
//读取数据库字段信息
|
||||
$tableInfo = $this->getTableInfo($tableName);
|
||||
|
||||
@ -572,7 +575,7 @@ class SystemCrudServices extends BaseServices
|
||||
$crudInfo = $this->dao->get($id);
|
||||
}
|
||||
|
||||
$res = $this->transaction(function () use ($crudInfo, $tableInfo, $modelName, $filePath, $tableName, $routeName, $data, $dataMenu) {
|
||||
$res = $this->transaction(function () use ($tableCreateInfo, $crudInfo, $tableInfo, $modelName, $filePath, $tableName, $routeName, $data, $dataMenu) {
|
||||
$routeService = app()->make(SystemRouteServices::class);
|
||||
$meunService = app()->make(SystemMenusServices::class);
|
||||
//修改菜单名称
|
||||
@ -681,6 +684,12 @@ class SystemCrudServices extends BaseServices
|
||||
$makePath[$key] = $item['path'];
|
||||
}
|
||||
|
||||
if ($tableCreateInfo && isset($tableCreateInfo['table']) && $tableCreateInfo['table'] instanceof Table) {
|
||||
//创建数据库
|
||||
$tableCreateInfo['table']->create();
|
||||
$tableInfo = $this->getTableInfo($tableName);
|
||||
}
|
||||
|
||||
$crudDate = [
|
||||
'pid' => $data['pid'],
|
||||
'name' => $data['menuName'],
|
||||
@ -816,10 +825,8 @@ class SystemCrudServices extends BaseServices
|
||||
$table->addIndex($item);
|
||||
}
|
||||
}
|
||||
//执行创建
|
||||
$table->create();
|
||||
|
||||
return compact('indexField', 'softDelete', 'timestamps');
|
||||
return compact('indexField', 'softDelete', 'timestamps', 'table');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1569,6 +1569,7 @@ class UserServices extends BaseServices
|
||||
$user['integral'] = intval($user['integral']);
|
||||
$user['is_agent_level'] = $agentLevelServices->count(['status' => 1, 'is_del' => 0]) > 0 ? 1 : 0;
|
||||
$user['division_open'] = (int)sys_config('division_status', 0);
|
||||
$user['agent_apply_open'] = (int)sys_config('agent_apply_open', 0);
|
||||
$user['is_default_avatar'] = $user['avatar'] == sys_config('h5_avatar') ? 1 : 0;
|
||||
$user['avatar'] = strpos($user['avatar'], '/statics/system_images/') !== false ? set_file_url($user['avatar']) : $user['avatar'];
|
||||
return $user;
|
||||
|
||||
@ -111,14 +111,16 @@ class WechatPay extends BasePay implements PayInterface
|
||||
$refundAccount = $opt['refund_account'] ?? 'REFUND_SOURCE_UNSETTLED_FUNDS';
|
||||
if (isset($opt['wechat'])) {
|
||||
$result = WechatService::refund($outTradeNo, $refundNo, $totalFee, $refundFee, $opUserId, $refundReason, $type, $refundAccount);
|
||||
if ($result['status'] != 'SUCCESS') throw new AdminException($result['status']);
|
||||
if(isset($result['return_code']) && $result['return_code'] != 'SUCCESS') throw new AdminException($result['return_msg']);
|
||||
if(isset($result['status']) && $result['status'] != 'SUCCESS') throw new AdminException($result['status']);
|
||||
} else {
|
||||
if ($opt['pay_new_weixin_open']) {
|
||||
$result = MiniProgramService::miniRefund($outTradeNo, $totalFee, $refundFee, $opt);
|
||||
if ($result['errcode'] != 0) throw new AdminException($result['errmsg']);
|
||||
} else {
|
||||
$result = MiniProgramService::refund($outTradeNo, $refundNo, $totalFee, $refundFee, $opUserId, $refundReason, $type, $refundAccount);
|
||||
if ($result['status'] != 'SUCCESS') throw new AdminException($result['status']);
|
||||
if(isset($result['return_code']) && $result['return_code'] != 'SUCCESS') throw new AdminException($result['return_msg']);
|
||||
if(isset($result['status']) && $result['status'] != 'SUCCESS') throw new AdminException($result['status']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,13 +23,13 @@
|
||||
</FormItem>
|
||||
<FormItem label="发送方式">
|
||||
<RadioGroup v-model="formData.receive_type">
|
||||
<Radio :label="1">手动领取</Radio>
|
||||
<Radio :label="1">用户领取</Radio>
|
||||
<Radio :label="2">新用户自动发放</Radio>
|
||||
<Radio :label="3">后台赠送</Radio>
|
||||
<Radio :label="3">系统赠送</Radio>
|
||||
<Radio :label="4">付费会员专享</Radio>
|
||||
</RadioGroup>
|
||||
<div class="tip">
|
||||
手动领取:用户需要手动领取优惠券;新用户自动发放:新注册的用户自动发放;后台赠送:后台发放制定用户或者添加到商品里面用户购买该商品获得;付费会员专享:仅付费会员可以领取和使用
|
||||
用户领取:用户需要手动领取优惠券;新用户自动发放:新注册的用户自动发放;系统赠送:后台发放制定用户或者添加到商品里面用户购买该商品获得;付费会员专享:仅付费会员可以领取和使用
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="优惠劵类型">
|
||||
|
||||
@ -588,9 +588,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
syncRoute() {
|
||||
this.$Modal.warning({
|
||||
this.$Modal.confirm({
|
||||
title: '立即同步',
|
||||
content: '您确认立即同步路由权限?',
|
||||
content: '同步之后,路由文件中新增的接口添加到接口列表中,路由文件中删除的路由会同步的在接口列表中删除',
|
||||
onOk: () => {
|
||||
syncRoute(this.app_name).then((res) => {
|
||||
this.getInterfaceList('one');
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="apply"
|
||||
v-if="userInfo.division_open && ((userInfo.is_division && userInfo.division_invite && userInfo.division_status) || (!userInfo.is_division && !userInfo.is_agent))">
|
||||
v-if="userInfo.division_open && userInfo.agent_apply_open && ((userInfo.is_division && userInfo.division_invite && userInfo.division_status) || (!userInfo.is_division && !userInfo.is_agent))">
|
||||
<view v-if="userInfo.is_division">{{$t(`邀请码`)}}:{{userInfo.division_invite}}</view>
|
||||
<view v-if="!userInfo.is_division && !userInfo.is_agent">
|
||||
<navigator url='/pages/annex/settled/index' hover-class="none">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user