|
|
@@ -278,4 +278,21 @@ class ShopController extends BaseController
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|
|
|
+ //运费模式和运费成本设置 shish 20211014
|
|
|
+ public function actionUpdateCgModel()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $cgModel = $get['cgModel'] ?? 0;
|
|
|
+ $cgPerCost = $get['cgPerCost'] ?? 0;
|
|
|
+ if ($cgModel == 0) {
|
|
|
+ if (is_numeric($cgPerCost) == false || $cgPerCost < 0) {
|
|
|
+ util::fail('请输入运费成本');
|
|
|
+ }
|
|
|
+ $this->shop->cgPerCost = $cgPerCost;
|
|
|
+ }
|
|
|
+ $this->shop->cgModel = $cgModel;
|
|
|
+ $this->shop->save();
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
}
|