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

api地址修改

parent ebd84904
...@@ -118,8 +118,9 @@ export default { ...@@ -118,8 +118,9 @@ export default {
domainUrl = "http://127.0.0.1"; //214主域名 domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.16:8083"; // domainUrl = "http://192.168.2.16:8083";
if (locationName.indexOf('oytour')!==-1) { if (locationName.indexOf('oytour')!==-1) {
domainUrl = "https://reborn.oytour.com"; domainUrl = "http://webapi.viitto.com";
}else if (locationName.indexOf('viitto')!==-1) { }
else if (locationName.indexOf('viitto')!==-1) {
domainUrl = "https://test.viitto.com"; domainUrl = "https://test.viitto.com";
} }
var obj = { var obj = {
...@@ -293,13 +294,13 @@ export default { ...@@ -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 == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
var apiurl = this.domainManager().PostUrl; var apiNewurl = this.domainManager().DomainUrl;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
this.apiurl = apiurl; apiNewurl = apiNewurl+"/Api/Trip/"+cmd;
if (this.$route.path.toLowerCase() == "/signature") { if (this.$route.path.toLowerCase() == "/signature") {
this.$router.push({ this.$router.push({
path: '/signature' path: '/signature'
...@@ -324,29 +325,11 @@ export default { ...@@ -324,29 +325,11 @@ export default {
"cmd": cmd, "cmd": cmd,
"timestamp": timestamp, "timestamp": timestamp,
"token": token, "token": token,
"sign": md5Str "sign": md5Str,
"uid":this.getLocalStorage().EmployeeId
} }
$.ajax({ this.$http.post(apiNewurl, postData, {
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, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path '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