Commit 7188854c authored by 黄奎's avatar 黄奎

页面修改

parent 03477581
......@@ -5,7 +5,7 @@ export default {
// Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.1.5:8088"
// Vue.prototype.host2 = "http://192.168.1.21"
Vue.prototype.host2 = "http://192.168.1.27:8200"
Vue.prototype.host2 = "http://testmall.oytour.com/"
Vue.prototype.request = function(param, success, failed) {
//网络请求
......@@ -17,9 +17,7 @@ export default {
},
data: param.data,
success: res => {
if (res.data.code != 0 && res.data.msg != "商品未上架") {
}
if (res.data.code != 0 && res.data.msg != "商品未上架") {}
typeof success == "function" && success(res.data);
},
fail: (e) => {
......@@ -40,25 +38,22 @@ export default {
'content-type': "application/json"
},
data: {
MallBaseId: 2,
TenantId: 12,
MallBaseId: this.GetMiniAppId().MallBaseId,
TenantId: this.GetMiniAppId().TenantId,
OpenId: this.GetOpenId().OpenId,
UserId: this.GetOpenId().UserId,
SmallShopsId: this.GetOpenId().SmallShopsId,
MiniAppId: this.GetMiniAppId(),
MiniAppId: this.GetMiniAppId().AppId,
msg: param.data,
token: this.GetOpenId().token
},
success: res => {
if (res.data.resultCode == 10000) {
let u = uni.getStorageSync("mall_UserInfo");
if (u) {
this.getLogin_t(u)
typeof failed == "function" && failed(res.data);
}
} else if (res.data.resultCode != 1) {
if (res.data.message != '') {
uni.showToast({
......@@ -66,13 +61,8 @@ export default {
icon: "none",
});
}
typeof failed == "function" && failed(res.data);
} else {
typeof success == "function" && success(res.data);
}
},
......@@ -115,10 +105,32 @@ export default {
}
// 获取小程序APPID
Vue.prototype.GetMiniAppId = function() {
// return 'wxacd9f8cc3480d29e'
return 'wxcf0727a7c78b501e' //旅小友
// return 'wx01350b305d45a63e' //饭粒汪
let appObj = {};
let appType = 1;
switch (appType) {
case 1: //赞羊
appObj = {
AppId: 'wxacd9f8cc3480d29e',
TenantId: 1,
MallBaseId: 1,
};
break;
case 2: //旅小友
appObj = {
AppId: 'wxcf0727a7c78b501e',
TenantId: 12,
MallBaseId: 2,
};
break;
case 3:
appObj = {
AppId: 'wx01350b305d45a63e',
TenantId: 14,
MallBaseId: 4,
};
break;
}
return appObj;
}
//获取OpenId
Vue.prototype.GetOpenId = function() {
......
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