提交代码
This commit is contained in:
parent
bab5601c6a
commit
8b960d09d4
|
|
@ -18,7 +18,7 @@ use app\common\model\OrderList;
|
||||||
use app\common\model\UserAccount;
|
use app\common\model\UserAccount;
|
||||||
use app\common\model\UserLoginIp;
|
use app\common\model\UserLoginIp;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
use think\helper\Str;
|
||||||
class User extends Base
|
class User extends Base
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
@ -224,6 +224,51 @@ class User extends Base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清空手机号
|
||||||
|
*/
|
||||||
|
public function usermobileclear(Request $request)
|
||||||
|
{
|
||||||
|
$id = request()->post('id/d', 0);
|
||||||
|
|
||||||
|
$user = UserModel::getInfo(['id' => $id]);
|
||||||
|
if (!$user) {
|
||||||
|
return $this->err('数据不存在');
|
||||||
|
}
|
||||||
|
$result = $user->save(["mobile" => '']);
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
return $this->renderSuccess('操作成功');
|
||||||
|
} else {
|
||||||
|
return $this->renderError('操作失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清空微信登录数据
|
||||||
|
*/
|
||||||
|
public function userwxclear(Request $request)
|
||||||
|
{
|
||||||
|
$id = request()->post('id/d', 0);
|
||||||
|
|
||||||
|
$user = UserModel::getInfo(['id' => $id]);
|
||||||
|
if (!$user) {
|
||||||
|
return $this->err('数据不存在');
|
||||||
|
}
|
||||||
|
$result = $user->save(["openid" => Str::random(32)]);
|
||||||
|
$useraccount = UserAccount::getInfo(['user_id' => $id]);
|
||||||
|
if ($useraccount != null) {
|
||||||
|
$useraccount->save(['account_token' => '']);
|
||||||
|
}
|
||||||
|
if ($result) {
|
||||||
|
return $this->renderSuccess('操作成功');
|
||||||
|
} else {
|
||||||
|
return $this->renderError('操作失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ip转换
|
ip转换
|
||||||
*/
|
*/
|
||||||
|
|
@ -695,7 +740,9 @@ class User extends Base
|
||||||
$user_item['user_item_price'] = $user_item_price;
|
$user_item['user_item_price'] = $user_item_price;
|
||||||
$u_index++;
|
$u_index++;
|
||||||
$u_price += $user_item_price;
|
$u_price += $user_item_price;
|
||||||
$u_order += $user_item_order;
|
if ($user_item_order && $user_item_order > 0) {
|
||||||
|
$u_order++;
|
||||||
|
}
|
||||||
if ($user_item['mobile'] && $user_item['mobile'] != "") {
|
if ($user_item['mobile'] && $user_item['mobile'] != "") {
|
||||||
$u_mobile_count++;
|
$u_mobile_count++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,10 @@ Route::rule('detailed_flow', 'User/detailed_flow', 'GET|POST');
|
||||||
Route::rule('user_team', 'User/user_team', 'GET|POST');
|
Route::rule('user_team', 'User/user_team', 'GET|POST');
|
||||||
Route::rule('ip_list', 'User/ip_list', 'GET|POST');
|
Route::rule('ip_list', 'User/ip_list', 'GET|POST');
|
||||||
Route::rule('ipzh', 'User/ipzh', 'GET|POST');
|
Route::rule('ipzh', 'User/ipzh', 'GET|POST');
|
||||||
|
|
||||||
|
Route::rule('usermobileclear', 'User/usermobileclear', 'POST');//清空手机号
|
||||||
|
Route::rule('userwxclear', 'User/userwxclear', 'POST');//清空微信登录数据
|
||||||
|
|
||||||
#============================
|
#============================
|
||||||
#Finance.php财务管理
|
#Finance.php财务管理
|
||||||
#============================
|
#============================
|
||||||
|
|
|
||||||
|
|
@ -123,36 +123,48 @@
|
||||||
<td>{$vo['ip_adcode']}</td>
|
<td>{$vo['ip_adcode']}</td>
|
||||||
<td>
|
<td>
|
||||||
<!--<a style="text-decoration:none" name="{$vo.nickname}" onClick="give_goodslist({$vo.id},this.name)" class="layui-btn layui-btn-success layui-btn-xs">赠送卡册</a>-->
|
<!--<a style="text-decoration:none" name="{$vo.nickname}" onClick="give_goodslist({$vo.id},this.name)" class="layui-btn layui-btn-success layui-btn-xs">赠送卡册</a>-->
|
||||||
<a style="text-decoration:none" title="赠送优惠券" href="javscript:;"
|
<div style="padding: 5px;">
|
||||||
onclick="give('优惠券','{$vo['mobile']}','{$vo['id']}')"
|
<a style="text-decoration:none" title="赠送优惠券" href="javscript:;"
|
||||||
class="layui-btn layui-btn-default layui-btn-xs">赠送优惠券</a>
|
onclick="give('优惠券','{$vo['mobile']}','{$vo['id']}')"
|
||||||
{if condition="$vo['status'] eq 1"}
|
class="layui-btn layui-btn-default layui-btn-xs">赠送优惠券</a>
|
||||||
<a style="text-decoration:none" name="{$vo.nickname}"
|
|
||||||
onClick="del({$vo.id},2,this.name,'封号')"
|
{if condition="$vo['status'] eq 1"}
|
||||||
class="layui-btn layui-btn-danger layui-btn-xs">封号</a>
|
<a style="text-decoration:none" name="{$vo.nickname}"
|
||||||
{else /}
|
onClick="del({$vo.id},2,this.name,'封号')"
|
||||||
<a style="text-decoration:none" name="{$vo.nickname}"
|
class="layui-btn layui-btn-danger layui-btn-xs">封号</a>
|
||||||
onClick="del({$vo.id},1,this.name,'解封')"
|
{else /}
|
||||||
class="layui-btn layui-btn-success layui-btn-xs">解封</a>
|
<a style="text-decoration:none" name="{$vo.nickname}"
|
||||||
{/if}
|
onClick="del({$vo.id},1,this.name,'解封')"
|
||||||
{if condition="$vo['istest'] eq 0"}
|
class="layui-btn layui-btn-success layui-btn-xs">解封</a>
|
||||||
<a style="text-decoration:none" name="{$vo.nickname}"
|
{/if}
|
||||||
onClick="test({$vo.id},1,this.name,'设为推广账号')"
|
{if condition="$vo['istest'] eq 0"}
|
||||||
class="layui-btn layui-btn-danger layui-btn-xs">推广账号</a>
|
<a style="text-decoration:none" name="{$vo.nickname}"
|
||||||
{else /}
|
onClick="test({$vo.id},1,this.name,'设为推广账号')"
|
||||||
<a style="text-decoration:none" name="{$vo.nickname}"
|
class="layui-btn layui-btn-danger layui-btn-xs">推广账号</a>
|
||||||
onClick="test({$vo.id},0,this.name,'取消推广账号')"
|
{else /}
|
||||||
class="layui-btn layui-btn-success layui-btn-xs">取消推广账号</a>
|
<a style="text-decoration:none" name="{$vo.nickname}"
|
||||||
{/if}
|
onClick="test({$vo.id},0,this.name,'取消推广账号')"
|
||||||
<a title="查看详情" onClick="detail({$vo.id})"
|
class="layui-btn layui-btn-success layui-btn-xs">取消推广账号</a>
|
||||||
class="layui-btn layui-btn-normal layui-btn-xs">查看下级</a>
|
{/if}
|
||||||
<a title="查看ip登录列表" onClick="ipdetail({$vo.id})"
|
<a title="查看详情" onClick="detail({$vo.id})"
|
||||||
class="layui-btn layui-btn-normal layui-btn-xs">查看ip登录列表</a>
|
class="layui-btn layui-btn-normal layui-btn-xs">查看下级</a>
|
||||||
{if condition="$vo['ip_adcode'] eq 1"}
|
<a title="查看ip登录列表" onClick="ipdetail({$vo.id})"
|
||||||
<a style="text-decoration:none" name="{$vo.nickname}"
|
class="layui-btn layui-btn-normal layui-btn-xs">查看ip登录列表</a>
|
||||||
onClick="ipzh({$vo.id},2,this.name,'ip转换')"
|
{if condition="$vo['ip_adcode'] eq 1"}
|
||||||
class="layui-btn layui-btn-danger layui-btn-xs">ip转换</a>
|
<a style="text-decoration:none" name="{$vo.nickname}"
|
||||||
{/if}
|
onClick="ipzh({$vo.id},2,this.name,'ip转换')"
|
||||||
|
class="layui-btn layui-btn-danger layui-btn-xs">ip转换</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="padding: 10px;">
|
||||||
|
<a style="text-decoration:none" name="{$vo.nickname}"
|
||||||
|
onClick="usermobileclear({$vo.id},2,this.name)"
|
||||||
|
class="layui-btn layui-btn-danger layui-btn-xs">清空手机号</a>
|
||||||
|
<a style="text-decoration:none" name="{$vo.nickname}"
|
||||||
|
onClick="userwxclear({$vo.id},2,this.name)"
|
||||||
|
class="layui-btn layui-btn-danger layui-btn-xs">重置微信登录</a>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/volist}
|
{/volist}
|
||||||
|
|
@ -307,6 +319,52 @@
|
||||||
content: url,
|
content: url,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//解封/封号
|
||||||
|
function usermobileclear(id, type, username) {
|
||||||
|
title_str = '确认要执行' + username + '的清空手机号操作吗?清空后通过手机号将搜索不到用户!同时用户需要重新绑定手机号才能抽奖!';
|
||||||
|
layer.confirm(title_str, { icon: 2, title: '清除手机号' }, function () {
|
||||||
|
var url = "{:url('/admin/usermobileclear')}";
|
||||||
|
var load = layer.load(2);
|
||||||
|
var $ = layui.$;
|
||||||
|
$.post(url, { "id": id }, function (data) {
|
||||||
|
if (data.status == 1) {
|
||||||
|
layer.msg(data.msg+";请手动刷新页面!", { icon: 1, time: 1000 }, function () {
|
||||||
|
// location.reload();
|
||||||
|
layer.close(load);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(data.msg, { icon: 2, anim: 6, time: 1500 }, function () {
|
||||||
|
layer.close(load);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//解封/封号
|
||||||
|
function userwxclear(id, type, username) {
|
||||||
|
title_str = '确认要执行' + username + '的清空微信关联数据操作吗?清空后通过微信号将关联不到此账号!微信设为新账号需要同时清除手机号操作!!!';
|
||||||
|
layer.confirm(title_str, { icon: 2, title: '清除微信号' }, function () {
|
||||||
|
var url = "{:url('/admin/userwxclear')}";
|
||||||
|
var load = layer.load(2);
|
||||||
|
var $ = layui.$;
|
||||||
|
$.post(url, { "id": id }, function (data) {
|
||||||
|
if (data.status == 1) {
|
||||||
|
layer.msg(data.msg+";请手动刷新页面!", { icon: 1, time: 1000 }, function () {
|
||||||
|
// location.reload();
|
||||||
|
layer.close(load);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(data.msg, { icon: 2, anim: 6, time: 1500 }, function () {
|
||||||
|
layer.close(load);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,9 @@
|
||||||
|
|
||||||
|
|
||||||
<th lay-data="{field:'info'}">邀请信息</th>
|
<th lay-data="{field:'info'}">邀请信息</th>
|
||||||
<th lay-data="{field:'invitenumber', width:150}">绑定手机数</th>
|
<th lay-data="{field:'count_mobile', width:150}">绑定手机数</th>
|
||||||
<th lay-data="{field:'invitenumber', width:150}">消费人数</th>
|
<th lay-data="{field:'sum_order', width:150}">消费人数</th>
|
||||||
<th lay-data="{field:'invitenumber', width:150}">消费总金额</th>
|
<th lay-data="{field:'sum_price', width:150}">消费总金额</th>
|
||||||
<th lay-data="{field:'xxx', width:150}">操作</th>
|
<th lay-data="{field:'xxx', width:150}">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user