|
|
|
@ -75,7 +75,7 @@ class Merchant extends Controller |
|
|
|
|
public function info(): Json |
|
|
|
|
{ |
|
|
|
|
// 商城详情 |
|
|
|
|
$model = MerchantModel::detail($this->storeId); |
|
|
|
|
$model = MerchantModel::detailbystore($this->storeId); |
|
|
|
|
return $this->renderSuccess(['storeInfo' => $model]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -86,7 +86,7 @@ class Merchant extends Controller |
|
|
|
|
public function edit(): Json |
|
|
|
|
{ |
|
|
|
|
// 商城详情 |
|
|
|
|
$model = MerchantModel::detail($this->postForm()['merchant_id'], $this->storeId); |
|
|
|
|
$model = MerchantModel::detailbystore($this->postForm()['merchant_id'], $this->storeId); |
|
|
|
|
// 更新记录 |
|
|
|
|
if (!$model->edit($this->postForm())) { |
|
|
|
|
return $this->renderError($model->getError() ?: '更新失败'); |
|
|
|
@ -118,7 +118,7 @@ class Merchant extends Controller |
|
|
|
|
public function delete(int $merchantId): Json |
|
|
|
|
{ |
|
|
|
|
// 门店详情 |
|
|
|
|
$model = MerchantModel::detail($merchantId, $this->storeId); |
|
|
|
|
$model = MerchantModel::detailbystore($merchantId, $this->storeId); |
|
|
|
|
if (!$model->setDelete()) { |
|
|
|
|
return $this->renderError($model->getError() ?: '删除失败'); |
|
|
|
|
} |
|
|
|
|