Commit 6be6b905 authored by 黄奎's avatar 黄奎

api地址修改

parent ebd84904
......@@ -118,8 +118,9 @@ export default {
domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.16:8083";
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 = {
......@@ -293,13 +294,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'
......@@ -324,29 +325,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