|
|
@ -55,11 +55,8 @@ class Shop extends Controller |
|
|
|
return $this->renderError('缺少必要参数'); |
|
|
|
return $this->renderError('缺少必要参数'); |
|
|
|
} |
|
|
|
} |
|
|
|
$detail = ShopModel::detail($shopId); |
|
|
|
$detail = ShopModel::detail($shopId); |
|
|
|
// var_dump($detail['shop_hours']); |
|
|
|
|
|
|
|
// exit; |
|
|
|
|
|
|
|
if (!empty($detail['shop_hours'])) { |
|
|
|
if (!empty($detail['shop_hours'])) { |
|
|
|
$shop_hours = explode(' ', $detail['shop_hours']); |
|
|
|
$shop_hours = explode('-', $detail['shop_hours'] ?? "00:00"); |
|
|
|
$shop_hours = explode('-', $shop_hours[1] ?? "00:00"); |
|
|
|
|
|
|
|
if (count($shop_hours) == 2) { |
|
|
|
if (count($shop_hours) == 2) { |
|
|
|
$array = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; |
|
|
|
$array = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; |
|
|
|
for ($i = 0; $i < 3; $i++) { |
|
|
|
for ($i = 0; $i < 3; $i++) { |
|
|
@ -95,16 +92,17 @@ class Shop extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
|
$param = $this->request->param(); |
|
|
|
$param = $this->request->param(); |
|
|
|
$upData = [ |
|
|
|
$upData = [ |
|
|
|
'shop_name' => $param['shop_name']??"", |
|
|
|
'shop_name' => $param['shop_name'] ?? "", |
|
|
|
'address' => $param['address']??"", |
|
|
|
'address' => $param['address'] ?? "", |
|
|
|
'phone' => $param['phone']??"", |
|
|
|
'phone' => $param['phone'] ?? "", |
|
|
|
'wechat_img_id' => $param['wechat_img_id']??"", |
|
|
|
'wechat_img_id' => $param['wechat_img_id'] ?? "", |
|
|
|
]; |
|
|
|
]; |
|
|
|
ShopModel::where('shop_id',$param['shop_id'])->update($upData); |
|
|
|
ShopModel::where('shop_id', $param['shop_id'])->update($upData); |
|
|
|
return $this->renderSuccess('ok'); |
|
|
|
return $this->renderSuccess('ok'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getShopInfo(){ |
|
|
|
public function getShopInfo() |
|
|
|
|
|
|
|
{ |
|
|
|
$banner_imgs = []; |
|
|
|
$banner_imgs = []; |
|
|
|
$share_imgs = []; |
|
|
|
$share_imgs = []; |
|
|
|
$activity_imgs = []; |
|
|
|
$activity_imgs = []; |
|
|
@ -117,8 +115,4 @@ class Shop extends Controller |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |