From 0dd1beeec25b700eac6e53fd358b7dac8e53b94e Mon Sep 17 00:00:00 2001 From: initwithout Date: Wed, 24 May 2023 11:34:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9D=80=E7=BC=96=E8=BE=91BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/address/index.js | 10 ++++++---- pages/address/index.wxml | 2 +- pages/address/upaddress.js | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pages/address/index.js b/pages/address/index.js index 84a5001..1a4cf5d 100644 --- a/pages/address/index.js +++ b/pages/address/index.js @@ -271,9 +271,11 @@ Page({ }, // 返回结算页面 chooseBack: function (e) { - wx.navigateBack() - var addressId = e.currentTarget.dataset.id - wx.setStorageSync('addressId', addressId); + if (this.data.productStr) { + wx.navigateBack() + var addressId = e.currentTarget.dataset.id + wx.setStorageSync('addressId', addressId); + } }, // 数据加载 DataonLoad: function () { @@ -287,7 +289,7 @@ Page({ if (res.code == 200) { var data = res.data; var address = data.adds; - that.numbers = data.adds; + // that.numbers = data.adds; if (address == '') { var address = [] } diff --git a/pages/address/index.wxml b/pages/address/index.wxml index e14f668..0311af9 100644 --- a/pages/address/index.wxml +++ b/pages/address/index.wxml @@ -30,7 +30,7 @@ 默认地址 - + 编辑 删除 diff --git a/pages/address/upaddress.js b/pages/address/upaddress.js index 17ed37f..f7c8f5f 100644 --- a/pages/address/upaddress.js +++ b/pages/address/upaddress.js @@ -38,6 +38,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + console.log(options) var region = [] region.push(options.sheng) region.push(options.city)