Commit ec017d63 by chenhui

Merge branch 'product_dev' of http://code.mayi888.com/chengmo/mayi-mp-shop into product_dev

parents 6514a4b9 25c1e8a3
......@@ -116,6 +116,7 @@ export default {
}
console.log("url", this.link + this.page + this.params);
this.getSpokesman();
this.init();
},
onShow() {
// console.log('显示了',options.webViewUrl);
......@@ -123,23 +124,23 @@ export default {
methods: {
init() {
// 弃用小程序地位
let that = this;
// let that = this;
// 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.record" 这个 scope
wx.getSetting({
success(res) {
console.log(res, "sdf1233");
if (!res.authSetting["scope.userLocation"]) {
wx.authorize({
scope: "scope.userLocation",
success() {
that.getLocationHandle();
}
});
} else {
that.getLocationHandle();
}
}
});
// wx.getSetting({
// success(res) {
// console.log(res, "sdf1233");
// if (!res.authSetting["scope.userLocation"]) {
// wx.authorize({
// scope: "scope.userLocation",
// success() {
// that.getLocationHandle();
// }
// });
// } else {
// that.getLocationHandle();
// }
// }
// });
},
checkLogin() {
let getOpenid = wx.getStorageSync("openid");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment