wx.getLocation({
type: 'gcj02',
isHighAccuracy: true,
highAccuracyExpireTime: 4000,
success(res) {},
fail(res) {
console.log(res, "res");
wx.showModal({
title: "检测到您未开启手机定位,请先去设置中打开定位,开启后请点击'重进程序'",
confirmText: "重进程序",
cancelText: "返回首页",
success(res) {
if (res.confirm) {
wx.restartMiniProgram({
path: '/pages/index/index'
})
}
if (res.cancel) {
wx.navigateBack({
delta: 1
})
}
}
})
},
complete(res) {},
})