作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

修改问题文档

... ... @@ -70,15 +70,21 @@ class Store extends Backend
$row->getRelation('user')->visible(['username']);
}
$list = collection($list)->toArray();
foreach ($list as &$v){
foreach ($list as $key =>$v){
//判断vip类型
$viptype = 1;
if($v['svip_passtime'] > time()){
$viptype = 2;
}
$list[$key]['viptype'] = $viptype;
$province_ids = [];
$user_province = Db::name('user_province')->where(['expiration_time'=>['gt',time()],'user_id'=>$v['user_id']])->select();
foreach($user_province as $key => $u_p){
foreach($user_province as $key2 => $u_p){
$province_ids[] = $u_p['province_id'];
}
$v['province_ids'] = Db::name('province')->whereIn('id',$province_ids)->column('name');
if($v['viptype'] == 2){
$v['province_ids'] = '全部';
$list[$key]['province_ids'] = Db::name('province')->whereIn('id',$province_ids)->column('name');
if($viptype == 2){
$list[$key]['province_ids'] = '全部';
}
}
$result = array("total" => $total, "rows" => $list);
... ...
... ... @@ -26,14 +26,20 @@
</div>
</div>
{if condition="!empty($row.svip_passtime)"}
<div class="form-group">
<!--<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('超级会员时间')}:</label>
<div class="col-xs-12 col-sm-8">
<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}">
</div>
</div>
</div>-->
{/if}
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('超级会员时间')}:</label>
<div class="col-xs-12 col-sm-8">
<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}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('满免运费价格')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-money" data-rule="required" class="form-control" name="row[money]" type="text" value="{$row.money|htmlentities}">
... ...