netHosIndex.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418
  1. <template>
  2. <view class="tabbar" :style="`padding-top:${statusBarHeight}px`">
  3. <view class="p_inner p_flexCenter">{{ pageTitle }}</view>
  4. <image class="p_back_img" mode="widthFix" :src="iconUrl.home_back_n"></image>
  5. </view>
  6. <view class="p_container" v-if="showCon" :style="`padding-top:${44 + statusBarHeight}px`">
  7. <view class="p_content" :class="{ 'p_bt200': !concerned }">
  8. <image class="p_back_img" mode="widthFix" :src="iconUrl.home_back_n"></image>
  9. <view class="home_con">
  10. <view class="p_search_con p_flexCenter">
  11. <input class="p_search_input" placeholder-class="p_placeholder" placeholder="搜索医生" type="text"
  12. @confirm="inputConfirm" v-model="searchVal" />
  13. </view>
  14. <view class="banner">
  15. <swiper class="swiper" @change="swiperChange" :autoplay="true" circular :interval="5000" :duration="1000">
  16. <swiper-item class="swiper_item" v-for="(item, ind) in bannerList" :key="ind" @click="bannerClkHandle"
  17. :data-item="item">
  18. <image class="banner_img" :src="item.ImgUrl"></image>
  19. </swiper-item>
  20. </swiper>
  21. <view class="dot_list p_flexCenter">
  22. <template v-for="(item, ind) in bannerList" :key="ind">
  23. <view class="dot_item" :class="{ 'dot_item_active': ind == bannerIndex }"></view>
  24. </template>
  25. </view>
  26. </view>
  27. <swiper v-if="false && msgList.length > 0" autoplay vertical circular :interval="6000" :duration="1000"
  28. class="message">
  29. <template>
  30. <template v-if="msgList.length > 0">
  31. <swiper-item class="p_flexCenter" v-for="(item, key) in msgList" :key="key">
  32. <view class="swiper_item_inner p_flexCenter">
  33. <image class="msg_icon" :src="iconUrl.home_msg"></image>
  34. <view class="msg_val">{{ item.backlogTipDiy }}</view>
  35. <view class="msg_btn p_bgcolor p_flexCenter" @click="mesClick">去处理</view>
  36. </view>
  37. </swiper-item>
  38. </template>
  39. <swiper-item v-else class="swiper_item_inner p_flexCenter">
  40. <image class="msg_icon" :src="iconUrl.home_msg"></image>
  41. <view class="msg_val">暂无消息通知</view>
  42. </swiper-item>
  43. </template>
  44. </swiper>
  45. <view class="nav_line" @click="toDoctor" data-selected-type="xgzx" v-if="false">
  46. <image class="item_back" :src="iconUrl.home_xgzx_n"></image>
  47. <view class="item_tit" style="margin-bottom:25upx;">新冠在线咨询</view>
  48. <view class="item_subtit_v2 mb10">在线免费图文咨询</view>
  49. <view class="item_subtit_v2">权威医生在线解答</view>
  50. <view class="item_btn">
  51. 点击咨询 <view class="right-arrow"></view>
  52. </view>
  53. </view>
  54. <view class="nav_list p_flexBetween">
  55. <view class="nav_item" @click="toDoctor" data-selected-type="twzx">
  56. <image class="item_back" :src="iconUrl.home_twzx_n"></image>
  57. <view class="item_tit_v2">图文咨询</view>
  58. <view class="item_subtit">
  59. <view>与医生本人</view>
  60. <view>在线图文沟通</view>
  61. </view>
  62. </view>
  63. <view class="nav_item nav_item_ask" @click="toDoctor" data-selected-type="spzx">
  64. <image class="item_back" :src="iconUrl.home_spzx_n"></image>
  65. <view class="item_tit">视频咨询</view>
  66. <view class="item_subtit">通过视频交流,高效直接更清楚</view>
  67. </view>
  68. </view>
  69. </view>
  70. <!-- 互联网服务 -->
  71. <view class="floot menuServices_box" v-if="menuObj?.Children?.[0]?.Children">
  72. <view class="floot_top displayFlexBetween">
  73. <view class="floot_title">
  74. <view class="floot_titleName">互联网服务</view>
  75. </view>
  76. </view>
  77. <view class="floot_lineFeed displayFlexBetween">
  78. <template v-for="(item, index) in menuObj.Children[0].Children" :key="index">
  79. <view class="floot_list menuList displayFlexCol" v-if="item.IsShow == '1'" :data-item="item"
  80. @click="menuClickFn">
  81. <image class="menuIcon" :src="item.Icon"></image>
  82. <text class="menuText">{{ item.MenuName }}</text>
  83. </view>
  84. </template>
  85. </view>
  86. </view>
  87. <view class="doctor_con" v-if="collectDocList.length > 0">
  88. <view class="nav menu_fifth_title p_flexBetween">
  89. <view class="displayFlexBetween">
  90. <text v-for="(item, index) in doctorTabbar" :key="index"
  91. :class="{ 'doctor_tabbar_active': doctorTabbarIndex == index }" :data-index="index"
  92. @click="choiceTabbar">{{ item }}</text>
  93. </view>
  94. <view class="nav_tip p_color_9 p_flexCenter" @click="contentClick" data-type="collectDocListMore">
  95. <text>更多</text>
  96. <image class="nav_img" :src="iconUrl.home_right"></image>
  97. </view>
  98. </view>
  99. <view class="doctor_swiper p_scroll">
  100. <view class="doctor_item p_flexCenter" v-if="doctorTabbarIndex == 0" v-for="(item, ind) in collectDocList"
  101. :key="ind" @click="toDoctorInfo" :data-item="item">
  102. <view class="p_doctor_img_con">
  103. <image class="p_doctor_img" :src="item.DoctorPhotourl"></image>
  104. </view>
  105. <view class="p_doctor_infocon">
  106. <view class="p_doctor_tit p_flexBetween">
  107. <view class="p_doctor_name p_lineClamp">{{ item.DoctorName }}</view>
  108. <view class="p_doctor_tip p_flexCenter">
  109. <image class="p_doctor_star" :src="iconUrl.home_star"></image>
  110. <text class="p_doctor_starval">{{ item.scoreDiy }}</text>
  111. </view>
  112. </view>
  113. <view class="p_doctor_info p_color_6 doctor_info">{{ item.LczcName }} {{ item.DeptName }}</view>
  114. </view>
  115. </view>
  116. <view class="displayFlexBetween" v-if="doctorTabbarIndex == 1" style="width: 100%">
  117. <template v-for="(item, index) in groupList" :key="index">
  118. <view class="menu_fifth_doctor_group displayFlexCol" v-if="index < 2" :data-item="item"
  119. @click="jumpGroupInfo">
  120. <image class="group_photo" :src="item.GroupUrl" mode="" />
  121. <view class="group_name displayFlexRow backgroundCustom">
  122. <text>{{ item.GroupName }}</text>
  123. </view>
  124. </view>
  125. </template>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="recommendDoc_con" v-if="doctorList.length > 0">
  130. <view class="nav p_flexBetween">
  131. <view class="nav_tit">名医推荐</view>
  132. </view>
  133. <view class="rec_inner">
  134. <view class="p_doctor_item p_flexCenter" v-for="(item, ind) in doctorList" :key="ind" @click="toDoctorInfo"
  135. :data-item="item">
  136. <view class="p_doctor_img_con">
  137. <image class="p_doctor_img" :src="item.DoctorPhotourl"></image>
  138. </view>
  139. <view class="p_doctor_item_con p_border_bottom">
  140. <view class="p_flexBetween">
  141. <view class="p_doctor_infocon">
  142. <view class="p_doctor_tit">
  143. <view class="p_doctor_name">{{ item.DoctorName }}</view>
  144. <view class="p_doctor_tip p_flexCenter">
  145. <image class="p_doctor_star" :src="iconUrl.home_star"></image>
  146. <text class="p_doctor_starval">{{ item.scoreDiy }}</text>
  147. </view>
  148. </view>
  149. <view class="p_doctor_info p_color_4d lineHeight">{{ item.TitleName }} {{ item.DeptName }}</view>
  150. </view>
  151. <view class="p_doctor_btn p_flexCenter">
  152. <view class="p_color" style="position: relative;z-index: 1;font-weight: bold;">快速问诊</view>
  153. <image class="p_doctor_btn_img" :src="iconUrl.home_tip_n"></image>
  154. </view>
  155. </view>
  156. <view class="p_doctor_item_introduce p_color_8a p_lineClamp lineHeight">
  157. 擅长:{{ item.DoctorSkill }}
  158. </view>
  159. <view class="p_doctor_item_describe lineHeight">
  160. 接诊量
  161. <text class="p_color font_bold">{{ item.ConsultAmount }}</text><text class="p_color_9"></text>
  162. 好评率
  163. <text class="p_color font_bold">{{ item.percentage }}</text>
  164. </view>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. </template>
  172. <script lang="ts" setup>
  173. import { getCurrentInstance, ref } from 'vue';
  174. import { onShow } from '@dcloudio/uni-app';
  175. import { useOnLoad, useIsToAuthPage, useDomain } from '@/hook';
  176. import { common, menuClick } from '@/utils';
  177. import icon from '@/utils/icon';
  178. import { REQUEST_CONFIG } from '@/config';
  179. import {
  180. queryConsultDeptList,
  181. queryRcmdConsultDoctorList,
  182. queryUserCollect,
  183. queryBackLogMsg,
  184. queryBDoctorList,
  185. queryConsultWaterList,
  186. queryArticleList,
  187. queryConsultDoctorGroup,
  188. saveConsultVisit
  189. } from '../../../service/base';
  190. const { proxy } = getCurrentInstance() as any;
  191. const app = getApp();
  192. // 响应式数据
  193. const iconUrl = ref(icon);
  194. const bannerList = ref<any[]>([]);
  195. const bannerIndex = ref(0);
  196. const doctorTabbar = ref(['关注的医生', '关注的团队']);
  197. const doctorTabbarIndex = ref(0);
  198. const groupList = ref<any[]>([]);
  199. const deptList = ref<any[]>([]);
  200. const doctorList = ref<any[]>([]);
  201. const collectDocList = ref<any[]>([]);
  202. const showCon = ref(false);
  203. const msgList = ref<any[]>([]);
  204. const searchVal = ref('');
  205. const statusBarHeight = ref(20);
  206. const pageTitle = ref('互联网医疗服务平台');
  207. const menuObj = ref<any>({});
  208. const concerned = ref(false);
  209. const options = ref<any>({});
  210. /** 页面初始加载 */
  211. useOnLoad(async (loadOptions) => {
  212. options.value = loadOptions || {};
  213. deptList.value = [];
  214. if (useIsToAuthPage()) {
  215. return;
  216. }
  217. siteFn();
  218. });
  219. /** 切换tabbar */
  220. const choiceTabbar = (e: any) => {
  221. const index = e.currentTarget?.dataset?.index;
  222. if (index == 1) {
  223. // 查询咨询医生组
  224. queryConsultDoctorGroupFn();
  225. }
  226. doctorTabbarIndex.value = index;
  227. };
  228. // 查询咨询医生组
  229. const queryConsultDoctorGroupFn = async () => {
  230. const data = {
  231. IsMemberCollect: 1
  232. };
  233. let { resp, resData } = await queryConsultDoctorGroup(data);
  234. if (common.isNotEmpty(resp)) {
  235. groupList.value = resp;
  236. } else {
  237. groupList.value = [];
  238. }
  239. };
  240. onShow(() => {
  241. statusBarHeight.value = app.globalData.statusBarHeight || 20;
  242. showFn();
  243. });
  244. // 埋点
  245. const siteFn = async () => {
  246. if (app.globalData.logSuccess) {
  247. saveConsultVisitFn('26');
  248. } else {
  249. app.siteCallBack = saveConsultVisitFn.bind(null, '26');
  250. }
  251. };
  252. const showFn = async () => {
  253. /**H5回跳后重新登录 */
  254. if (options.value.h5Login) {
  255. await app.main();
  256. }
  257. if (app.globalData.logSuccess) {
  258. main();
  259. } else {
  260. app.loginReadyCallBack = main;
  261. }
  262. };
  263. const main = async () => {
  264. // 深拷贝 否则影响morePage更多页面
  265. let menuObjData: any = {};
  266. const menuList = uni.getStorageSync('menuList');
  267. if (!common.isEmpty(menuList)) {
  268. menuObjData = common.deepCopy(menuList.filter((item: any) => item.MenuName == 'netHosPage')[0], {});
  269. }
  270. common.showLoading();
  271. queryConsultWaterListFn();
  272. let deptListData: any[] = [];
  273. let doctorListData: any[] = [];
  274. let collectDocListData: any[] = [];
  275. let msgListData: any[] = [];
  276. const requestOptions = {
  277. showLoading: false
  278. };
  279. // 查询推荐科室
  280. const deptListRequestData = {
  281. HosId: app.globalData.districtId || app.globalData.hosId,
  282. IsRcmd: '1'
  283. };
  284. const queryConsultDeptListPromise = queryConsultDeptList(deptListRequestData);
  285. // 查询推荐医生
  286. const queryRcmdConsultDoctorListPromise = queryRcmdConsultDoctorList(deptListRequestData);
  287. // 查询关注医生
  288. const collectData = {
  289. resourceType: '1'
  290. };
  291. const queryUserCollectPromise = queryUserCollect(collectData);
  292. const backLogData = {
  293. OpenId: uni.getStorageSync('openid'),
  294. BusinessId: '',
  295. BacklogType: '', //1咨询申请2咨询消息3随访消息4医患申请5日程计划
  296. ReadState: '1', //1未读 2已读
  297. UserType: '1', //1.就诊人,2.医生
  298. IsGroup: '1' //是否分组
  299. };
  300. const queryBackLogMsgPromise = queryBackLogMsg(backLogData);
  301. const [
  302. { resp: deptListResp },
  303. { resp: doctorListResp },
  304. { resp: collectListResp },
  305. { resp: backLogMsgResp }
  306. ] = await Promise.all([
  307. queryConsultDeptListPromise,
  308. queryRcmdConsultDoctorListPromise,
  309. queryUserCollectPromise,
  310. queryBackLogMsgPromise
  311. ]);
  312. getBannerImg();
  313. deptListData = deptListResp || [];
  314. doctorListData = doctorListResp || [];
  315. if (!common.isEmpty(backLogMsgResp)) {
  316. let filteredBackLog = backLogMsgResp.filter((item: any) => item.Status == '1');
  317. if (!common.isEmpty(filteredBackLog)) {
  318. filteredBackLog.map((item: any) => {
  319. const { msgKeyList } = app.globalData;
  320. if (msgKeyList) {
  321. for (let i of msgKeyList) {
  322. if (item.BacklogType == i.backlogType) {
  323. item.backlogTitleDiy = i.title;
  324. item.backlogTipDiy = i.content;
  325. }
  326. }
  327. }
  328. });
  329. msgListData = filteredBackLog;
  330. }
  331. }
  332. if (!common.isEmpty(collectListResp)) {
  333. const arr: string[] = [];
  334. for (let i = 0; i < collectListResp.length; i++) {
  335. arr.push(collectListResp[i].ResourceId);
  336. }
  337. const queryBDoctorListData = {
  338. DoctorUid: arr.join()
  339. };
  340. let { resp: collectDocListResp } = await queryBDoctorList(queryBDoctorListData);
  341. common.hideLoading();
  342. if (!common.isEmpty(collectDocListResp)) {
  343. collectDocListData = collectDocListResp;
  344. }
  345. } else {
  346. common.hideLoading();
  347. }
  348. menuObj.value = menuObjData;
  349. deptList.value = deptListData;
  350. doctorList.value = doctorListHandle(doctorListData);
  351. collectDocList.value = doctorListHandle(collectDocListData);
  352. showCon.value = true;
  353. msgList.value = msgListData;
  354. // 查询咨询医生组
  355. queryConsultDoctorGroupFn();
  356. };
  357. const queryConsultWaterListFn = async () => {
  358. const queryData = {
  359. ConsultStartDate: common.getDate(),
  360. ConsultEndDate: common.getDate(),
  361. ConsultStatus: '16'
  362. };
  363. let { resp, resData } = await queryConsultWaterList(queryData);
  364. if (!common.isEmpty(resp)) {
  365. common.showModal(
  366. `尊敬的患者,您已预约视频问诊,请点击该提示跳转到签到页面在就诊前30分钟完成在线签到`,
  367. () => {
  368. const item: any = {};
  369. item.Url = `/pagesNetHos/st1/business/enquire/enquireList/enquireList?consultType=2&pageType=2`;
  370. menuClick(item, proxy);
  371. },
  372. { cancelText: '取消', confirmText: '跳转' }
  373. );
  374. }
  375. };
  376. /**
  377. * 查询文章列表,获取轮播图
  378. */
  379. const getBannerImg = async () => {
  380. /**首页轮播 */
  381. const data = {
  382. //0 新闻动态;1 通知公告;2 健康宣教;3 就诊指南;4 住院需知 62 首页banner
  383. TypeClass: 62,
  384. // 1已发布
  385. Status: 1,
  386. //1链接
  387. Type: 1
  388. };
  389. let { resp, resData } = await queryArticleList(data);
  390. let bannerListData: any[] = [];
  391. if (common.isNotEmpty(resp)) {
  392. const domain = useDomain();
  393. resp.forEach((item: any) => {
  394. if (item.ImgUrl && item.ImgUrl.indexOf('http') === -1) {
  395. item.ImgUrl = `${domain}${item.ImgUrl.substring(1).replace(/\/\//g, '/')}`;
  396. }
  397. // 兼容原代码中的 BigImgUrl 字段
  398. item.BigImgUrl = item.ImgUrl;
  399. });
  400. bannerListData = resp;
  401. }
  402. bannerList.value = bannerListData;
  403. };
  404. // 点击事件
  405. const contentClick = (e: any) => {
  406. const { type } = e.currentTarget?.dataset || {};
  407. console.log(type,'type')
  408. let url: string | undefined;
  409. if (type == 'collectDocListMore') {
  410. // 点击更多关注医生
  411. url = `/pagesNetHos/st1/business/other/doctorLike/doctorLike`;
  412. }
  413. if (url) {
  414. const data = {
  415. Url: url
  416. };
  417. menuClick(data, proxy);
  418. }
  419. };
  420. // 前往医生列表
  421. const toDoctor = (e: any) => {
  422. const { selectedType } = e.currentTarget?.dataset || {};
  423. let data: any;
  424. if (selectedType == 'zxxf') {
  425. // 在线续方
  426. data = { Url: `/pages/st1/business/continuation/continuationList/continuationList` };
  427. } else if (selectedType == 'xgzx') {
  428. // 新冠咨询
  429. } else {
  430. // twzx spzx 图文咨询 视频咨询
  431. data = {
  432. Url: `/pagesNetHos/st1/business/doctor/doctorList/doctorList?selectedType=${selectedType}`
  433. };
  434. }
  435. if (data) {
  436. menuClick(data, proxy);
  437. }
  438. };
  439. // 前往医生详情
  440. const toDoctorInfo = (e: any) => {
  441. const queryBean = common.stringify(e.currentTarget?.dataset?.item);
  442. const data = {
  443. Url: `/pagesNetHos/st1/business/doctor/doctorInfo/doctorInfo?queryBean=${queryBean}`
  444. };
  445. console.log(data,'data')
  446. menuClick(data, proxy);
  447. };
  448. // 搜索
  449. const inputConfirm = (e: any) => {
  450. const value = e.detail.value;
  451. if (value) {
  452. const data = {
  453. Url: `/pagesNetHos/st1/business/doctor/doctorList/doctorList?searchValue=${value}`
  454. };
  455. menuClick(data, proxy);
  456. searchVal.value = '';
  457. }
  458. };
  459. // 轮播图更改
  460. const swiperChange = (e: any) => {
  461. if (e.detail.source == 'touch') {
  462. bannerIndex.value = e.detail.current;
  463. }
  464. };
  465. // banner图片点击
  466. const bannerClkHandle = async (e: any) => {
  467. return;
  468. /**需要判断就诊人 和公众号授权*/
  469. if (useIsToAuthPage()) {
  470. return;
  471. }
  472. const { item } = e.currentTarget?.dataset || {};
  473. if (item?.LinkUrl) {
  474. if (item.LinkUrl.indexOf('http') > -1) {
  475. common.goToUrl('/pages/st1/blue/business/h5/h5/h5?url=' + item.LinkUrl);
  476. } else {
  477. // 处理其他链接逻辑
  478. common.goToUrl(item.LinkUrl);
  479. }
  480. }
  481. };
  482. // 消息点击
  483. const mesClick = () => {
  484. common.goToUrl(`/pages/st1/blue/business/tabbar/message/message`, {
  485. skipWay: 'reLaunch'
  486. });
  487. };
  488. // 添加埋点(互联网)
  489. // type 26:患者端 27:医生端 28:患者端添加就诊人
  490. const saveConsultVisitFn = (type: string) => {
  491. const data = {
  492. Type: type
  493. };
  494. saveConsultVisit(data);
  495. };
  496. // 处理医生返回值
  497. const doctorListHandle = (list: any[]) => {
  498. if (common.isEmpty(list)) {
  499. return list;
  500. }
  501. const domain = useDomain();
  502. for (let i of list) {
  503. if (i.DoctorPhotourl) {
  504. if (i.DoctorPhotourl.indexOf('http') === -1) {
  505. i.DoctorPhotourl = `${domain}${i.DoctorPhotourl.replace(/\\/g, '/')}`;
  506. }
  507. } else {
  508. i.DoctorPhotourl = icon.equire_doctor;
  509. }
  510. // 计算价格
  511. i.phoneFeeDiy = i.PhoneFee ? common.centToYuan(i.PhoneFee).toFixed(2) : 0;
  512. i.videoFeeDiy = i.VideoFee ? common.centToYuan(i.VideoFee).toFixed(2) : 0;
  513. i.consultFeeDiy = i.ConsultFee ? common.centToYuan(i.ConsultFee).toFixed(2) : 0;
  514. let AvgAppraiseScore = '-';
  515. // 用于做排序判断
  516. let AvgAppraiseScoreTag = 0;
  517. if (i.AppraiseCount > 0 && i.AppraiseScore > 0) {
  518. AvgAppraiseScore = ((i.AppraiseScore / i.AppraiseCount / 5) * 100).toFixed(0) + '%';
  519. AvgAppraiseScoreTag = ((i.AppraiseScore / i.AppraiseCount / 5) * 100).toFixed(0);
  520. }
  521. i.AvgAppraiseScore = AvgAppraiseScore;
  522. i.AvgAppraiseScoreTag = AvgAppraiseScoreTag;
  523. // 计算好评率
  524. if (true) {
  525. const highCount =
  526. app.globalData.config.net_pageConfiguration_patient.currency_config.iniHighAppraiseCount +
  527. i.HighAppraiseCountCons;
  528. const totalCount =
  529. app.globalData.config.net_pageConfiguration_patient.currency_config.iniHighAppraiseCount +
  530. (i.AppraiseCount !== undefined ? i.AppraiseCount : i.AppraiseCountCons);
  531. const percentage = (highCount / totalCount) * 100;
  532. if (Number.isNaN(percentage)) {
  533. i.percentage = '100%';
  534. } else {
  535. i.percentage = Math.ceil(percentage) + '%';
  536. }
  537. }
  538. i.scoreDiy = '5.0';
  539. if (
  540. (i.AppraiseCount !== undefined ? i.AppraiseCount : i.AppraiseCountCons) &&
  541. (i.AppraiseScore !== undefined ? i.AppraiseScore : i.AppraiseScoreCons)
  542. ) {
  543. // 评分
  544. i.scoreDiy = (
  545. (i.AppraiseScore !== undefined ? i.AppraiseScore : i.AppraiseScoreCons) /
  546. (i.AppraiseCount !== undefined ? i.AppraiseCount : i.AppraiseCountCons)
  547. ).toFixed(1);
  548. }
  549. if (i.AppraiseRule) {
  550. try {
  551. i.AppraiseRule = JSON.parse(i.AppraiseRule);
  552. } catch (err) {
  553. console.log('i.AppraiseRule格式化失败');
  554. }
  555. }
  556. try {
  557. i.DoctorName = i.DoctorName.split('-')[0];
  558. } catch (err) {}
  559. }
  560. return list;
  561. };
  562. /** 跳转团队主页 */
  563. const jumpGroupInfo = (e: any) => {
  564. const item = e.currentTarget?.dataset?.item;
  565. const url = `/pagesNetHos/st1/business/doctorGroup/doctorGroupInfo/doctorGroupInfo?groupId=${item.GroupId}`;
  566. common.goToUrl(url);
  567. };
  568. /**
  569. * 菜单点击
  570. */
  571. const menuClickFn = (e: any) => {
  572. console.log(e);
  573. menuClick(e, proxy);
  574. };
  575. </script>
  576. <style lang="scss" scoped>
  577. .p_content {
  578. padding: 20upx 30upx 30upx;
  579. }
  580. .home_con {
  581. padding: 20upx 0 1px;
  582. margin-bottom: 30upx;
  583. overflow: hidden;
  584. }
  585. .banner {
  586. width: 100%;
  587. height: 240upx;
  588. position: relative;
  589. margin: 30upx 0;
  590. }
  591. .swiper {
  592. width: 100%;
  593. height: 100%;
  594. }
  595. .dot_list {
  596. position: absolute;
  597. left: 50%;
  598. bottom: 12upx;
  599. transform: translateX(-50%);
  600. }
  601. .dot_item {
  602. width: 6upx;
  603. height: 6upx;
  604. background: #ffffff;
  605. opacity: 0.8;
  606. margin-right: 8upx;
  607. border-radius: 50px;
  608. }
  609. .dot_item_active {
  610. width: 12upx;
  611. }
  612. .message {
  613. width: 100%;
  614. height: 110upx;
  615. background: rgba(242, 248, 255, 1);
  616. border-radius: 10upx;
  617. padding: 0 33upx;
  618. margin: 20upx 0;
  619. box-sizing: border-box;
  620. }
  621. .swiper_item_inner {
  622. width: 100%;
  623. }
  624. .banner_img {
  625. border-radius: 26upx;
  626. }
  627. .msg_icon {
  628. width: 44upx;
  629. height: 44upx;
  630. margin-right: 28upx;
  631. flex-shrink: 0;
  632. }
  633. .msg_val {
  634. width: 100%;
  635. overflow: hidden;
  636. text-overflow: ellipsis;
  637. white-space: nowrap;
  638. word-break: break-word;
  639. }
  640. .msg_btn {
  641. font-size: 26upx;
  642. width: 108upx;
  643. height: 52upx;
  644. border-radius: 8px;
  645. margin-left: 24upx;
  646. flex-shrink: 0;
  647. }
  648. .nav_list {
  649. margin: 20upx 0 0;
  650. flex-wrap: wrap;
  651. }
  652. .nav_item {
  653. width: 335upx;
  654. height: 192upx;
  655. padding: 30upx 32upx;
  656. position: relative;
  657. border-radius: 20upx;
  658. }
  659. .nav_item_n {
  660. margin-top: 20upx;
  661. }
  662. .nav_line {
  663. width: 100%;
  664. height: 360upx;
  665. padding: 30upx 32upx;
  666. position: relative;
  667. border-radius: 20upx;
  668. }
  669. .item_btn {
  670. padding: 8upx 16upx 8upx 21upx;
  671. border-radius: 50px;
  672. color: #fff;
  673. font-size: 32upx;
  674. position: absolute;
  675. bottom: 40upx;
  676. left: 32upx;
  677. border: 1px solid rgba(255, 255, 255, 0.6);
  678. }
  679. .right-arrow {
  680. width: 7px;
  681. height: 7px;
  682. border-top: 2px solid #fff;
  683. border-right: 2px solid #fff;
  684. transform: rotate(45deg) translateY(0upx) translateX(-7upx);
  685. display: inline-block;
  686. align-items: center;
  687. }
  688. .item_back {
  689. position: absolute;
  690. top: 0;
  691. left: 0;
  692. width: 100%;
  693. height: 100%;
  694. }
  695. .nav_item_ask {
  696. background: #31cf94;
  697. }
  698. .item_tit {
  699. font-size: 44upx;
  700. font-weight: 500;
  701. color: #ffffff;
  702. line-height: 1em;
  703. margin-bottom: 18upx;
  704. position: relative;
  705. }
  706. .item_tit_v2 {
  707. font-size: 40upx;
  708. font-weight: 500;
  709. color: #ffffff;
  710. line-height: 1em;
  711. margin-bottom: 18upx;
  712. position: relative;
  713. }
  714. .item_subtit {
  715. font-size: 28upx;
  716. font-family: PingFang SC;
  717. color: #ffffff;
  718. line-height: 36upx;
  719. opacity: 0.6;
  720. position: relative;
  721. }
  722. .item_subtit_v2 {
  723. font-size: 30upx;
  724. font-family: PingFang SC;
  725. color: #ffffff;
  726. line-height: 36upx;
  727. opacity: 0.6;
  728. position: relative;
  729. }
  730. .item_btn_ask {
  731. box-shadow: 0px 4upx 10upx 0px rgba(50, 207, 148, 0.8);
  732. }
  733. .btn_val {
  734. font-size: 24upx;
  735. font-weight: 500;
  736. color: #ffffff;
  737. margin-right: 8upx;
  738. }
  739. .btn_right {
  740. width: 12upx;
  741. height: 12upx;
  742. }
  743. .item_img {
  744. position: absolute;
  745. right: 0;
  746. bottom: 0;
  747. width: 140upx;
  748. height: 132upx;
  749. }
  750. .doctor_con {
  751. margin-top: 20upx;
  752. background-color: #fff;
  753. overflow: hidden;
  754. border-radius: 24upx;
  755. }
  756. .doctor_con .nav {
  757. padding-bottom: 20upx;
  758. }
  759. .nav {
  760. padding: 34upx 30upx 40upx;
  761. line-height: 1em;
  762. }
  763. .nav_tit {
  764. font-size: 40upx;
  765. font-weight: 500;
  766. }
  767. .nav_img {
  768. width: 20upx;
  769. height: 20upx;
  770. margin-left: 8upx;
  771. }
  772. .menu_fifth_title {
  773. width: 100%;
  774. }
  775. .menu_fifth_title view:nth-child(1) {
  776. width: 50%;
  777. font-size: 30upx;
  778. }
  779. .menu_fifth_title view:nth-child(1) text {
  780. color: #666;
  781. }
  782. .menu_fifth_title view:nth-child(2) {
  783. font-size: 26upx;
  784. }
  785. .menu_fifth_title view:nth-child(2) text {
  786. margin-right: 10upx;
  787. }
  788. .doctor_tabbar_active {
  789. font-weight: bold;
  790. color: #333 !important;
  791. }
  792. .menu_fifth_doctor_group {
  793. width: 49%;
  794. border-radius: 20upx;
  795. overflow: hidden;
  796. }
  797. .group_photo {
  798. width: 100%;
  799. height: 130upx;
  800. background: #f0f0f0;
  801. }
  802. .group_name {
  803. width: 100%;
  804. padding: 10upx 0;
  805. }
  806. .doctor_swiper {
  807. white-space: nowrap;
  808. padding: 20upx 30upx 40upx;
  809. }
  810. .doctor_item {
  811. width: 380upx;
  812. height: 160upx;
  813. display: inline-flex;
  814. background: #ffffff;
  815. box-shadow: 0px 0px 30upx 0upx rgba(0, 0, 0, 0.06);
  816. border-radius: 10upx;
  817. margin-right: 20upx;
  818. padding: 0 24upx;
  819. }
  820. .doctor_item:nth-last-child(1) {
  821. margin-right: 0;
  822. }
  823. .special_con {
  824. margin-top: 20upx;
  825. background-color: #fff;
  826. overflow: hidden;
  827. }
  828. .special_inner {
  829. padding: 0 30upx 40upx;
  830. white-space: nowrap;
  831. }
  832. .special_item {
  833. width: 280upx;
  834. height: 200upx;
  835. background: #95adff;
  836. border-radius: 10px;
  837. padding: 24upx;
  838. display: inline-block;
  839. margin-right: 20upx;
  840. }
  841. .special_item:nth-last-child(1) {
  842. margin-right: 0;
  843. }
  844. .special_item_tit {
  845. font-size: 32upx;
  846. font-family: Source Han Sans CN;
  847. font-weight: 500;
  848. color: #ffffff;
  849. }
  850. .special_item_subtit {
  851. font-size: 24upx;
  852. font-family: Source Han Sans CN;
  853. font-weight: 400;
  854. color: #ffffff;
  855. }
  856. .dept_con {
  857. margin-top: 20upx;
  858. background-color: #fff;
  859. overflow: hidden;
  860. }
  861. .dept_inner {
  862. padding: 0 30upx 40upx;
  863. white-space: nowrap;
  864. }
  865. .dept_item {
  866. display: inline-flex;
  867. margin-right: 92upx;
  868. }
  869. .dept_item:nth-last-child(1) {
  870. margin-right: 0;
  871. }
  872. .dept_item_img {
  873. width: 56upx;
  874. height: 56upx;
  875. margin-bottom: 16upx;
  876. }
  877. .dept_item_tit {
  878. font-size: 28upx;
  879. line-height: 1em;
  880. }
  881. .pharmacy_con {
  882. margin-top: 20upx;
  883. background-color: #fff;
  884. overflow: hidden;
  885. border-radius: 24upx;
  886. margin-bottom: 30upx;
  887. }
  888. .pharmacy_inner {
  889. padding: 0 30upx 40upx;
  890. white-space: nowrap;
  891. }
  892. .pharmacy_item {
  893. width: 20%;
  894. }
  895. .pharmacy_item:nth-last-child(1) {
  896. margin-right: 0;
  897. }
  898. .pharmacy_item_img {
  899. width: 88upx;
  900. height: 88upx;
  901. margin-bottom: 16upx;
  902. }
  903. .pharmacy_item_tit {
  904. font-size: 24upx;
  905. line-height: 2em;
  906. }
  907. .recommendDoc_con {
  908. background-color: #fff;
  909. overflow: hidden;
  910. margin-top: 20upx;
  911. border-radius: 24upx;
  912. }
  913. .recommendDoc_con .nav {
  914. padding-bottom: 0;
  915. }
  916. .health_con {
  917. margin-top: 20upx;
  918. background-color: #fff;
  919. overflow: hidden;
  920. }
  921. .health_con .nav {
  922. padding-bottom: 0;
  923. }
  924. .health_inner {
  925. padding: 0 30upx;
  926. }
  927. .health_inner:nth-last-child(1) .health_inner_border::before {
  928. border-bottom: 0;
  929. }
  930. .health_val {
  931. width: 100%;
  932. }
  933. .health_val {
  934. margin-right: 30upx;
  935. }
  936. .health_val_tit {
  937. font-size: 32upx;
  938. }
  939. .health_val_time {
  940. font-size: 24upx;
  941. margin-top: 20upx;
  942. }
  943. .health_img {
  944. width: 210upx;
  945. height: 140upx;
  946. border-radius: 12upx;
  947. flex-shrink: 0;
  948. margin: 32upx 0;
  949. }
  950. .doctor_info {
  951. width: 210upx;
  952. overflow: hidden;
  953. text-overflow: ellipsis;
  954. white-space: nowrap;
  955. word-break: break-word;
  956. }
  957. .home_help {
  958. position: fixed;
  959. width: 150upx;
  960. height: 162upx;
  961. bottom: 177upx;
  962. right: 0;
  963. }
  964. .p_doctor_name {
  965. max-width: 4em;
  966. -webkit-line-clamp: 1;
  967. font-weight: bold;
  968. }
  969. .back_tit {
  970. width: 671upx;
  971. height: 62upx;
  972. position: relative;
  973. z-index: 1;
  974. margin: 0 0 0 6px;
  975. }
  976. .p_doctor_item {
  977. margin: 0;
  978. padding: 50upx 40upx 0 30upx;
  979. align-items: flex-start !important;
  980. background-color: #fff;
  981. border-radius: 24upx;
  982. }
  983. .p_doctor_item:nth-child(1) {
  984. margin: 0;
  985. padding: 40upx 40upx 0 30upx;
  986. }
  987. .p_doctor_item_con {
  988. padding-bottom: 50upx;
  989. width: 100%;
  990. }
  991. .font_bold {
  992. font-weight: bold;
  993. }
  994. .mb10 {
  995. margin-bottom: 10upx;
  996. }
  997. .p_inner {
  998. width: 100%;
  999. height: 100%;
  1000. position: relative;
  1001. z-index: 1;
  1002. }
  1003. /* 背景图 */
  1004. .p_back_img {
  1005. position: absolute;
  1006. top: 0;
  1007. left: 0;
  1008. width: 100%;
  1009. }
  1010. .p_container {
  1011. height: 100% !important;
  1012. background-color: #f0f1f6;
  1013. color: #333333;
  1014. font-family: Source Han Sans CN;
  1015. font-size: 0;
  1016. }
  1017. .p_content {
  1018. display: inline-block;
  1019. width: 100%;
  1020. font-size: 30upx;
  1021. background-color: #f0f1f6;
  1022. }
  1023. /* 搜索框 */
  1024. .p_search_con {
  1025. width: 100%;
  1026. height: 76upx;
  1027. background: #f0f1f6;
  1028. border-radius: 38upx;
  1029. margin-bottom: 20upx;
  1030. position: relative;
  1031. }
  1032. .p_flexCenter,
  1033. .displayFlexRow {
  1034. display: flex;
  1035. align-items: center;
  1036. justify-content: center;
  1037. }
  1038. .p_search_input {
  1039. width: 100%;
  1040. text-align: center;
  1041. }
  1042. .p_placeholder {
  1043. font-size: 30upx;
  1044. font-family: Source Han Sans CN;
  1045. font-weight: 400;
  1046. color: #999999;
  1047. }
  1048. /* 背景色 */
  1049. .p_bgcolor,
  1050. .backgroundCustom {
  1051. background-color: #02c28a !important;
  1052. color: #fff !important;
  1053. }
  1054. .p_flexBetween,
  1055. .displayFlexBetween {
  1056. display: flex;
  1057. align-items: center;
  1058. justify-content: space-between;
  1059. }
  1060. /* 滚动 */
  1061. .p_scroll {
  1062. display: flex;
  1063. overflow: auto;
  1064. -webkit-overflow-scrolling: touch;
  1065. }
  1066. .p_doctor_img_con {
  1067. width: 88upx;
  1068. height: 88upx;
  1069. border-radius: 50upx;
  1070. position: relative;
  1071. margin-right: 20upx;
  1072. flex-shrink: 0;
  1073. margin-top: 4px;
  1074. }
  1075. .p_doctor_img {
  1076. border-radius: 50%;
  1077. }
  1078. .p_doctor_infocon {
  1079. width: 100%;
  1080. }
  1081. .p_doctor_tit {
  1082. display: flex;
  1083. align-items: center;
  1084. }
  1085. .p_lineClamp {
  1086. overflow: hidden;
  1087. text-overflow: ellipsis;
  1088. display: -webkit-box;
  1089. -webkit-line-clamp: 2;
  1090. -webkit-box-orient: vertical;
  1091. }
  1092. .p_doctor_tip {
  1093. height: 32upx;
  1094. background: #fff0e1;
  1095. padding: 0 12upx;
  1096. margin-left: 16upx;
  1097. border-radius: 50px;
  1098. }
  1099. .p_doctor_star {
  1100. width: 24upx;
  1101. height: 24upx;
  1102. }
  1103. .p_doctor_starval {
  1104. font-size: 26upx;
  1105. font-family: DINPro;
  1106. font-weight: 500;
  1107. color: #ff9d35;
  1108. margin-left: 9upx;
  1109. }
  1110. .p_doctor_info {
  1111. font-size: 28upx;
  1112. margin-top: 8upx;
  1113. }
  1114. .p_flexCenterCol,
  1115. .displayFlexCol {
  1116. display: flex;
  1117. align-items: center;
  1118. flex-direction: column;
  1119. justify-content: center;
  1120. }
  1121. .p_doctor_btn {
  1122. min-width: 144upx;
  1123. height: 52upx;
  1124. border-radius: 8px;
  1125. font-size: 28upx;
  1126. color: #ffffff;
  1127. padding: 0 17upx;
  1128. position: relative;
  1129. margin-bottom: 10upx;
  1130. margin-right: -5upx;
  1131. }
  1132. /* 快速问诊按钮 */
  1133. .p_doctor_btn_img {
  1134. position: absolute;
  1135. width: 100%;
  1136. height: 100%;
  1137. border-radius: 26upx;
  1138. top: 0;
  1139. left: 0;
  1140. }
  1141. .p_doctor_item_introduce {
  1142. font-size: 24upx;
  1143. margin: 10upx 0;
  1144. }
  1145. .p_color_8a {
  1146. color: #8a8a99 !important;
  1147. }
  1148. .p_doctor_item_describe {
  1149. font-size: 28upx;
  1150. color: #333333;
  1151. }
  1152. /* tabbar */
  1153. .tabbar {
  1154. height: 44px;
  1155. line-height: 44px;
  1156. text-align: center;
  1157. color: #222;
  1158. box-sizing: content-box;
  1159. font-size: 32upx;
  1160. font-weight: 500;
  1161. background: #f0f1f6;
  1162. width: 100%;
  1163. position: fixed;
  1164. z-index: 10;
  1165. top: 0;
  1166. left: 0;
  1167. overflow: hidden;
  1168. }
  1169. .iconCon {
  1170. width: 87upx;
  1171. height: 40px;
  1172. position: absolute;
  1173. left: 0;
  1174. top: 0;
  1175. bottom: 0;
  1176. margin: auto 0;
  1177. z-index: 1;
  1178. }
  1179. .iconLeft {
  1180. width: 12px;
  1181. height: 12px;
  1182. border-top: 2px solid;
  1183. border-left: 2px solid;
  1184. color: #222;
  1185. transform: rotateZ(-45deg);
  1186. position: absolute;
  1187. top: 2px;
  1188. left: 0;
  1189. bottom: 0;
  1190. right: 0;
  1191. margin: auto;
  1192. }
  1193. .p_search_con {
  1194. background-color: #fff;
  1195. }
  1196. .p_color_9 {
  1197. color: #999999 !important;
  1198. }
  1199. /* 字体颜色 */
  1200. .p_color,
  1201. .colorCustom {
  1202. color: #02c28a !important;
  1203. }
  1204. .nav {
  1205. padding: 34upx 30upx 40upx;
  1206. line-height: 1em;
  1207. }
  1208. .p_border_bottom,
  1209. .border_bottom {
  1210. position: relative;
  1211. }
  1212. .p_border_bottom::before,
  1213. .border_bottom::before {
  1214. content: ' ';
  1215. position: absolute;
  1216. left: 0;
  1217. bottom: 0;
  1218. width: 100%;
  1219. height: 1px;
  1220. border-bottom: 1px solid #e6e6e6;
  1221. -webkit-transform-origin: 0 0;
  1222. transform-origin: 0 0;
  1223. -webkit-transform: scaleY(0.5);
  1224. transform: scaleY(0.5);
  1225. }
  1226. .p_color_4d {
  1227. color: #4d4d54 !important;
  1228. }
  1229. .lineHeight {
  1230. line-height: 1.4em;
  1231. }
  1232. .floot {
  1233. background-color: #fff;
  1234. border-radius: 24upx;
  1235. }
  1236. .floot_top {
  1237. padding: 37upx 30upx 0 34upx;
  1238. }
  1239. .floot_title {
  1240. position: relative;
  1241. font-size: 32upx;
  1242. font-family: PingFang SC;
  1243. font-weight: 800;
  1244. color: #222326;
  1245. }
  1246. .floot_title::after {
  1247. content: '';
  1248. position: absolute;
  1249. left: -10upx;
  1250. top: 0;
  1251. width: 38upx;
  1252. height: 38upx;
  1253. background: linear-gradient(229deg, #ffffff 0%, #74b72f 100%);
  1254. opacity: 0.6;
  1255. border-radius: 50%;
  1256. }
  1257. .floot_titleName {
  1258. position: relative;
  1259. z-index: 1;
  1260. }
  1261. .floot_tip {
  1262. font-size: 28upx;
  1263. font-family: PingFang SC;
  1264. font-weight: 500;
  1265. color: #8a8a99;
  1266. }
  1267. .floot_tip text {
  1268. line-height: initial;
  1269. }
  1270. .icon_right {
  1271. width: 11upx;
  1272. height: 19upx;
  1273. margin-left: 10upx;
  1274. }
  1275. .flootNoTip {
  1276. text-align: center;
  1277. width: 100%;
  1278. font-size: 30upx;
  1279. margin: 30upx 0;
  1280. color: #43434a;
  1281. }
  1282. .menuServices_box .menuList {
  1283. width: 25%;
  1284. margin: 40upx 0 36upx;
  1285. }
  1286. .menuIcon {
  1287. width: 78upx;
  1288. height: 84upx;
  1289. margin-bottom: 20upx;
  1290. }
  1291. .menuText {
  1292. font-size: 26upx;
  1293. font-family: PingFang SC;
  1294. color: #222326;
  1295. }
  1296. .p_bt200 {
  1297. padding-bottom: 200upx;
  1298. }
  1299. </style>