diff --git a/src/App.vue b/src/App.vue index d11c4fb..c4f072a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -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); }, }; diff --git a/src/permission.js b/src/permission.js index 76134ee..50d4cc4 100644 --- a/src/permission.js +++ b/src/permission.js @@ -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(); diff --git a/src/views/firmContent/drugInfo/PZchouyang/PZchouyang.vue b/src/views/firmContent/drugInfo/PZchouyang/PZchouyang.vue index 01a89c7..71b3734 100644 --- a/src/views/firmContent/drugInfo/PZchouyang/PZchouyang.vue +++ b/src/views/firmContent/drugInfo/PZchouyang/PZchouyang.vue @@ -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) { diff --git a/src/views/firmContent/drugInfo/drugBasicInfo/drugBasicInfo.vue b/src/views/firmContent/drugInfo/drugBasicInfo/drugBasicInfo.vue index bdf1898..80e0f62 100644 --- a/src/views/firmContent/drugInfo/drugBasicInfo/drugBasicInfo.vue +++ b/src/views/firmContent/drugInfo/drugBasicInfo/drugBasicInfo.vue @@ -125,7 +125,7 @@
A项目检验报告.doc
-
+
下载 @@ -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; diff --git a/src/views/firmContent/drugInfo/index.vue b/src/views/firmContent/drugInfo/index.vue index 848c8ee..248b838 100644 --- a/src/views/firmContent/drugInfo/index.vue +++ b/src/views/firmContent/drugInfo/index.vue @@ -12,8 +12,7 @@
- 返回 - + 返回
@@ -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(); + // }) } }