zhaoxiaohai 3 лет назад
Родитель
Сommit
470bac03e1

+ 7 - 5
packageA/setclient/modules/address/add/index.js

@@ -1,7 +1,7 @@
 const _Http = getApp().globalData.http;
 const _Http = getApp().globalData.http;
 Page({
 Page({
     data: {
     data: {
-        form: [{
+        /* {
             label: "联系人",
             label: "联系人",
             error: false,
             error: false,
             errMsg: "",
             errMsg: "",
@@ -19,15 +19,16 @@ Page({
             value: "",
             value: "",
             placeholder: "收货人手机号码",
             placeholder: "收货人手机号码",
             valueName: "phonenumber",
             valueName: "phonenumber",
-            required: false,
+            required: true,
             checking: "phone"
             checking: "phone"
-        }, {
-            label: "地区",
+        },  */
+        form: [{
+            label: "省市县",
             error: false,
             error: false,
             errMsg: "",
             errMsg: "",
             type: "region",
             type: "region",
             value: [],
             value: [],
-            placeholder: "省,市,",
+            placeholder: "省,市,",
             valueName: "region",
             valueName: "region",
             required: false
             required: false
         }, {
         }, {
@@ -94,6 +95,7 @@ Page({
             "id": "20221018141802",
             "id": "20221018141802",
             content
             content
         }).then(res => {
         }).then(res => {
+            console.log('新建地址', res)
             if (res.msg != '成功') return wx.showToast({
             if (res.msg != '成功') return wx.showToast({
                 title: res.data,
                 title: res.data,
                 icon: "none"
                 icon: "none"

+ 10 - 13
packageA/setclient/modules/address/list/index.js

@@ -108,19 +108,16 @@ Component({
                                         icon: "none"
                                         icon: "none"
                                     });
                                     });
                                     getCurrentPages().forEach(v => {
                                     getCurrentPages().forEach(v => {
-                                        switch (v.__route__) {
-                                            case "packageA/setclient/detail":
-                                                let model = v.selectComponent("#Address");
-                                                model.setData({
-                                                    list: model.data.list.filter(value => value.contactsid != item.contactsid)
-                                                });
-                                                model.changeTotal();
-                                                break;
-                                            case "packageA/setclient/modules/address/search/index":
-                                                v.setData({
-                                                    list: v.data.list.filter(value => value.contactsid != item.contactsid)
-                                                });
-                                                break;
+                                        if (v.__route__ == "packageA/setclient/detail" || v.__route__ == "packageA/opponent/detail" || v.__route__ == "packageA/publicCustomer/detail") {
+                                            let model = v.selectComponent("#Address");
+                                            model.setData({
+                                                list: model.data.list.filter(value => value.contactsid != item.contactsid)
+                                            });
+                                            model.changeTotal();
+                                        } else if (v.__route__ == "packageA/setclient/modules/address/search/index") {
+                                            v.setData({
+                                                list: v.data.list.filter(value => value.contactsid != item.contactsid)
+                                            });
                                         }
                                         }
                                     })
                                     })
                                 })
                                 })

+ 2 - 2
packageA/setclient/modules/address/list/index.wxml

@@ -4,9 +4,9 @@
             <view class="label">
             <view class="label">
                 <text class="iconfont icon-a-wodemendianxinxidizhi" style="color: #3874F6;" /> {{item.province + item.city + item.county + item.address}}
                 <text class="iconfont icon-a-wodemendianxinxidizhi" style="color: #3874F6;" /> {{item.province + item.city + item.county + item.address}}
             </view>
             </view>
-            <view class="detail-add">
+      <!--       <view class="detail-add">
                 {{item.name}}:{{item.phonenumber}}
                 {{item.name}}:{{item.phonenumber}}
-            </view>
+            </view> -->
         </view>
         </view>
         <view class="editor">
         <view class="editor">
             <van-radio icon-size='14' label-class='radio' name="{{item.contactsid}}">默认收货地址</van-radio>
             <van-radio icon-size='14' label-class='radio' name="{{item.contactsid}}">默认收货地址</van-radio>