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 { ...@@ -116,6 +116,7 @@ export default {
} }
console.log("url", this.link + this.page + this.params); console.log("url", this.link + this.page + this.params);
this.getSpokesman(); this.getSpokesman();
this.init();
}, },
onShow() { onShow() {
// console.log('显示了',options.webViewUrl); // console.log('显示了',options.webViewUrl);
...@@ -123,23 +124,23 @@ export default { ...@@ -123,23 +124,23 @@ export default {
methods: { methods: {
init() { init() {
// 弃用小程序地位 // 弃用小程序地位
let that = this; // let that = this;
// 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.record" 这个 scope // 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.record" 这个 scope
wx.getSetting({ // wx.getSetting({
success(res) { // success(res) {
console.log(res, "sdf1233"); // console.log(res, "sdf1233");
if (!res.authSetting["scope.userLocation"]) { // if (!res.authSetting["scope.userLocation"]) {
wx.authorize({ // wx.authorize({
scope: "scope.userLocation", // scope: "scope.userLocation",
success() { // success() {
that.getLocationHandle(); // that.getLocationHandle();
} // }
}); // });
} else { // } else {
that.getLocationHandle(); // that.getLocationHandle();
} // }
} // }
}); // });
}, },
checkLogin() { checkLogin() {
let getOpenid = wx.getStorageSync("openid"); 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