正在显示
2 个修改的文件
包含
19 行增加
和
7 行删除
@@ -70,15 +70,21 @@ class Store extends Backend | @@ -70,15 +70,21 @@ class Store extends Backend | ||
70 | $row->getRelation('user')->visible(['username']); | 70 | $row->getRelation('user')->visible(['username']); |
71 | } | 71 | } |
72 | $list = collection($list)->toArray(); | 72 | $list = collection($list)->toArray(); |
73 | - foreach ($list as &$v){ | 73 | + foreach ($list as $key =>$v){ |
74 | + //判断vip类型 | ||
75 | + $viptype = 1; | ||
76 | + if($v['svip_passtime'] > time()){ | ||
77 | + $viptype = 2; | ||
78 | + } | ||
79 | + $list[$key]['viptype'] = $viptype; | ||
74 | $province_ids = []; | 80 | $province_ids = []; |
75 | $user_province = Db::name('user_province')->where(['expiration_time'=>['gt',time()],'user_id'=>$v['user_id']])->select(); | 81 | $user_province = Db::name('user_province')->where(['expiration_time'=>['gt',time()],'user_id'=>$v['user_id']])->select(); |
76 | - foreach($user_province as $key => $u_p){ | 82 | + foreach($user_province as $key2 => $u_p){ |
77 | $province_ids[] = $u_p['province_id']; | 83 | $province_ids[] = $u_p['province_id']; |
78 | } | 84 | } |
79 | - $v['province_ids'] = Db::name('province')->whereIn('id',$province_ids)->column('name'); | ||
80 | - if($v['viptype'] == 2){ | ||
81 | - $v['province_ids'] = '全部'; | 85 | + $list[$key]['province_ids'] = Db::name('province')->whereIn('id',$province_ids)->column('name'); |
86 | + if($viptype == 2){ | ||
87 | + $list[$key]['province_ids'] = '全部'; | ||
82 | } | 88 | } |
83 | } | 89 | } |
84 | $result = array("total" => $total, "rows" => $list); | 90 | $result = array("total" => $total, "rows" => $list); |
@@ -26,14 +26,20 @@ | @@ -26,14 +26,20 @@ | ||
26 | </div> | 26 | </div> |
27 | </div> | 27 | </div> |
28 | {if condition="!empty($row.svip_passtime)"} | 28 | {if condition="!empty($row.svip_passtime)"} |
29 | - <div class="form-group"> | 29 | + <!--<div class="form-group"> |
30 | <label class="control-label col-xs-12 col-sm-2">{:__('超级会员时间')}:</label> | 30 | <label class="control-label col-xs-12 col-sm-2">{:__('超级会员时间')}:</label> |
31 | <div class="col-xs-12 col-sm-8"> | 31 | <div class="col-xs-12 col-sm-8"> |
32 | <input id="c-svip_passtime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[svip_passtime]" type="text" value="{$row.svip_passtime|datetime}"> | 32 | <input id="c-svip_passtime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[svip_passtime]" type="text" value="{$row.svip_passtime|datetime}"> |
33 | </div> | 33 | </div> |
34 | - </div> | 34 | + </div>--> |
35 | {/if} | 35 | {/if} |
36 | <div class="form-group"> | 36 | <div class="form-group"> |
37 | + <label class="control-label col-xs-12 col-sm-2">{:__('超级会员时间')}:</label> | ||
38 | + <div class="col-xs-12 col-sm-8"> | ||
39 | + <input id="c-svip_passtime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[svip_passtime]" type="text" value="{if condition='!empty($row.svip_passtime)'}{$row.svip_passtime|datetime}{/if}"> | ||
40 | + </div> | ||
41 | + </div> | ||
42 | + <div class="form-group"> | ||
37 | <label class="control-label col-xs-12 col-sm-2">{:__('满免运费价格')}:</label> | 43 | <label class="control-label col-xs-12 col-sm-2">{:__('满免运费价格')}:</label> |
38 | <div class="col-xs-12 col-sm-8"> | 44 | <div class="col-xs-12 col-sm-8"> |
39 | <input id="c-money" data-rule="required" class="form-control" name="row[money]" type="text" value="{$row.money|htmlentities}"> | 45 | <input id="c-money" data-rule="required" class="form-control" name="row[money]" type="text" value="{$row.money|htmlentities}"> |
-
请 注册 或 登录 后发表评论