|
|
@ -134,7 +134,8 @@ class Merchant extends Controller |
|
|
|
// 新增记录 |
|
|
|
// 新增记录 |
|
|
|
$model = new StyleModel; |
|
|
|
$model = new StyleModel; |
|
|
|
$data = $this->postForm(); |
|
|
|
$data = $this->postForm(); |
|
|
|
if ($model->add($data)) { |
|
|
|
$data['style_id'] = 1; |
|
|
|
|
|
|
|
if ($model->edit($data)) { |
|
|
|
return $this->renderSuccess('添加成功'); |
|
|
|
return $this->renderSuccess('添加成功'); |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->renderError($model->getError() ?: '添加失败'); |
|
|
|
return $this->renderError($model->getError() ?: '添加失败'); |
|
|
@ -143,7 +144,7 @@ class Merchant extends Controller |
|
|
|
public function getPageStyle(): Json |
|
|
|
public function getPageStyle(): Json |
|
|
|
{ |
|
|
|
{ |
|
|
|
// 新增记录 |
|
|
|
// 新增记录 |
|
|
|
$detail = StyleModel::detail(); |
|
|
|
$detail = StyleModel::detail(1); |
|
|
|
return $this->renderSuccess(compact('detail')); |
|
|
|
return $this->renderSuccess(compact('detail')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|