细节优化
parent
008376242f
commit
a23d7a68bb
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}}none{{/if}}">
|
||||
|
|
|
|||
|
|
@ -10,8 +10,13 @@
|
|||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" {{if isset($params['is_more']) and $params['is_more'] eq 1}}checked{{/if}} />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}} none{{/if}}">
|
||||
|
|
@ -50,9 +55,8 @@
|
|||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10 m-l-5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>用户头像</th>
|
||||
<th>用户名</th>
|
||||
<th class="am-hide-sm-only">手机号码</th>
|
||||
<th>编号</th>
|
||||
<th>基础信息</th>
|
||||
<th class="am-hide-sm-only">积分</th>
|
||||
<th class="am-hide-sm-only">性别</th>
|
||||
<th class="am-hide-sm-only">状态</th>
|
||||
|
|
@ -65,18 +69,15 @@
|
|||
{{if !empty($data)}}
|
||||
{{foreach $data as $v}}
|
||||
<tr id="data-list-{{$v.id}}">
|
||||
<td>
|
||||
{{if !empty($v['avatar'])}}
|
||||
<img src="{{$v['avatar']}}" class="am-img-thumbnail am-radius" width="60" height="60" />
|
||||
{{else /}}
|
||||
<span class="cr-ddd">暂无图片</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
{{if empty($v['username'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.username}}{{/if}}
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
{{if empty($v['mobile'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.mobile}}{{/if}}
|
||||
<td>{{$v.id}}</td>
|
||||
<td class="user-info">
|
||||
<img src="{{$v.avatar}}" class="am-fl am-img-thumbnail am-radius am-hide-sm-only" />
|
||||
<ul class="user-base am-fl">
|
||||
<li>名称:{{if empty($v['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($v['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.nickname}}{{/if}}</li>
|
||||
<li>手机:{{if empty($v['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.mobile}}{{/if}}</li>
|
||||
<li>邮箱:{{if empty($v['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.email}}{{/if}}</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
{{if empty($v['integral'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.integral}}{{/if}}
|
||||
|
|
@ -170,7 +171,7 @@
|
|||
</tr>
|
||||
{{/foreach}}
|
||||
{{else /}}
|
||||
<tr><td colspan="20" class="table-no">没有相关数据</td></tr>
|
||||
<tr><td colspan="8" class="table-no">没有相关数据</td></tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -13,17 +13,28 @@
|
|||
<div class="wallet-content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-search" action="{{:PluginsAdminUrl('wallet', 'walletadmin', 'index')}}" method="POST">
|
||||
<div class="am-g form-keyword">
|
||||
<input type="text" class="am-form-field am-radius form-search-items" name="keywords" placeholder="用户名/电话/邮箱" {{if !empty($params['keywords'])}} value="{{$params.keywords}}"{{/if}} />
|
||||
<select name="status" class="chosen-select form-search-items" data-placeholder="状态...">
|
||||
<option value="-1">状态...</option>
|
||||
{{if !empty($wallet_status_list)}}
|
||||
<div class="am-g">
|
||||
<input type="text" autocomplete="off" class="am-radius form-keyword" placeholder="姓名/手机/邮箱/昵称" name="keywords" {{if !empty($params['keywords'])}} value="{{$params.keywords}}"{{/if}} />
|
||||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">查询</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
更多筛选
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="more-where {{if !isset($params['is_more']) or $params['is_more'] neq 1}} none{{/if}}">
|
||||
<select name="status" class="am-radius c-p m-t-10 chosen-select param-where" data-placeholder="状态...">
|
||||
<option value="-1">状态...</option>
|
||||
{{foreach $wallet_status_list as $v}}
|
||||
<option value="{{$v.value}}" {{if isset($params['status']) and $params['status'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</select>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-sm" type="submit">查询</button>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
|
|
@ -33,9 +44,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>用户信息</th>
|
||||
<th>可用金额</th>
|
||||
<th>冻结金额</th>
|
||||
<th>赠送金额</th>
|
||||
<th>账户金额(元)</th>
|
||||
<th>状态</th>
|
||||
<th class="am-hide-sm-only">开通时间</th>
|
||||
<th>操作</th>
|
||||
|
|
@ -45,10 +54,32 @@
|
|||
{{if !empty($data_list)}}
|
||||
{{foreach $data_list as $v}}
|
||||
<tr id="data-list-{{$v.id}}" {{if isset($v['status']) and $v['status'] neq 0}}{{if $v['status'] eq 1}} class="am-danger"{{elseif $v['status'] eq 2}} class="am-active"{{else /}} class="am-warning"{{/if}}{{/if}}>
|
||||
<td>{{$v.id}}</td>
|
||||
<td>{{$v.normal_money}}</td>
|
||||
<td>{{$v.frozen_money}}</td>
|
||||
<td>{{$v.give_money}}</td>
|
||||
<td class="user-info">
|
||||
{{if !empty($v['user'])}}
|
||||
<img src="{{$v.user.avatar}}" alt="{{$v.user.user_name_view}}" class="am-fl am-img-thumbnail am-radius am-hide-sm-only" />
|
||||
<ul class="user-base am-fl">
|
||||
<li>名称:{{if empty($v['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($v['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.nickname}}{{/if}}</li>
|
||||
<li>手机:{{if empty($v['user']['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.mobile}}{{/if}}</li>
|
||||
<li>邮箱:{{if empty($v['user']['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.email}}{{/if}}</li>
|
||||
</ul>
|
||||
{{else /}}
|
||||
用户信息异常
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">
|
||||
<ul>
|
||||
<li>
|
||||
可用:<span class="normal-money">{{$v.normal_money}}</span>
|
||||
</li>
|
||||
<li>
|
||||
冻结:<span class="frozen-money">{{$v.frozen_money}}</span>
|
||||
</li>
|
||||
<li>
|
||||
赠送:<span class="give-money">{{$v.give_money}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>{{$v.status_text}}</td>
|
||||
<td class="am-hide-sm-only">{{$v.add_time_text}}</td>
|
||||
{{if !isset($params['is_admin_index']) or $params['is_admin_index'] neq 1}}
|
||||
|
|
|
|||
|
|
@ -54,13 +54,18 @@ class Walletadmin extends Controller
|
|||
$this->assign('page_html', $page->GetPageHtml());
|
||||
|
||||
// 获取列表
|
||||
$data_params = array(
|
||||
'm' => $page->GetPageStarNumber(),
|
||||
'n' => $number,
|
||||
'where' => $where,
|
||||
);
|
||||
$data = WalletService::WalletList($data_params);
|
||||
$this->assign('data_list', $data['data']);
|
||||
if($total > 0)
|
||||
{
|
||||
$data_params = array(
|
||||
'm' => $page->GetPageStarNumber(),
|
||||
'n' => $number,
|
||||
'where' => $where,
|
||||
);
|
||||
$data = WalletService::WalletList($data_params);
|
||||
$this->assign('data_list', $data['data']);
|
||||
} else {
|
||||
$this->assign('data_list', []);
|
||||
}
|
||||
|
||||
// 静态数据
|
||||
$this->assign('wallet_status_list', WalletService::$wallet_status_list);
|
||||
|
|
|
|||
|
|
@ -73,6 +73,9 @@ class WalletService
|
|||
$wallet_status_list = WalletService::$wallet_status_list;
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 用户信息
|
||||
$v['user'] = self::GetUserInfo($v['user_id']);
|
||||
|
||||
// 状态
|
||||
$v['status_text'] = (isset($v['status']) && isset($wallet_status_list[$v['status']])) ? $wallet_status_list[$v['status']]['name'] : '未知';
|
||||
|
||||
|
|
@ -83,6 +86,46 @@ class WalletService
|
|||
return DataReturn('处理成功', 0, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-05-05
|
||||
* @desc description
|
||||
* @param [int] $user_id [用户id]
|
||||
*/
|
||||
private static function GetUserInfo($user_id)
|
||||
{
|
||||
$user = Db::name('User')->field('username,nickname,mobile,email,avatar')->find($user_id);
|
||||
if(!empty($user))
|
||||
{
|
||||
$user['user_name_view'] = $user['username'];
|
||||
if(empty($user['user_name_view']))
|
||||
{
|
||||
$user['user_name_view'] = $user['nickname'];
|
||||
}
|
||||
if(empty($user['user_name_view']))
|
||||
{
|
||||
$user['user_name_view'] = $user['mobile'];
|
||||
}
|
||||
if(empty($user['user_name_view']))
|
||||
{
|
||||
$user['user_name_view'] = $user['email'];
|
||||
}
|
||||
|
||||
// 头像
|
||||
if(!empty($user['avatar']))
|
||||
{
|
||||
$user['avatar'] = ResourcesService::AttachmentPathViewHandle($user['avatar']);
|
||||
} else {
|
||||
$user['avatar'] = config('shopxo.attachment_host').'/static/index/'.strtolower(config('DEFAULT_THEME', 'default')).'/images/default-user-avatar.jpg';
|
||||
}
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* 钱包总数
|
||||
* @author Devil
|
||||
|
|
@ -113,10 +156,13 @@ class WalletService
|
|||
// 用户
|
||||
if(!empty($params['keywords']))
|
||||
{
|
||||
$user_ids = Db::name('User')->where('username|mobile|email', 'like', '%'.$params['keywords'].'%')->column('id');
|
||||
$user_ids = Db::name('User')->where('username|nickname|mobile|email', '=', $params['keywords'])->column('id');
|
||||
if(!empty($user_ids))
|
||||
{
|
||||
$where[] = ['user_id', 'in', $user_ids];
|
||||
} else {
|
||||
// 无数据条件,避免用户搜索条件没有数据造成的错觉
|
||||
$where[] = ['id', '=', 0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,4 +15,18 @@
|
|||
}
|
||||
@media only screen and (max-width: 321px) {
|
||||
.view-operation button { margin: 2px 0px; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
.content-right table.am-table ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.content-right table.am-table .user-info img {
|
||||
max-width: 75px;
|
||||
max-height: 75px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
|
@ -1,20 +1,44 @@
|
|||
.form-search .form-keyword input {
|
||||
display: initial;
|
||||
/**
|
||||
* 搜索表单
|
||||
*/
|
||||
.form-search .form-keyword { display: initial !important; }
|
||||
.form-search .more-submit input { display: none; }
|
||||
.form-search .param-date input { display: initial !important; }
|
||||
@media only screen and (max-width: 641px) {
|
||||
.form-search .form-keyword { width: calc(100% - 140px) !important; }
|
||||
.form-search .param-where { width: 100% !important; margin-left: 0px !important; }
|
||||
.form-search .param-date input { width: 47% !important; }
|
||||
}
|
||||
@media only screen and (min-width: 641px) {
|
||||
.form-search .form-keyword input {
|
||||
width: 260px;
|
||||
}
|
||||
.form-search .chosen-container, .form-search select {
|
||||
width: 150px !important;
|
||||
display: -webkit-inline-box;
|
||||
}
|
||||
.form-search .chosen-container-single .chosen-single {
|
||||
width: 100%;
|
||||
}
|
||||
.form-search .form-keyword { width: 35% !important; }
|
||||
.form-search .param-where { width: 32% !important; float: left; }
|
||||
.form-search .param-date input { width: 45% !important; }
|
||||
.form-search .param-where:nth-child(1), .param-where:nth-child(4) { margin-left: 0px !important; }
|
||||
}
|
||||
@media only screen and (max-width: 641px) {
|
||||
.form-search .form-search-items {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
.wallet-content table.am-table ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.wallet-content table.am-table .user-info img {
|
||||
max-width: 75px;
|
||||
max-height: 75px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.wallet-content table.am-table .money span {
|
||||
font-weight: 700;
|
||||
}
|
||||
.wallet-content table.am-table .normal-money {
|
||||
color: #4CAF50;
|
||||
}
|
||||
.wallet-content table.am-table .frozen-money {
|
||||
color: #FF9800;
|
||||
}
|
||||
.wallet-content table.am-table .give-money {
|
||||
color: #666;
|
||||
}
|
||||
Loading…
Reference in New Issue