修改
This commit is contained in:
parent
8ed8cca8d7
commit
5d5dbdbdac
@ -100,7 +100,6 @@
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.address = uni.getStorageSync('location')
|
this.address = uni.getStorageSync('location')
|
||||||
console.log(this.address, '000')
|
|
||||||
if (this.address == '德州市') {
|
if (this.address == '德州市') {
|
||||||
uni.setStorageSync("region", 1)
|
uni.setStorageSync("region", 1)
|
||||||
} else if (this.address == '东营市') {
|
} else if (this.address == '东营市') {
|
||||||
|
|||||||
@ -32,7 +32,8 @@
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let location = uni.getStorageSync('location')
|
let location = uni.getStorageSync('location')
|
||||||
if (!location) {
|
let region = uni.getStorageSync('region')
|
||||||
|
if (!location || !region) {
|
||||||
this.getAddress()
|
this.getAddress()
|
||||||
}
|
}
|
||||||
this.phonecode = undefined
|
this.phonecode = undefined
|
||||||
@ -57,6 +58,14 @@
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
success(res) {
|
success(res) {
|
||||||
uni.setStorageSync('location', res.data.result.address_component.city)
|
uni.setStorageSync('location', res.data.result.address_component.city)
|
||||||
|
var address = uni.getStorageSync('location')
|
||||||
|
if (address == '德州市') {
|
||||||
|
uni.setStorageSync("region", 1)
|
||||||
|
} else if (address == '东营市') {
|
||||||
|
uni.setStorageSync("region", 2)
|
||||||
|
} else if (address == '济南市') {
|
||||||
|
uni.setStorageSync("region", 3)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fail: res => {
|
fail: res => {
|
||||||
console.log(res.errMsg, '解析失败返回的错误信息');
|
console.log(res.errMsg, '解析失败返回的错误信息');
|
||||||
@ -115,7 +124,6 @@
|
|||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
}, 500)
|
}, 500)
|
||||||
console.log("9999")
|
|
||||||
} else {
|
} else {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '登录失败',
|
title: '登录失败',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user