|
|
@@ -2976,4 +2976,38 @@ class OrderController extends BaseController
|
|
|
util::complete('打印成功');
|
|
|
}
|
|
|
|
|
|
+ //修改地址 ssh 20251123
|
|
|
+ public function actionModifyAddress()
|
|
|
+ {
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $id = $post['id'] ?? 0;
|
|
|
+ $order = OrderClass::getById($id, true);
|
|
|
+ if (empty($order)) {
|
|
|
+ util::fail('没有找到订单');
|
|
|
+ }
|
|
|
+ if ($order->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的订单,不能修改地址');
|
|
|
+ }
|
|
|
+ $province = $post['province'] ?? '';
|
|
|
+ $city = $post['city'] ?? '';
|
|
|
+ $dist = $post['dist'] ?? '';
|
|
|
+ $address = $post['address'] ?? '';
|
|
|
+ $floor = $post['floor'] ?? '';
|
|
|
+ $fullAddress = $city . $dist . $address . $floor;
|
|
|
+ $lat = $post['lat'] ?? '';
|
|
|
+ $long = $post['long'] ?? '';
|
|
|
+ $showAddress = $post['showAddress'] ?? '';
|
|
|
+ $order->province = $province;
|
|
|
+ $order->city = $city;
|
|
|
+ $order->dist = $dist;
|
|
|
+ $order->address = $address;
|
|
|
+ $order->floor = $floor;
|
|
|
+ $order->showAddress = $showAddress;
|
|
|
+ $order->fullAddress = $fullAddress;
|
|
|
+ $order->lat = $lat;
|
|
|
+ $order->long = $long;
|
|
|
+ $order->save();
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
}
|