Commit 3fbe10f1 authored by 黄媛媛's avatar 黄媛媛

新增资产管理的接口方法

parent 52feec7b
......@@ -645,7 +645,7 @@ export default {
},
getdanjuList(){
this.apiJavaPost("/api/property/GetAuditChangeLogPageList",this.danjuMsg,
this.apiJavaPostZc("/api/property/GetAuditChangeLogPageList",this.danjuMsg,
res => {
if (res.data.resultCode === 1) {
let data=res.data.data.pageData;
......@@ -675,9 +675,8 @@ export default {
}
this.addMsg.AuditType=num;
this.addMsg.ImageList=this.uploadImgList;
this.apiJavaPost("/api/property/AuditOrRefund",this.addMsg,
this.apiJavaPostZc("/api/property/AuditOrRefund",this.addMsg,
res => {
console.log("res",res)
if (res.data.resultCode ==1) {
this.getDetail();
......@@ -734,7 +733,7 @@ export default {
},
getDetail(){
this.pageLoad=true;
this.apiJavaPost("/api/property/GetPropertyAuditDetail",{UseReceiveId:this.addMsg.UseReceiveId},
this.apiJavaPostZc("/api/property/GetPropertyAuditDetail",{UseReceiveId:this.addMsg.UseReceiveId},
res => {
this.pageLoad=false;
......
......@@ -153,7 +153,8 @@ export default {
//文件站点
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.2.214:8130',
javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087",
javaUrlNew: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087",
// javaUrl:"http://192.168.2.215:9000",
//Java接口本站文件流下载地址
JavaLocalFileStreamDownLoadUrl: javaUrldo,
......@@ -423,6 +424,66 @@ export default {
}
}, faildCall)
},
//请求资产管理接口
Vue.prototype.apiJavaPostZc = function (cmd, msg, successCall, faildCall) {
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1 && this.$route.name.indexOf('clientConfirm') === -1) {
let previousPathInfo = {
path: this.$route.name,
query: this.$route.query
}
localStorage.previousPathInfo = JSON.stringify(previousPathInfo);
}
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().javaUrlNew + cmd;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
var token = "";
var key = "";
let userInfo = localStorage.userInfo ? JSON.parse(localStorage.userInfo) : '';
let groupId = userInfo.RB_Group_id ? userInfo.RB_Group_id : 0;
let uid = userInfo.EmployeeId ? userInfo.EmployeeId : 0;
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().SecretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"uid": uid,
"groupId": groupId
}
if (localStorage.g && localStorage.g != 'undefined') {
postData.groupId = parseInt(JSON.parse(localStorage.g).i)
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.resultCode == 10000 || res.resultCode == 10001) {
this.$router.push({
path: '/login'
})
} else if (res.resultCode == 10005) {
this.$router.go(-1)
} else if (res.data.data && res.data.data.isJumpTwoCode == 1) {
this.$router.push({
path: '/clientConfirm'
})
} else {
successCall(res)
}
}, faildCall)
},
//下载文件
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
......
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