修一下

This commit is contained in:
2025-06-20 16:59:15 +08:00
parent 7a066b3026
commit 9b2f38e5cb
7 changed files with 115 additions and 27 deletions

View File

@ -88,14 +88,22 @@
created() {
const that = this;
const userInfo = TaCache.get('auth.user');
if (!userInfo) {
uni.navigateTo({
if (!userInfo || !userInfo.id) {
uni.redirectTo({
url: "/pages/user/login"
})
}
uni.getLocation({
type: 'gcj02',
success(res) {
console.log(res)
TaPost('/ticket/api.auth.UserShare/query_address', {
lat: res.latitude,
lng: res.longitude
}).then((result) => {
const data = result.data;
that.form.ticket_address = data;
})
that.form.ticket_lat = res.latitude;
that.form.ticket_lng = res.longitude;
},