You've already forked guangan-mp
修一下
This commit is contained in:
@ -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;
|
||||
},
|
||||
|
Reference in New Issue
Block a user