|
@@ -33,7 +33,7 @@ class Index extends Api
|
|
|
$host = $_SERVER['HTTP_HOST'];
|
|
$host = $_SERVER['HTTP_HOST'];
|
|
|
$list = BannerModel::where("type", $type)->order("sort", "desc")->select();
|
|
$list = BannerModel::where("type", $type)->order("sort", "desc")->select();
|
|
|
foreach ($list as $k=>$v){
|
|
foreach ($list as $k=>$v){
|
|
|
- $list[$k]['image'] = 'http://'.$host.$v['image'];
|
|
|
|
|
|
|
+ $list[$k]['image'] = 'https://'.$host.$v['image'];
|
|
|
}
|
|
}
|
|
|
$this->success("ok", $list);
|
|
$this->success("ok", $list);
|
|
|
}
|
|
}
|
|
@@ -140,7 +140,7 @@ class Index extends Api
|
|
|
}
|
|
}
|
|
|
$host = $_SERVER['HTTP_HOST'];
|
|
$host = $_SERVER['HTTP_HOST'];
|
|
|
foreach ($list as $k=>$v){
|
|
foreach ($list as $k=>$v){
|
|
|
- $list[$k]['image'] = 'http://'.$host.$v['image'];
|
|
|
|
|
|
|
+ $list[$k]['image'] = 'https://'.$host.$v['image'];
|
|
|
}
|
|
}
|
|
|
$this->success("ok", $list);
|
|
$this->success("ok", $list);
|
|
|
}
|
|
}
|
|
@@ -157,7 +157,7 @@ class Index extends Api
|
|
|
// 拼接图片路径
|
|
// 拼接图片路径
|
|
|
foreach ($goods as $k=>$v){
|
|
foreach ($goods as $k=>$v){
|
|
|
$host = $_SERVER['HTTP_HOST'];
|
|
$host = $_SERVER['HTTP_HOST'];
|
|
|
- $goods[$k]['little_image'] = 'http://'.$host.$goods[$k]['little_image'];
|
|
|
|
|
|
|
+ $goods[$k]['little_image'] = 'https://'.$host.$goods[$k]['little_image'];
|
|
|
}
|
|
}
|
|
|
// 获取分类
|
|
// 获取分类
|
|
|
$cate = collection($this->category_model->field('id,title,pid')->where(['status_switch'=>1])->select())->toArray();
|
|
$cate = collection($this->category_model->field('id,title,pid')->where(['status_switch'=>1])->select())->toArray();
|
|
@@ -189,12 +189,12 @@ class Index extends Api
|
|
|
$fields = 'id,category_id,category_name,title,price,little_image,images,describe,dynamic,content';
|
|
$fields = 'id,category_id,category_name,title,price,little_image,images,describe,dynamic,content';
|
|
|
$goods = $this->goods_model->field($fields)->where(['id'=>$id])->find()->toArray();
|
|
$goods = $this->goods_model->field($fields)->where(['id'=>$id])->find()->toArray();
|
|
|
$goods['dynamic_list'] = [];
|
|
$goods['dynamic_list'] = [];
|
|
|
- $goods['little_image'] = 'http://'.$host.$goods['little_image'];
|
|
|
|
|
|
|
+ $goods['little_image'] = 'https://'.$host.$goods['little_image'];
|
|
|
$temp = collection($this->dynamic_model->field('title,type_price')->where(['goods_id'=>$goods['id']])->select())->toArray();
|
|
$temp = collection($this->dynamic_model->field('title,type_price')->where(['goods_id'=>$goods['id']])->select())->toArray();
|
|
|
$goods['dynamic_list'] = $temp;
|
|
$goods['dynamic_list'] = $temp;
|
|
|
$goods['images'] = !empty($goods['images'])?explode(',',$goods['images']):[];
|
|
$goods['images'] = !empty($goods['images'])?explode(',',$goods['images']):[];
|
|
|
foreach ($goods['images'] as $k=>$v){
|
|
foreach ($goods['images'] as $k=>$v){
|
|
|
- $goods['images'][$k]= 'http://'.$host.$v;
|
|
|
|
|
|
|
+ $goods['images'][$k]= 'https://'.$host.$v;
|
|
|
}
|
|
}
|
|
|
$this->success("ok", $goods);
|
|
$this->success("ok", $goods);
|
|
|
}
|
|
}
|