Commit 07891c22 by 程智春

5.26

parent 609814e2
......@@ -2,5 +2,7 @@
{
"extEnable":true,
"extAppid":"wxae95a07ffdf11548",
"directCommit":true
"ext":{
"mixid":"antgood"
}
}
\ No newline at end of file
<script>
export default {
created () {
let extConfig = wx.getExtConfigSync? wx.getExtConfigSync(): {}
this.$store.commit("setExtConfig", extConfig.mixid);
// if (wx.getExtConfig) {
// wx.getExtConfig({
// success : (res) => {
// if(res.errMsg == 'getExtConfig: ok'){
// this.$store.commit("setExtConfig", res.extConfig.mixid);
// }
// }
// })
// }
// 调用API从本地缓存中获取数据
/*
* 平台 api 差异的处理方式: api 方法统一挂载到 mpvue 名称空间, 平台判断通过 mpvuePlatform 特征字符串
......
......@@ -11,7 +11,7 @@ import { serialize, getQueryVariable, DFSImg } from "@/utils/index";
export default {
data() {
return {
shopId: process.env.SHOP_MIXID,
shopId: this.$store.state.mixid,
options: {},
session_key: "",
baseUrl: process.env.BASE_URL,
......@@ -53,7 +53,8 @@ export default {
"index------",
this.shopId,
"-----",
wx.getStorageSync("openid")
wx.getStorageSync("openid"),
this.shopId
);
//检测登录态
this.checkLogin();
......
......@@ -114,8 +114,6 @@ export default {
code : '',
shopId: process.env.SHOP_MIXID,
baseUrl: process.env.BASE_URL,
}
......
......@@ -32,6 +32,9 @@ const mutations = {
wx.clearStorage()
state.isLogin = 0;
state.userInfo = null;
},
setExtConfig(state,obj){
state.mixid = obj
}
};
......
......@@ -20,5 +20,7 @@ const state = {
offlineShopCode:"",
isLogin,
userInfo,
mixid : '',
};
export default state
\ No newline at end of file
import store from '../store/index'
let shopMixid = process.env.SHOP_MIXID;
console.log(store.state.mixid,'store.state')
let shopMixid = store.state.mixid;
// wx.getStore
export async function requestGET(url, options) {
......
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