Commit 7ec9bdf5 authored by 黄奎's avatar 黄奎

111

parents 92a82bce 133dfa04
......@@ -2,10 +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.20.17:8020"
Vue.prototype.host2 = "https://erpmallapi.oytour.com"
//Vue.prototype.host3 = "http://192.168.20.17:8015"
Vue.prototype.host3 = "https://reborn.oytour.com"
// Vue.prototype.host2 = "http://192.168.20.17:8020"
Vue.prototype.host2 = "https://erpmallapi.oytour.com"
// Vue.prototype.host3 = "http://192.168.20.17:8015"
Vue.prototype.host3 = "https://reborn.oytour.com"
Vue.prototype.host4 = "https://upload.oytour.com"
Vue.prototype.request = function (param, success, failed) {
//网络请求
......@@ -75,6 +76,27 @@ export default {
}
});
}
Vue.prototype.request4 = function (param, success, failed) {
//网络请求
uni.request({
url: this.host4 + param.url,
method: param.method || "Post",
header: param.header || {
'content-type': "application/json"
},
data: param.data,
success: res => {
success(res.data);
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
}
});
}
//请求app接口
Vue.prototype.apipost = function (cmd, msg, success, failed) {
var postData = this.GetPostData(cmd, msg, "");
......
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