From a31fc3c1e6fd7dc550c52348d5c3c4be6f120cdc Mon Sep 17 00:00:00 2001
From: zoujiandong <10130823232@qq.com>
Date: Fri, 13 Jun 2025 19:09:30 +0800
Subject: [PATCH] 6.13
---
api/api.js | 20 +-
components/navBarSearch/navBarSearch.vue | 2 +
.../u-parse/components/wxParseAudio.vue | 27 ++
components/u-parse/components/wxParseImg.vue | 86 ++++
.../u-parse/components/wxParseTemplate0.vue | 107 ++++
.../u-parse/components/wxParseTemplate1.vue | 99 ++++
.../u-parse/components/wxParseTemplate10.vue | 97 ++++
.../u-parse/components/wxParseTemplate11.vue | 87 ++++
.../u-parse/components/wxParseTemplate2.vue | 98 ++++
.../u-parse/components/wxParseTemplate3.vue | 98 ++++
.../u-parse/components/wxParseTemplate4.vue | 98 ++++
.../u-parse/components/wxParseTemplate5.vue | 98 ++++
.../u-parse/components/wxParseTemplate6.vue | 98 ++++
.../u-parse/components/wxParseTemplate7.vue | 98 ++++
.../u-parse/components/wxParseTemplate8.vue | 98 ++++
.../u-parse/components/wxParseTemplate9.vue | 98 ++++
.../u-parse/components/wxParseVideo.vue | 15 +
components/u-parse/libs/html2json.js | 261 ++++++++++
components/u-parse/libs/htmlparser.js | 156 ++++++
components/u-parse/libs/wxDiscode.js | 195 ++++++++
components/u-parse/readme.md | 102 ++++
components/u-parse/u-parse.css | 232 +++++++++
components/u-parse/u-parse.vue | 118 +++++
main.js | 4 +-
pages.json | 21 +
pages/case/case.vue | 18 +-
pages/caseTalk/caseTalk.vue | 9 +-
pages/certImg/certImg.vue | 32 ++
pages/certList/certList.vue | 152 ++----
pages/detail/detail.vue | 340 ++++++++++---
pages/index/index.vue | 44 +-
pages/login/login.vue | 1 +
pages/my/my.vue | 2 +-
pages/search/search.vue | 459 ++++++++++++++++--
pages/searchList/searchList.vue | 277 +----------
pages/sickList/sickList.vue | 455 +++++++++++++++++
pages/specialList/specialList.vue | 102 +++-
pages/videoList/videoList.vue | 391 +++++++++++++++
static/caseIcon.png | Bin 0 -> 438 bytes
utils/navTo.js | 47 +-
40 files changed, 4210 insertions(+), 532 deletions(-)
create mode 100644 components/u-parse/components/wxParseAudio.vue
create mode 100644 components/u-parse/components/wxParseImg.vue
create mode 100644 components/u-parse/components/wxParseTemplate0.vue
create mode 100644 components/u-parse/components/wxParseTemplate1.vue
create mode 100644 components/u-parse/components/wxParseTemplate10.vue
create mode 100644 components/u-parse/components/wxParseTemplate11.vue
create mode 100644 components/u-parse/components/wxParseTemplate2.vue
create mode 100644 components/u-parse/components/wxParseTemplate3.vue
create mode 100644 components/u-parse/components/wxParseTemplate4.vue
create mode 100644 components/u-parse/components/wxParseTemplate5.vue
create mode 100644 components/u-parse/components/wxParseTemplate6.vue
create mode 100644 components/u-parse/components/wxParseTemplate7.vue
create mode 100644 components/u-parse/components/wxParseTemplate8.vue
create mode 100644 components/u-parse/components/wxParseTemplate9.vue
create mode 100644 components/u-parse/components/wxParseVideo.vue
create mode 100644 components/u-parse/libs/html2json.js
create mode 100644 components/u-parse/libs/htmlparser.js
create mode 100644 components/u-parse/libs/wxDiscode.js
create mode 100644 components/u-parse/readme.md
create mode 100644 components/u-parse/u-parse.css
create mode 100644 components/u-parse/u-parse.vue
create mode 100644 pages/certImg/certImg.vue
create mode 100644 pages/sickList/sickList.vue
create mode 100644 pages/videoList/videoList.vue
create mode 100644 static/caseIcon.png
diff --git a/api/api.js b/api/api.js
index 6c7c2aa..f69c699 100644
--- a/api/api.js
+++ b/api/api.js
@@ -18,6 +18,7 @@ const api = {
getHomeStatics(data) { //首页统计数据
return request('/clinical/stats', data, 'get', true);
},
+
getArticleDetail(id) { //获取详情
return request('/clinical/article/'+id,{}, 'get', false);
},
@@ -82,6 +83,9 @@ const api = {
getStaticDoctor(id){
return request('/clinical/stats/doctor/'+id,{}, 'get',false);
},
+ getStaticSick(data) { //首页统计数据
+ return request('/clinical/stats/label', data, 'get', false);
+ },
getStaticHospital(id){
return request('/clinical/stats/hospital/'+id, {}, 'get',false);
},
@@ -152,7 +156,7 @@ const api = {
return request('/user/collect/search',data, 'post',false,'application/json');
},
getMyRead(data){
- return request('/user/case/read/search',data, 'post',false,'application/json');
+ return request('/user/case/read/search',data, 'post',true,'application/json');
},
getOss(data){
return request('/sign/oss',data, 'get', false);
@@ -160,11 +164,21 @@ const api = {
getCaseLabel(data){
return request('/case/label',data,'get', false);
},
-
+ getSearchLabel(data){
+ return request('/clinical/label/search',data,'post', true,'application/json');
+ },
+ addVote(id,data){
+ return request('/exchange/vote/'+id,data,'post',true,'application/json');
+ },
ossUpload(url,data){
return request(url,data,'post','multipart/form-data')
},
-
+ getUserPoint(data){
+ return request('/user/point',data,'get');
+ },
+ givePoint(data){
+ return request('/reward',data,'post',true);
+ }
}
diff --git a/components/navBarSearch/navBarSearch.vue b/components/navBarSearch/navBarSearch.vue
index d97d046..4017d61 100644
--- a/components/navBarSearch/navBarSearch.vue
+++ b/components/navBarSearch/navBarSearch.vue
@@ -59,6 +59,8 @@ watch(()=>props.type,(newVal)=>{
placeholder.value='输入医生姓名'
}else if(newVal==='hospital'){
placeholder.value='输入医院名称'
+ }else if(newVal==='video' || newVal==='article' || newVal==='case' ){
+ placeholder.value='搜索疾病、症状、医院'
}
},{immediate: true })
diff --git a/components/u-parse/components/wxParseAudio.vue b/components/u-parse/components/wxParseAudio.vue
new file mode 100644
index 0000000..86df246
--- /dev/null
+++ b/components/u-parse/components/wxParseAudio.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
+
diff --git a/components/u-parse/components/wxParseImg.vue b/components/u-parse/components/wxParseImg.vue
new file mode 100644
index 0000000..00747e4
--- /dev/null
+++ b/components/u-parse/components/wxParseImg.vue
@@ -0,0 +1,86 @@
+
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate0.vue b/components/u-parse/components/wxParseTemplate0.vue
new file mode 100644
index 0000000..0c76e74
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate0.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate1.vue b/components/u-parse/components/wxParseTemplate1.vue
new file mode 100644
index 0000000..a864f23
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate1.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate10.vue b/components/u-parse/components/wxParseTemplate10.vue
new file mode 100644
index 0000000..9a8d8b6
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate10.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate11.vue b/components/u-parse/components/wxParseTemplate11.vue
new file mode 100644
index 0000000..1402d11
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate11.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
+
+ \n
+
+
+
+
+
+ {{node.text}}
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate2.vue b/components/u-parse/components/wxParseTemplate2.vue
new file mode 100644
index 0000000..d6d027d
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate2.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate3.vue b/components/u-parse/components/wxParseTemplate3.vue
new file mode 100644
index 0000000..f899edd
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate3.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate4.vue b/components/u-parse/components/wxParseTemplate4.vue
new file mode 100644
index 0000000..9bd558c
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate4.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate5.vue b/components/u-parse/components/wxParseTemplate5.vue
new file mode 100644
index 0000000..4f6cc27
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate5.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate6.vue b/components/u-parse/components/wxParseTemplate6.vue
new file mode 100644
index 0000000..4781c64
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate6.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate7.vue b/components/u-parse/components/wxParseTemplate7.vue
new file mode 100644
index 0000000..1efc4dc
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate7.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate8.vue b/components/u-parse/components/wxParseTemplate8.vue
new file mode 100644
index 0000000..2ac546f
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate8.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseTemplate9.vue b/components/u-parse/components/wxParseTemplate9.vue
new file mode 100644
index 0000000..c771e5f
--- /dev/null
+++ b/components/u-parse/components/wxParseTemplate9.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{node.text}}
+
+
+
+
diff --git a/components/u-parse/components/wxParseVideo.vue b/components/u-parse/components/wxParseVideo.vue
new file mode 100644
index 0000000..a952f58
--- /dev/null
+++ b/components/u-parse/components/wxParseVideo.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
diff --git a/components/u-parse/libs/html2json.js b/components/u-parse/libs/html2json.js
new file mode 100644
index 0000000..0927382
--- /dev/null
+++ b/components/u-parse/libs/html2json.js
@@ -0,0 +1,261 @@
+/**
+ * html2Json 改造来自: https://github.com/Jxck/html2json
+ *
+ *
+ * author: Di (微信小程序开发工程师)
+ * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
+ * 垂直微信小程序开发交流社区
+ *
+ * github地址: https://github.com/icindy/wxParse
+ *
+ * for: 微信小程序富文本解析
+ * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
+ */
+
+import wxDiscode from './wxDiscode';
+import HTMLParser from './htmlparser';
+
+function makeMap(str) {
+ const obj = {};
+ const items = str.split(',');
+ for (let i = 0; i < items.length; i += 1) obj[items[i]] = true;
+ return obj;
+}
+
+// Block Elements - HTML 5
+const block = makeMap('br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');
+
+// Inline Elements - HTML 5
+const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
+
+// Elements that you can, intentionally, leave open
+// (and which close themselves)
+const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');
+
+function removeDOCTYPE(html) {
+ const isDocument = /
([^]*)<\/body>/.test(html);
+ return isDocument ? RegExp.$1 : html;
+}
+
+function trimHtml(html) {
+ return html
+ .replace(//gi, '')
+ .replace(/\/\*.*?\*\//gi, '')
+ .replace(/[ ]+/gi, '')
+ .replace(/
+```
+
+
+## 渲染 Markdown
+
+> 先将 markdown 转换为 html 即可
+
+```
+npm install marked
+```
+
+``` js
+import marked from 'marked'
+import uParse from '@/components/u-parse/u-parse.vue'
+
+export default {
+ components: {
+ uParse
+ },
+ data () {
+ return {
+ article: marked(`#hello, markdown!`)
+ }
+ }
+}
+```
diff --git a/components/u-parse/u-parse.css b/components/u-parse/u-parse.css
new file mode 100644
index 0000000..691993a
--- /dev/null
+++ b/components/u-parse/u-parse.css
@@ -0,0 +1,232 @@
+/**
+ * author: Di (微信小程序开发工程师)
+ * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
+ * 垂直微信小程序开发交流社区
+ *
+ * github地址: https://github.com/icindy/wxParse
+ *
+ * for: 微信小程序富文本解析
+ * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
+ */
+
+.wxParse {
+ width: 100%;
+ font-family: Helvetica, sans-serif;
+ font-size: 30upx;
+ color: #666;
+ line-height: 1.8;
+}
+
+.wxParse view {
+ word-break: hyphenate;
+}
+
+.wxParse .inline {
+ display: inline;
+ margin: 0;
+ padding: 0;
+}
+
+.wxParse .div {
+ margin: 0;
+ padding: 0;
+}
+
+.wxParse .h1 .text {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+.wxParse .h2 .text {
+ font-size: 1.5em;
+ margin: 0.83em 0;
+}
+.wxParse .h3 .text {
+ font-size: 1.17em;
+ margin: 1em 0;
+}
+.wxParse .h4 .text {
+ margin: 1.33em 0;
+}
+.wxParse .h5 .text {
+ font-size: 0.83em;
+ margin: 1.67em 0;
+}
+.wxParse .h6 .text {
+ font-size: 0.67em;
+ margin: 2.33em 0;
+}
+
+.wxParse .h1 .text,
+.wxParse .h2 .text,
+.wxParse .h3 .text,
+.wxParse .h4 .text,
+.wxParse .h5 .text,
+.wxParse .h6 .text,
+.wxParse .b,
+.wxParse .strong {
+ font-weight: bolder;
+}
+
+
+.wxParse .p {
+ margin: 1em 0;
+}
+
+.wxParse .i,
+.wxParse .cite,
+.wxParse .em,
+.wxParse .var,
+.wxParse .address {
+ font-style: italic;
+}
+
+.wxParse .pre,
+.wxParse .tt,
+.wxParse .code,
+.wxParse .kbd,
+.wxParse .samp {
+ font-family: monospace;
+}
+.wxParse .pre {
+ overflow: auto;
+ background: #f5f5f5;
+ padding: 16upx;
+ white-space: pre;
+ margin: 1em 0upx;
+}
+.wxParse .code {
+ display: inline;
+ background: #f5f5f5;
+}
+
+.wxParse .big {
+ font-size: 1.17em;
+}
+
+.wxParse .small,
+.wxParse .sub,
+.wxParse .sup {
+ font-size: 0.83em;
+}
+
+.wxParse .sub {
+ vertical-align: sub;
+}
+.wxParse .sup {
+ vertical-align: super;
+}
+
+.wxParse .s,
+.wxParse .strike,
+.wxParse .del {
+ text-decoration: line-through;
+}
+
+.wxParse .strong,
+.wxParse .s {
+ display: inline;
+}
+
+.wxParse .a {
+ color: deepskyblue;
+}
+
+.wxParse .video {
+ text-align: center;
+ margin: 22upx 0;
+}
+
+.wxParse .video-video {
+ width: 100%;
+}
+
+.wxParse .img {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ max-width: 100%;
+ overflow: hidden;
+}
+
+.wxParse .blockquote {
+ margin: 10upx 0;
+ padding: 22upx 0 22upx 22upx;
+ font-family: Courier, Calibri, "宋体";
+ background: #f5f5f5;
+ border-left: 6upx solid #dbdbdb;
+}
+.wxParse .blockquote .p {
+ margin: 0;
+}
+
+.wxParse .ul, .wxParse .ol {
+ display: block;
+ margin: 1em 0;
+ padding-left: 33upx;
+}
+.wxParse .ol {
+ list-style-type: disc;
+}
+.wxParse .ol {
+ list-style-type: decimal;
+}
+.wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template {
+ display: list-item;
+ align-items: baseline;
+ text-align: match-parent;
+}
+
+.wxParse .ol>.li,.wxParse .ul>.li {
+ display: list-item;
+ align-items: baseline;
+ text-align: match-parent;
+}
+.wxParse .ul .ul, .wxParse .ol .ul {
+ list-style-type: circle;
+}
+.wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul {
+ list-style-type: square;
+}
+
+.wxParse .u {
+ text-decoration: underline;
+}
+.wxParse .hide {
+ display: none;
+}
+.wxParse .del {
+ display: inline;
+}
+.wxParse .figure {
+ overflow: hidden;
+}
+
+.wxParse .table {
+ width: 100%;
+}
+.wxParse .thead, .wxParse .tfoot, .wxParse .tr {
+ display: flex;
+ flex-direction: row;
+}
+.wxParse .tr {
+ width:100%;
+ display: flex;
+ border-right: 2upx solid #e0e0e0;
+ border-bottom: 2upx solid #e0e0e0;
+}
+.wxParse .th,
+.wxParse .td {
+ display: flex;
+ width: 1276upx;
+ overflow: auto;
+ flex: 1;
+ padding: 11upx;
+ border-left: 2upx solid #e0e0e0;
+}
+.wxParse .td:last {
+ border-top: 2upx solid #e0e0e0;
+}
+.wxParse .th {
+ background: #f0f0f0;
+ border-top: 2upx solid #e0e0e0;
+}
diff --git a/components/u-parse/u-parse.vue b/components/u-parse/u-parse.vue
new file mode 100644
index 0000000..494e60c
--- /dev/null
+++ b/components/u-parse/u-parse.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main.js b/main.js
index 3861bf2..182c56d 100644
--- a/main.js
+++ b/main.js
@@ -1,7 +1,7 @@
import App from './App'
+import navTo from './utils/navTo'
import uviewPlus, { setConfig } from 'uview-plus'
// #ifndef VUE3
-console.log(222)
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
@@ -16,6 +16,7 @@ app.$mount()
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
+
app.use(uviewPlus, () => {
return {
options: {
@@ -28,6 +29,7 @@ export function createApp() {
}
})
console.log(uni.$u.config.v);
+ app.config.globalProperties.$navTo = navTo
return {
app
}
diff --git a/pages.json b/pages.json
index 51a14ac..3313972 100644
--- a/pages.json
+++ b/pages.json
@@ -27,6 +27,27 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/certImg/certImg",
+ "style": {
+ "navigationBarTitleText": "uni-app",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/sickList/sickList",
+ "style": {
+ "navigationBarTitleText": "uni-app",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/videoList/videoList",
+ "style": {
+ "navigationBarTitleText": "uni-app",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/login/login",
"style": {
diff --git a/pages/case/case.vue b/pages/case/case.vue
index 614d59d..224cf72 100644
--- a/pages/case/case.vue
+++ b/pages/case/case.vue
@@ -1,7 +1,7 @@
-
+
@@ -9,12 +9,20 @@
diff --git a/pages/certList/certList.vue b/pages/certList/certList.vue
index 1c6083f..55c1312 100644
--- a/pages/certList/certList.vue
+++ b/pages/certList/certList.vue
@@ -9,7 +9,12 @@
@query="queryList"
>
-
+
+
+ 检索到:{{numInfo.search_article_num}}篇文章
+ 检索到:{{numInfo.search_video_num}}个视频
+ 检索词:{{ keyWord }}
+
-
- {{isArticle?item.article_title:item.video_title }}
+
+ {{tab==0?item.article_title:item.video_title }}
{{ tag.doctor_name }}
@@ -55,104 +60,57 @@ import dayjs from "dayjs";
import switchImg from "@/static/switch.png";
import certImg from "@/static/cert.png";
const paging = ref(null);
-const uDropdownRef=ref(null);
+const isSearch=ref(false);
const dataList = ref([]);
const total = ref(0);
const value = ref("");
const keyWord = ref("");
-const page=ref(1);
-const isArticle=ref(true);
+const tab=ref(0);
const hospital_id=ref('');
-const hospital_name=ref('');
const doctor_id=ref('');
-const doctor_name=ref('');
const numInfo=reactive({});
const navName=ref('肝胆相照临床病例库')
-const options= ref([
- {
- label: "正序",
- value: 'asc',
- },
- {
- label: "倒序",
- value: 'desc',
- },
-]);
+
+const formatdate=(date)=>{
+ return dayjs(date).format('YYYY-MM-DD')
+}
const tabList=ref([{
name: '文章病例库',
}, {
name: '视频病例库',
}])
-const order=reactive({
- read_num:'',
- push_date:''
-})
+
const switchTab=(index)=>{
- console.log('item', index);
+ tab.value=index.index;
+ paging.value.reload();
}
onLoad((options) => {
if(options.keyWord){
keyWord.value = options.keyWord;
};
- if(options.order=='new'){
- order.push_date='asc'
- };
- if(options.order=='read'){
- order.read_num='desc'
- };
- if(options.order=='video'){
- isArticle.value=false;
- }
if(options.doctor_id){
doctor_id.value=options.doctor_id;
- doctor_name.value=options.doctor_name
- navName.value= doctor_name.value+'临床病例库'
- getStaticDoctor(doctor_id.value)
}
- if(options.hospital_id){
- hospital_id.value=options.hospital_id;
- hospital_name.value=options.hospital_name;
- navName.value= hospital_name.value+'临床病例库'
- getStaticDoctor(hospital_id.value)
+})
+const goDetail=(url)=>{
- }
-});
-const change=(e)=>{
- paging.value.reload();
-}
-const formatdate=(date)=>{
- return dayjs(date).format('YYYY-MM-DD')
-}
-const goDetail=(id)=>{
- console.log(11111)
- console.log(id)
- let type=isArticle.value?'article':'video'
uni.navigateTo({
- url: `/pages/detail/detail?id=${id}&type=${type}`
+ url: `/pages/certImg/certImg?src=${url}`
})
}
-const swicthType=()=>{
- isArticle.value=!isArticle.value;
- dataList.value=[];
- order.read_num='';
- order.push_date='';
- paging.value.reload();
+const changeWord=(val)=>{
+ keyWord.value=val;
+ isSearch.value=true;
+ paging.value.reload();
}
const searchArticle =(params) => {
let searchForm={
keyword: keyWord.value,
doctor_id:doctor_id.value,
- hospital_id:hospital_id.value
}
- if(!order.read_num){
- delete order.read_num
- }
- if(!order.push_date){
- delete order.push_date
- }
- if(order.read_num || order.push_date){
- searchForm.order=order
+ if(isSearch.value){
+ formatdate.is_need_num=1
}
api.searchArticle({
...searchForm,
@@ -160,29 +118,27 @@ const searchArticle =(params) => {
}).then((res)=>{
paging.value.complete(res.data.data.data);
total.value=res.data.data.total;
+ numInfo.search_article_num=res.data.data.search_article_num;
+ numInfo.search_video_num=res.data.data.search_video_num;
}).catch(err=>{
paging.value.complete(false);
})
}
const searchVideo = async(params) => {
- let searchForm={
+ let searchForm={
keyword: keyWord.value,
+ doctor_id:doctor_id.value,
}
- if(!order.read_num){
- delete order.read_num
- }
- if(!order.push_date){
- delete order.push_date
- }
- if(order.read_num || order.push_date){
- searchForm.order=order
- }
+
api.searchVideo({
+ ...searchForm,
...params
}).then((res)=>{
paging.value.complete(res.data.data.data);
total.value=res.data.data.total;
+ numInfo.search_article_num=res.data.data.search_article_num;
+ numInfo.search_video_num=res.data.data.search_video_num;
}).catch(err=>{
paging.value.complete(false);
})
@@ -207,11 +163,23 @@ const queryList = (pageNo, pageSize) => {
page: pageNo,
page_size: pageSize,
};
- isArticle.value?searchArticle(params):searchVideo(params)
+ tab.value==0?searchArticle(params):searchVideo(params)
};
\ No newline at end of file
diff --git a/pages/specialList/specialList.vue b/pages/specialList/specialList.vue
index a741db1..53d6e55 100644
--- a/pages/specialList/specialList.vue
+++ b/pages/specialList/specialList.vue
@@ -22,6 +22,25 @@
>检索词:{{ keyWord }}
+
+
+
+
+
+
+
+
+
@@ -131,7 +150,7 @@
\ No newline at end of file
diff --git a/static/caseIcon.png b/static/caseIcon.png
new file mode 100644
index 0000000000000000000000000000000000000000..e60a6197c9830c801bca23be29e9f854a7f5abaa
GIT binary patch
literal 438
zcmV;n0ZIOeP)Px$a7jc#R9Hu2WEfz;IKcKZj5=U61O`V47#pXtN+|uA!oa|&&%i*3gvrS8@W=1p
znS0kSdJ7H#pWp6s<}|6?fHwsvkm*a2Rl2@;G9%%>R`7-Z<Mxf4M`3GP}cm$
z$m8;#fsqF}g#Z6#{Pp+quYJ3AE&fVG$itP8>;RvTq>29-8S}7N^8f$;UE9{obEl~T
zyhD;#F)%WOVs`+;rEP2Gf~s_)0m&f%t~viRWig;d0VCu8pN#+hE!@0z!40BqAFYf=
gLtr!n215t{08(6MAl-Z6761SM07*qoM6N<$g0DBp;s5{u
literal 0
HcmV?d00001
diff --git a/utils/navTo.js b/utils/navTo.js
index 5033b35..b190b98 100644
--- a/utils/navTo.js
+++ b/utils/navTo.js
@@ -1,22 +1,35 @@
import pageUrl from './pageUrl'
-function navTo(obj){
- // let token='';
- // if(process.env.NODE_ENV === 'development'){
- // token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
- // }else{
- // token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
- // }
- // if(!token){
- // let page_url=pageUrl();
- // uni.setStorageSync('redirectUrl',page_url);
- // uni.navigateTo({
- // url: '/pages/login/login?redirectUrl=has'
- // });
- // }else{
- // uni.navigateTo(obj)
- // }
- uni.navigateTo(obj)
+
+function navTo(obj) {
+ let token = '';
+ if (process.env.NODE_ENV === 'development') {
+ token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
+ } else {
+ token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
+ }
+ if (!token) {
+ let page_url = pageUrl();
+ uni.setStorageSync('redirectUrl', page_url);
+ uni.navigateTo({
+ url: '/pages/login/login?redirectUrl=has'
+ });
+ } else {
+ // # ifdef MP-WEIXIN
+ const pages = getCurrentPages();
+ let len = pages.length;
+ if (len < 10) {
+ uni.navigateTo(obj)
+ } else {
+ uni.redirectTo(obj)
+ }
+ // # endif
+
+ // # ifdef H5
+ uni.navigateTo(obj)
+ //# endif
+ }
+
}
export default navTo
\ No newline at end of file