Commit d8251aa5 by 程智春

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

parents 49fcb96d bf93f3b0
...@@ -11,9 +11,9 @@ export default { ...@@ -11,9 +11,9 @@ export default {
process.env.NODE_ENV == "production" || process.env.NODE_ENV == "production" ||
JSON.stringify(extConfig) == "{}" JSON.stringify(extConfig) == "{}"
) { ) {
// extConfig = { mixid: "jordan", shopid: 471 }; extConfig = { mixid: "antgood", shopid: 67 };
extConfig = { "mixid":"antgood", // extConfig = { "mixid":"xyyx",
"shopid":67 }; // "shopid":133 };
} }
console.log("1444444444", extConfig); console.log("1444444444", extConfig);
this.$store.commit("setExtConfig", extConfig.mixid); this.$store.commit("setExtConfig", extConfig.mixid);
......
...@@ -82,13 +82,16 @@ export default { ...@@ -82,13 +82,16 @@ export default {
this.options = options; this.options = options;
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
let op=wx.getStorageSync("openid")
if (op) {
this.params += '&open_id='+wx.getStorageSync("openid");
this.withoutScene = true; this.withoutScene = true;
}else{
//获取openId //获取openId
wx.login({ wx.login({
success: res => { success: res => {
this.code = res.code; this.code = res.code;
login.miniLogin({ code: this.code}).then(res1 => { login.miniLogin({ code: this.code}).then(res1 => {
console.log(res1,555555)
if (res1.data.code == 200) { if (res1.data.code == 200) {
wx.setStorage({ wx.setStorage({
key: "openid", key: "openid",
...@@ -96,10 +99,11 @@ export default { ...@@ -96,10 +99,11 @@ export default {
}); });
} }
this.params += '&open_id='+wx.getStorageSync("openid"); this.params += '&open_id='+wx.getStorageSync("openid");
console.log(this.code,77777,this.params) this.withoutScene = true;
}) })
}, },
}) })
}
// 移除重复参数 // 移除重复参数
if (options.params) { if (options.params) {
let params=decodeURIComponent(options.params) let params=decodeURIComponent(options.params)
......
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