Commit d8fe7c27 authored by 黄奎's avatar 黄奎

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents fe4407fb 56c5a29f
This diff is collapsed.
......@@ -2,9 +2,11 @@ export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue.prototype.host2 = "http://192.168.10.128:8200"
Vue.prototype.host2 = "http://localhost:5000"
// Vue.prototype.host2 = "http://192.168.10.46:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
//进阶思维后台地址
Vue.prototype.host3 = "http://192.168.10.128:8900"
Vue.prototype.UploadConfig = function() { //本地上传配置
return {
......@@ -60,7 +62,7 @@ export default {
this.getLogin_t(u)
}
} else if (res.data.resultCode != 1) {
if (res.data.message) {
uni.showToast({
title: res.data.message,
......@@ -125,6 +127,45 @@ export default {
});
}
//进阶思维后台接口
Vue.prototype.requestJJSWAdmin = function(cmd, postMsg, success, failed) {
uni.request({
url: this.host3 + cmd,
method: "Post",
header: {
'content-type': "application/json"
},
data: {
msg: postMsg
},
success: res => {
if (res.Code == 10000) {
let u = uni.getStorageSync("mall_UserInfo");
if (u) {
this.getLogin_t(u)
}
} else if (res.Code != 1) {
if (res.Message != '') {
uni.showToast({
title: res.Message,
icon: "none",
});
}
typeof failed == "function" && failed(res.Data);
} else {
typeof success == "function" && success(res.Data);
}
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.Message
});
typeof failed == "function" && failed(res.data);
}
});
}
// token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
......@@ -133,7 +174,7 @@ export default {
let CounponPassword = uni.getStorageSync("CounponPassword") ? uni.getStorageSync("CounponPassword").CounponPassword :
0;
let KeyWord = uni.getStorageSync("KeyWord") ? uni.getStorageSync("KeyWord").KeyWord : '';
let EduId = uni.getStorageSync("jxhData") ? uni.getStorageSync("jxhData").Id : 0;
let EduId = uni.getStorageSync("jxhData") ? uni.getStorageSync("jxhData").Id : 0;
this.request2({
url: '/api/AppletLogin/Login',
data: {
......@@ -147,7 +188,7 @@ export default {
UserPageType: Up,
CounponPassword: CounponPassword,
KeyWord: KeyWord,
EduId:EduId,
EduId: EduId,
}
},
res => {
......
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