Commit ee124806 by 李嘉林

url解析错误

parent fc89f46e
......@@ -5702,9 +5702,9 @@
}
},
"mayi-front-tools": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.0.tgz",
"integrity": "sha512-Rva5tM2lSmbX6pb+fmu7FA60kJ/tKtDdTp5Tpj9B/+4Rtk9psuZ7zZk20Nk19mF6u/lZYJHrvdHr2yhKQWWFqQ=="
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.1.tgz",
"integrity": "sha512-xEkLnrY5VDU9ooonUwQyiKcOHuNhGq8MJ7dlNfM3QUlUWmZVxZj5r2Aa8yQI/ukfQdl1p5RUFjmIPfSZRQKMjQ=="
},
"md5.js": {
"version": "1.3.5",
......
......@@ -23,7 +23,7 @@
},
"dependencies": {
"mayi-analytics": "^1.1.37",
"mayi-front-tools": "^1.0.0",
"mayi-front-tools": "^1.0.1",
"mpvue": "^2.0.0",
"mpvue-wxparse": "^0.6.5",
"vuex": "^3.0.1",
......
......@@ -11,7 +11,7 @@ export default {
let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {};
console.log(extConfig, "-----------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 {
//商城配置
getShopInfo({ mixid }) {
shop.getShopInfo({ shopMixId: mixid }).then((res) => {
console.log("--app---getShopInfo")
if (res.data.code == 200) {
// 收集用户数据
this.$mpBehavior.init("mayi-moblie-shop-mp", res.data.data.id, {
......@@ -186,6 +187,11 @@ export default {
let defaultComponentModel = res.data.data.shopThemeData;
this.mpApp.globalData.shopThemeData = res.data.data.shopThemeData;
this.mpApp.globalData.shopInfo = res.data.data;
if(this.mpApp.globalData.shopInfo.whetherOpenEnterprisesWantGoods - 0 == 0) {
wx.removeStorage({
key: "enterpriseAccount"
});
}
// 获取底部栏数据
let val = JSON.parse(defaultComponentModel);
......@@ -225,6 +231,16 @@ export default {
});
//
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 {
.themePagesInfo({
shopid,
shopMixId: mixid,
homePageFlag: true
homePageFlag: false
})
.then((response) => {
if (response.data.code == 200) {
......@@ -251,6 +267,7 @@ export default {
if (Array.isArray(data) && data.length > 0) {
console.log("90", data);
// 设置显示条件
// 首页
this.setVisible(data,()=>{
console.log(1711111111);
this.mpApp.globalData.pageList = data;
......
......@@ -65,7 +65,10 @@ export default {
if(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;
return pageUrl;
},
......
......@@ -210,6 +210,7 @@ export default {
}
this.hideBack = options.hideBack == 1?1:0
if (options.params) {
options.params = decodeURIComponent(options.params);
this.defalutBackParams= serialize(options.params);
this.backParams = this.defalutBackParams;
let params = JSON.parse(options.params);
......@@ -503,6 +504,10 @@ export default {
})
.catch(err => {
log.info("err", err);
wx.showToast({
title: err,
icon: "none"
});
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