This commit is contained in:
yanran200730
2022-11-17 17:03:16 +08:00
parent ea73b0ccb3
commit 3bdb7a72e7

View File

@@ -61,6 +61,7 @@ export default {
success: res => {
const {latitude: lat, longitude: lng} = res
if (!!lat && !!lng) {
uni.showLoading()
this.$http.post('/app/appdvcpconfig/apiForward', null, {
params: {
url: qs.stringifyUrl({
@@ -75,10 +76,11 @@ export default {
})
.then(({data: {result: {address}}}) => this.$http.post("/app/appwxsigninfo/sign", {lat, lng, address}))
.then(res => {
uni.hideLoading()
if (res?.code == 0) {
this.linkTo("./signResult?id=" + res?.data.id)
}
}).catch(err => this.$u.toast(err))
}).catch(err => uni.hideLoading(),this.$u.toast(err))
} else this.$u.toast("无法获取到定位!")
},
fail: () => this.$u.toast("获取定位失败,请重新尝试!")