Commit 6feaf643 authored by hujun's avatar hujun

1

parent 34f7a909
...@@ -1012,17 +1012,12 @@ class Shop extends Basic ...@@ -1012,17 +1012,12 @@ class Shop extends Basic
public function getExclusive() public function getExclusive()
{ {
if ($this->params['houses_id']) { if ($this->params['houses_id']) {
if ($this->params['is_exclusive_type'] == 1) {
$res = $this->gHousesModel->getExclusive($this->params['houses_id']); $res = $this->gHousesModel->getExclusive($this->params['houses_id']);
// dump($res); // dump($res);
foreach ($res['exclusive_img'] as $key => $val) { foreach ($res['exclusive_img'] as $key => $val) {
$res['exclusive_img'][$key]['file_name'] = CURRENT_URL.'resource/lib/Attachments/images/'.$val['img_name']; $res['exclusive_img'][$key]['file_name'] = CURRENT_URL.'resource/lib/Attachments/images/'.$val['img_name'];
$res['exclusive_img'][$key]['save_path'] = $val['img_name']; $res['exclusive_img'][$key]['save_path'] = $val['img_name'];
} }
} else {
$res = $this->gHousesModel->editData(['is_exclusive_type'=>0], $this->params['houses_id']);
}
} else { } else {
return $this->response("101", "houses_id is null"); return $this->response("101", "houses_id is null");
} }
...@@ -1035,6 +1030,11 @@ class Shop extends Basic ...@@ -1035,6 +1030,11 @@ class Shop extends Basic
public function editExclusive() public function editExclusive()
{ {
// $res = $this->gHousesModel->exclusive($this->params, $this->params['houses_id'], $this->agentId, $this->siteId); // $res = $this->gHousesModel->exclusive($this->params, $this->params['houses_id'], $this->agentId, $this->siteId);
if (empty($this->params['houses_id'])) {
return $this->response(101, '参数错误');
}
if ($this->params['is_exclusive_type'] == 1) {
$code = 200; $code = 200;
$msg = ""; $msg = "";
$house = new HouseService(); $house = new HouseService();
...@@ -1043,6 +1043,10 @@ class Shop extends Basic ...@@ -1043,6 +1043,10 @@ class Shop extends Basic
$code = 101; $code = 101;
$msg = $result['msg']; $msg = $result['msg'];
} }
} else {
$res = $this->gHousesModel->editData(['is_exclusive_type'=>0], $this->params['houses_id']);
}
return $this->response($code, $msg); return $this->response($code, $msg);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment