Browse Source

客户地址

zhaoxiaohai 3 years ago
parent
commit
ed3bffd056

+ 6 - 5
packageA/setclient/modules/address/index.js

@@ -10,7 +10,7 @@ Component({
         content: {
             "nacache": true,
             "pageNumber": 1,
-            "pageSize": 10,
+            "pageSize": 15,
             "pageTotal": 1,
             "total": null,
             "where": {
@@ -111,18 +111,19 @@ Component({
                                         "sys_enterpriseid": item.sys_enterpriseid
                                     }
                                 }).then(res => {
-                                    console.log(res)
+                                    console.log("删除地址", res)
                                     if (res.msg != '成功') return wx.showToast({
                                         title: res.data,
                                         icon: "none"
                                     });
-                                    that.setData({
-                                        list: this.data.list.filter(v => v.contactsid != item.contactsid)
-                                    });
                                     wx.showToast({
                                         title: `删除成功!`,
                                         icon: "none"
                                     })
+                                    that.setData({
+                                        list: that.data.list.filter(v => v.contactsid != item.contactsid),
+                                        "content.total": that.data.content.total - 1
+                                    });
                                 })
                             }
                         }

+ 1 - 1
packageA/setclient/modules/address/index.wxml

@@ -4,7 +4,7 @@
         <navigator url="#" class="but">
             <van-icon name="search" />
         </navigator>
-        <navigator url="/packageA/setclient/modules/address/add/index" class="but">
+        <navigator url="/packageA/setclient/modules/address/add/index?sys_enterpriseid={{sys_enterpriseid}}" class="but">
             <van-icon name="plus" />
         </navigator>
     </view>