作者 郭盛
1 个管道 的构建 通过 耗费 5 秒

修改今日推荐

... ... @@ -224,13 +224,17 @@ class Index extends Api
$v['before'] = $http.$v['before'];
$v['behind'] = $http.$v['behind'];
$v['thumbnail'] = $http.$v['thumbnail'];
$v['territory_id'] = explode(',',$v['territory_id']);
foreach ($v['territory_id'] as &$val){
$val = Db::name('territory')
->alias('a')
->join('contype b','a.contype_id = b.id')
->where('a.id',$val)
->column('b.title');
if(!empty($v['territory_id'])){
$v['territory_id'] = explode(',',$v['territory_id']);
foreach ($v['territory_id'] as &$val){
$val = Db::name('territory')
->alias('a')
->join('contype b','a.contype_id = b.id')
->where('a.id',$val)
->column('b.title');
}
}else{
$v['territory_id'] = '';
}
}
$this->success('success',$data);
... ... @@ -325,8 +329,8 @@ class Index extends Api
$v['before'] = $http.$v['before'];
$v['behind'] = $http.$v['behind'];
$v['thumbnail'] = $http.$v['thumbnail'];
$v['territory_id'] = explode(',',$v['territory_id']);
if(!empty($v['territory_id'])){
$v['territory_id'] = explode(',',$v['territory_id']);
foreach ($v['territory_id'] as &$val){
$a = Db::name('territory')
->alias('a')
... ... @@ -336,6 +340,8 @@ class Index extends Api
->find();
$val = $a['title'];
}
}else{
$v['territory_id'] = '';
}
}
$this->success('success',$data);
... ...
... ... @@ -9412,7 +9412,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-03-18 11:23:28 </div>
Generated on 2020-03-18 13:07:27 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...