Commit d99ad5d5 authored by zhengke's avatar zhengke
parents 826230b8 c8a8093b
......@@ -117,8 +117,9 @@ export default {
let locationName = window.location.hostname;
domainUrl = "http://127.0.0.1"; //214主域名
if (locationName.indexOf('oytour')!==-1) {
domainUrl = "https://reborn.oytour.com";
}else if (locationName.indexOf('viitto')!==-1) {
domainUrl = "http://webapi.viitto.com";
}
else if (locationName.indexOf('viitto')!==-1) {
domainUrl = "https://test.viitto.com";
}
var obj = {
......@@ -292,13 +293,13 @@ export default {
},
Vue.prototype.JueryPost=function (cmd, msg, successCall, faildCall) {
Vue.prototype.ApiPost2=function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().PostUrl;
var apiNewurl = this.domainManager().DomainUrl;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
apiNewurl = apiNewurl+"/Api/Trip/"+cmd;
if (this.$route.path.toLowerCase() == "/signature") {
this.$router.push({
path: '/signature'
......@@ -323,29 +324,11 @@ export default {
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
"sign": md5Str,
"uid":this.getLocalStorage().EmployeeId
}
$.ajax({
url: apiurl,
type: "POST",
data: msg,
datatype: "jsonP",
success: function (res) {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
},
faildCall
});
this.$http.post(apiurl, postData, {
this.$http.post(apiNewurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
......
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