This commit is contained in:
齐天大圣 2024-07-09 10:28:16 +08:00
parent 4273fd0d41
commit dd535ad374
4 changed files with 38 additions and 38 deletions

View File

@ -72,7 +72,7 @@
} else {
if (str.includes("storeId")) {
storeId = str.split("=")[1]
}else if(str.includes("sn")){
} else if (str.includes("sn")) {
sn = str.split("=")[1]
}
}

View File

@ -409,7 +409,7 @@
// this.getAddress();
uni.getSetting({
success(res) {
if (res.authSetting['scope.userLocation']==false) {
if (res.authSetting['scope.userLocation'] == false) {
// uni.clearStorageSync();
// _this.getStorageSize()
@ -434,33 +434,33 @@
//
showRefuseLocationPermission() {
const that = this;
wx.showModal({
title: "提示",
content: "需要获取用户位置权限",
confirmText: "前往设置",
showCancel: false,
success(res) {
if (res.confirm) {
uni.openSetting({
success(res){
console.log("打开设置成功", res);
if (res.authSetting['scope.userLocation']) {
console.log('成功授权userLocation')
that.getAddress()
} else {
console.log('用户未授权userLocation')
// ()
that.showRefuseLocationPermission()
}
},
fail(err){
console.log("打开设置失败", err)
}
})
}
}
})
const that = this;
wx.showModal({
title: "提示",
content: "需要获取用户位置权限",
confirmText: "前往设置",
showCancel: false,
success(res) {
if (res.confirm) {
uni.openSetting({
success(res) {
console.log("打开设置成功", res);
if (res.authSetting['scope.userLocation']) {
console.log('成功授权userLocation')
that.getAddress()
} else {
console.log('用户未授权userLocation')
// ()
that.showRefuseLocationPermission()
}
},
fail(err) {
console.log("打开设置失败", err)
}
})
}
}
})
},
getStorageSize() {
let that = this;

View File

@ -92,7 +92,8 @@
},
}).then((resp) => {
if (resp.code == 200) {
console.log(uni.getStorageSync("y_type"),uni.getStorageSync("y_userId"));
console.log(uni.getStorageSync("y_type"), uni
.getStorageSync("y_userId"));
if (uni.getStorageSync("y_type") ==
'yaoqingyouli') {
_this.activeRecommendRecords()

View File

@ -325,8 +325,7 @@
oilCardAmountSale: this.oilCardRedece,
ifLogin: this.ifLogin,
levelAmount: this.levelAmount,
activeAmount: this.activeAmount,
sn
activeAmount: this.activeAmount
};
let _this = this;
request({