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 { ...@@ -2,9 +2,11 @@ export default {
install(Vue, options) { install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285" 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 = "http://192.168.10.46:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com" // Vue.prototype.host2 = "https://mallApi.oytour.com"
//进阶思维后台地址
Vue.prototype.host3 = "http://192.168.10.128:8900"
Vue.prototype.UploadConfig = function() { //本地上传配置 Vue.prototype.UploadConfig = function() { //本地上传配置
return { return {
...@@ -125,6 +127,45 @@ export default { ...@@ -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失效再次登录接口 // token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) { Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
...@@ -147,7 +188,7 @@ export default { ...@@ -147,7 +188,7 @@ export default {
UserPageType: Up, UserPageType: Up,
CounponPassword: CounponPassword, CounponPassword: CounponPassword,
KeyWord: KeyWord, KeyWord: KeyWord,
EduId:EduId, EduId: EduId,
} }
}, },
res => { 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