作者 Cool
1 个管道 的构建 通过 耗费 0 秒

商家首页接口调试

@@ -415,11 +415,15 @@ class Store extends Api @@ -415,11 +415,15 @@ class Store extends Api
415 public function store() 415 public function store()
416 { 416 {
417 $store = $this->get_store(); 417 $store = $this->get_store();
  418 + $img_arr = Db::name('store_banner')->order('weigh','DESC')->column('image');
  419 + foreach ($img_arr as &$v) {
  420 + $v = cdnurl($v);
  421 + }
418 $return = [ 422 $return = [
419 'id' => $store['id'], 423 'id' => $store['id'],
420 'store_icon' => $store['store_icon'] ? cdnurl($store['store_icon'],true) : cdnurl('/assets/img/avatar.png',true), 424 'store_icon' => $store['store_icon'] ? cdnurl($store['store_icon'],true) : cdnurl('/assets/img/avatar.png',true),
421 'store_name' => $store['store_name'], 425 'store_name' => $store['store_name'],
422 - 'image_arr' => $store['image_arr'], 426 + 'image_arr' => $img_arr,
423 ]; 427 ];
424 $this->success('成功',$return); 428 $this->success('成功',$return);
425 } 429 }