...
|
...
|
@@ -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);
|
...
|
...
|
|