Commit 72f77ec2 by 杨树贤
parents 14fd421d 78b4a962
......@@ -52,5 +52,5 @@ MENU_SIGN=/web/
LOGIN_DOMAIN=user.icsales.cc
ES_URL = http://soapi.icsales.com:8001
BASE_SERVER_URL = 192.168.20.10:61009
BASE_SERVER_URL = 192.168.2.232:61009
......@@ -19,6 +19,9 @@ class InviteTransformer
{
if (isset($data['data'])&&is_array($data['data'])) {
$userIds = array_column($data['data'], 'user_id');
$invitedUserIds = array_column($data['data'], 'invited_user_id');
$userIds = array_merge($userIds, $invitedUserIds);
$userIds = array_unique($userIds);
if ($userIds) {
$users = $this->service->getUsersFromRedis($userIds);
$mobiles = [];
......@@ -26,19 +29,23 @@ class InviteTransformer
$mobiles[$user['user_id']] = $user['mobile'];
}
$invitedUserIds = array_column($data['data'], 'invited_user_id');
$invitedUsers = $this->service->getUsersFromRedis($invitedUserIds);
$invitedUserMobiles = [];
foreach ($users as $invitedUsers) {
$invitedUserMobiles[$invitedUsers['user_id']] = $user['mobile'];
}
// $invitedUserIds = array_column($data['data'], 'invited_user_id');
// $invitedUsers = $this->service->getUsersFromRedis($invitedUserIds);
// $invitedUserMobiles = [];
// dd($users);
// foreach ($users as $invitedUsers) {
// $invitedUserMobiles[$invitedUsers['user_id']] = $mobiles[$invitedUsers['user_id']];
// }
foreach ($data['data'] as &$item) {
//获取邀请人的手机
$item['mobile'] = array_get($mobiles, $item['user_id']);
$item['add_time'] = date('Y-m-d H:i:s', $item['add_time']);
//获取被邀请人的手机
$item['invited_user_mobile'] = array_get($invitedUserMobiles,$item['user_id']);
$item['invited_user_mobile'] = array_get($mobiles,$item['invited_user_id']);
// if(empty($item['invited_user_mobile'])){
// dd($item['invited_user_id']);
// }
}
}
unset($item);
......
......@@ -111,7 +111,7 @@ layui.use(['table', 'form', 'laydate', 'layer'], function () {
});
break;
case 'edit':
window.location = '/integrals/updateIntegral?id=' + obj.data.id;
window.open('/integrals/updateIntegral?id=' + obj.data.id);
break;
}
});
......
......@@ -34,6 +34,7 @@ layui.use(['table', 'form', 'laydate', 'layer'], function () {
, {field: 'invited_user_id', title: '被邀请用户Id'}
, {field: 'invited_user_mobile', title: '被邀请用户手机'}
, {field: 'add_time', title: '邀请时间'}
, {field: 'status', title: '认证状态', templet:'#status'}
]]
, id: 'Invite'
, page: {}
......
......@@ -115,11 +115,11 @@ table.on('tool(UserExchange)', function (obj) {
var layEvent = obj.event;
switch (layEvent) {
case 'audit':
window.location = `/user_exchanges/auditUserExchange?id=${obj.data.id}&user_id=${obj.data.user_id}`;
window.open(`/user_exchanges/auditUserExchange?id=${obj.data.id}&user_id=${obj.data.user_id}`);
break;
case 'bills':
window.location = '/user_exchanges/userExchangeBillList?user_id='
+ obj.data.user_id;
window.open( '/user_exchanges/userExchangeBillList?user_id='
+ obj.data.user_id);
break;
}
});
......
......@@ -93,7 +93,7 @@ layui.use(['table', 'form', 'laydate', 'layer'], function () {
});
break;
case 'bills':
window.location = '/integral_bills/integralBillList?user_id=' + obj.data.user_id;
window.open('/integral_bills/integralBillList?user_id=' + obj.data.user_id);
break;
}
});
......
......@@ -4,7 +4,7 @@
<li class="nav-header">
<div class="feed-element profile-element">
<a class="pull-left">
<img alt="image" class="img-circle" src="{{ $header }}" onerror="this.src='/img/missing_face.png';" style="width:40px;"/>
<img alt="image" class="img-circle" src="{{ $header }}" onerror="this.src='https://www.ichunt.com/v3/dist/res/home/images/headimg/boy2.png';" style="width:40px;"/>
</a>
<div class="media-body">
<strong class="font-bold" style="color:#FFF" >{{ $username }}</strong>
......
......@@ -34,7 +34,7 @@
<div class="layui-card-body" style="padding-top: 20px">
<div style="padding-bottom: 10px;">
{{-- <button class="layui-btn layui-btn-danger layuiadmin-btn-list" data-type="batchdel">禁用</button>--}}
<a href="/exchange/settings/createExchangeSetting" class="layui-btn layuiadmin-btn-list"
<a href="/exchange/settings/createExchangeSetting" target="_blank" class="layui-btn layuiadmin-btn-list"
data-type="add">添加</a>
</div>
<table class="layui-table" id="list" lay-filter="ExchangeSetting"></table>
......
......@@ -28,3 +28,20 @@
<table class="layui-table" id="Invite" lay-filter="Invite"></table>
</div>
</div>
<script type="text/html" id="status">
@{{# if(d.status == 1){ }}
<button class="btn btn-xs btn-outline btn-warning">
<strong>待认证</strong>
</button>
@{{# }else if(d.status ==2 ){ }}
<button class="btn btn-xs btn-outline btn-success">
<strong>已认证</strong>
</button>
@{{# }else{ }}
<button class="btn btn-xs btn-outline btn-danger">
<strong>未知</strong>
</button>
@{{# } }}
</script>
......@@ -49,7 +49,7 @@
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit="" lay-filter="update_integral">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary" onclick="history.back()">返回列表</button>
{{-- <button type="reset" class="layui-btn layui-btn-primary" onclick="history.back()">返回列表</button>--}}
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment