Commit 5286ed21 authored by youjie's avatar youjie
parents 50322045 42000259
...@@ -119,21 +119,16 @@ export default { ...@@ -119,21 +119,16 @@ export default {
let lxymallUrl = ''; //国内游api let lxymallUrl = ''; //国内游api
let crmUrl = ""; //crm API let crmUrl = ""; //crm API
let locationName = window.location.hostname; let locationName = window.location.hostname;
// domainUrl = "http://192.168.10.128"; domainUrl = "http://192.168.10.9:8083"; // 刘东电脑
// domainUrl = "http://192.168.10.9:8083" // 刘东电脑
domainUrl = "http://192.168.10.226:8015";
// domainUrl = "http://reborn.oytour.com";
let crmLocalFileStreamDownLoadUrl = ""; let crmLocalFileStreamDownLoadUrl = "";
crmLocalFileStreamDownLoadUrl = locationName.indexOf('oytour') !== -1 ? "http://crm.oytour.com" : "http://testcrm.oytour.com"; crmLocalFileStreamDownLoadUrl = locationName.indexOf('oytour') !== -1 ? "http://crm.oytour.com" : "http://testcrm.oytour.com";
let javaUrldo = ""; let javaUrldo = "";
javaUrldo = locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://127.0.0.1:9000"; javaUrldo = locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://127.0.0.1:9000";
//商城API //商城API
// mallUrl = "http://192.168.1.48:8019";
mallUrl = "http://192.168.20.13:8088"; mallUrl = "http://192.168.20.13:8088";
lxymallUrl = "http://192.168.20.13:8088"; lxymallUrl = "http://192.168.20.13:8088";
// crmUrl = "http://192.168.10.36:8098" crmUrl = "http://192.168.10.36:8098"
// crmUrl = "http://192.168.10.9:8098"
crmUrl = "http://crm.oytour.com"
if (locationName.indexOf('testerp.oytour') !== -1) { if (locationName.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com"; domainUrl = "http://testapi.oytour.com";
mallUrl = "https://mallapi.oytour.com"; mallUrl = "https://mallapi.oytour.com";
...@@ -150,7 +145,6 @@ export default { ...@@ -150,7 +145,6 @@ export default {
DomainUrl: domainUrl, DomainUrl: domainUrl,
//常用提交数据URL //常用提交数据URL
PostUrl: domainUrl + "/api/common/post", PostUrl: domainUrl + "/api/common/post",
//上传文件URL //上传文件URL
UploadFileUrl: domainUrl + '/api/File/post', UploadFileUrl: domainUrl + '/api/File/post',
//本站模板文件下载地址 //本站模板文件下载地址
...@@ -358,9 +352,7 @@ export default { ...@@ -358,9 +352,7 @@ export default {
f: c f: c
}); });
}); });
return Promise.resolve(config) return Promise.resolve(config)
}, error => { }, error => {
return Promise.reject(error) return Promise.reject(error)
}) })
...@@ -382,9 +374,6 @@ export default { ...@@ -382,9 +374,6 @@ export default {
successCall(res); successCall(res);
} }
}, faildCall) }, faildCall)
}, },
// CRM接口 // CRM接口
Vue.prototype.crmapipost = function (cmd, msg, successCall, faildCall, isOnline) { Vue.prototype.crmapipost = function (cmd, msg, successCall, faildCall, isOnline) {
...@@ -440,9 +429,7 @@ export default { ...@@ -440,9 +429,7 @@ export default {
} }
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
this.apiurl = apiurl; this.apiurl = apiurl;
var data = JSON.parse(localStorage.crmuserInfo) var data = JSON.parse(localStorage.crmuserInfo)
if (this.$route.path.toLowerCase() == "/signature") { if (this.$route.path.toLowerCase() == "/signature") {
this.$router.push({ this.$router.push({
path: '/signature' path: '/signature'
...@@ -1028,6 +1015,21 @@ export default { ...@@ -1028,6 +1015,21 @@ export default {
}) })
}, },
//证件识别
Vue.prototype.UploadCard = function (type, base64Str, successCall, faildCall) {
var apiurl = this.domainManager().UploadUrl + '/Upload/UploadBlobHuZhao?Type=' + type;
var formData = new FormData();
formData.append("myfile", base64Str);
this.$http.post(apiurl, formData, {
headers: {
"Content-Type": "application/x-www-form-urlencoded;"
},
}).then(function (res) {
if (successCall) {
successCall(res)
}
})
},
//Blob文件上传 //Blob文件上传
Vue.prototype.uploadSelfBlob = function (path, files, successCall) { Vue.prototype.uploadSelfBlob = function (path, files, successCall) {
let that = this; let that = this;
...@@ -1677,7 +1679,7 @@ export default { ...@@ -1677,7 +1679,7 @@ export default {
} else { } else {
return false return false
} }
}else if (type == 3) { } else if (type == 3) {
if (img.indexOf('.png') != -1 || img.indexOf('.PNG') != -1 || if (img.indexOf('.png') != -1 || img.indexOf('.PNG') != -1 ||
img.indexOf('.GIF') != -1 || img.indexOf('.gif') != -1 || img.indexOf('.GIF') != -1 || img.indexOf('.gif') != -1 ||
img.indexOf('.JPEG') != -1 || img.indexOf('.jpeg') != -1 || img.indexOf('.JPEG') != -1 || img.indexOf('.jpeg') != -1 ||
...@@ -1687,7 +1689,7 @@ export default { ...@@ -1687,7 +1689,7 @@ export default {
} else { } else {
return false return false
} }
}else{ } else {
if (img.indexOf('.DOCX') != -1 || img.indexOf('.docx') != -1 || if (img.indexOf('.DOCX') != -1 || img.indexOf('.docx') != -1 ||
img.indexOf('.DOC') != -1 || img.indexOf('.doc') != -1 || img.indexOf('.DOC') != -1 || img.indexOf('.doc') != -1 ||
img.indexOf('.XLSX') != -1 || img.indexOf('.xlsx') != -1 || img.indexOf('.XLSX') != -1 || img.indexOf('.xlsx') != -1 ||
...@@ -1696,13 +1698,13 @@ export default { ...@@ -1696,13 +1698,13 @@ export default {
img.indexOf('.PPTX') != -1 || img.indexOf('.pptx') != -1 || img.indexOf('.PPTX') != -1 || img.indexOf('.pptx') != -1 ||
img.indexOf('.PDF') != -1 || img.indexOf('.pdf') != -1) { img.indexOf('.PDF') != -1 || img.indexOf('.pdf') != -1) {
return 1 return 1
}else if(img.indexOf('.png') != -1 || img.indexOf('.PNG') != -1 || } else if (img.indexOf('.png') != -1 || img.indexOf('.PNG') != -1 ||
img.indexOf('.GIF') != -1 || img.indexOf('.gif') != -1 || img.indexOf('.GIF') != -1 || img.indexOf('.gif') != -1 ||
img.indexOf('.JPEG') != -1 || img.indexOf('.jpeg') != -1 || img.indexOf('.JPEG') != -1 || img.indexOf('.jpeg') != -1 ||
img.indexOf('.JPG') != -1 || img.indexOf('.jpg') != -1 || img.indexOf('.JPG') != -1 || img.indexOf('.jpg') != -1 ||
img.indexOf('.BMP') != -1 || img.indexOf('.bmp') != -1) { img.indexOf('.BMP') != -1 || img.indexOf('.bmp') != -1) {
return 3 return 3
}else{ } else {
return 0 return 0
} }
} }
......
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