sn
This commit is contained in:
parent
4273fd0d41
commit
dd535ad374
@ -72,7 +72,7 @@
|
|||||||
} else {
|
} else {
|
||||||
if (str.includes("storeId")) {
|
if (str.includes("storeId")) {
|
||||||
storeId = str.split("=")[1]
|
storeId = str.split("=")[1]
|
||||||
}else if(str.includes("sn")){
|
} else if (str.includes("sn")) {
|
||||||
sn = str.split("=")[1]
|
sn = str.split("=")[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,4 +105,4 @@
|
|||||||
.dis {
|
.dis {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -409,10 +409,10 @@
|
|||||||
// this.getAddress();
|
// this.getAddress();
|
||||||
uni.getSetting({
|
uni.getSetting({
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.authSetting['scope.userLocation']==false) {
|
if (res.authSetting['scope.userLocation'] == false) {
|
||||||
// uni.clearStorageSync();
|
// uni.clearStorageSync();
|
||||||
// _this.getStorageSize()
|
// _this.getStorageSize()
|
||||||
|
|
||||||
_this.showRefuseLocationPermission()
|
_this.showRefuseLocationPermission()
|
||||||
} else {
|
} else {
|
||||||
// 用户同意获取位置信息
|
// 用户同意获取位置信息
|
||||||
@ -431,36 +431,36 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 用户拒绝授权的展示
|
// 用户拒绝授权的展示
|
||||||
showRefuseLocationPermission() {
|
showRefuseLocationPermission() {
|
||||||
const that = this;
|
const that = this;
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "需要获取用户位置权限",
|
content: "需要获取用户位置权限",
|
||||||
confirmText: "前往设置",
|
confirmText: "前往设置",
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.openSetting({
|
uni.openSetting({
|
||||||
success(res){
|
success(res) {
|
||||||
console.log("打开设置成功", res);
|
console.log("打开设置成功", res);
|
||||||
if (res.authSetting['scope.userLocation']) {
|
if (res.authSetting['scope.userLocation']) {
|
||||||
console.log('成功授权userLocation')
|
console.log('成功授权userLocation')
|
||||||
that.getAddress()
|
that.getAddress()
|
||||||
} else {
|
} else {
|
||||||
console.log('用户未授权userLocation')
|
console.log('用户未授权userLocation')
|
||||||
// 递归调用本函数,(函数套函数)
|
// 递归调用本函数,(函数套函数)
|
||||||
that.showRefuseLocationPermission()
|
that.showRefuseLocationPermission()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail(err){
|
fail(err) {
|
||||||
console.log("打开设置失败", err)
|
console.log("打开设置失败", err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStorageSize() {
|
getStorageSize() {
|
||||||
let that = this;
|
let that = this;
|
||||||
@ -1059,4 +1059,4 @@
|
|||||||
color: white;
|
color: white;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -92,11 +92,12 @@
|
|||||||
},
|
},
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
if (resp.code == 200) {
|
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") ==
|
if (uni.getStorageSync("y_type") ==
|
||||||
'yaoqingyouli') {
|
'yaoqingyouli') {
|
||||||
_this.activeRecommendRecords()
|
_this.activeRecommendRecords()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.setStorageSync('App-Token', resp.data.token);
|
uni.setStorageSync('App-Token', resp.data.token);
|
||||||
@ -380,4 +381,4 @@
|
|||||||
border: 1px solid #0078FF;
|
border: 1px solid #0078FF;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -325,8 +325,7 @@
|
|||||||
oilCardAmountSale: this.oilCardRedece,
|
oilCardAmountSale: this.oilCardRedece,
|
||||||
ifLogin: this.ifLogin,
|
ifLogin: this.ifLogin,
|
||||||
levelAmount: this.levelAmount,
|
levelAmount: this.levelAmount,
|
||||||
activeAmount: this.activeAmount,
|
activeAmount: this.activeAmount
|
||||||
sn
|
|
||||||
};
|
};
|
||||||
let _this = this;
|
let _this = this;
|
||||||
request({
|
request({
|
||||||
|
Loading…
Reference in New Issue
Block a user