Commit 423d1863 authored by 罗超's avatar 罗超

提交URL

parent 8d8042a3
......@@ -6,20 +6,20 @@ export default {
apiurl: ''
},
install(Vue, options) {
Vue.prototype.isOnline = function() {
Vue.prototype.isOnline = function () {
return process.env.NODE_ENV !== 'development';
},
//域名管理对象
Vue.prototype.domainManager = function() {
Vue.prototype.domainManager = function () {
//CRM API
let domainUrl = "";
domainUrl = "http://192.168.10.36:8098";
domainUrl = "http://192.168.10.46:8500";
//domainUrl = "http://localhost:5003";
let locationName = window.location.hostname;
//旅游ERPApi
let domainPostUrl = ""
domainPostUrl = "http://192.168.10.36:8083";
//domainPostUrl = "http://192.168.10.46";
//domainPostUrl = "http://192.168.10.36:8083";
domainPostUrl = "http://192.168.10.46";
if (this.isOnline()) {
if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) {
domainUrl = "http://crm.oytour.com"
......@@ -48,7 +48,7 @@ export default {
},
//消息成功提示
Vue.prototype.Success = function(msg) {
Vue.prototype.Success = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -56,7 +56,7 @@ export default {
});
},
//错误提示
Vue.prototype.Error = function(msg) {
Vue.prototype.Error = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -65,7 +65,7 @@ export default {
},
//一般提示
Vue.prototype.Info = function(msg) {
Vue.prototype.Info = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -73,7 +73,7 @@ export default {
});
},
//警告提示
Vue.prototype.Warning = function(msg) {
Vue.prototype.Warning = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -81,7 +81,7 @@ export default {
});
},
//Confirm
Vue.prototype.Confirm = function(msg, callback) {
Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -101,7 +101,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue.prototype.compressImg = function(path, type, w, h) {
Vue.prototype.compressImg = function (path, type, w, h) {
let url = this.domainManager().UploadUrl;
let poise = 'width=';
w = w ? w : ''
......@@ -116,7 +116,7 @@ export default {
//旅游ERP接口
Vue.prototype.apipost2 = function(cmd, msg, successCall, faildCall, isOnline) {
Vue.prototype.apipost2 = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -165,7 +165,7 @@ export default {
}
//CRM接口
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -208,7 +208,7 @@ export default {
},
// 自动登录HTTP提交数据
Vue.prototype.apipostLogin = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apipostLogin = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -251,7 +251,7 @@ export default {
},
//Java接口
Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -303,7 +303,7 @@ export default {
},
//下载文件
Vue.prototype.GetLocalFile = function(cmd, msg, fileName, callBack) {
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, callBack) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -345,7 +345,7 @@ export default {
};
callBack(result);
}
}).catch(function(res) {
}).catch(function (res) {
console.log("GetLocalFile", 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