Commit c9c5d6e6 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/huaguohao/crm

# Conflicts:
#	src/components/clueManagement/guestDialogBox.vue
#	src/plugins/index.js
#	vue.config.js
#	yarn.lock
parents 5fa56f7b 2be1b4bf
...@@ -6,20 +6,19 @@ export default { ...@@ -6,20 +6,19 @@ export default {
apiurl: '' apiurl: ''
}, },
install(Vue, options) { install(Vue, options) {
Vue.prototype.isOnline = function () { Vue.prototype.isOnline = function() {
return process.env.NODE_ENV !== 'development'; return process.env.NODE_ENV !== 'development';
}, },
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function() {
let domainUrl = "https://localhost:5001" let domainUrl = "http://192.168.10.2:8098"
let locationName = window.location.hostname; let locationName = window.location.hostname;
let domainPostUrl = "http://reborn.oytour.com" let domainPostUrl = "http://198.168.10.2:8083"
if (this.isOnline()) { if (this.isOnline()) {
if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) { if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) {
domainUrl = "http://crm.oytour.com" domainUrl = "http://crm.oytour.com"
domainPostUrl = "http://reborn.oytour.com" domainPostUrl = "http://reborn.oytour.com"
} } else {
else {
domainUrl = "http://testcrm.oytour.com" domainUrl = "http://testcrm.oytour.com"
domainPostUrl = "http://testapi.oytour.com" domainPostUrl = "http://testapi.oytour.com"
} }
...@@ -48,7 +47,7 @@ export default { ...@@ -48,7 +47,7 @@ export default {
}; };
return obj; return obj;
}, },
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) { Vue.prototype.GetLocalFile = function(cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl; var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") { if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
...@@ -84,10 +83,10 @@ export default { ...@@ -84,10 +83,10 @@ export default {
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function (res) { }); }).catch(function(res) {});
}, },
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun //价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) { Vue.prototype.moneyFormat = function(value) {
let nStr = Number(value).toFixed(2) let nStr = Number(value).toFixed(2)
nStr += ''; nStr += '';
let x = nStr.split('.'); let x = nStr.split('.');
...@@ -100,7 +99,7 @@ export default { ...@@ -100,7 +99,7 @@ export default {
return x1 + x2; return x1 + x2;
}, },
//消息成功提示 //消息成功提示
Vue.prototype.Success = function (msg) { Vue.prototype.Success = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -108,7 +107,7 @@ export default { ...@@ -108,7 +107,7 @@ export default {
}); });
}, },
//错误提示 //错误提示
Vue.prototype.Error = function (msg) { Vue.prototype.Error = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -117,7 +116,7 @@ export default { ...@@ -117,7 +116,7 @@ export default {
}, },
//一般提示 //一般提示
Vue.prototype.Info = function (msg) { Vue.prototype.Info = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -125,7 +124,7 @@ export default { ...@@ -125,7 +124,7 @@ export default {
}); });
}, },
//警告提示 //警告提示
Vue.prototype.Warning = function (msg) { Vue.prototype.Warning = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -133,7 +132,7 @@ export default { ...@@ -133,7 +132,7 @@ export default {
}); });
}, },
//Confirm //Confirm
Vue.prototype.Confirm = function (msg, callback) { Vue.prototype.Confirm = function(msg, callback) {
this.$confirm(msg, "提示", { this.$confirm(msg, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -153,7 +152,7 @@ export default { ...@@ -153,7 +152,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定 //type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽 // w : 宽
// h : 高 // h : 高
Vue.prototype.compressImg = function (path, type, w, h) { Vue.prototype.compressImg = function(path, type, w, h) {
let url = this.domainManager().UploadUrl; let url = this.domainManager().UploadUrl;
let poise = 'width='; let poise = 'width=';
w = w ? w : '' w = w ? w : ''
...@@ -166,13 +165,13 @@ export default { ...@@ -166,13 +165,13 @@ export default {
return path.split('?')[0] + '?width=' + w; return path.split('?')[0] + '?width=' + w;
} }
//打开新窗口连接 //打开新窗口连接
Vue.prototype.OpenNewUrl = function (URL) { Vue.prototype.OpenNewUrl = function(URL) {
if (URL != '') { if (URL != '') {
window.open('http://' + URL, '_blank'); window.open('http://' + URL, '_blank');
} }
} }
//HTTP提交数据 //HTTP提交数据
Vue.prototype.apipost2 = function (cmd, msg, successCall, faildCall, isOnline) { Vue.prototype.apipost2 = function(cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -219,7 +218,7 @@ export default { ...@@ -219,7 +218,7 @@ export default {
} }
}, faildCall) }, faildCall)
} }
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -262,7 +261,7 @@ export default { ...@@ -262,7 +261,7 @@ export default {
} }
}, faildCall) }, faildCall)
}, },
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -313,7 +312,7 @@ export default { ...@@ -313,7 +312,7 @@ export default {
} }
}, faildCall) }, faildCall)
}, },
Vue.prototype.getAction = function (actionId, lineId) { Vue.prototype.getAction = function(actionId, lineId) {
// if(actionId==1){ // if(actionId==1){
// console.log("浏览签证产品",actionId) // console.log("浏览签证产品",actionId)
// } // }
...@@ -340,7 +339,7 @@ export default { ...@@ -340,7 +339,7 @@ export default {
} }
//验证只能输入2位小数 //验证只能输入2位小数
Vue.prototype.checkPrice = function (item, filed) { Vue.prototype.checkPrice = function(item, filed) {
var value = ""; var value = "";
if (typeof item[filed] == "string") { if (typeof item[filed] == "string") {
value = item[filed]; value = item[filed];
...@@ -361,7 +360,7 @@ export default { ...@@ -361,7 +360,7 @@ export default {
item[filed] = value; item[filed] = value;
} }
//验证只能输入整数 //验证只能输入整数
Vue.prototype.checkInteger = function (item, filed) { Vue.prototype.checkInteger = function(item, filed) {
var value = ""; var value = "";
if (typeof item[filed] == "string") { if (typeof item[filed] == "string") {
value = item[filed]; value = item[filed];
......
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