Merge pull request '更新' (#5) from xiaozy into master
Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
@@ -41,6 +41,22 @@ const instance = defineStore('user', {
|
|||||||
let { lat: latitude, lng: longitude } = result.position
|
let { lat: latitude, lng: longitude } = result.position
|
||||||
this.position = { latitude, longitude }
|
this.position = { latitude, longitude }
|
||||||
} else {
|
} else {
|
||||||
|
switch (result.status) {
|
||||||
|
case 1:
|
||||||
|
Notify({
|
||||||
|
message: '用户拒绝对获取地理位置的请求。',
|
||||||
|
type: 'danger',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
Notify({
|
||||||
|
message: '定位获取失败,请退出重试。',
|
||||||
|
type: 'danger',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -144,6 +144,22 @@ export default {
|
|||||||
this.position = { latitude, longitude }
|
this.position = { latitude, longitude }
|
||||||
this.obtainData()
|
this.obtainData()
|
||||||
} else {
|
} else {
|
||||||
|
switch (result.status) {
|
||||||
|
case 1:
|
||||||
|
Notify({
|
||||||
|
message: '用户拒绝对获取地理位置的请求。',
|
||||||
|
type: 'danger',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
Notify({
|
||||||
|
message: '定位获取失败,请退出重试。',
|
||||||
|
type: 'danger',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user