Commit ed89e10b by 李伟康

修复BUG

1 parent a1e0cead
// packageMall/pages/detail/detail.js
import {
commentTime,
centsToyuan,
iosTimeFormat
} from '~/utils/format'
......@@ -236,7 +235,7 @@ Page({
},
async join(e) {
const loginStatus = await wx.p.router.intercept()
if(loginStatus) return
if (loginStatus) return
let params = e && e.detail
if (!params) {
params = {
......@@ -389,11 +388,6 @@ Page({
})
if (isActivity) this.countDown([data.startTime, data.endTime])
if (!wx.$authStatus) this.getUserAddressDefault()
else
this.setData({
addressFlag: true
})
wx.hideLoading()
} else {
wx.hideLoading()
......@@ -464,8 +458,12 @@ Page({
}
})
},
getUserAddressDefault() {
wx.p.api.mineApi.getUserAddressDefault().then(({
async getUserAddressDefault() {
const res = await wx.p.router.intercept(false)
if (res) this.setData({
addressFlag: true
})
else wx.p.api.mineApi.getUserAddressDefault().then(({
code,
data
}) => {
......@@ -496,6 +494,7 @@ Page({
*/
onShow: function () {
this.getUserAddressList()
this.getUserAddressDefault()
},
/**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!