index.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366
  1. <template>
  2. <view class="content">
  3. <view class="cont">
  4. <view class="bg">
  5. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/image/index_img/home_top_bg.png"></image>
  6. </view>
  7. <view class="top-box" :style="{ background: bg }" >
  8. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  9. <view class="top-title">
  10. <view class="name" :style="{ color: titleColor }">医健宝医药</view>
  11. <view class="desc-box" >
  12. <image v-if="!isTop" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/dui1.png"></image>
  13. <image v-if="isTop" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/dui1.png"></image>
  14. <view class="desc" :style="{ color: descColor }">卫健部门权威认证机构,世界各地千万用户健康选择</view>
  15. </view>
  16. </view>
  17. <view class="search">
  18. <view class="search-box" @click="navTo('/pages_index/search')">
  19. <image class="img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_search.png" mode=""></image>
  20. <input disabled type="text" placeholder="搜索医生、疾病、知识" placeholder-class="input-place">
  21. </view>
  22. <!-- 购物车 -->
  23. <view class="img-item" @click="loginNavTo('/pages_shopping/cart')">
  24. <u-badge type="error" max="99" :value="cartCount" :offset="[-10,-10]" :absolute="true"></u-badge>
  25. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/fs/20250925/9a8fa2e310704a8b9ed078e10a2ab6c5.png" mode=""></image>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="cont-box">
  30. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  31. <view style="padding-bottom:178rpx" >
  32. </view>
  33. <view class="banner" v-if="advImgs.length>0">
  34. <u-swiper
  35. :list="advImgs"
  36. indicator
  37. indicatorMode="line"
  38. circular
  39. height="233rpx"
  40. @click="handleAdvClick">
  41. </u-swiper>
  42. </view>
  43. <view class="menu-box box">
  44. <view class="menu-item" @click="navTo('/pages_index/healthy/index?cateId=2')">
  45. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/medical_news_icon.png" mode="aspectFill"></image>
  46. <view>医药资讯</view>
  47. </view>
  48. <view class="menu-item" @click="loginNavTo('/pages_user/complaint')">
  49. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/consultation_complaints_icon.png" mode="aspectFill"></image>
  50. <view>咨询投诉</view>
  51. </view>
  52. <view class="menu-item" @click="loginNavTo('/pages_user/shopping/storeOrder')">
  53. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/consultant_pharmacist_icon.png" mode="aspectFill"></image>
  54. <view>药品订单</view>
  55. </view>
  56. <view class="menu-item" @click="navTo('/pages_shopping/registerMerchant')">
  57. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/merchants_settle_in_icon.png" mode="aspectFill"></image>
  58. <view>商家入驻</view>
  59. </view>
  60. </view>
  61. <view class="modules">
  62. <view class="module" v-for="(it,index) in layouts" :key="index">
  63. <!-- 推荐药品 -->
  64. <tuiProduct ref="tuiProduct" v-if="it.id==8&&it.isShow"></tuiProduct>
  65. <!-- 特色药店 -->
  66. <view class="pharmacy-box box" v-if="it.id==9&&it.isShow&&storeIndexList.length>0">
  67. <view class="title-box">
  68. <view class="title">{{it.name}}</view>
  69. <view class="more" @click="navTo('/pages_store/index')" >
  70. <view class="text">更多药店</view>
  71. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  72. </view>
  73. </view>
  74. <view class="pharmacy">
  75. <image :src="store.logoUrl" mode="aspectFill" v-for="(store,i) in storeIndexList" :key="i"
  76. @click="navTo('/pages_store/storeIndex?storeId='+store.storeId)"></image>
  77. </view>
  78. </view>
  79. <!-- <view class="depts" v-if="it.id==2&&it.isShow">
  80. <view class="title">
  81. {{it.name}}
  82. </view>
  83. <view class="dept-box">
  84. <view @click="navTo('/pages_doctor/doctorList?deptId='+item.deptId)" class="dept" v-for="(item,index) in depts" :key="index">
  85. <image class="icon" :src="item.iconUrl"></image>
  86. <view class="title">{{item.deptName}}</view>
  87. </view>
  88. <view @click="navTo('/pages_doctor/doctorList?deptId=0')" class="dept">
  89. <image class="icon" src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/acbb520df8284c6aaff601cb06411c2a.png"></image>
  90. <view class="title">更多科室</view>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="depts" v-if="it.id==3&&it.isShow">
  95. <view class="title">
  96. {{it.name}}
  97. </view>
  98. <view class="dept-box">
  99. <view @click="yangshengClick(item)" class="dept" v-for="(item,index) in yangshengs" :key="index">
  100. <image class="icon" :src="item.icon"></image>
  101. <view class="title" >{{item.title}}</view>
  102. </view>
  103. </view>
  104. </view>
  105. <view class="doctor-articles" v-if="it.id==4&&it.isShow" >
  106. <view class="title-box">
  107. <view class="title">{{it.name}}</view>
  108. <view class="more" @click="navTo('/pages_doctor/doctorArticleList')" >
  109. <view class="text">更多</view>
  110. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  111. </view>
  112. </view>
  113. <scroll-view :scroll-x="true" style="white-space: nowrap;">
  114. <view class="article-box" >
  115. <view class="article" @click="navTo('/pages_doctor/doctorArticleDetails?articleId='+item.articleId)" v-for="(item,index) in doctocArticles" :key="index">
  116. <view class="image-box">
  117. <image mode="aspectFill" :src="item.imageUrl"></image>
  118. <view class="views">
  119. {{item.views}}人观看
  120. </view>
  121. <view class="doctor">
  122. <image mode="aspectFill" :src="item.avatar"></image>
  123. <view class="right">
  124. <view class="doc-name ellipsis">{{item.doctorName}}</view>
  125. <view class="doc-position ellipsis">{{item.position}}</view>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="article-title-box">
  130. <view class="article-title ellipsis">{{item.title}}</view>
  131. </view>
  132. </view>
  133. </view>
  134. </scroll-view>
  135. </view> -->
  136. <view class="doctors box" v-if="it.id==5&&it.isShow&&doctors.length>0">
  137. <view class="title-box">
  138. <view class="title">{{it.name}}</view>
  139. <view class="more" @click="navTo('/pages_doctor/doctorList')">
  140. <view class="text">更多</view>
  141. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  142. </view>
  143. </view>
  144. <view class="doctor-box" v-if="doctors.length>0" style="padding: 0;margin: 0;">
  145. <view class="doctor" @click="navTo('/pages_doctor/doctorDetails?doctorId='+item.doctorId)" v-for="(item,index) in doctors" :key="index">
  146. <view class="item">
  147. <view class="left">
  148. <view class="head-box">
  149. <image mode="aspectFill" class="doc-img" :src="item.avatar"></image>
  150. <view class="isline" v-if="item.workStatus==1">
  151. <view class="img">
  152. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/isline.png"></image>
  153. <view class="name">在线</view>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. <view class="right">
  159. <view class="doc-box">
  160. <view class="doc-name">
  161. {{item.doctorName}}
  162. </view>
  163. <view class="doc-position">{{item.position}}</view>
  164. <view class="doc-dept">{{item.deptName}}</view>
  165. </view>
  166. <view class="hospital-box">
  167. <!-- <view class="tag" v-if="item.hospitalLevel!=null">
  168. <text>{{$getDictLabelName(hosLevelOptions,item.hospitalLevel)}}</text>
  169. </view> -->
  170. <view class="name">{{item.hospitalName||''}} </view>
  171. </view>
  172. <view class="doc-spec">
  173. <view class="spec ellipsis2">{{item.speciality}}</view>
  174. </view>
  175. <view class="doc-count">
  176. <view class="name">好评:</view>
  177. <view class="count">{{item.pingStar}}分</view>
  178. <view class="name">接诊量:</view>
  179. <view class="count">{{item.orderNumber}}</view>
  180. <view class="name">平均响应:</view>
  181. <view class="count"></view>
  182. </view>
  183. <view class="doc-price" >
  184. <view class="btn">
  185. 咨询医生¥
  186. <text v-for="(price,index) in item.prices" :key="index">
  187. {{price.price.toFixed(2)}} <text v-if="index==0">/</text>
  188. </text>
  189. </view>
  190. </view>
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. </view>
  196. <view class="articles box" v-if="it.id==6&&it.isShow&&articles.length>0">
  197. <view class="title-box">
  198. <view class="title">{{it.name}}</view>
  199. <view class="more" @click="navTo('/pages_index/healthy/index')">
  200. <view class="text">更多</view>
  201. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  202. </view>
  203. </view>
  204. <view class="article-box" v-if="articles.length>0">
  205. <view class="item" @click="navTo('/pages_index/healthy/detail?articleId='+item.articleId)" v-for="(item,index) in articles" :key="index">
  206. <view class="left">
  207. <view class="title ellipsis2">
  208. {{item.title}}
  209. </view>
  210. <view class="views">
  211. 浏览量 {{item.views}}
  212. </view>
  213. </view>
  214. <view class="right">
  215. <image :src="item.imageUrl" mode="aspectFill"></image>
  216. </view>
  217. </view>
  218. </view>
  219. </view>
  220. <!-- <view class="packages" v-if="it.id==7&&it.isShow">
  221. <view class="title-box">
  222. <view class="title">{{it.name}}</view>
  223. <view class="more" @click="navTo('/pages_index/packageList')">
  224. <view class="text">更多</view>
  225. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  226. </view>
  227. </view>
  228. <view class="package-box" >
  229. <view class="item" @click="navTo('/pages_index/packageDetails?packageId='+item.packageId)" v-for="(item,index) in packages" :key="index">
  230. <view class="top">
  231. <image :src="item.imgUrl"></image>
  232. </view>
  233. <view class="bottom">
  234. <view class="title ellipsis2">
  235. {{item.packageName}}
  236. </view>
  237. <view class="price-box">
  238. <view class="price">¥{{item.price.toFixed(2)}}元/日</view>
  239. <view class="count">{{item.sales}}人已购</view>
  240. </view>
  241. </view>
  242. </view>
  243. </view>
  244. </view> -->
  245. </view>
  246. </view>
  247. <!-- 资质 -->
  248. <view class="qualifications-box">
  249. <view class="qualifications-con">
  250. <image class="qualifications-icon" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/certificate_icon68.svg" mode=""></image>
  251. <view class="qualifications-r">
  252. <view class="x-bc">
  253. <text>资质证书展示</text>
  254. <view class="desc x-f" @click="navTo('/pages_user/cert')">
  255. <text>查看详情</text>
  256. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/white_right_arrow_right_icon.png" mode="aspectFill"></image>
  257. </view>
  258. </view>
  259. <view class="text" style="margin-top: 6rpx;">药品交易平台备案:{{qual.ypwljyfwdsfpt}}</view>
  260. <view class="text" style="margin-top: 6rpx;">医疗器械交易平台备案:{{qual.ylqxwljyfwdsfptbah}}</view>
  261. </view>
  262. </view>
  263. <view style="padding-left: 14rpx;">
  264. <text class="text" style="margin-right: 40rpx;">投诉举报邮箱:{{qual.jbyx}}</text>
  265. <text class="text">联系电话:{{qual.baxx}}</text>
  266. </view>
  267. </view>
  268. </view>
  269. </view>
  270. </view>
  271. </template>
  272. <script>
  273. import tuiProduct from "@/components/tuiProduct.vue"
  274. import {getConfigByKey} from '@/api/common'
  275. import {getPackageList} from '@/api/package.js'
  276. import {getDoctorArticleList} from '@/api/doctorArticle.js'
  277. import {getDoctorList} from '@/api/doctor.js'
  278. import {getArticleList} from '@/api/article.js'
  279. import {getAdvList} from '@/api/adv.js'
  280. import {getDepartmentList} from '@/api/department.js'
  281. import {getDictByKey} from '@/api/common.js'
  282. import {validList,getCartCount}from '@/api/index.js'
  283. export default {
  284. components: {
  285. tuiProduct
  286. },
  287. data() {
  288. return {
  289. cartCount: 0,
  290. layouts:[],
  291. yangshengs:[
  292. {id:"0",title:"AI舌诊",page:"/pages_user/tongue/index",icon:"https://cos.his.cdwjyyh.com/fs/20240919/647fb42de0ab4e96a6c3097f3c3d9cf5.png"},
  293. {id:"1",title:"药膳食疗",page:"/pages_index/medicatedFoodList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3cfbd47911cf4753aa9497eac500728d.png"},
  294. {id:"2",title:"经络穴位",page:"/pages_index/vesselList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e93536a9dc1a4f8ca09545097b12fdea.png"},
  295. {id:"3",title:"问答专区",page:"/pages_index/questionsList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e896972bd56f4e358188af36f2c5af42.png"},
  296. {id:"4",title:"疾病",page:"/pages_index/diseaseList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d6f1851cccae414b8baf2ba07782f91b.png"},
  297. {id:"5",title:"中药图解",page:"/pages_index/chineseMedicineList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ff43572d0d004285b5a3b0ef2663c471.png"},
  298. {id:"6",title:"名方今用",page:"/pages_index/famousPrescribeList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/45db770e58c34963b0d2ba24a958b617.png"},
  299. {id:"7",title:"康复医案",page:"/pages_doctor/doctorArticleList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e793942797b24035b51f94d894bdfa0b.png"}
  300. ],
  301. isTop:false,
  302. titleColor:"#ffffff",
  303. descColor:"#ffffff",
  304. top:0,
  305. // 状态栏的高度
  306. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  307. advImgs:[],
  308. doctors:[],
  309. advs:[],
  310. articles:[],
  311. depts:[],
  312. doctocArticles:[],
  313. hosLevelOptions:[],
  314. packages:[],
  315. storeIndexList: [],
  316. qual: {}
  317. }
  318. },
  319. onLoad() {
  320. this.getDictByKey("sys_hospital_level");
  321. uni.$on('refreshMsgCount', () => {
  322. try{
  323. let totalUnreadCount = uni.$TUIKit.getTotalUnreadMessageCount();
  324. if(totalUnreadCount>0){
  325. try{
  326. uni.setTabBarBadge({ //显示数字
  327. index: 1, //tabbar下标
  328. text: totalUnreadCount+"" //数字
  329. })
  330. }
  331. catch(e){
  332. }
  333. }
  334. else{
  335. try{
  336. uni.hideTabBarRedDot({ //隐藏红点
  337. index: 1 //tabbar下标
  338. })
  339. }
  340. catch(e){
  341. }
  342. }
  343. }catch(e){
  344. }
  345. });
  346. },
  347. onShow() {
  348. this.getDoctorList();
  349. this.getArticleList();
  350. this.getAdvList();
  351. // this.getDepartmentList();
  352. // this.getDoctorArticleList();
  353. // this.getPackageList();
  354. this.getConfigByKey("his.appShow");
  355. this.getQual()
  356. this.getStore()
  357. var that=this;
  358. uni.$emit('refreshMsgCount');
  359. this.$isLogin().then(
  360. res => {
  361. if(res){
  362. this.getCartCount();
  363. }
  364. }
  365. );
  366. },
  367. onPageScroll(e) {
  368. this.top=e.scrollTop;
  369. },
  370. //发送给朋友
  371. onShareAppMessage(res) {
  372. if(this.$isLogin()){
  373. return {
  374. title: "医健宝医药",
  375. path: '/pages/index/index',
  376. imageUrl: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  377. }
  378. }
  379. },
  380. //分享到朋友圈
  381. onShareTimeline(res) {
  382. if(this.$isLogin()){
  383. return {
  384. title: "医健宝医药",
  385. imageUrl: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  386. }
  387. }
  388. },
  389. computed: {
  390. bg: function() {
  391. var top=this.top/120;
  392. if(top>0){
  393. this.isTop=true;
  394. this.titleColor="#fff"
  395. this.descColor="#fff"
  396. }
  397. else{
  398. this.isTop=false;
  399. this.titleColor="#fff"
  400. this.descColor="#fff"
  401. }
  402. return 'rgba(37, 131, 235, ' + top + ')';
  403. },
  404. },
  405. methods: {
  406. loginNavTo(url){
  407. this.$isLogin().then(
  408. res => {
  409. console.log(res)
  410. if(res){
  411. uni.navigateTo({
  412. url: url
  413. })
  414. }
  415. else{
  416. uni.navigateTo({
  417. url:'/pages/auth/login'
  418. })
  419. }
  420. }
  421. );
  422. },
  423. dev(){
  424. uni.showToast({
  425. icon:"none",
  426. title: '敬请期待'
  427. })
  428. },
  429. getStore() {
  430. validList().then(res=>{
  431. if(res.code==200) {
  432. this.storeIndexList =res.rows
  433. }
  434. })
  435. },
  436. getCartCount(){
  437. let data = {};
  438. getCartCount(data).then(
  439. cartRes => {
  440. if(cartRes.code==200){
  441. this.cartCount=cartRes.data;
  442. }
  443. },
  444. rej => {}
  445. );
  446. },
  447. getQual(){
  448. let param = {key:"his.zzzs"};
  449. getConfigByKey(param).then(
  450. res => {
  451. if(res.code==200){
  452. this.qual = res.data ? JSON.parse(res.data) : {}
  453. }
  454. },
  455. rej => {}
  456. );
  457. },
  458. getConfigByKey(key){
  459. var that=this;
  460. var data={key:key}
  461. getConfigByKey(data).then(
  462. res => {
  463. if(res.code==200){
  464. this.layouts=JSON.parse(res.data);
  465. this.layouts.sort((a, b) => a.sort - b.sort)
  466. this.layouts.forEach(function(element) {
  467. if(element.id=="4"){
  468. if(!element.isShow){
  469. that.yangshengs.splice(6,1);
  470. }
  471. }
  472. if(element.id=="7"){
  473. // if(!element.isShow){
  474. // uni.setTabBarItem({
  475. // index:2, //从左到右 0开始
  476. // visible:false //默认true false隐藏
  477. // })
  478. // }
  479. // else{
  480. // uni.setTabBarItem({
  481. // index:2, //从左到右 0开始
  482. // visible:true //默认true false隐藏
  483. // })
  484. // }
  485. }
  486. });
  487. }
  488. },
  489. rej => {}
  490. );
  491. },
  492. yangshengClick(item){
  493. // uni.navigateTo({
  494. // url: '/pages/index/webview?url=' + encodeURIComponent('rtlive://course?courseId=1')
  495. // });
  496. // return;
  497. if(item.id==0){
  498. // this.$isLogin().then(
  499. // res => {
  500. // if(res){
  501. uni.navigateTo({
  502. url:item.page
  503. });
  504. // }
  505. // else{
  506. // uni.navigateTo({
  507. // url:'/pages/auth/login'
  508. // })
  509. // }
  510. // }
  511. // );
  512. }
  513. else{
  514. if(item.page==""){
  515. uni.showToast({
  516. icon:"none",
  517. title: '暂无更多'
  518. })
  519. return;
  520. }
  521. uni.navigateTo({
  522. url:item.page
  523. })
  524. }
  525. },
  526. switchTab(url){
  527. uni.switchTab({
  528. url:url
  529. })
  530. },
  531. navToMiniProgram(){
  532. uni.navigateToMiniProgram({
  533. // appid 写你要跳转的小程序的 appid
  534. appId: 'wx45cf09091aead547',
  535. // 路径写 src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
  536. path: '/pages/common/launch',
  537. extraData: {
  538. // 'type': 'out'
  539. },
  540. // 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
  541. envVersion: 'develop',
  542. success(res) {
  543. // 打开成功
  544. // uni.showToast({
  545. // title: '跳转成功'
  546. // })
  547. },
  548. fail(err) {
  549. // 打开失败/取消
  550. // uni.showToast({
  551. // title: '跳转不成功'
  552. // })
  553. }
  554. })
  555. },
  556. getDictByKey(key){
  557. var data={key:key}
  558. getDictByKey(data).then(
  559. res => {
  560. if(res.code==200){
  561. if(key=="sys_hospital_level"){
  562. this.hosLevelOptions=res.data;
  563. }
  564. }
  565. },
  566. err => {
  567. }
  568. );
  569. },
  570. getDoctorArticleList(page) {
  571. //联网加载数据
  572. var that = this;
  573. var data = {
  574. pageNum:1,
  575. pageSize:10,
  576. };
  577. getDoctorArticleList(data).then(res => {
  578. if(res.code==200){
  579. this.doctocArticles=res.data.list;
  580. }else{
  581. }
  582. });
  583. },
  584. getDepartmentList(page) {
  585. //联网加载数据
  586. var that = this;
  587. var data = {
  588. isTui:1
  589. };
  590. getDepartmentList(data).then(res => {
  591. if(res.code==200){
  592. this.depts=res.data;
  593. }
  594. });
  595. },
  596. handleAdvClick(index){
  597. var ad=this.advs[index];
  598. console.log(ad.advUrl);
  599. if(ad.showType==1){
  600. uni.setStorageSync('url',ad.advUrl);
  601. uni.navigateTo({
  602. url:"h5"
  603. })
  604. }
  605. else if(ad.showType==2){
  606. uni.navigateTo({
  607. url:ad.advUrl
  608. })
  609. }
  610. else if(ad.showType==3){
  611. uni.setStorageSync('content',ad.content);
  612. uni.navigateTo({
  613. url:"content"
  614. })
  615. }
  616. },
  617. getAdvList() {
  618. //联网加载数据
  619. var that = this;
  620. var data = {
  621. advType:1
  622. };
  623. getAdvList(data).then(res => {
  624. if(res.code==200){
  625. that.advImgs=[];
  626. that.advs=[];
  627. res.data.forEach(function(element) {
  628. if(element.imageUrl!=null&&element.imageUrl!=""){
  629. that.advs.push(element);
  630. that.advImgs.push(element.imageUrl);
  631. }
  632. });
  633. }else{
  634. uni.showToast({
  635. icon:'none',
  636. title: "请求失败",
  637. });
  638. }
  639. });
  640. },
  641. getArticleList() {
  642. //联网加载数据
  643. var that = this;
  644. var data = {
  645. isTui:1,
  646. pageNum:1,
  647. pageSize:10,
  648. };
  649. getArticleList(data).then(res => {
  650. if(res.code==200){
  651. this.articles=res.data.list;
  652. }else{
  653. uni.showToast({
  654. icon:'none',
  655. title: "请求失败",
  656. });
  657. }
  658. });
  659. },
  660. getDoctorList() {
  661. //联网加载数据
  662. var that = this;
  663. var data = {
  664. isTui:1,
  665. pageNum:1,
  666. pageSize:10,
  667. };
  668. getDoctorList(data).then(res => {
  669. if(res.code==200){
  670. this.doctors=res.data.list;
  671. this.doctors.forEach(function(value,index,array){
  672. value.prices=JSON.parse(value.priceJson)
  673. });
  674. }else{
  675. uni.showToast({
  676. icon:'none',
  677. title: "请求失败",
  678. });
  679. }
  680. });
  681. },
  682. getPackageList() {
  683. //联网加载数据
  684. var that = this;
  685. var data = {
  686. isShow:1,
  687. pageNum:1,
  688. pageSize:10,
  689. };
  690. getPackageList(data).then(res => {
  691. if(res.code==200){
  692. this.packages=res.data.list;
  693. }else{
  694. uni.showToast({
  695. icon:'none',
  696. title: "请求失败",
  697. });
  698. }
  699. });
  700. },
  701. loginNavTo(url){
  702. this.$isLogin().then(
  703. res => {
  704. if(res){
  705. console.log(res)
  706. uni.navigateTo({
  707. url: url
  708. })
  709. }
  710. else{
  711. uni.navigateTo({
  712. url:'/pages/auth/login'
  713. })
  714. }
  715. }
  716. );
  717. },
  718. navTo(url){
  719. if(url=="dev"){
  720. uni.showToast({
  721. icon:'none',
  722. title: "尽情期待...",
  723. });
  724. return;
  725. }
  726. console.log(url)
  727. uni.navigateTo({
  728. url: url
  729. })
  730. },
  731. navToTest() {
  732. const course = {"companyId":100,"companyUserId":6806,"corpId":"ww5a88c4f879f204c5","courseId":63,"link":"1899022782092541952","linkType":3,"qwExternalId":9914983,"qwUserId":"18931","videoId":409}
  733. uni.navigateTo({
  734. url: '/pages_course/video?course='+JSON.stringify(course)
  735. })
  736. }
  737. }
  738. }
  739. </script>
  740. <style scoped lang="scss">
  741. .img-item{
  742. position: relative;
  743. width: 44rpx;
  744. height: 44rpx;
  745. margin: 0 20rpx 0 10rpx;
  746. image{
  747. width: 100%;
  748. height: 100%;
  749. }
  750. }
  751. .qualifications {
  752. &-box {
  753. margin: 24rpx;
  754. padding: 24rpx 16rpx;
  755. box-sizing: border-box;
  756. overflow: hidden;
  757. background-image: url('https://cos.his.cdwjyyh.com/fs/20250826/54a29c58e06c431cbe3286335bb0da1b.png');
  758. background-repeat: no-repeat;
  759. background-size: 100% 100%;
  760. .text {
  761. font-family: PingFang SC, PingFang SC;
  762. font-weight: 400;
  763. font-size: 20rpx;
  764. color: #FFFFFF;
  765. }
  766. }
  767. &-con {
  768. display: flex;
  769. align-items: flex-start;
  770. }
  771. &-icon {
  772. height: 136rpx;
  773. width: 136rpx;
  774. margin-left: -10rpx;
  775. }
  776. &-r {
  777. flex: 1;
  778. font-family: PingFang SC, PingFang SC;
  779. font-weight: 600;
  780. font-size: 40rpx;
  781. color: #FFFFFF;
  782. .desc {
  783. font-family: PingFang SC, PingFang SC;
  784. font-weight: 400;
  785. font-size: 24rpx;
  786. color: #FFFFFF;
  787. image {
  788. height: 48rpx;
  789. width: 48rpx
  790. }
  791. }
  792. }
  793. }
  794. .content{
  795. height: 100%;
  796. .cont{
  797. position: relative;
  798. width: 100%;
  799. display: flex;
  800. flex-direction: column;
  801. .bg{
  802. width: 100%;
  803. height:450rpx;
  804. // background-color: #2583EB;
  805. // background: linear-gradient(#2583EB, #88e2da);
  806. position: fixed;
  807. image{
  808. border-radius: 0rpx 0rpx 50rpx 50rpx;
  809. width: 100%;
  810. height:100%;
  811. }
  812. }
  813. .top-box{
  814. width: 100%;
  815. position: fixed;
  816. top: 0;
  817. left: 0;
  818. z-index: 1001;
  819. .top-title{
  820. height: 88upx;
  821. // line-height: 88upx;
  822. display: flex;
  823. flex-direction: column;
  824. align-items: flex-start;
  825. justify-content: center;
  826. margin-left: 15rpx;
  827. .name{
  828. font-size: 32upx;
  829. font-family: Source Han Sans CN;
  830. font-weight: bold;
  831. color: #fff;
  832. }
  833. .desc-box{
  834. display: flex;
  835. align-items: center;
  836. justify-content: flex-start;
  837. margin-top: 10rpx;
  838. image{
  839. width:24rpx;
  840. height:24rpx;
  841. }
  842. .desc{
  843. margin-left: 5rpx;
  844. font-size: 20upx;
  845. font-family: Source Han Sans CN;
  846. color: #626468;
  847. }
  848. }
  849. }
  850. .search{
  851. box-sizing: border-box;
  852. z-index: 101;
  853. padding: 15rpx;
  854. width: 100%;
  855. display: flex;
  856. align-items: center;
  857. justify-content: center;
  858. .search-box{
  859. flex: 1;
  860. margin-right: 10rpx;
  861. height: 60upx;
  862. line-height: 60upx;
  863. border-radius: 30upx;
  864. background-color: #fff;
  865. padding: 0 30upx;
  866. display: flex;
  867. align-items: center;
  868. transition: all .5s;
  869. .img{
  870. width: 30upx;
  871. height: 30upx;
  872. margin-right: 10upx;
  873. }
  874. input{
  875. flex: 1;
  876. font-size: 24upx;
  877. color: #000;
  878. }
  879. .input-place{
  880. font-size: 24upx;
  881. color: #878787;
  882. }
  883. }
  884. .msg{
  885. position: relative;
  886. width:50rpx;
  887. height:50rpx;
  888. image{
  889. width: 100%;
  890. height:100%;
  891. }
  892. .contact-btn {
  893. top: 0;
  894. position: absolute;
  895. width:100%;
  896. height:100%;
  897. opacity: 0;
  898. }
  899. }
  900. }
  901. }
  902. .box {
  903. background: #FFFFFF;
  904. border-radius: 16rpx 16rpx 16rpx 16rpx;
  905. margin: 24rpx;
  906. box-sizing: border-box;
  907. .title-box{
  908. display: flex;
  909. flex-direction: row;
  910. align-items: center;
  911. justify-content: space-between;
  912. padding: 28rpx 0;
  913. box-sizing: border-box;
  914. .title{
  915. font-size: 32upx;
  916. font-family: PingFang SC;
  917. font-weight: bold;
  918. color: #111111;
  919. }
  920. .more{
  921. display: flex;
  922. align-items: center;
  923. justify-content: flex-end;
  924. .text{
  925. font-size: 24rpx;
  926. font-family: PingFang SC;
  927. color: #9B9B9B;
  928. }
  929. image{
  930. margin-left: 10rpx;
  931. width:15rpx;
  932. height:20rpx;
  933. }
  934. }
  935. }
  936. .price-box {
  937. font-family: Roboto, Roboto;
  938. font-weight: bold;
  939. font-size: 36rpx;
  940. color: #FF5C03;
  941. margin-top: 22rpx;
  942. &-unit {
  943. font-weight: 600;
  944. font-size: 26rpx;
  945. }
  946. &-decimal {
  947. font-weight: 600;
  948. font-size: 26rpx;
  949. }
  950. &-text {
  951. font-family: PingFang SC, PingFang SC;
  952. font-weight: 500;
  953. font-size: 26rpx;
  954. }
  955. }
  956. }
  957. .menu-box {
  958. display: flex;
  959. align-items: center;
  960. justify-content: space-evenly;
  961. padding: 26rpx 0 34rpx 0;
  962. .menu-item {
  963. width: 25%;
  964. font-family: PingFang SC, PingFang SC;
  965. font-weight: 400;
  966. font-size: 24rpx;
  967. color: #222222;
  968. display: flex;
  969. flex-direction: column;
  970. align-items: center;
  971. align-items: center;
  972. }
  973. image {
  974. width: 104rpx;
  975. height: 104rpx;
  976. margin-bottom: 26rpx;
  977. }
  978. }
  979. .pharmacy-box {
  980. padding: 8rpx 24rpx 32rpx 24rpx;
  981. .pharmacy {
  982. background: #FFFFFF;
  983. display: flex;
  984. align-items: center;
  985. flex-wrap: wrap;
  986. margin-right: -18rpx;
  987. image {
  988. flex-shrink: 0;
  989. width: 150rpx;
  990. height: 150rpx;
  991. border-radius: 16rpx 16rpx 16rpx 16rpx;
  992. border: 1rpx solid #F5F6F6;
  993. margin-right: 18rpx;
  994. margin-bottom: 18rpx;
  995. box-sizing: border-box;
  996. }
  997. }
  998. }
  999. .cont-box{
  1000. z-index: 100;
  1001. .banner{
  1002. margin: 20rpx auto auto;
  1003. width: 702rpx;
  1004. }
  1005. .modules{
  1006. .module{
  1007. .depts{
  1008. z-index: 101;
  1009. margin: 20rpx 15rpx 0rpx;
  1010. padding: 20rpx;
  1011. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  1012. background-color: #fff;
  1013. border-radius: 15rpx;
  1014. .title{
  1015. font-size: 32upx;
  1016. font-family: PingFang SC;
  1017. font-weight: bold;
  1018. color: #2A2B2E;
  1019. }
  1020. .dept-box{
  1021. margin-top: 15rpx;
  1022. display: flex;
  1023. align-items: center;
  1024. justify-content: flex-start;
  1025. flex-wrap:wrap;
  1026. .dept{
  1027. padding: 15rpx 5rpx;
  1028. width:25%;
  1029. display: flex;
  1030. flex-direction: column;
  1031. align-items: center;
  1032. justify-content: center;
  1033. .icon{
  1034. width:58rpx;
  1035. height:58rpx;
  1036. }
  1037. .title{
  1038. margin-top: 10rpx;
  1039. font-size: 24upx;
  1040. font-family: PingFang SC;
  1041. font-weight: 500;
  1042. color: #111111;
  1043. }
  1044. }
  1045. }
  1046. }
  1047. .doctor-articles{
  1048. z-index: 101;
  1049. margin: 20rpx 15rpx 0rpx;
  1050. padding: 20rpx;
  1051. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  1052. background-color: #fff;
  1053. border-radius: 15rpx;
  1054. .title-box{
  1055. display: flex;
  1056. flex-direction: row;
  1057. align-items: center;
  1058. justify-content: space-between;
  1059. .title{
  1060. font-size: 32upx;
  1061. font-family: PingFang SC;
  1062. font-weight: bold;
  1063. color: #111111;
  1064. }
  1065. .more{
  1066. display: flex;
  1067. align-items: center;
  1068. justify-content: flex-end;
  1069. .text{
  1070. font-size: 24rpx;
  1071. font-family: PingFang SC;
  1072. color: #9B9B9B;
  1073. }
  1074. image{
  1075. margin-left: 10rpx;
  1076. width:15rpx;
  1077. height:20rpx;
  1078. }
  1079. }
  1080. }
  1081. .article-box{
  1082. overflow-x: auto;
  1083. box-sizing: border-box;
  1084. display: flex;
  1085. align-items: center;
  1086. justify-content: flex-start;
  1087. .article{
  1088. width: 300rpx;
  1089. margin-right: 20rpx;
  1090. background: #f9f8fe;
  1091. display: flex;
  1092. flex-direction: column;
  1093. align-items: flex-start;
  1094. justify-content: flex-start;
  1095. &:last-child{
  1096. margin-right: 0rpx;
  1097. }
  1098. .image-box{
  1099. width: 300rpx;
  1100. height:400rpx;
  1101. position: relative;
  1102. border-radius: 20rpx;
  1103. image{
  1104. border-radius: 20rpx;
  1105. width: 300rpx;
  1106. height:400rpx;
  1107. }
  1108. .views{
  1109. position: absolute;
  1110. top:0rpx;
  1111. left:0rpx;
  1112. padding: 5rpx 10rpx;
  1113. background: rgba(0,0,0,0.25);
  1114. border-radius: 12rpx 0px 12rpx 0px;
  1115. opacity: 1;
  1116. font-size: 20rpx;
  1117. font-family: PingFang SC-Bold, PingFang SC;
  1118. font-weight: bold;
  1119. color: #FFFFFF;
  1120. }
  1121. .doctor{
  1122. margin: 10rpx;
  1123. display: flex;
  1124. align-items: center;
  1125. justify-content: flex-start;
  1126. position: absolute;
  1127. bottom:0rpx;
  1128. left:0rpx;
  1129. image{
  1130. border-radius: 50%;
  1131. width: 64rpx;
  1132. height:64rpx;
  1133. }
  1134. .right{
  1135. width: 200rpx;
  1136. margin-left: 10rpx;
  1137. display: flex;
  1138. flex-direction: column;
  1139. align-items: flex-start;
  1140. justify-content: space-between;
  1141. .doc-name{
  1142. width: 200rpx;
  1143. font-size: 30rpx;
  1144. font-weight: bold;
  1145. font-family: PingFang SC;
  1146. color: #fff;
  1147. }
  1148. .doc-position{
  1149. width: 100%;
  1150. font-size: 28rpx;
  1151. font-family: PingFang SC;
  1152. color: #fff;
  1153. font-weight: bold;
  1154. opacity: 0.8;
  1155. }
  1156. }
  1157. }
  1158. }
  1159. .article-title-box{
  1160. width: 100%;
  1161. margin-top: 10rpx;
  1162. display: flex;
  1163. align-items: center;
  1164. justify-content: flex-start;
  1165. .article-title{
  1166. font-size: 30rpx;
  1167. font-weight: bold;
  1168. font-family: PingFang SC;
  1169. color: #2A2B2E;
  1170. }
  1171. }
  1172. }
  1173. }
  1174. }
  1175. .doctors {
  1176. padding: 0 24rpx 24rpx 24rpx;
  1177. }
  1178. .articles{
  1179. padding: 0 24rpx 24rpx 24rpx;
  1180. .article-box{
  1181. display: flex;
  1182. flex-direction: column;
  1183. align-items: flex-start;
  1184. justify-content: flex-start;
  1185. .item{
  1186. width: 100%;
  1187. margin-bottom: 20rpx;
  1188. display: flex;
  1189. align-items: flex-start;
  1190. justify-content: flex-start;
  1191. &:last-child{
  1192. margin-bottom: 0rpx;
  1193. }
  1194. .left{
  1195. flex:1;
  1196. height:160rpx;
  1197. margin-right: 15rpx;
  1198. display: flex;
  1199. flex-direction: column;
  1200. align-items: flex-start;
  1201. justify-content: space-between;
  1202. .title{
  1203. font-size: 28upx;
  1204. font-family: PingFang SC;
  1205. font-weight: bold;
  1206. color: #111111;
  1207. }
  1208. .views{
  1209. font-size: 24upx;
  1210. font-family: PingFang SC;
  1211. color: #9a9a9c;
  1212. }
  1213. }
  1214. .right{
  1215. image{
  1216. width: 180rpx;
  1217. height: 136rpx;
  1218. background: #F5F6F6;
  1219. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1220. }
  1221. }
  1222. }
  1223. }
  1224. }
  1225. .packages{
  1226. z-index: 101;
  1227. margin: 20rpx 15rpx;
  1228. padding: 20rpx;
  1229. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  1230. background-color: #fff;
  1231. border-radius: 15rpx;
  1232. .title-box{
  1233. display: flex;
  1234. flex-direction: row;
  1235. align-items: center;
  1236. justify-content: space-between;
  1237. .title{
  1238. font-size: 32upx;
  1239. font-family: PingFang SC;
  1240. font-weight: bold;
  1241. color: #111111;
  1242. }
  1243. .more{
  1244. display: flex;
  1245. align-items: center;
  1246. justify-content: flex-end;
  1247. .text{
  1248. font-size: 24rpx;
  1249. font-family: PingFang SC;
  1250. color: #9B9B9B;
  1251. }
  1252. image{
  1253. margin-left: 10rpx;
  1254. width:15rpx;
  1255. height:20rpx;
  1256. }
  1257. }
  1258. }
  1259. .package-box{
  1260. padding: 20rpx 0rpx 0rpx;
  1261. display: flex;
  1262. align-items: flex-start;
  1263. justify-content: flex-start;
  1264. flex-wrap: wrap;
  1265. .item{
  1266. width: calc(50% - 20rpx);
  1267. border-radius: 15rpx;
  1268. margin: 10rpx;
  1269. display: flex;
  1270. flex-direction: column;
  1271. align-items: flex-start;
  1272. justify-content: flex-start;
  1273. &:last-child{
  1274. }
  1275. .top{
  1276. width:100%;
  1277. height:300rpx;
  1278. image{
  1279. border-radius: 15rpx 15rpx 0rpx 0rpx;
  1280. width:100%;
  1281. height:300rpx;
  1282. }
  1283. }
  1284. .bottom{
  1285. width: 100%;
  1286. margin-top: 15rpx;
  1287. .title{
  1288. font-weight: bold;
  1289. font-size: 28upx;
  1290. font-family: PingFang SC;
  1291. color: #111111;
  1292. }
  1293. .price-box{
  1294. margin-top: 10rpx;
  1295. display: flex;
  1296. align-items: center;
  1297. justify-content: space-between;
  1298. width: 100%;
  1299. .price{
  1300. padding: 5rpx 10rpx;
  1301. background-color: #2583EB;
  1302. border-radius: 30rpx;
  1303. font-size: 20upx;
  1304. font-family: PingFang SC;
  1305. color: #ffffff;
  1306. }
  1307. .count{
  1308. font-size: 24upx;
  1309. font-family: PingFang SC;
  1310. color: #333333;
  1311. }
  1312. }
  1313. }
  1314. }
  1315. }
  1316. }
  1317. }
  1318. }
  1319. }
  1320. }
  1321. }
  1322. </style>