homePage.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <image :src="iconUrl.homePage_topBg" class="topBg_img"></image>
  5. <view class="top_box">
  6. <view class="topBox_title"
  7. :style="`margin-top: ${statusBarHeight}px; height: 44px; line-height: 44px;color: #fff;`">{{ hosName }}
  8. </view>
  9. <view class="search displayFlexBetween" @click="jumSearch">
  10. <view class="search_box displayFlexRow">
  11. <image class="search_icon" :src="iconUrl.homePage_serch"></image>
  12. <view class="search_input">请输入医生姓名/科室/服务名称</view>
  13. </view>
  14. <!-- <image class="remove_icon" src="{{iconUrl.homePage_san}}" catchtap="focusFn"></image> -->
  15. </view>
  16. <view class="userBox">
  17. <!-- 无绑定就诊人 -->
  18. <view class="no_userBox displayFlexCol" v-if="!currentUser?.memberId">
  19. <image :src="iconUrl.home_noBindBG" class="home_noBindBG"></image>
  20. <view class="no_userBox_title"> 就医请先添加就诊人</view>
  21. <view class="no_userBox_btn " @click="jumpAddMember">
  22. <image class="home_noBindBtn" :src="iconUrl.home_noBindBtn"></image>
  23. <view class="btnText displayFlexRow">
  24. <image class="icon_WhiteAdd" :src="iconUrl.icon_WhiteAdd"></image>
  25. <text>去添加</text>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 有绑定就诊人 -->
  30. <view class="yes_userBox" v-if="currentUser?.memberId">
  31. <view class="user_info_box displayFlexBetween">
  32. <view class="user_info_content ">
  33. <view class="member_box displayFlexLeft">
  34. <view class="memberName">{{ currentUser.memberName }}</view>
  35. <view class="memberTip" v-if="!homePageConfig.medicalBtn" @click="codeStateChange"
  36. :data-item="currentUser">
  37. <image class="homePage_userTip" :src="iconUrl.homePage_userTip"></image>
  38. <view class="QRCode_box displayFlexRow">
  39. <image class="homePage_qrCode" :src="iconUrl.homePage_qrCode"></image>
  40. 电子就诊码
  41. </view>
  42. </view>
  43. <view class="electronMedical displayFlexCol" @click="clickElectronMedical"
  44. v-if="currentUser.memberType == 1">
  45. <image class="electronMedical_img" :src="iconUrl.dzybpz"></image>
  46. <view class="electronMedical_txt">刷医保码</view>
  47. </view>
  48. </view>
  49. <view class="memberInfo_cardInfo ellipsis">
  50. {{ currentUser.cardType == 14 ? "住院号" : "就诊卡号" }}:{{ currentUser.cardNo ? currentUser.cardNo : "无" }}
  51. </view>
  52. </view>
  53. <view class="choice_patient_btn" @click="jumpChoosPatient">
  54. 换个就诊人
  55. </view>
  56. </view>
  57. <view class="msg_list_box">
  58. <view class="non_msg_box" v-if="!showProgress">
  59. <image class="imgCom homeTop_noyygh" :src="iconUrl.homeTop_noyygh"></image>
  60. <progress percent="90" active stroke-width="3" color="var(--dominantColor)" class="progress" />
  61. </view>
  62. <template v-else>
  63. <!-- 无预约记录时展示 -->
  64. <view class="non_msg_box" v-if="lastMsgList.length == 0">
  65. <image class="imgCom homeTop_noyygh" :src="iconUrl.homeTop_noyygh"></image>
  66. <view class=" register_remind_box displayFlexBetween">
  67. <view class="displayFlexCol" style="align-items: flex-start;">
  68. <text class="titel">预约挂号</text>
  69. <text class="colorCustom_F08">包含预约挂号及当日挂号</text>
  70. </view>
  71. <text class="register_remind_btn backgroundCustom_F08" @click="goToRegister">去挂号</text>
  72. </view>
  73. </view>
  74. <!-- 有预约记录时展示 -->
  75. <template v-if="lastMsgList.length > 0">
  76. <activeFlow v-if="lastMsgList.length > 0" :flowList="lastMsgList" pageType="homePage">
  77. </activeFlow>
  78. </template>
  79. </template>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="content_inner pb-100">
  85. <!-- 我的医生 -->
  86. <view class="floot myDoctor_box">
  87. <view class="floot_top displayFlexBetween">
  88. <view class="floot_title">
  89. <view class="floot_titleName">我的医生</view>
  90. </view>
  91. <view class="floot_tip displayFlexRow" v-if="doctorList.length > 0" @click="seeMoreDoctor">
  92. <text>更多</text>
  93. <image class="icon_right" :src="iconUrl.icon_right"></image>
  94. </view>
  95. </view>
  96. <view class="floot_lineFeed" :class="doctorList.length >= 3 ? 'displayFlexBetween' : 'displayFlexLeft'">
  97. <view v-if="doctorList.length > 0">
  98. <view class="floot_list myDoctor_item displayFlexCol" v-for="(item, index) in doctorList.slice(0, 3)" :key="index"
  99. :item="item" @click="clickDoctor">
  100. <image class="iconDoctor" :src="item.Url || iconUrl.icon_doctor"></image>
  101. <text class="doctorName">{{ item.DoctorName }}</text>
  102. <text class="doctorTitle">{{ item.DoctorTitle }}</text>
  103. </view>
  104. </view>
  105. <view class="flootNoTip" v-else>暂无医生</view>
  106. </view>
  107. </view>
  108. <!-- 就医服务 -->
  109. <view class="floot menuServices_box">
  110. <view class="floot_top displayFlexBetween">
  111. <view class="floot_title">
  112. <view class="floot_titleName">就医服务</view>
  113. </view>
  114. <view class="floot_tip displayFlexRow" @click="moreClick">
  115. <text>更多</text>
  116. <image class="icon_right" :src="iconUrl.icon_right"></image>
  117. </view>
  118. </view>
  119. <view class="floot_lineFeed displayFlexLeft">
  120. <view class="floot_list menuList" :class="{ 'fw_25': item.IsShow == '1' }"
  121. v-for="(item, index) in menuObj?.Children[0].Children" :key="index" @click="menuClickFn(item)">
  122. <view v-if="item.IsShow == '1'" class="displayFlexCol">
  123. <image class="menuIcon" :src="item.Icon"></image>
  124. <text class="menuText">{{ item.MenuName }}</text>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <!-- 热点资讯 -->
  130. <view class="floot">
  131. <view class="floot_top displayFlexBetween">
  132. <view class="floot_title">
  133. <view class="floot_titleName">热点资讯</view>
  134. </view>
  135. </view>
  136. <view class="hotspot_info">
  137. <!-- 进度条 -->
  138. <view class="pro_msg_box" v-if="!showSeekProgress">
  139. <progress :percent="90" active stroke-width="3" color="var(--dominantColor)" class="progress" />
  140. </view>
  141. <template v-else>
  142. <template v-if="articleList.length > 0">
  143. <view class="hotspot_infoItem" v-for="(item, index) in articleList" :key="index" @click="hotspotDetail"
  144. :data-id="item.Id">
  145. <view class="hotspot_infoItem_title">{{ item.CreatorName }}</view>
  146. <view class="hotspot_infoItem_text">{{ item.Title }}</view>
  147. </view>
  148. </template>
  149. <view class="flootNoTip" v-else>暂无最新热点资讯</view>
  150. </template>
  151. </view>
  152. </view>
  153. <!-- 医院风采 -->
  154. <view class="floot">
  155. <view class="floot_top displayFlexBetween">
  156. <view class="floot_title">
  157. <view class="floot_titleName">医院风采</view>
  158. </view>
  159. </view>
  160. <view class="hosMenuInfo">
  161. <view v-for="(item, index) in menuObj.Children[1].Children" :key="index" @click="menuClickFn" :item="item"
  162. :class="`${index >= 1 ? 'hosInfoBox_item' : 'hosInfoBox_item_fir'} ${index == 2 ? 'hosInfoBox_itemT' : ''}`">
  163. <view v-if="item?.IsShow == '1'">
  164. <image class="hosInfoBox_itemImg" :src="item.Icon"></image>
  165. <view class="hosInfoBox_itemText">
  166. <view class="name">{{ item.MenuName }}</view>
  167. <view>查看详情</view>
  168. </view>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. </view>
  175. <!-- 医保电子凭证弹窗 -->
  176. <view class="public_dialog" v-if="codeIsShow">
  177. <view class="code_inner">
  178. <image class="code_img_out" :src="iconUrl.icon_whiteClose" @click="codeStateChange" :data-item="''">
  179. </image>
  180. <image class="code_img" :src="iconUrl.icon_codeBgTop"></image>
  181. <view class="code_tit">{{ codeInfo.memberName }}-电子就诊码</view>
  182. <view class="code_con">
  183. <image :src="codeInfo.imagesApi"></image>
  184. <!-- <canvas class='qr_code' canvas-id='canvas'></canvas> -->
  185. </view>
  186. </view>
  187. </view>
  188. <view class="tip_x p_flexBetween" v-if="hasSlb">
  189. <view class="tip_ p_flexBetween">
  190. <view class="tip_cell">进入长辈版</view>
  191. <view class="tip_cell" @click="toSlb" data-type="sec">点击进入</view>
  192. </view>
  193. <image class="tip_back" :src="iconUrl.home_tipBk_slb"></image>
  194. <image class="tip_right" :src="iconUrl.home_tipBk_right_slb"></image>
  195. </view>
  196. <view class="modal_mark p_flexCenter" v-if="hasSlb && showSlbTip">
  197. <view class="modal_slb">
  198. <image class="modal_home_bk" :src="iconUrl.home_bk_slb"></image>
  199. <image class="modal_home_ld" :src="iconUrl.bell_slb"></image>
  200. <view class="modal_con">
  201. <view class="modal_tit">长辈版已上线</view>
  202. <view class="modal_txt">图标字体更大操作更方便,有需要的用户可以点击切换使用。</view>
  203. <view class="modal_btns p_flexBetween">
  204. <view class="modal_btn" @click="slbTipChange">知道啦</view>
  205. <view class="modal_btn" @click="toSlb">进入长辈版</view>
  206. </view>
  207. </view>
  208. </view>
  209. </view>
  210. <!-- 隐私政策 -->
  211. <privacyDialog v-if="currentUser" :currentUser="currentUser" :hosName="hosName" :articleId="''">
  212. </privacyDialog>
  213. </view>
  214. <!-- AI数智客服入口-->
  215. <ai-customer-entry :currentUser="currentUser"></ai-customer-entry>
  216. </template>
  217. <script lang="ts" setup>
  218. import { getCurrentInstance, nextTick, ref } from 'vue';
  219. import { useDomain, useOnLoad, usePreserMember, queryMemberCardList_V3 } from '../../../../../hook';
  220. import { onShow, onPullDownRefresh } from '@dcloudio/uni-app';
  221. import { common, menuClick } from '@/utils';
  222. import icon from '@/utils/icon';
  223. import store from '@/store';
  224. import { articleTypeListUrl, topArticleListUrl, getMemberLastMsg, queryHistoryBaseDoctor } from '../../../service/base';
  225. import activeFlow from '@/pages/st1/components/pageActive/st1/components/activeFlow/activeFlow.vue';
  226. import aiCustomerEntry from '@/pages/st1/components/pagesAICustomerService/st1/components/aiCustomerEntry/aiCustomerEntry.vue';
  227. const { proxy } = getCurrentInstance();
  228. const app = getApp();
  229. const iconUrl = ref(icon)
  230. const currentUser = ref({})
  231. const menuObj = ref({})
  232. const lastMsgList = ref([])
  233. const showBalance = ref(false)
  234. const homePageConfig = ref({})
  235. const articleList = ref([])
  236. const codeIsShow = ref(false)
  237. const codeInfo = ref({})
  238. const showSlbTip = ref(false)
  239. const statusBarHeight = ref("")
  240. const hosName = ref("")
  241. const hasSlb = ref("")
  242. const showSeekProgress = ref(false)
  243. const doctorList = ref([])
  244. const showProgress = ref(false)
  245. /** 页面初始加载 */
  246. useOnLoad((options) => {
  247. console.log('logSuccess');
  248. console.log("app.globalData=====", app.globalData)
  249. console.log('loadFn', options, store.state);
  250. console.log("getAuthorize=====",common)
  251. loadFn(options);
  252. });
  253. const loadFn = async (options) => {
  254. /**H5回跳后重新登录 */
  255. if (options.h5Login) {
  256. await app.main()
  257. }
  258. main()
  259. }
  260. const main = async () => {
  261. let homePageConfigData = common.deepCopy(app.globalData.config.pageConfiguration.homePage_config)
  262. let menuList = uni.getStorageSync('menuList')
  263. //深拷贝 否则影响morePage更多页面
  264. let menuObjData = {};
  265. if (!common.isEmpty(menuList)) {
  266. menuObjData = common.deepCopy(menuList.filter(item => item.MenuName == 'HomePage')[0], {})
  267. }
  268. menuObj.value = menuObjData
  269. homePageConfig.value = homePageConfigData
  270. statusBarHeight.value = JSON.parse(app.globalData.smallPro_systemInfo).statusBarHeight || 20
  271. hosName.value = app.globalData.hospitalInfo.HospitalAlias
  272. hasSlb.value = app.globalData.hasSlb
  273. // 获取热点资讯
  274. articleTypeListUrlFn()
  275. }
  276. /**
  277. * 首先要上最新的统一内容管理(要有这个功能版本需求),没有就个性化隐藏
  278. * java, 2.1.10-RELEASES.jar
  279. * 后台ui, 1.0.20-RELEASES.jar
  280. */
  281. const articleTypeListUrlFn = async () => {
  282. let {resp,resData} = await articleTypeListUrl({
  283. ChannelId: app.globalData.channelId,
  284. eqTitle: '热点资讯'
  285. });
  286. if (common.isNotEmpty(resp)) {
  287. let {resp:articleList} = await topArticleListUrl({
  288. ChannelId: app.globalData.channelId,
  289. PSize: 3,
  290. RootTypeId: resp[0].Id
  291. })
  292. if (common.isNotEmpty(articleList)) {
  293. articleList.value = articleList || []
  294. }
  295. showSeekProgress.value = true
  296. }
  297. }
  298. /** 菜单点击 */
  299. const menuClickFn = (item) => {
  300. menuClick(item, proxy)
  301. }
  302. /** 点击更多 */
  303. const moreClick = () => {
  304. common.goToUrl("/pages/st1/business/tabbar/more/more")
  305. }
  306. /** 去挂号 */
  307. const goToRegister = () => {
  308. let menuItem = {}
  309. menuObj.value.Children[0].Children.forEach((item) => {
  310. if (item.MenuName == "预约挂号") {
  311. menuItem = item
  312. }
  313. })
  314. common.goToUrl(menuItem.Url)
  315. }
  316. /** 生命周期函数--监听页面显示 */
  317. onShow(() => {
  318. eliminateData()
  319. if (app.globalData.logSuccess) {
  320. getMember()
  321. } else {
  322. app.loginReadyCallBack_getMenu = () => {
  323. getMember()
  324. }
  325. }
  326. })
  327. /** 统一清空进入首页时,逻辑存储数据 */
  328. const eliminateData = () => {
  329. /**当前的业务类型,006表示互联网医院 空表示普通的挂号业务 */
  330. app.globalData.sourceType = ""
  331. /**点击menu时进入添加就诊人 会设置toUrl 如果后退 需清空 否则从个人中心进入添加就诊人后 会进入toUrl页面 */
  332. app.globalData.toUrl = ""
  333. // 适老版
  334. uni.setStorageSync('wx_Slb', '');
  335. }
  336. /** 页面下拉刷新 */
  337. onPullDownRefresh(async () => {
  338. // 重新查询一下就诊人
  339. await usePreserMember()
  340. await getMember()
  341. uni.stopPullDownRefresh();
  342. })
  343. /** 获取就诊人 */
  344. const getMember = async () => {
  345. let currentUserData = null
  346. let memberList = store.state.memberList || []
  347. if (common.isEmpty(memberList)) {
  348. await usePreserMember()
  349. memberList = store.state.memberList
  350. }
  351. if (common.isNotEmpty(memberList)) {
  352. let memberLists = memberList.filter(item => item.userMemberList[0].isDefaultMember == 1)
  353. // 判断过滤默认操作人 : 没有默认操作人查询人列表第一条
  354. currentUserData = common.isNotEmpty(memberLists) ? memberLists[0] : memberList[0]
  355. if (common.isNotEmpty(currentUserData)) {
  356. // 获取就诊人memberOtherInfo 获取,默认就诊卡
  357. let cardInfo = typeof currentUserData.memberOtherInfo == 'object' ? currentUserData.memberOtherInfo : JSON.parse(currentUserData.memberOtherInfo)
  358. // 判断当前默认就诊人是否有默认就诊卡数据,没有在查询一遍
  359. if (common.isEmpty(cardInfo.defaultCard)) {
  360. let cardResp = await queryMemberCardList_V3(currentUserData.memberId)
  361. cardInfo = cardResp.filter(item => item.cardType == 1)[0]
  362. } else {
  363. cardInfo = cardInfo.defaultCard
  364. }
  365. currentUserData = {
  366. ...currentUserData,
  367. cardNo: cardInfo.cardNo || '',
  368. encryptionStore: cardInfo.cardEncryptionStore || cardInfo.encryptionStore || '',
  369. cardType: '1' //返回的默认就诊卡都为就诊卡类型
  370. }
  371. app.globalData.currentUser = currentUserData
  372. // 查询主动式服务-最新消息
  373. getMemberLastMsgFn(currentUserData)
  374. queryHistoryBaseDoctorFn(currentUserData)
  375. chkEnableSeniorVersion();
  376. }
  377. }
  378. showBalance.value = false
  379. currentUser.value = currentUserData
  380. }
  381. /** 主动式服务-获取患者最新一条主动式服务消息 */
  382. const getMemberLastMsgFn = async (currentUser) => {
  383. var reqData = {
  384. OrgId: '',
  385. MemberId: currentUser.memberId,
  386. cardEncryptionStore: currentUser.encryptionStore || '',
  387. memberEncryptionStore: currentUser.baseMemberEncryptionStore || '',
  388. ChannelId: app.globalData.channelId,
  389. }
  390. let lastMsgListData = []
  391. let {resp,resData} = await getMemberLastMsg(reqData)
  392. if (common.isNotEmpty(resp)) {
  393. if (resp[0].IsOpenService === 0) {
  394. if (common.isNotEmpty(resp[0].ActiveNodeServiceList)) {
  395. resp[0].ActiveNodeServiceList = resp[0].ActiveNodeServiceList.filter(ele => ele.PatientChannel.indexOf(app.globalData.hosId) != -1)
  396. resp[0].ActiveNodeServiceList.map(item => {
  397. item.Btns = common.isJSON(item.Btns) ? JSON.parse(item.Btns) : item.Btns
  398. })
  399. }
  400. }
  401. lastMsgListData = resp
  402. }
  403. lastMsgList.value = lastMsgListData,
  404. showProgress.value = true
  405. }
  406. /** 查询我的医生当前就诊人历史预约医生 */
  407. const queryHistoryBaseDoctorFn = async (currentUser) => {
  408. let doctorListData = []
  409. let queryData = {
  410. HosId: app.globalData.districtId || app.globalData.hosId,
  411. HasSch: '0',//默认查询本地,0:本地,1:his
  412. QueryLocal: "1",
  413. MemberIds: currentUser.memberId,
  414. }
  415. let {resp,resData} = await queryHistoryBaseDoctor(queryData)
  416. if (common.isNotEmpty(resp)) {
  417. doctorListData = resp
  418. }
  419. doctorList.value = doctorListData
  420. }
  421. /** 添加就诊人 */
  422. const jumpAddMember = () => {
  423. common.goToUrl(`/pagesPersonal/st1/business/patientManagement/selecteBindCardMode/selecteBindCardMode`)
  424. }
  425. /** 选择就诊卡 */
  426. const jumpChoosPatient = () => {
  427. common.goToUrl(`/pagesPersonal/st1/business/patientManagement/selecteCardOrHos/selecteCardOrHos?type=card&pageType=home`)
  428. }
  429. /** 进入历史我的医生 */
  430. const seeMoreDoctor = () => {
  431. common.goToUrl(`/pagesPatient/st1/business/yygh/yyghHistoryDoctor/yyghHistoryDoctor`)
  432. }
  433. /** 历史医生跳转越狱挂号 */
  434. const clickDoctor = (e) => {
  435. app.globalData.queryBean = e.currentTarget.dataset.item;
  436. app.globalData.currentUser = currentUser.value;
  437. common.goToUrl(`/pagesPatient/st1/business/yygh/yyghClinicMsg/yyghClinicMsg`)
  438. }
  439. /** 搜索 */
  440. const jumSearch = (e) => {
  441. common.goToUrl('/pages/st1/business/tabbar/homeSearch/homeSearch')
  442. }
  443. /** 热点资讯详情 */
  444. const hotspotDetail = (e) => {
  445. let { id } = e.currentTarget.dataset
  446. common.goToUrl(`/pagesAdmin/article/st1/business/article/detail/detail?id=${id}`)
  447. }
  448. /** 改变二维码显隐状态 */
  449. const codeStateChange = (e) => {
  450. let item = e.currentTarget.dataset.item || "";
  451. if (common.isNotEmpty(item)) {
  452. item.imagesApi = `${useDomain()}/api/340/340/createQrCode.do?content=${item.memberId}`
  453. }
  454. codeInfo.value = item || {}
  455. codeIsShow.value = !codeIsShow.value
  456. }
  457. /** 前往适老版 */
  458. const toSlb = (e) => {
  459. let { type } = e.currentTarget.dataset;
  460. if (!type) {
  461. slbTipChange()
  462. }
  463. common.goToUrl(`/pagesSlb/st1/business/tabbar/index/index`, { skipWay: "reLaunch" })
  464. uni.setStorageSync('wx_Slb', true)
  465. }
  466. /** 适老版显示弹窗显示切换 */
  467. const slbTipChange = () => {
  468. showSlbTip.value = !showSlbTip.value
  469. }
  470. /** 判断是否提示切换适老版 */
  471. const chkEnableSeniorVersion = () => {
  472. const { hasAlreadySlb, currentUser } = app.globalData;
  473. if (hasAlreadySlb) { // 是否已经开启过适老版切换弹窗
  474. return;
  475. }
  476. if (currentUser && currentUser.age >= 60) {
  477. app.globalData.hasAlreadySlb = true; // 默认 一次进入小程序只弹一次适老版切换弹窗
  478. slbTipChange();
  479. }
  480. }
  481. /** 打开医保电子凭证 */
  482. const clickElectronMedical = () => {
  483. uni.navigateToMiniProgram({
  484. appId: "wxb032bc789053daf4",
  485. path: "pages/esscard/scancode-nhsa/main?channel=AAEQHg2Pe4b-JhLqiIyHf2g0&cityCode=350000",
  486. })
  487. }
  488. </script>
  489. <style lang="scss" scoped>
  490. .container,
  491. .content {
  492. background-color: #f6f7f8;
  493. }
  494. .topBg_img {
  495. width: 100%;
  496. height: 376upx;
  497. position: fixed;
  498. top: 0;
  499. left: 0;
  500. }
  501. .top_box {
  502. position: relative;
  503. z-index: 1;
  504. padding: 0 30upx;
  505. }
  506. .topBox_title {
  507. width: 100%;
  508. font-size: 32upx;
  509. font-family: Source Han Sans CN;
  510. font-weight: 500;
  511. color: #000000;
  512. text-align: center;
  513. }
  514. /* ================ */
  515. /* 搜索框 */
  516. .search {
  517. margin: 30upx 0;
  518. background-color: #fff;
  519. height: 72upx;
  520. line-height: 72upx;
  521. border-radius: 36upx;
  522. }
  523. .search_input {
  524. font-size: 28upx;
  525. font-family: PingFang SC;
  526. color: #8A8A99;
  527. line-height: 40upx;
  528. }
  529. .search_icon {
  530. width: 26upx;
  531. height: 25upx;
  532. margin: 0 20upx;
  533. }
  534. .search_box {
  535. width: 100%;
  536. }
  537. .remove_icon {
  538. width: 32rpx;
  539. height: 32rpx;
  540. margin: 20rpx 30rpx;
  541. padding-left: 30rpx;
  542. box-sizing: content-box;
  543. border-left: 1px solid #E6E6E6;
  544. }
  545. /* ================ */
  546. .userBox .no_userBox {
  547. width: 690upx;
  548. height: 300upx;
  549. position: relative;
  550. padding-top: 20upx;
  551. }
  552. .userBox .no_userBox .home_noBindBG {
  553. position: absolute;
  554. top: 0;
  555. left: 0;
  556. }
  557. .userBox .no_userBox .no_userBox_title {
  558. font-size: 32upx;
  559. font-family: PingFang SC;
  560. font-weight: 800;
  561. color: #222326;
  562. position: relative;
  563. }
  564. .userBox .no_userBox .no_userBox_btn {
  565. width: 180upx;
  566. height: 64upx;
  567. font-size: 28upx;
  568. font-family: PingFang SC;
  569. font-weight: bold;
  570. color: #FFFFFF;
  571. position: relative;
  572. margin-top: 28upx;
  573. }
  574. .userBox .no_userBox .home_noBindBtn {
  575. position: absolute;
  576. top: 0;
  577. left: 0;
  578. }
  579. .userBox .no_userBox .icon_WhiteAdd {
  580. width: 20upx;
  581. height: 20upx;
  582. margin-right: 8upx;
  583. }
  584. .userBox .no_userBox .btnText {
  585. position: relative;
  586. width: 180upx;
  587. height: inherit;
  588. }
  589. .userBox .no_login {
  590. width: 690rpx;
  591. height: 240rpx;
  592. position: relative;
  593. }
  594. .userBox .no_login .home_noBindBG {
  595. position: absolute;
  596. top: 0;
  597. left: 0;
  598. }
  599. .unlogin {
  600. z-index: 1;
  601. display: flex;
  602. align-items: center;
  603. width: 100%;
  604. height: 100%;
  605. padding: 40rpx 20rpx 20rpx;
  606. }
  607. .unlogin image {
  608. width: 120rpx;
  609. height: 120rpx;
  610. min-width: 120rpx;
  611. min-height: 120rpx;
  612. margin: 0 40rpx;
  613. }
  614. .unlogin button {
  615. background-color: transparent;
  616. text-align: left;
  617. color: #fff;
  618. }
  619. /* ====================== */
  620. .yes_userBox {
  621. background: linear-gradient(-45deg, #8CC63F 0%, #74B72F 100%);
  622. border-radius: 24upx;
  623. position: relative;
  624. }
  625. .yes_userBox .user_info_box {
  626. padding: 30upx;
  627. color: #fff;
  628. }
  629. .yes_userBox .user_info_box .member_box .memberName {
  630. font-size: 36upx;
  631. font-family: PingFang SC;
  632. color: #FAFAFA;
  633. }
  634. .yes_userBox .user_info_box .memberTip {
  635. position: relative;
  636. width: 180upx;
  637. height: 40upx;
  638. line-height: 40upx;
  639. margin-left: 24upx;
  640. }
  641. .yes_userBox .user_info_box .memberTip .homePage_userTip {
  642. position: absolute;
  643. height: inherit;
  644. line-height: inherit;
  645. width: 100%;
  646. top: 0;
  647. left: 0;
  648. }
  649. .yes_userBox .user_info_box .memberTip .QRCode_box {
  650. position: absolute;
  651. width: 100%;
  652. z-index: 1;
  653. font-size: 22upx;
  654. font-family: PingFang SC;
  655. height: inherit;
  656. line-height: inherit;
  657. }
  658. .yes_userBox .user_info_box .memberTip .homePage_qrCode {
  659. width: 20upx;
  660. height: 20upx;
  661. margin-right: 7upx;
  662. }
  663. .yes_userBox .user_info_box .memberInfo_cardInfo {
  664. font-size: 28upx;
  665. font-family: PingFang SC;
  666. color: #FAFAFA;
  667. margin-top: 24upx;
  668. }
  669. .yes_userBox .user_info_box .choice_patient_btn {
  670. width: 188upx;
  671. height: 63upx;
  672. line-height: 63upx;
  673. border: 2rpx solid #FFFFFF;
  674. border-radius: 32upx;
  675. font-size: 28upx;
  676. font-family: PingFang SC;
  677. color: #FAFAFA;
  678. text-align: center;
  679. }
  680. .yes_userBox .electronMedical {
  681. position: absolute;
  682. right: 242upx;
  683. top: 20upx;
  684. }
  685. .yes_userBox .electronMedical_img {
  686. width: 104upx;
  687. height: 104upx;
  688. }
  689. .yes_userBox .electronMedical_txt {
  690. margin-top: -10upx;
  691. color: #fff;
  692. font-size: 20upx;
  693. }
  694. /* ================================= */
  695. /* 主动式服务 */
  696. .msg_list_box {
  697. position: relative;
  698. z-index: 3;
  699. padding: 0 24upx 30upx;
  700. }
  701. .non_msg_box {
  702. height: 180upx;
  703. }
  704. .msg_list_box .imgCom {
  705. position: absolute;
  706. top: 0;
  707. left: 16upx;
  708. }
  709. /* .msg_list_box {
  710. padding: 0 16rpx 24rpx;
  711. margin-top: 40rpx;
  712. border-radius: 30rpx;
  713. } */
  714. .register_remind_btn {
  715. width: 148upx;
  716. height: 64upx;
  717. line-height: 64upx;
  718. text-align: center;
  719. border-radius: 32upx;
  720. }
  721. .register_remind_box {
  722. position: relative;
  723. padding: 56upx 24upx 32upx;
  724. font-size: 28upx;
  725. }
  726. .homeTop_noyygh {
  727. width: 658upx;
  728. height: 165upx;
  729. }
  730. .homeTop_yesyygh {
  731. width: 658upx;
  732. height: 416upx;
  733. }
  734. .register_remind_box .titel {
  735. font-size: 32upx;
  736. font-family: PingFang SC;
  737. font-weight: 800;
  738. color: #222326;
  739. margin-bottom: 20upx;
  740. }
  741. .register_remind_btn {
  742. width: 148upx;
  743. height: 64upx;
  744. line-height: 64upx;
  745. text-align: center;
  746. border-radius: 32upx;
  747. }
  748. .progress {
  749. position: absolute;
  750. width: 90%;
  751. top: 50upx;
  752. left: 20px;
  753. }
  754. /* ================================= */
  755. .floot {
  756. margin: 30upx;
  757. background-color: #fff;
  758. border-radius: 24upx;
  759. }
  760. .floot_top {
  761. padding: 37upx 30upx 0 34upx;
  762. }
  763. .floot_title {
  764. position: relative;
  765. font-size: 32upx;
  766. font-family: PingFang SC;
  767. font-weight: 800;
  768. color: #222326;
  769. }
  770. .floot_title::after {
  771. content: "";
  772. position: absolute;
  773. left: -10upx;
  774. top: 0;
  775. width: 38upx;
  776. height: 38upx;
  777. background: linear-gradient(229deg, #FFFFFF 0%, #74B72F 100%);
  778. opacity: 0.6;
  779. border-radius: 50%;
  780. }
  781. .floot_titleName {
  782. position: relative;
  783. z-index: 1;
  784. }
  785. .floot_tip {
  786. font-size: 28upx;
  787. font-family: PingFang SC;
  788. font-weight: 500;
  789. color: #8A8A99;
  790. }
  791. .floot_tip text {
  792. line-height: initial;
  793. }
  794. .icon_right {
  795. width: 11upx;
  796. height: 19upx;
  797. margin-left: 10upx;
  798. }
  799. .flootNoTip {
  800. text-align: center;
  801. width: 100%;
  802. font-size: 30upx;
  803. margin: 30upx 0;
  804. color: #43434A;
  805. }
  806. /* 常用功能 */
  807. .menuServices_box .menuList {
  808. margin: 40upx 0 36upx;
  809. }
  810. .fw_25 {
  811. width: 25%;
  812. }
  813. .menuIcon {
  814. width: 78upx;
  815. height: 84upx;
  816. margin-bottom: 20upx;
  817. }
  818. .menuText {
  819. font-size: 26upx;
  820. font-family: PingFang SC;
  821. color: #222326;
  822. }
  823. /* 我的医生 */
  824. .myDoctor_box .floot_lineFeed {
  825. padding: 0 30upx;
  826. }
  827. .myDoctor_box .myDoctor_item {
  828. width: 196upx;
  829. height: 202upx;
  830. background: #FFFFFF;
  831. box-shadow: 0rpx 0rpx 98rpx 0rpx rgba(100, 100, 100, 0.1);
  832. border-radius: 20upx;
  833. margin: 30upx 0 46upx 0;
  834. }
  835. .myDoctor_box .floot_lineFeed.displayFlexLeft .myDoctor_item {
  836. margin: 30upx 30upx 46upx 0;
  837. }
  838. .myDoctor_box .iconDoctor {
  839. width: 80upx;
  840. height: 80upx;
  841. border-radius: 50%;
  842. }
  843. .myDoctor_box .doctorName {
  844. text-align: center;
  845. font-size: 28upx;
  846. font-family: PingFang SC;
  847. font-weight: bold;
  848. color: #222326;
  849. margin: 17upx 0 9upx;
  850. }
  851. .myDoctor_box .doctorTitle {
  852. font-size: 22upx;
  853. font-family: PingFang SC;
  854. color: #999999;
  855. }
  856. /* 热点资讯 */
  857. .hotspot_info {
  858. position: relative;
  859. padding: 30upx 0 30upx 30upx;
  860. white-space: nowrap;
  861. overflow: auto;
  862. -webkit-overflow-scrolling: touch;
  863. }
  864. .hotspot_infoItem {
  865. width: 310upx;
  866. height: 170upx;
  867. margin-right: 16upx;
  868. display: inline-flex;
  869. flex-direction: column;
  870. padding: 24upx 20upx;
  871. background: #e9f6d2;
  872. border-radius: 20rpx;
  873. color: #5D9C36;
  874. }
  875. .hotspot_infoItem:nth-child(2n) {
  876. background: #FBEBC2;
  877. color: #EC8413;
  878. }
  879. .hotspot_info .hotspot_infoItem_title {
  880. font-size: 28upx;
  881. font-family: PingFang SC;
  882. font-weight: bold;
  883. margin-bottom: 24upx;
  884. }
  885. .hotspot_info .hotspot_infoItem_text {
  886. font-size: 22upx;
  887. font-family: PingFang SC;
  888. font-weight: 500;
  889. line-height: 32upx;
  890. text-overflow: ellipsis;
  891. overflow: hidden;
  892. display: -webkit-box;
  893. -webkit-box-orient: vertical;
  894. -webkit-line-clamp: 2;
  895. white-space: pre-wrap;
  896. }
  897. /* =============== */
  898. /* 医院风采 */
  899. .hosMenuInfo {
  900. margin: 30upx 30upx 0;
  901. padding: 0 0 30upx;
  902. align-items: end;
  903. position: relative;
  904. }
  905. .hosInfoBox_item_fir {
  906. width: 48%;
  907. float: left;
  908. height: 256upx;
  909. margin-right: 16upx;
  910. position: relative;
  911. }
  912. .hosInfoBox_item {
  913. width: 48%;
  914. height: 120upx;
  915. display: inline-flex;
  916. align-items: center;
  917. position: relative;
  918. }
  919. .hosInfoBox_itemT {
  920. margin-top: 16upx;
  921. }
  922. .hosInfoBox_itemImg {
  923. position: absolute;
  924. top: 0;
  925. left: 0;
  926. }
  927. .hosInfoBox_itemText {
  928. position: absolute;
  929. z-index: 1;
  930. top: 30upx;
  931. left: 30upx;
  932. font-size: 24upx;
  933. font-family: PingFang SC;
  934. color: #AAADBD;
  935. line-height: 44upx;
  936. }
  937. .hosInfoBox_itemText .name {
  938. font-size: 28upx;
  939. font-family: PingFang SC;
  940. font-weight: bold;
  941. color: #43434A;
  942. margin-bottom: 16upx;
  943. }
  944. /* 进度条 */
  945. .progress {
  946. position: absolute;
  947. width: 90%;
  948. top: 50rpx;
  949. left: 20px;
  950. }
  951. /* 主动式插件样式覆盖 */
  952. .active-service-process {
  953. clip-path: none !important;
  954. }
  955. /* 二维码 */
  956. .public_dialog {
  957. background-color: rgba(1, 1, 1, 0.6);
  958. position: fixed;
  959. top: 0;
  960. left: 0;
  961. width: 100%;
  962. height: 100%;
  963. z-index: 2;
  964. display: flex;
  965. align-items: center;
  966. justify-content: center;
  967. }
  968. .code_inner {
  969. width: 600upx;
  970. border-radius: 24upx;
  971. position: relative;
  972. background-color: #fff;
  973. padding-bottom: 50upx;
  974. display: flex;
  975. flex-direction: column;
  976. align-items: center;
  977. justify-content: center;
  978. }
  979. .code_img_out {
  980. width: 24upx;
  981. height: 24upx;
  982. position: absolute;
  983. right: 30upx;
  984. top: 30upx;
  985. z-index: 1;
  986. }
  987. .code_img {
  988. width: 100%;
  989. height: 200upx;
  990. position: absolute;
  991. top: 0;
  992. left: 0;
  993. }
  994. .code_tit {
  995. font-size: 40upx;
  996. font-weight: 500;
  997. height: 200upx;
  998. line-height: 210upx;
  999. position: relative;
  1000. color: #fff;
  1001. }
  1002. .code_card {
  1003. font-size: 28upx;
  1004. font-family: Arial;
  1005. font-weight: 400;
  1006. color: rgba(255, 255, 255, 1);
  1007. margin: 23upx 0 107upx;
  1008. position: relative;
  1009. }
  1010. .code_subtit {
  1011. font-size: 28upx;
  1012. }
  1013. .code_con {
  1014. margin: 37upx 0 30upx;
  1015. width: 340upx;
  1016. height: 340upx;
  1017. }
  1018. .code_tip {
  1019. font-size: 26upx;
  1020. color: #58AB56;
  1021. }
  1022. .qr_code {
  1023. box-sizing: content-box;
  1024. width: 340upx;
  1025. height: 340upx;
  1026. padding: 10upx 0;
  1027. }
  1028. .tip_x {
  1029. width: 100%;
  1030. height: 88upx;
  1031. position: fixed;
  1032. left: 0;
  1033. bottom: 0;
  1034. font-size: 36upx;
  1035. font-family: PingFang-SC, PingFang-SC;
  1036. font-weight: bold;
  1037. color: #814B01;
  1038. line-height: 32upx;
  1039. padding: 0 60upx 0 30upx;
  1040. z-index: 1111;
  1041. }
  1042. .tip_ {
  1043. width: 100%;
  1044. position: relative;
  1045. z-index: 1;
  1046. }
  1047. .tip_back {
  1048. position: absolute;
  1049. width: 100%;
  1050. height: 100%;
  1051. left: 0;
  1052. top: 0;
  1053. }
  1054. .tip_right {
  1055. position: absolute;
  1056. width: 20upx;
  1057. height: 32upx;
  1058. top: 0;
  1059. bottom: 0;
  1060. margin: auto 0;
  1061. right: 32upx;
  1062. }
  1063. .modal_mark {
  1064. background-color: rgba(0, 0, 0, 0.4);
  1065. position: fixed;
  1066. z-index: 1111;
  1067. height: 100%;
  1068. width: 100%;
  1069. top: 0;
  1070. left: 0;
  1071. }
  1072. .modal_slb {
  1073. width: 560rpx;
  1074. position: relative;
  1075. background-color: #fff;
  1076. border-radius: 14px;
  1077. padding-bottom: 60rpx;
  1078. }
  1079. .modal_home_bk {
  1080. width: 100%;
  1081. height: 172rpx;
  1082. position: absolute;
  1083. left: 0;
  1084. top: 0;
  1085. }
  1086. .modal_home_ld {
  1087. position: absolute;
  1088. width: 158rpx;
  1089. height: 109rpx;
  1090. left: 50%;
  1091. transform: translateX(-50%);
  1092. top: -47rpx;
  1093. }
  1094. .modal_con {
  1095. position: relative;
  1096. padding-top: 90rpx;
  1097. }
  1098. .modal_tit {
  1099. font-size: 40rpx;
  1100. font-family: PingFang-SC, PingFang-SC;
  1101. font-weight: bold;
  1102. color: #000000;
  1103. line-height: 32rpx;
  1104. text-align: center;
  1105. }
  1106. .modal_txt {
  1107. font-size: 36rpx;
  1108. font-family: PingFang-SC, PingFang-SC;
  1109. font-weight: bold;
  1110. color: #000000;
  1111. line-height: 36rpx;
  1112. width: 445rpx;
  1113. margin: 33rpx auto 39rpx auto;
  1114. }
  1115. .modal_btns {
  1116. padding: 0 40rpx;
  1117. }
  1118. .modal_btn {
  1119. padding: 26rpx 50rpx;
  1120. border-radius: 50px;
  1121. font-size: 32rpx;
  1122. font-family: PingFang-SC, PingFang-SC;
  1123. font-weight: bold;
  1124. color: #FFFFFF;
  1125. line-height: 36rpx;
  1126. background: var(--dominantColor);
  1127. }
  1128. .pb-100 {
  1129. padding-bottom: 100rpx;
  1130. }
  1131. </style>