diff --git a/acupuncture-前台/src/api/screening.js b/acupuncture-前台/src/api/screening.js index 734c61f3..cb6cb827 100644 --- a/acupuncture-前台/src/api/screening.js +++ b/acupuncture-前台/src/api/screening.js @@ -75,3 +75,11 @@ export function queryDetail(data) { data: data, }); } +// 筛查列表不需要token +export function queryDetailNoToken(data) { + return request({ + url: "screening/queryDetailNoToken", + method: "post", + data: data, + }); +} diff --git a/acupuncture-前台/src/permission.js b/acupuncture-前台/src/permission.js index 107c2729..b6838e3d 100644 --- a/acupuncture-前台/src/permission.js +++ b/acupuncture-前台/src/permission.js @@ -9,7 +9,13 @@ import { isRelogin } from "@/utils/request"; NProgress.configure({ showSpinner: false }); -const whiteList = ["/login", "/register", "/screening/h5", "/screening/h5eva"]; +const whiteList = [ + "/login", + "/register", + "/screening/h5", + "/screening/h5eva", + "/screening/h5Result", +]; const isWhiteList = (path) => { return whiteList.some((pattern) => isPathMatch(pattern, path)); diff --git a/acupuncture-前台/src/router/index.js b/acupuncture-前台/src/router/index.js index 4defb9af..a15000e2 100644 --- a/acupuncture-前台/src/router/index.js +++ b/acupuncture-前台/src/router/index.js @@ -177,6 +177,11 @@ export const constantRoutes = [ component: () => import("@/views/screening/h5eva.vue"), hidden: true, }, + { + path: "/screening/h5Result", + component: () => import("@/views/screening/h5Result.vue"), + hidden: true, + }, ]; // 动态路由,基于用户权限动态去加载 diff --git a/acupuncture-前台/src/utils/request.js b/acupuncture-前台/src/utils/request.js index 6309bf93..c9b599e9 100644 --- a/acupuncture-前台/src/utils/request.js +++ b/acupuncture-前台/src/utils/request.js @@ -36,9 +36,14 @@ service.interceptors.request.use( "screening/createNoToken", "screening/save", "screening/submitNoToken", + "screening/queryDetailNoToken", ]; + console.log("config.url", config.url); + // 判断白名单是否存在当前则携带参数在header if (whiteList.includes(config.url)) { + console.log("携带参数在header"); + if (localStorage.getItem("tenantId")) { config.headers["TENANT-ID"] = localStorage.getItem("tenantId"); } diff --git a/acupuncture-前台/src/views/screening/h5Result.vue b/acupuncture-前台/src/views/screening/h5Result.vue new file mode 100644 index 00000000..76905083 --- /dev/null +++ b/acupuncture-前台/src/views/screening/h5Result.vue @@ -0,0 +1,262 @@ + + + {{ tenantName || "-" }} + + 筛查结论 + + 您的体重指数(BMI)为: + {{ form["SCWJ-BMI"] || "-" }} + + + 您的睡眠效率为: + {{ form["SCWJ-SMXL"] || "-" }}% + + + + 属于{{ + form["SCWJ-JL"] || "-" + }}型肥胖,建议扫码关注医院公众号,预约体重管理中心医师进一步评估。 + + + + + {{ tenantName || "-" }} + + + + + + + diff --git a/acupuncture-前台/src/views/screening/h5eva.vue b/acupuncture-前台/src/views/screening/h5eva.vue index 494a1270..b76cbef6 100644 --- a/acupuncture-前台/src/views/screening/h5eva.vue +++ b/acupuncture-前台/src/views/screening/h5eva.vue @@ -42,6 +42,7 @@ @@ -70,6 +71,7 @@ { + let flat = false; + let detailList = null; + res.data.list.forEach((item) => { + let data = {}; + if (item.detailList) { + item.detailList?.forEach((row) => { + item[row.questionCode] = row.answer; + data[row.questionCode] = row.answer; + }); + } + if (item["SCWJ-NAME"] == name && item["SCWJ-PHONE"] == phone) { + flat = true; + detailList = data; + console.log("已经筛查过,直接显示结果"); + } + }); + if (flat) { + this.$router.replace({ + path: "/screening/h5Result", + query: { + tenantName: this.tenantName, + data: JSON.stringify(detailList), + }, + }); + } + }); + } + }, // 获取筛查结论 getTips() { console.log("获取筛查结论"); @@ -899,11 +937,17 @@ export default { this.$modal.msgSuccess("提交成功"); }); // 根据筛查结果,判断是否需要显示二维码 - // 根据筛查结果,判断是否需要显示二维码 - let flat = this.BMIVerdict[this.form["SCWJ-JL"]]; - if (flat >= 3) { - this.open = true; - } + this.$router.replace({ + path: "/screening/h5Result", + query: { + tenantName: this.tenantName, + data: JSON.stringify(this.form), + }, + }); + // let flat = this.BMIVerdict[this.form["SCWJ-JL"]]; + // if (flat >= 3) { + // this.open = true; + // } }); } }); diff --git a/acupuncture-前台/针灸前台113-1.zip b/acupuncture-前台/针灸前台113-1.zip deleted file mode 100644 index 58797f34..00000000 Binary files a/acupuncture-前台/针灸前台113-1.zip and /dev/null differ diff --git a/acupuncture-前台/针灸前台http-1.zip b/acupuncture-前台/针灸前台http-1.zip deleted file mode 100644 index a93204b5..00000000 Binary files a/acupuncture-前台/针灸前台http-1.zip and /dev/null differ diff --git a/acupuncture-前台/针灸前台http-2.zip b/acupuncture-前台/针灸前台http-2.zip deleted file mode 100644 index 1a3d66ad..00000000 Binary files a/acupuncture-前台/针灸前台http-2.zip and /dev/null differ diff --git a/acupuncture-前台/针灸前台nnzjpt-1.zip b/acupuncture-前台/针灸前台nnzjpt-1.zip deleted file mode 100644 index 969be417..00000000 Binary files a/acupuncture-前台/针灸前台nnzjpt-1.zip and /dev/null differ diff --git a/acupuncture-前台/针灸前台ssl-1.zip b/acupuncture-前台/针灸前台ssl-1.zip index 1c969981..ff0829ba 100644 Binary files a/acupuncture-前台/针灸前台ssl-1.zip and b/acupuncture-前台/针灸前台ssl-1.zip differ