From 3952549775758a587ae9890e5f19c5c7be21cbdd Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Fri, 17 Feb 2023 17:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E9=A2=84=E7=BA=A6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=88=A4=E6=96=AD=EF=BC=8C=E7=88=B1=E5=B1=B1=E4=B8=9C?= =?UTF-8?q?=E4=B8=AD=E8=BD=AC=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/aisdapp.js | 2 +- src/views/Guidance.vue | 32 ++++++++++++++------ src/views/HomeView.vue | 69 ++++++++++++++++++++++++++---------------- src/views/myExam.vue | 36 +++++++++++----------- 4 files changed, 85 insertions(+), 54 deletions(-) diff --git a/src/utils/aisdapp.js b/src/utils/aisdapp.js index 9158f9e..c5dff29 100644 --- a/src/utils/aisdapp.js +++ b/src/utils/aisdapp.js @@ -5,7 +5,7 @@ export const appword = "aKd20dbGdFvmuwrt" const appid = 'cgstjyyjzpzp'; -const appMode = true;//是否开启爱山东中控台接口调用方式 +const appMode = false;//是否开启爱山东中控台接口调用方式 export default { appid, diff --git a/src/views/Guidance.vue b/src/views/Guidance.vue index d89dc5a..35ea5ae 100644 --- a/src/views/Guidance.vue +++ b/src/views/Guidance.vue @@ -34,15 +34,29 @@ export default { duration: 0, }) try { - queryArticleDetail(id).then(res => { - this.$toast.clear(); - if (JSON.stringify(res.data) != '{}') { - res.data.content = decodeURIComponent(res.data.content); - this.article = res.data; - } - }, err => { - this.$toast.clear(); - }) + if (this.GlobalConfig.appMode) { + vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqwzxq", JSON.stringify({ createDept: id }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { + this.$toast.clear(); + let retData = JSON.parse(value); + if (retData.code == 200 && JSON.stringify(retData.data) != '{}') { + retData.data.content = decodeURIComponent(retData.data.content); + this.article = retData.data; + } + }, err => { + this.$toast.clear(); + }) + } + else { + queryArticleDetail(id).then(res => { + this.$toast.clear(); + if (JSON.stringify(res.data) != '{}') { + res.data.content = decodeURIComponent(res.data.content); + this.article = res.data; + } + }, err => { + this.$toast.clear(); + }) + } } catch (error) { this.$toast.clear(); } diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 8a20fd9..f0e5fbb 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -76,25 +76,26 @@ export default { message: '加载中', duration: 0, }) - if (this.GlobalConfig.appMode) { - vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqyylb", JSON.stringify({}), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { - this.$toast.clear(); - let retData = JSON.parse(value); - if (retData.code == 200) { - this.hospitalList = retData.data; - } - }, err => { - this.$toast.clear(); - }) - return; - } try { - queryHosiptal().then(res => { - this.$toast.clear(); - this.hospitalList = res.data; - }, err => { - this.$toast.clear(); - }) + if (this.GlobalConfig.appMode) { + vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqyylb", JSON.stringify({}), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { + this.$toast.clear(); + let retData = JSON.parse(value); + if (retData.code == 200) { + this.hospitalList = retData.data; + } + }, err => { + this.$toast.clear(); + }) + } + else { + queryHosiptal().then(res => { + this.$toast.clear(); + this.hospitalList = res.data; + }, err => { + this.$toast.clear(); + }) + } } catch (error) { this.$toast.clear(); } @@ -118,14 +119,30 @@ export default { // console.log(this.userInfo.papersnumber) if (this.userInfo) { // console.log(this.userInfo.papersnumber); - checkBacklist(this.userInfo.papersnumber).then(res => { - if (res.data) { - this.errMsg = res.data; - this.isShowError = true; - } else { - this.$router.push({ name: 'guidance', query: { deptId: id } }) - } - }) + if (this.GlobalConfig.appMode) { + vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdyhhmdyz", JSON.stringify({ cupCardNo: this.userInfo.papersnumber }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { + this.$toast.clear(); + let retData = JSON.parse(value); + if (retData.code == 200 && retData.data) { + this.errMsg = retData.data; + this.isShowError = true; + } else { + this.$router.push({ name: 'guidance', query: { deptId: id } }) + } + }, err => { + this.$toast.clear(); + }) + } + else { + checkBacklist(this.userInfo.papersnumber).then(res => { + if (res.data) { + this.errMsg = res.data; + this.isShowError = true; + } else { + this.$router.push({ name: 'guidance', query: { deptId: id } }) + } + }) + } } }, //登陆 diff --git a/src/views/myExam.vue b/src/views/myExam.vue index aaffd52..2a9c91e 100644 --- a/src/views/myExam.vue +++ b/src/views/myExam.vue @@ -30,7 +30,7 @@