Commit ee124806 by 李嘉林

url解析错误

parent fc89f46e
...@@ -5702,9 +5702,9 @@ ...@@ -5702,9 +5702,9 @@
} }
}, },
"mayi-front-tools": { "mayi-front-tools": {
"version": "1.0.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.0.tgz", "resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.1.tgz",
"integrity": "sha512-Rva5tM2lSmbX6pb+fmu7FA60kJ/tKtDdTp5Tpj9B/+4Rtk9psuZ7zZk20Nk19mF6u/lZYJHrvdHr2yhKQWWFqQ==" "integrity": "sha512-xEkLnrY5VDU9ooonUwQyiKcOHuNhGq8MJ7dlNfM3QUlUWmZVxZj5r2Aa8yQI/ukfQdl1p5RUFjmIPfSZRQKMjQ=="
}, },
"md5.js": { "md5.js": {
"version": "1.3.5", "version": "1.3.5",
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
}, },
"dependencies": { "dependencies": {
"mayi-analytics": "^1.1.37", "mayi-analytics": "^1.1.37",
"mayi-front-tools": "^1.0.0", "mayi-front-tools": "^1.0.1",
"mpvue": "^2.0.0", "mpvue": "^2.0.0",
"mpvue-wxparse": "^0.6.5", "mpvue-wxparse": "^0.6.5",
"vuex": "^3.0.1", "vuex": "^3.0.1",
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {};
console.log(extConfig, "-----------extConfig"); console.log(extConfig, "-----------extConfig");
if (JSON.stringify(extConfig) == "{}") { if (JSON.stringify(extConfig) == "{}") {
extConfig = process.env.NODE_ENV == "development" ? { mixid: "antgood", shopid: 67}:{ "mixid":"CL", "shopid":1166 }; extConfig = process.env.NODE_ENV == "development" ? { mixid: "antgood", shopid: 67}:{ "mixid":"fruit", "shopid": 1213 };
} }
...@@ -171,6 +171,7 @@ export default { ...@@ -171,6 +171,7 @@ export default {
//商城配置 //商城配置
getShopInfo({ mixid }) { getShopInfo({ mixid }) {
shop.getShopInfo({ shopMixId: mixid }).then((res) => { shop.getShopInfo({ shopMixId: mixid }).then((res) => {
console.log("--app---getShopInfo")
if (res.data.code == 200) { if (res.data.code == 200) {
// 收集用户数据 // 收集用户数据
this.$mpBehavior.init("mayi-moblie-shop-mp", res.data.data.id, { this.$mpBehavior.init("mayi-moblie-shop-mp", res.data.data.id, {
...@@ -186,6 +187,11 @@ export default { ...@@ -186,6 +187,11 @@ export default {
let defaultComponentModel = res.data.data.shopThemeData; let defaultComponentModel = res.data.data.shopThemeData;
this.mpApp.globalData.shopThemeData = res.data.data.shopThemeData; this.mpApp.globalData.shopThemeData = res.data.data.shopThemeData;
this.mpApp.globalData.shopInfo = res.data.data; this.mpApp.globalData.shopInfo = res.data.data;
if(this.mpApp.globalData.shopInfo.whetherOpenEnterprisesWantGoods - 0 == 0) {
wx.removeStorage({
key: "enterpriseAccount"
});
}
// 获取底部栏数据 // 获取底部栏数据
let val = JSON.parse(defaultComponentModel); let val = JSON.parse(defaultComponentModel);
...@@ -225,6 +231,16 @@ export default { ...@@ -225,6 +231,16 @@ export default {
}); });
// //
console.log(this.mpApp, "mmmmm74", themeColor); console.log(this.mpApp, "mmmmm74", themeColor);
// 强制登录
if(res.data.data.whetherToForceLogin == 1 && !wx.getStorageSync('sessionid')) {
let backUrl = `/pages/home/main`;
const url = `/pages/login/main?back=${encodeURIComponent(
backUrl
)}&hideBack=1`;
wx.navigateTo({
url: url
});
}
} }
}); });
}, },
...@@ -243,7 +259,7 @@ export default { ...@@ -243,7 +259,7 @@ export default {
.themePagesInfo({ .themePagesInfo({
shopid, shopid,
shopMixId: mixid, shopMixId: mixid,
homePageFlag: true homePageFlag: false
}) })
.then((response) => { .then((response) => {
if (response.data.code == 200) { if (response.data.code == 200) {
...@@ -251,6 +267,7 @@ export default { ...@@ -251,6 +267,7 @@ export default {
if (Array.isArray(data) && data.length > 0) { if (Array.isArray(data) && data.length > 0) {
console.log("90", data); console.log("90", data);
// 设置显示条件 // 设置显示条件
// 首页
this.setVisible(data,()=>{ this.setVisible(data,()=>{
console.log(1711111111); console.log(1711111111);
this.mpApp.globalData.pageList = data; this.mpApp.globalData.pageList = data;
......
...@@ -65,7 +65,10 @@ export default { ...@@ -65,7 +65,10 @@ export default {
if(wx.getStorageSync("enterpriseAccount")){ if(wx.getStorageSync("enterpriseAccount")){
this.params +=`&enterpriseAccount=${wx.getStorageSync("enterpriseAccount")}`; this.params +=`&enterpriseAccount=${wx.getStorageSync("enterpriseAccount")}`;
} }
let pageUrl = forUrlAddKey(decodeURIComponent(this.link+this.page+this.params)); let pageUrl1 = (this.page.startsWith('http://') || this.page.startsWith('https://'))? (this.page + this.params) : this.link+this.page+this.params
console.log(pageUrl1,'--------pageUrl1')
let pageUrl = forUrlAddKey(decodeURIComponent(pageUrl1));
console.log(pageUrl,'--------pageUrl')
// let pageUrl = this.link+this.page+this.params; // let pageUrl = this.link+this.page+this.params;
return pageUrl; return pageUrl;
}, },
......
...@@ -210,6 +210,7 @@ export default { ...@@ -210,6 +210,7 @@ export default {
} }
this.hideBack = options.hideBack == 1?1:0 this.hideBack = options.hideBack == 1?1:0
if (options.params) { if (options.params) {
options.params = decodeURIComponent(options.params);
this.defalutBackParams= serialize(options.params); this.defalutBackParams= serialize(options.params);
this.backParams = this.defalutBackParams; this.backParams = this.defalutBackParams;
let params = JSON.parse(options.params); let params = JSON.parse(options.params);
...@@ -503,6 +504,10 @@ export default { ...@@ -503,6 +504,10 @@ export default {
}) })
.catch(err => { .catch(err => {
log.info("err", err); log.info("err", err);
wx.showToast({
title: err,
icon: "none"
});
wx.hideLoading(); wx.hideLoading();
}); });
}, },
......
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