Compare commits

..

10 Commits

Author SHA1 Message Date
cbada0b5c5 配置修改 2026-05-15 18:20:20 +08:00
378389b66b 配置修改 2026-05-15 18:18:59 +08:00
5887dc402a 配置修改 2026-05-15 18:17:04 +08:00
edf47a5cc3 配置修改 2026-05-09 14:18:02 +08:00
b24dbee5b0 配置修改 2026-04-25 17:52:27 +08:00
31604027e3 提交 2026-04-25 17:50:31 +08:00
557798d558 配置修改 2026-04-25 17:45:59 +08:00
1c67b47ff6 c\\\\\\ 2026-04-25 17:39:40 +08:00
21b36969ff 本次提交 2026-04-25 17:39:00 +08:00
3411c8b129 配置修改 2026-04-25 17:37:48 +08:00
7 changed files with 29 additions and 25 deletions

View File

@ -0,0 +1 @@
oslWGWc_CQW7j5ihsEgwDCIM9UCRJ6F4xYpl6BoI2mU.rGo-7MeQym6vvdWtE2EmeK-QrR4vQClzR5C-LJqfurM

View File

@ -44,7 +44,7 @@
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label reqRed">一级佣金比例</label> <label class="layui-form-label reqRed">平台比例</label>
<div class="layui-inline"> <div class="layui-inline">
<input type="number" min="0" name="first_ratio" value="{$detail.first_ratio}" required lay-verify="required" autocomplete="off" class="layui-input" /> <input type="number" min="0" name="first_ratio" value="{$detail.first_ratio}" required lay-verify="required" autocomplete="off" class="layui-input" />
</div> </div>
@ -53,7 +53,7 @@
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label reqRed">二级佣金比例</label> <label class="layui-form-label reqRed">分销会员比例</label>
<div class="layui-inline"> <div class="layui-inline">
<input type="number" min="0" name="second_ratio" value="{$detail.second_ratio}" required lay-verify="required" autocomplete="off" class="layui-input" /> <input type="number" min="0" name="second_ratio" value="{$detail.second_ratio}" required lay-verify="required" autocomplete="off" class="layui-input" />
</div> </div>

View File

@ -18,9 +18,9 @@
</div> </div>
<div class="layui-card-body"> <div class="layui-card-body">
<!--功能按钮--> <!--功能按钮-->
<div class="btns"> <!-- <div class="btns">-->
<buttion class="layui-btn layui-btn-sm layui-bg-blue" id="add">添加分销等级</buttion> <!-- <buttion class="layui-btn layui-btn-sm layui-bg-blue" id="add">添加分销等级</buttion>-->
</div> <!-- </div>-->
<!--数据表格--> <!--数据表格-->
<table id="lists" lay-filter="lists"></table> <table id="lists" lay-filter="lists"></table>
<!--工具条模板--> <!--工具条模板-->
@ -54,8 +54,8 @@
,cols: [[ //表头 ,cols: [[ //表头
{field: 'weights_desc', title: '等级级别', width:150} {field: 'weights_desc', title: '等级级别', width:150}
,{field: 'name', title: '等级名称', width:150} ,{field: 'name', title: '等级名称', width:150}
,{field: 'first_ratio', title: '一级佣金比例', width:150} ,{field: 'first_ratio', title: '平台比例', width:150}
,{field: 'second_ratio', title: '二级佣金比例', width: 150} ,{field: 'second_ratio', title: '分销会员比例', width: 150}
,{field: 'members_num', title: '分销会员数', width: 150} ,{field: 'members_num', title: '分销会员数', width: 150}
,{title: '操作', toolbar: '#operate'} ,{title: '操作', toolbar: '#operate'}
]] , text: {none: '暂无数据!'} ]] , text: {none: '暂无数据!'}

View File

@ -34,7 +34,7 @@
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">分销等级</label> <label class="layui-form-label">分销比例</label>
<div class="layui-input-block"> <div class="layui-input-block">
<select name="level_id" id="level_id" placeholder="请选择" > <select name="level_id" id="level_id" placeholder="请选择" >
{foreach $levels as $val } {foreach $levels as $val }

View File

@ -94,19 +94,19 @@ class DistributionLogic extends Logic
public static function apply($post) public static function apply($post)
{ {
$time = time(); $time = time();
$data = [ $data = [
'user_id' => $post['user_id'], 'user_id' => $post['user_id'],
'real_name' => $post['real_name'], 'real_name' => $post['real_name'],
'mobile' => $post['mobile'], 'mobile' => $post['mobile'],
'province' => $post['province'], 'province' => $post['province'],
'city' => $post['city'], 'city' => $post['city'],
'district' => $post['district'], 'district' => $post['district'],
'reason' => $post['reason'], 'reason' => $post['reason'],
'status' => 0, // 待审核 'status' => 0, // 待审核
'create_time' => $time, 'create_time' => $time,
'update_time' => $time 'update_time' => $time
]; ];
return DistributionMemberApply::create($data); return DistributionMemberApply::create($data);
} }
/** /**
@ -374,11 +374,14 @@ class DistributionLogic extends Logic
if($firstLeader->isEmpty()) { if($firstLeader->isEmpty()) {
throw new \think\Exception('无效的二维码'); throw new \think\Exception('无效的二维码');
} }
$user = User::where(['user_id' => $user_id]) $user = User::where(['id' => $user_id])
->find(); ->find();
if($user['first_leader'] != 0) { if($user['first_leader'] != 0) {
throw new \think\Exception('已扫码'); throw new \think\Exception('已扫码');
} }
if($post['user_id'] == $user_id) {
throw new \think\Exception('无法扫自己的码');
}
// 上级 // 上级
$first_leader_id = $firstLeader['id']; $first_leader_id = $firstLeader['id'];
$data = [ $data = [
@ -387,7 +390,7 @@ class DistributionLogic extends Logic
]; ];
// 更新当前用户的分销关系 // 更新当前用户的分销关系
User::where(['id' => $post['user_id']])->update($data); User::where(['id' => $user_id])->update($data);
//通知用户 //通知用户
event('Notice', [ event('Notice', [
'scene' => NoticeEnum::INVITE_SUCCESS_NOTICE, 'scene' => NoticeEnum::INVITE_SUCCESS_NOTICE,
@ -663,7 +666,7 @@ class DistributionLogic extends Logic
try { try {
$width = 430; $width = 430;
// 'env_version' => 'trial', // 'env_version' => 'trial',
// $envVersion = 'develop'; // $envVersion = 'develop';
$envVersion = 'release'; $envVersion = 'release';
$page = "pages/index/index"; $page = "pages/index/index";
$save_dir = public_path() . 'uploads/wxqrcode/'; $save_dir = public_path() . 'uploads/wxqrcode/';

View File

@ -365,7 +365,7 @@ class GoodsLogic extends Logic
self::recordKeyword(trim($get['keyword']), $get['user_id']); self::recordKeyword(trim($get['keyword']), $get['user_id']);
} }
} }
if(isset($get['city_id']) && !empty($get['city_id'])) { if(isset($get['city_id'])) {
$shop_msg = Shop::where("city_id",$get['city_id']) $shop_msg = Shop::where("city_id",$get['city_id'])
->where("is_run",1) ->where("is_run",1)
->where("is_freeze",0) ->where("is_freeze",0)

0
runtime/index.html Normal file → Executable file
View File