吕天方 2 years ago
commit 18ccfda6f7

@ -20,30 +20,37 @@ export default {
},
};
},
mounted() {
//
var queryString = window.location.search;
// URLSearchParams
var params = new URLSearchParams(queryString);
// JSON
// //
// var queryString = window.location.search;
// // URLSearchParams
// var params = new URLSearchParams(queryString);
// // JSON
// var obj = {};
// // JSON
// params.forEach(function (value, key) {
// //
// var decodedValue = decodeURIComponent(value);
// obj[key] = decodedValue;
// });
var obj = {};
// JSON
params.forEach(function (value, key) {
//
var decodedValue = decodeURIComponent(value);
obj[key] = decodedValue;
window.addEventListener("message", function (event) {
console.log(event);
obj = event.data.data;
console.log(obj);
if (obj.token) {
localStorage.setItem("MSSM-LIAONING__TOKEN", obj.token);
} else {
this.$alert("token不能为空", "提示", {
confirmButtonText: "返回",
callback: (action) => {
this.$router.go(-1);
},
});
}
this.$store.commit("app/URLChange", obj);
});
if (obj.token) {
localStorage.setItem("MSSM-LIAONING__TOKEN", obj.token);
} else {
this.$alert("暂无token",'提示', {
confirmButtonText: "返回",
callback: (action) => {
this.$router.go(-1);
},
});
}
this.$store.commit("app/URLChange", obj);
},
};
</script>

@ -12,18 +12,8 @@ import axios from "axios";
NProgress.configure({ showSpinner: false });
const whiteList = ["/login", "/register"];
router.beforeEach(async (to, from, next) => {
let token = localStorage.getItem('MSSM-LIAONING__TOKEN')
if (token) {
next()
} else {
this.$alert("暂无token",'提示', {
confirmButtonText: "返回",
callback: (action) => {
this.$router.go(-1);
},
});
}
router.beforeEach((to, from, next) => {
next()
})
router.afterEach(() => {
NProgress.done();

@ -554,10 +554,8 @@ export default {
this.value = "";
},
getPagination(e) {
console.log(e);
this.form1.current = e.page;
this.form1.size = e.limit;
this.chinaCosmetics();
this.listyp();
},
filterLevel(e) {

@ -125,7 +125,7 @@
<i class="el-icon-s-marketing"></i>
</span>
<div>A项目检验报告.doc</div>
<div class="file-icon">
<div class="file-icon" @click="uploadBG">
<!-- cpjsyqlj -->
<i class="el-icon-download"></i>
下载
@ -761,6 +761,17 @@ export default {
},
mounted() {},
methods: {
uploadBG() {
// let baseUrl =
// process.env.VUE_APP_BASE_API +
// `/common/downloadmino/download?filename=2023/5/16/40289e5688225c0b018822745173000e.pdf`;
// const link = document.createElement("a");
// link.href = baseUrl;
// link.style.display = "none";
// document.body.appendChild(link);
// link.click();
// document.body.removeChild(link);
},
//
async yiliao(e) {
this.loading = true;

@ -12,8 +12,7 @@
</div>
</div>
<div>
<el-button v-if="goback" type="primary" plain size="mini" @click="goBack"></el-button>
<i v-else class="el-icon-close close" @click="goBack"></i>
<el-button type="primary" plain size="mini" @click="goBack"></el-button>
</div>
</div>
<div class="drugInfo-bottom">
@ -94,7 +93,6 @@ export default {
height:'',
},
// isOne:false,
goback:true,
id:null,
token:null,
//
@ -198,27 +196,27 @@ export default {
// console.log(this.$route.params)
// this.row = JSON.parse(this.$route.params.row)
// this.row = this.$route.params.row;
let search = window.location.search.slice(1);
let params = search.split('&');
let paramsLabel = params[2].split('=')[0]
this.id = params[0].split('=')[1];
this.token = params[1].split('=')[1];
if (paramsLabel == 'yppzwh') {
this.isYppzwh = true;
this.getVRdgYpwhGxwz(params[2].split('=')[1]);
} else if(paramsLabel == 'qxzczh') {
this.ylqxJnyelcp(params[2].split('=')[1]);
}
// let search = window.location.search.slice(1);
// let params = search.split('&');
// let paramsLabel = params[2].split('=')[0]
// this.id = params[0].split('=')[1];
// this.token = params[1].split('=')[1];
// if (paramsLabel == 'yppzwh') {
// this.isYppzwh = true;
// this.getVRdgYpwhGxwz(params[2].split('=')[1]);
// } else if(paramsLabel == 'qxzczh') {
// this.ylqxJnyelcp(params[2].split('=')[1]);
// }
// X
if(this.id == '1') {
this.goback = true;
} else {
this.goback = false;
}
this.$nextTick(()=>{
this.getHeight();
})
// // X
// if(this.id == '1') {
// this.goback = true;
// } else {
// this.goback = false;
// }
// this.$nextTick(()=>{
// this.getHeight();
// })
}
}
</script>

Loading…
Cancel
Save