Răsfoiți Sursa

修改客户地址

shish 2 ani în urmă
părinte
comite
f23eeb9233
1 a modificat fișierele cu 20 adăugiri și 0 ștergeri
  1. 20 0
      app-hd/controllers/CustomController.php

+ 20 - 0
app-hd/controllers/CustomController.php

@@ -30,6 +30,26 @@ class CustomController extends BaseController
 
     public $guestAccess = ['list'];
 
+    //修改客户地址 ssh 20231109
+    public function actionModifyAddress()
+    {
+        $post = Yii::$app->request->post();
+        $id = $post['id'] ?? 0;
+        unset($post['id']);
+        $custom = CustomClass::getById($id, true);
+
+        $city = $post['city'] ?? '';
+        $dist = $post['dist'] ?? '';
+        $address = $post['address'] ?? '';
+        $floor = $post['floor'] ?? '';
+        $post['fullAddress'] = $city . $dist . $address . $floor;
+        $shopId = $custom->shopId ?? 0;
+        $where = ['shopId' => $shopId];
+//        ShopClass::updateById($shopId, $post);
+//        CustomClass::updateByCondition($where, $post);
+        util::complete('修改成功');
+    }
+
     //修改名称 ssh 2022096
     public function actionChangeName()
     {