Commit ca75d06a authored by 黄奎's avatar 黄奎

页面修改

parent 44a59adf
...@@ -114,8 +114,8 @@ export default { ...@@ -114,8 +114,8 @@ export default {
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
let domainUrl = ''; let domainUrl = '';
// domainUrl = "http://192.168.2.214:8082"; domainUrl = "http://192.168.2.214:8082";
domainUrl = "http://192.168.2.65:8025"; //domainUrl = "http://192.168.2.65:8025";
let locationName = window.location.hostname; let locationName = window.location.hostname;
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
// javaUrl:"http://192.168.2.215:9000", // javaUrl:"http://192.168.2.215:9000",
//Java接口本站文件流下载地址 //Java接口本站文件流下载地址
JavaLocalFileStreamDownLoadUrl: javaUrldo, JavaLocalFileStreamDownLoadUrl: javaUrldo,
mallUrl:"http://192.168.2.65", mallUrl:"http://192.168.0.110:8200",
}; };
return obj; return obj;
}, },
...@@ -349,18 +349,38 @@ export default { ...@@ -349,18 +349,38 @@ export default {
} }
}) })
.then(res => { .then(res => {
console.log("res",res); if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
// if (res.data.resultCode == 10000 || res.data.resultCode == 10001) { // this.$router.push({
// // this.$router.push({ // path: '/login'
// // path: '/login' // });
// // }); } else if (res.resultCode == 10005) {
// } else if (res.resultCode == 10005) { this.$router.go(-1);
// this.$router.go(-1); } else {
// } else { successCall(res);
// successCall(res); }
// }
}, faildCall) }, faildCall)
} }
//文件下载
Vue.prototype.GetMallLocalFile = function(cmd, msg, fileName, newCmd, successCall) {
var apiurl = this.domainManager().mallUrl + cmd;
var postData = this.GetPostData(cmd, msg, newCmd);
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function(res) {});
}
//获取请求参数 //获取请求参数
Vue.prototype.GetPostData = function(cmd, msg, newCmd) { Vue.prototype.GetPostData = function(cmd, msg, newCmd) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
......
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