index.vue 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315
  1. <template>
  2. <view class="content">
  3. <!-- 背景图片 -->
  4. <image class="bg" src="../../static/images/yuexuan_home_top_bg.png" mode=""></image>
  5. <view>
  6. <view class="top-inner">
  7. <view class="fixed-top-box" :style="{ background: bg }">
  8. <!-- 这里是状态栏 -->
  9. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  10. <view class="shop-block">
  11. <view class="shop">
  12. <image class="w40 h40" src="/static/images/shopping_car_icon.png"></image>
  13. </view>
  14. </view>
  15. <view class="top-title">
  16. <view class="name">芳华悦选</view>
  17. <view class="dot">让家人放心吃健康安全的食品</view>
  18. </view>
  19. <!-- 搜索框、购物车、客服 -->
  20. <view class="func-cont">
  21. <view class="search-cont">
  22. <image class="icon-search" src="../../static/images/search.png" mode=""></image>
  23. <input type="text" disabled value="" placeholder="搜索商品"
  24. placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  25. @click="toSearch" />
  26. <view class="search-button">搜索</view>
  27. </view>
  28. <!-- 购物车 -->
  29. <!-- <uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
  30. <view class="img-item" @click="goAuthUrl('../shopping/cart')">
  31. <image src="../../static/images/cart_wihte.png" mode=""></image>
  32. </view>
  33. </uni-badge> -->
  34. <view class="img-item" style="position: relative;">
  35. <image src="../../static/images/share_icon.png" mode=""></image>
  36. <button class="contact-btn" open-type="contact"></button>
  37. </view>
  38. <view class="img-item" style="position: relative;">
  39. <image src="../../static/images/new_hall_icon.png" mode=""></image>
  40. <button class="contact-btn" open-type="contact"></button>
  41. </view>
  42. </view>
  43. <!-- <view class="tips">
  44. <view class="left"></view>
  45. <view class="right" @click="navTo('./cert')">资质证明</view>
  46. </view> -->
  47. </view>
  48. </view>
  49. <!-- 头部间距 -->
  50. <view style="padding-bottom:220rpx">
  51. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  52. </view>
  53. <!-- 轮播图 -->
  54. <view class="banner-box">
  55. <view class="inner">
  56. <swiper class="swiper" :indicator-dots="true" :circular="true" :autoplay="true" :interval="3000"
  57. :duration="1000" indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#ffffff">
  58. <swiper-item class="swiper-item" v-for="(item,index) in advList" :key="index"
  59. @click="handleAdvClick(item)">
  60. <image :src="item.imageUrl" mode=""></image>
  61. </swiper-item>
  62. </swiper>
  63. </view>
  64. </view>
  65. <!-- tab切换 -->
  66. <view class="pub-tab-box">
  67. <view class="tab-inner">
  68. <view v-for="(item,index) in orderStatus" :key="index"
  69. :class="status ==item.value?'item active':'item'" @click="orderStatusChange(item)">
  70. <view class="text">
  71. {{ item.name }}
  72. <view class="tab-bg" v-show="status ==item.value"></view>
  73. <!-- <image v-show="status ==item.value" class="tab-bg" src="/static/images/tab_bg.png" mode=""> -->
  74. </image>
  75. </view>
  76. </view>
  77. <image class="white-gradient" src="/static/images/white_gradient_bg.png"></image>
  78. </view>
  79. <image class="icon mr24" src="/static/images/product_section_icon.png"></image>
  80. <image class="icon" src="/static/images/home_filter_icon.png"></image>
  81. </view>
  82. <!-- 菜单 -->
  83. <view class="menu-content">
  84. <view class="menu-box">
  85. <Menu :list="menus" @menuClick="menuClick" v-if="menus.length>0" style="width:100%;"></Menu>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 在线问诊、处方查询 -->
  90. <view class="online-inquiry">
  91. <view class="item" @click="navTo('/pages_shopping/shopping/productSalesList')">
  92. <!-- <image class="bg-img" src="../../static/images/banner1.png" mode=""></image> -->
  93. <image class="bg-img"
  94. src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250320/f2d3ba32a9344dc79b4df7c228189243.png"
  95. mode=""></image>
  96. <!-- <view class="inner">
  97. <text class="title">用药榜</text>
  98. <text class="sub-title"></text>
  99. <image src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250320/f2d3ba32a9344dc79b4df7c228189243.png" mode=""></image>
  100. </view> -->
  101. </view>
  102. <view class="item" @click="navTo('/pages_course/livingList')">
  103. <image class="bg-img" src="/static/images/banner2.png" mode=""></image>
  104. </view>
  105. </view>
  106. <view class="index-cont">
  107. <!-- 医生团队 -->
  108. <!-- <view class="pub-item">
  109. <view class="pub-title-box">
  110. <text class="left">医生团队</text>
  111. <view class="right" @click="navTo('../doctor/doctorList')">
  112. <text class="text">全部医生</text>
  113. <image src="../../static/images/arrow_gray.png" mode=""></image>
  114. </view>
  115. </view>
  116. <view class="doc-cont">
  117. <view class="inner">
  118. <view class="item" v-for="(item,index) in doctorList" :key="index" @click="shopDoctor(item)">
  119. <view class="head-box">
  120. <image :src="item.headImg" mode="aspectFill"></image>
  121. </view>
  122. <text class="name ellipsis">{{ item.doctorName }}</text>
  123. <text class="position ellipsis">
  124. {{utils.getDictLabelName("doctorPosition",item.position)}}
  125. </text>
  126. </view>
  127. </view>
  128. </view>
  129. </view> -->
  130. <!-- <view class="pub-item">
  131. <view class="tabs">
  132. <view class="tab" @click="docTabChange(1)">
  133. <image v-if="docTab==1" class="img" src="../../static/images/tab1.png" mode=""></image>
  134. <view class="inner">
  135. <text :class="docTab == 1?'title active':'title'" >推荐医生</text>
  136. </view>
  137. </view>
  138. <view class="tab" @click="docTabChange(2)">
  139. <image v-if="docTab==2" class="img" src="../../static/images/tab2.png" mode=""></image>
  140. <view class="inner">
  141. <text :class="docTab == 2?'title active':'title'" >推荐药师</text>
  142. </view>
  143. </view>
  144. <view class="tab" @click="docTabChange(3)">
  145. <image v-if="docTab==3" class="img" src="../../static/images/tab3.png" mode=""></image>
  146. <view class="inner">
  147. <text :class="docTab == 3?'title active':'title'" >推荐营养师</text>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="doc-tab-box">
  152. <view class="tab-inner" >
  153. <view
  154. v-for="(item,index) in depts"
  155. :key="index"
  156. :class="item.departmentId == deptId?'item active':'item'"
  157. @click="deptChange(item)"
  158. >
  159. <view class="text">
  160. {{ item.departmentName }}
  161. <image v-show="item.departmentId == deptId" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
  162. </view>
  163. </view>
  164. </view>
  165. <image class="right-mask" src="../../static/images/mask.png" mode=""></image>
  166. </view>
  167. <view class="doc-list">
  168. <view class="item" v-for="(item,index) in doctorList" :key="index" @click="shopDoctor(item)"> -->
  169. <!-- 头像 -->
  170. <!-- <view class="head-box">
  171. <image :src="item.headImg" mode="aspectFill"></image>
  172. </view> -->
  173. <!-- 详细信息 -->
  174. <!-- <view class="info"> -->
  175. <!-- 姓名等 -->
  176. <!-- <view class="top">
  177. <text class="name">{{ item.doctorName }}</text>
  178. <view class="line"></view>
  179. <text class="other">{{utils.getDictLabelName("doctorPosition",item.position)}}</text>
  180. <view class="line"></view>
  181. <text class="other">{{ item.departmentName }}</text>
  182. </view> -->
  183. <!-- 单位 -->
  184. <!-- <view class="unit-box"> -->
  185. <!-- <view class="level">三甲</view> -->
  186. <!-- <view class="name">{{ item.hospitalName }}</view>
  187. </view> -->
  188. <!-- 擅长 -->
  189. <!-- <view class="expertise ellipsis2">
  190. 擅长:{{ item.doctorDesc }}
  191. </view> -->
  192. <!-- 评分 -->
  193. <!-- <view class="rate-box">
  194. <view class="star">
  195. <image src="../../static/images/star.png" mode=""></image>
  196. <text>{{ item.pings }}</text>
  197. </view>
  198. <view class="line"></view>
  199. <view class="num-box">
  200. <text class="label">接诊数</text>
  201. <text class="num">{{ item.orders }}</text>
  202. </view>
  203. <view class="line"></view>
  204. <view class="num-box">
  205. <text class="label">响应速度</text>
  206. <text class="num">{{ item.speed }}分钟</text>
  207. </view>
  208. </view> -->
  209. <!-- 价格 -->
  210. <!-- <view class="price-box">
  211. <view class="btn-item" v-for="(subitme) in item.price">
  212. <text class="label" >{{subitme.priceType==1?'图文':'语音'}}</text>
  213. <text class="num">¥{{subitme.price.toFixed(2)}}</text>
  214. </view>
  215. </view>
  216. </view>
  217. </view>
  218. <view class="bottom-title" @click="navTo('../doctor/doctorList?doctorType='+docTab)">
  219. <text >{{allDoctorTitle}}</text>
  220. <image src="../../static/images/arrow3.png" mode=""></image>
  221. </view>
  222. </view>
  223. -->
  224. <!-- <view class="doc-cont">
  225. <view class="inner">
  226. <view class="item" v-for="(item,index) in doctorList" :key="index" @click="shopDoctor(item)">
  227. <view class="head-box">
  228. <image :src="item.headImg" mode="aspectFill"></image>
  229. </view>
  230. <text class="name ellipsis">{{ item.doctorName }}</text>
  231. <text class="position ellipsis">
  232. {{utils.getDictLabelName("doctorPosition",item.position)}}
  233. </text>
  234. </view>
  235. </view>
  236. </view> -->
  237. <!-- </view> -->
  238. <!-- 问诊案例 -->
  239. <!-- <view class="pub-item">
  240. <view class="pub-title-box">
  241. <text class="left">问诊案例</text>
  242. <view class="right" @click="viewAll('doctorCase')">
  243. <text class="text">全部案例</text>
  244. <image src="../../static/images/arrow_gray.png" mode=""></image>
  245. </view>
  246. </view>
  247. <view class="inner">
  248. <view class="pub-tab-box">
  249. <view class="tab-inner">
  250. <view
  251. v-for="(item,index) in orderTypes"
  252. :key="index"
  253. :class="item.id == orderType?'item cases active':'item cases'"
  254. @click="orderTypeChange(item)"
  255. >
  256. <view class="text">
  257. {{ item.name }}
  258. <image v-show="item.id == orderType" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
  259. </view>
  260. </view>
  261. </view>
  262. <image class="right-mask" src="../../static/images/mask.png" mode=""></image>
  263. </view>
  264. <view class="cases-list">
  265. <view class="item" v-for="(item,index) in doctorOrderList" :key="index">
  266. <view class="dec-text ellipsis2">{{item.title}}</view>
  267. <view class="images-box" v-if="item.imgs!=null" >
  268. <view class="img-item" v-for="(subitem,j) in utils.photosToArr(item.imgs)" @click="showImg(item.imgs)" :key="j">
  269. <image :src="subitem" mode="aspectFill" ></image>
  270. </view>
  271. </view>
  272. <view class="doc-info">
  273. <view class="head">
  274. <image :src="item.doctorHeadImg" mode="aspectFill"></image>
  275. </view>
  276. <view class="name">{{item.doctorName}}</view>
  277. <view class="line"></view>
  278. <view class="posit">
  279. {{utils.getDictLabelName("doctorPosition",item.doctorPosition)}}
  280. </view>
  281. <view class="line"></view>
  282. <view class="address">{{item.hospitalName}}</view>
  283. </view>
  284. <view class="answer-box">
  285. <text class="text-inner" v-if="item.orderType == '1' ">{{item.replyContent}}</text>
  286. <view class="voice-inner" v-if="item.orderType == '2'">
  287. <free-audio
  288. startPic='/static/images/play.png'
  289. endPic='/static/images/pause.png'
  290. activeColor="#2BC7B9"
  291. :audioId="'audio'+index"
  292. :url='item.replyAudioUrl'
  293. ></free-audio>
  294. </view>
  295. </view>
  296. <view class="read-box">
  297. <image src="../../static/images/eye.png" mode=""></image>
  298. <text class="text">{{item.views}}人看过</text>
  299. </view>
  300. </view>
  301. </view>
  302. </view>
  303. </view> -->
  304. <!-- 热门榜单 -->
  305. <!-- <NewProduct :detail="newProductList" /> -->
  306. <HotProduct :detail="hotProductList" />
  307. <!-- 健康百科 -->
  308. <!-- <view class="pub-item" style="margin-top: 20rpx;">
  309. <view class="pub-title-box">
  310. <text class="left">健康百科</text>
  311. <view class="right" @click="switchTo('../healthy/index')">
  312. <text class="text">更多</text>
  313. <image src="../../static/images/arrow_gray.png" mode=""></image>
  314. </view>
  315. </view>
  316. <view class="inner">
  317. <view class="pub-tab-box">
  318. <view class="tab-inner">
  319. <view
  320. v-for="(item,index) in articleCateList"
  321. :key="index"
  322. :class="item.cateId == cateId?'item active':'item'"
  323. @click="articleCateChange(item)"
  324. >
  325. <view class="text">
  326. {{ item.cateName }}
  327. <image v-show="item.cateId == cateId" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image>
  328. </view>
  329. </view>
  330. </view>
  331. <image class="right-mask" src="../../static/images/mask.png" mode=""></image>
  332. </view>
  333. <view class="know-list">
  334. <view class="item" v-for="(item,index) in articleList" :key="index" @click="showArticle(item)">
  335. <view class="left">
  336. <view class="title ellipsis2">{{ item.title }}</view>
  337. <view class="info-box">
  338. <view class="readers">
  339. <view class="head-box" v-if="item.viewsList!=null&&item.viewsList.length>0">
  340. <view class="head" v-for="(subitem,j) in item.viewsList" :key="j">
  341. <image v-if="subitem!=null" :src="subitem.avatar==null?'/static/images/detault_head.jpg':subitem.avatar" mode=""></image>
  342. </view>
  343. </view>
  344. <view class="readings">
  345. <image class="eye" src="../../static/images/eye.png" mode=""></image>
  346. <text class="num">{{item.views}}</text>
  347. </view>
  348. </view>
  349. <view class="time">{{item.publishTime}}</view>
  350. </view>
  351. </view>
  352. <view class="right">
  353. <image :src="item.imageUrl" mode="aspectFill"></image>
  354. </view>
  355. </view>
  356. </view>
  357. </view>
  358. </view> -->
  359. <!-- 精选药品 -->
  360. <TuiProduct ref="tuiProduct" />
  361. <!-- <view class="feat-title">
  362. <image src="../../static/images/tui.png" mode=""></image>
  363. <text>精选药品</text>
  364. </view>
  365. <view class="drug-list">
  366. <view class="item" v-for="(item,index) in tuiProductList" :key="index" @click="showProduct(item)">
  367. <view class="img-box">
  368. <image :src="item.image" mode="aspectFit"></image>
  369. </view>
  370. <view class="info-box">
  371. <view class="title ellipsis2">{{ item.productName }}</view>
  372. <view class="price-box">
  373. <view class="now">
  374. <text class="unit">¥</text>
  375. <text class="num">{{item.price.toFixed(2)}}</text>
  376. </view>
  377. <view class="old">¥{{item.otPrice.toFixed(2)}}</view>
  378. </view>
  379. </view>
  380. </view>
  381. </view> -->
  382. </view>
  383. <!-- 限时消息 -->
  384. <!-- <view class="message-box" >
  385. <view class="left">
  386. <image src="../../static/images/close24.png" mode="" @click="closeMsg"></image>
  387. <view class="text ellipsis">关注公众号了解更新</view>
  388. </view>
  389. <view class="btn">查看</view>
  390. </view> -->
  391. <!-- #ifdef MP-WEIXIN -->
  392. <view class="official-account">
  393. <official-account @load="bindload" @error="binderror"></official-account>
  394. </view>
  395. <!-- #endif -->
  396. <view class="popup-box" v-if="activityShow">
  397. <view class="info-mask" @tap="closeActivity()"></view>
  398. <view class="info-form">
  399. <image :src="activity.logoUrl" @tap="showActivity()" />
  400. </view>
  401. </view>
  402. <z-modal :show="tuiModalControl" placeholderText="请输入邀请码" :btnGroup="btnGroup" :contentType="2"
  403. titleText="填写邀请码" @cancle="cancleTui" @sure="submitTui"></z-modal>
  404. </view>
  405. </template>
  406. <script>
  407. import zModal from '@/components/z-modal/z-modal.vue'
  408. import {
  409. getStoreActivity
  410. } from '@/api/activity.js'
  411. import {
  412. getDepartmentList
  413. } from '@/api/doctorOrder.js'
  414. import {
  415. getMenu,
  416. getCanvas,
  417. getIndexData,
  418. getTuiDoctor,
  419. getTuiArticle,
  420. getTuiDoctorOrder,
  421. getCartCount
  422. } from '@/api/index'
  423. import {
  424. getStoreConfig
  425. } from '@/api/common'
  426. import tabBg from "@/static/images/tab_bg.png"
  427. import freeAudio from '@/components/chengpeng-audio/free-audio.vue'
  428. import Menu from '@/components/Menu.vue'
  429. import HotProduct from './components/HotProduct.vue'
  430. // import NewProduct from './components/NewProduct.vue'
  431. import TuiProduct from '@/components/tuiProduct.vue'
  432. import {
  433. getUserInfo,
  434. bindPromoter
  435. } from '@/api/user'
  436. export default {
  437. components: {
  438. zModal,
  439. freeAudio,
  440. Menu,
  441. HotProduct,
  442. TuiProduct
  443. },
  444. data() {
  445. return {
  446. status: '',
  447. orderStatus: [{
  448. name: "精选",
  449. value: ""
  450. },
  451. {
  452. name: "健康新品",
  453. value: "0"
  454. },
  455. {
  456. name: "营养保健",
  457. value: "1"
  458. },
  459. {
  460. name: "健康滋补",
  461. value: "2"
  462. },{
  463. name: "天",
  464. value: "3"
  465. }
  466. ],
  467. btnGroup: [{
  468. text: '取消',
  469. color: '#FFFFFF',
  470. bgColor: '#999999',
  471. width: '150rpx',
  472. height: '80rpx',
  473. shape: 'fillet',
  474. eventName: 'cancle'
  475. }, {
  476. text: '确定',
  477. color: '#FFFFFF',
  478. bgColor: '#2BC7B9',
  479. width: '150rpx',
  480. height: '80rpx',
  481. shape: 'fillet',
  482. eventName: 'sure'
  483. }],
  484. tuiModalControl: false,
  485. activity: null,
  486. activityShow: false,
  487. newProductList: [],
  488. hotProductList: [],
  489. tuiProductList: [],
  490. menus: [],
  491. canvas: [],
  492. allDoctorTitle: "全部医生",
  493. topLen: 0,
  494. deptId: 0,
  495. depts: [],
  496. docTab: 1,
  497. top: 0,
  498. cartCount: 0,
  499. doctorOrderList: [],
  500. orderType: 0,
  501. cateId: null,
  502. articleList: [],
  503. advList: [],
  504. doctorList: [],
  505. articleCateList: [],
  506. // 状态栏的高度
  507. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  508. tabBg: tabBg, // tab切换背景
  509. // 问诊案例类型
  510. orderTypes: [{
  511. name: '全部',
  512. id: 0,
  513. }, {
  514. name: '图文',
  515. id: 1,
  516. }, {
  517. name: '语音',
  518. id: 2,
  519. }],
  520. // 限时消息是否显示
  521. messageShow: true,
  522. }
  523. this.getStoreActivity();
  524. },
  525. onLoad(option) {
  526. if (option.userCode != null) {
  527. uni.setStorageSync('userCode', option.userCode);
  528. if (this.utils.checkLoginState()) {
  529. this.getUserInfo();
  530. }
  531. }
  532. if (option.hasOwnProperty('q') && option.q) {
  533. // 通过下面这步解码,可以拿到url的值
  534. const url = decodeURIComponent(option.q)
  535. this.url = url;
  536. // // 对url中携带的参数提取处理
  537. const obj = this.utils.urlToObj(url)
  538. uni.setStorageSync('userCode', obj.userCode);
  539. if (this.utils.checkLoginState()) {
  540. this.getUserInfo();
  541. }
  542. }
  543. this.getStoreActivity()
  544. },
  545. // 暂停所有音频(一般用于页面切换时停止正在播放的音频)
  546. onUnload() { //普通页面在 onUnload 生命周期中执行
  547. uni.$emit('stop')
  548. },
  549. onHide() { //tabBar页面在onHide生命周期中执行
  550. uni.$emit('stop')
  551. },
  552. onPageScroll(e) {
  553. //console.log(e)
  554. this.top = e.scrollTop;
  555. },
  556. mounted() {
  557. //this.getDepartmentList();
  558. },
  559. onShareAppMessage(res) {
  560. return {
  561. title: '芳华悦选',
  562. path: `/pages/common/launch`,
  563. imageUrl: '/static/images/logo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  564. }
  565. },
  566. onReachBottom() {
  567. console.log("onReachBottom")
  568. this.$refs.tuiProduct.getTuiProducts();
  569. },
  570. //分享到朋友圈
  571. onShareTimeline(res) {
  572. return {
  573. title: '芳华悦选互联网医院',
  574. query: '', //页面参数
  575. imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250721/efce6c594de34caba6537992083a5e47.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  576. }
  577. },
  578. computed: {
  579. // 计算属性的 getter
  580. bg: function() {
  581. var top = this.top / 30;
  582. // console.log(top)
  583. return 'rgba(43,199,185, ' + top + ')';
  584. },
  585. },
  586. onShow() {
  587. this.getMenu();
  588. this.getIndexData()
  589. //this.getTuiDoctorOrder();
  590. // console.log(uni.getStorageSync('isLocation'))
  591. // if(uni.getStorageSync('isLocation')==""){
  592. // this.getLocation();
  593. // }
  594. if (this.utils.checkLoginState()) {
  595. this.getCartCount();
  596. }
  597. this.getStoreConfig();
  598. //this.getTuiDoctor()
  599. this.getCanvas();
  600. },
  601. methods: { // tab切换
  602. orderStatusChange(item) {
  603. this.status = item.value
  604. },
  605. navToMiniProgram() {
  606. uni.navigateToMiniProgram({
  607. // appid 写你要跳转的小程序的 appid
  608. appId: 'wx503cf8ab31f83dd4',
  609. // 路径写 src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
  610. path: '/pages/common/launch',
  611. extraData: {
  612. // 'type': 'out'
  613. },
  614. // 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
  615. envVersion: 'develop',
  616. success(res) {
  617. // 打开成功
  618. // uni.showToast({
  619. // title: '跳转成功'
  620. // })
  621. },
  622. fail(err) {
  623. // 打开失败/取消
  624. // uni.showToast({
  625. // title: '跳转不成功'
  626. // })
  627. }
  628. })
  629. },
  630. getUserInfo() {
  631. getUserInfo().then(
  632. res => {
  633. if (res.code == 200) {
  634. if (res.user != null) {
  635. if (res.user.isPromoter == null || res.user.isPromoter == 0) {
  636. this.tuiModalControl = true
  637. }
  638. }
  639. } else {
  640. uni.showToast({
  641. icon: 'none',
  642. title: "请求失败",
  643. });
  644. }
  645. },
  646. rej => {}
  647. );
  648. },
  649. cancleTui(e) {
  650. this.tuiModalControl = false
  651. },
  652. submitTui(e) {
  653. console.log(e)
  654. if (e.inputText == null || e.inputText == "") {
  655. uni.showToast({
  656. icon: 'none',
  657. title: "请输入邀请码",
  658. });
  659. return;
  660. }
  661. var data = {
  662. userCode: e.inputText
  663. };
  664. bindPromoter(data).then(
  665. res => {
  666. if (res.code == 200) {
  667. uni.showToast({
  668. icon: 'none',
  669. title: res.msg,
  670. });
  671. this.tuiModalControl = false
  672. } else {
  673. uni.showToast({
  674. icon: 'none',
  675. title: res.msg,
  676. });
  677. }
  678. },
  679. rej => {}
  680. );
  681. },
  682. bindload: function(detail) {},
  683. binderror: function(detail) {},
  684. closeActivity() {
  685. this.activityShow = false;
  686. // uni.setStorageSync(this.activity.activityId,null);
  687. },
  688. getStoreActivity() {
  689. let data = {}
  690. getStoreActivity(data).then(res => {
  691. this.activity = res.activity;
  692. if (this.activity != null) {
  693. // if(uni.getStorageSync(this.activity.activityId)!=null)
  694. // {
  695. // uni.setStorageSync(this.activity.activityId,1);
  696. // this.activityShow=true;
  697. // }
  698. // else{
  699. // this.activityShow=false;
  700. // }
  701. this.activityShow = true;
  702. } else {
  703. this.activityShow = false;
  704. }
  705. })
  706. },
  707. showActivity() {
  708. this.activityShow = false;
  709. uni.navigateTo({
  710. url: '/pages_shopping/shopping/activityDetails?activityId=' + this.activity.activityId
  711. })
  712. },
  713. menuClick(item) {
  714. if (item.linkType == 1) {
  715. if (item.linkUrl == "/pages/shopping/index") {
  716. uni.switchTab({
  717. url: item.linkUrl
  718. })
  719. } else if (item.linkUrl == "/pages/healthy/index") {
  720. uni.switchTab({
  721. url: item.linkUrl
  722. })
  723. } else {
  724. uni.navigateTo({
  725. url: item.linkUrl
  726. })
  727. }
  728. } else if (item.linkType == 0) {
  729. // this.navToMiniProgram();
  730. uni.showToast({
  731. icon: 'none',
  732. title: "开发中...",
  733. });
  734. }
  735. },
  736. goDev() {
  737. uni.showToast({
  738. icon: 'none',
  739. title: "开发中...",
  740. });
  741. },
  742. handleAdvClick(item) {
  743. console.log(item);
  744. if (item.showType == 1) {
  745. uni.setStorageSync('url', item.advUrl);
  746. uni.navigateTo({
  747. url: "h5"
  748. })
  749. } else if (item.showType == 2) {
  750. uni.navigateTo({
  751. url: item.advUrl
  752. })
  753. } else if (item.showType == 3) {
  754. uni.setStorageSync('content', item.content);
  755. uni.navigateTo({
  756. url: "content"
  757. })
  758. }
  759. },
  760. deptChange(item) {
  761. this.deptId = item.departmentId;
  762. this.getTuiDoctor();
  763. },
  764. getMenu() {
  765. getMenu().then(res => {
  766. console.log(res)
  767. if (res.code == 200) {
  768. this.menus = res.data
  769. } else {
  770. }
  771. });
  772. },
  773. getCanvas() {
  774. getCanvas().then(res => {
  775. if (res.code == 200) {
  776. console.log(res.data)
  777. this.canvas = JSON.parse(res.data.json)
  778. } else {
  779. }
  780. });
  781. },
  782. getDepartmentList() {
  783. this.depts = [];
  784. getDepartmentList().then(res => {
  785. if (res.code == 200) {
  786. var allDept = {
  787. departmentId: 0,
  788. departmentName: "全部"
  789. }
  790. this.depts.push(allDept);
  791. this.depts = this.depts.concat(res.data);
  792. } else {
  793. uni.showToast({
  794. icon: 'none',
  795. title: "请求失败",
  796. });
  797. }
  798. });
  799. },
  800. getTuiDoctor() {
  801. let data = {
  802. departmentId: this.deptId,
  803. doctorType: this.docTab
  804. };
  805. getTuiDoctor(data).then(
  806. res => {
  807. if (res.code == 200) {
  808. this.doctorList = res.data;
  809. } else {
  810. uni.showToast({
  811. icon: 'none',
  812. title: "请求失败",
  813. });
  814. }
  815. },
  816. rej => {}
  817. );
  818. },
  819. docTabChange(val) {
  820. if (val == 1) {
  821. this.allDoctorTitle = "全部医师"
  822. }
  823. if (val == 2) {
  824. this.allDoctorTitle = "全部药师"
  825. }
  826. if (val == 3) {
  827. this.allDoctorTitle = "全部营养师"
  828. }
  829. this.docTab = val;
  830. this.getTuiDoctor();
  831. },
  832. showImg(urls) {
  833. var imgArr = urls.split(',');
  834. //预览图片
  835. uni.previewImage({
  836. urls: imgArr,
  837. current: imgArr[0]
  838. });
  839. },
  840. getStoreConfig() {
  841. getStoreConfig().then(
  842. res => {
  843. if (res.code == 200) {
  844. uni.setStorageSync('config', JSON.stringify(res.data));
  845. }
  846. },
  847. rej => {}
  848. );
  849. },
  850. goAuthUrl(url) {
  851. this.utils.isLogin().then(res => {
  852. if (res) {
  853. uni.navigateTo({
  854. url: url
  855. })
  856. }
  857. })
  858. },
  859. switchTo(url) {
  860. uni.switchTab({
  861. url: url
  862. })
  863. return
  864. },
  865. // 跳转页面
  866. navTo(url) {
  867. uni.navigateTo({
  868. url: url
  869. })
  870. },
  871. getLocation() {
  872. var that = this;
  873. uni.authorize({
  874. scope: 'scope.userLocation',
  875. success() {
  876. uni.getLocation({
  877. type: 'gcj02', //腾讯地图使用gcj02获取位置坐标
  878. success: function(res) {
  879. uni.setStorageSync('isLocation', 1);
  880. uni.setStorageSync('lng', res.longitude);
  881. uni.setStorageSync('lat', res.latitude);
  882. },
  883. })
  884. },
  885. fail(err) {
  886. console.log(err)
  887. }
  888. })
  889. },
  890. getIndexData() {
  891. let data = {};
  892. getIndexData(data).then(
  893. res => {
  894. if (res.code == 200) {
  895. this.advList = res.data.advList;
  896. this.articleCateList = res.data.articleCateList;
  897. if (this.articleCateList != null && this.articleCateList.length > 0) {
  898. this.cateId = this.articleCateList[0].cateId;
  899. this.getTuiArticle()
  900. }
  901. this.tuiProductList = res.data.tuiProductList
  902. this.newProductList = res.data.newProductList
  903. this.hotProductList = res.data.hotProductList
  904. } else {
  905. uni.showToast({
  906. icon: 'none',
  907. title: "请求失败",
  908. });
  909. }
  910. },
  911. rej => {}
  912. );
  913. },
  914. getCartCount() {
  915. this.utils.isLogin().then(res => {
  916. if (res) {
  917. getCartCount().then(
  918. cartRes => {
  919. if (cartRes.code == 200) {
  920. this.cartCount = cartRes.data;
  921. }
  922. },
  923. rej => {}
  924. );
  925. }
  926. })
  927. },
  928. getTuiArticle() {
  929. let data = {
  930. cateId: this.cateId
  931. };
  932. getTuiArticle(data).then(
  933. res => {
  934. if (res.code == 200) {
  935. this.articleList = res.data;
  936. } else {
  937. uni.showToast({
  938. icon: 'none',
  939. title: "请求失败",
  940. });
  941. }
  942. },
  943. rej => {}
  944. );
  945. },
  946. getTuiDoctorOrder() {
  947. let data = {
  948. orderType: this.orderType
  949. };
  950. getTuiDoctorOrder(data).then(
  951. res => {
  952. if (res.code == 200) {
  953. this.doctorOrderList = res.data;
  954. } else {
  955. uni.showToast({
  956. icon: 'none',
  957. title: "请求失败",
  958. });
  959. }
  960. },
  961. rej => {}
  962. );
  963. },
  964. showArticle(item) {
  965. uni.navigateTo({
  966. url: '../healthy/detail?articleId=' + item.articleId
  967. })
  968. },
  969. showProduct(item) {
  970. uni.navigateTo({
  971. url: '/pages_shopping/shopping/productDetails?productId=' + item.productId
  972. })
  973. },
  974. // 顶部搜索
  975. toSearch() {
  976. uni.navigateTo({
  977. url: './productSearch'
  978. })
  979. },
  980. // 健康知识选中
  981. articleCateChange(item) {
  982. this.cateId = item.cateId;
  983. this.getTuiArticle();
  984. },
  985. // 问诊案例选中
  986. orderTypeChange(item) {
  987. this.orderType = item.id;
  988. console.log(this.orderType)
  989. this.getTuiDoctorOrder();
  990. },
  991. // 关闭限时消息
  992. closeMsg() {
  993. this.messageShow = false
  994. },
  995. // 查看全部
  996. viewAll(url) {
  997. uni.navigateTo({
  998. url: '/pages/home/' + url,
  999. });
  1000. },
  1001. shopDoctor(item) {
  1002. console.log(item);
  1003. uni.navigateTo({
  1004. url: "../doctor/doctorDetail?doctorId=" + item.doctorId
  1005. })
  1006. },
  1007. // 跳转页面
  1008. navgetTo(url) {
  1009. uni.navigateTo({
  1010. url: url
  1011. })
  1012. },
  1013. switchTo(url) {
  1014. uni.switchTab({
  1015. url: url
  1016. })
  1017. return
  1018. },
  1019. // 在线问诊
  1020. openIm() {
  1021. uni.navigateTo({
  1022. url: '../doctor/doctorOrderIM?orderId=10'
  1023. })
  1024. }
  1025. }
  1026. }
  1027. </script>
  1028. <style lang="scss">
  1029. .fixed-top-box {
  1030. width: 100%;
  1031. position: fixed;
  1032. top: 0;
  1033. left: 0;
  1034. z-index: 1000;
  1035. transition: all 0.5s;
  1036. background-color: #2bc7b9;
  1037. &.show-back {
  1038. // background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
  1039. }
  1040. .status_bar {
  1041. width: 100%;
  1042. }
  1043. .shop-block {
  1044. display: flex;
  1045. transform: translateY();
  1046. justify-content: flex-end;
  1047. .shop {
  1048. width: 64rpx;
  1049. height: 64rpx;
  1050. padding: 12rpx;
  1051. margin-right: 210rpx;
  1052. border-radius: 32rpx 32rpx 32rpx 32rpx;
  1053. border: 1rpx solid #E9E9E9;
  1054. box-sizing: border-box;
  1055. background: #FFFFFF;
  1056. }
  1057. }
  1058. }
  1059. .content {
  1060. width: 100%;
  1061. position: relative;
  1062. .bg {
  1063. width: 100%;
  1064. height: 380rpx;
  1065. position: absolute;
  1066. top: 0;
  1067. left: 0;
  1068. }
  1069. .top-inner {
  1070. width: 100%;
  1071. position: absolute;
  1072. top: 0;
  1073. left: 0;
  1074. z-index: 5;
  1075. .top-title {
  1076. position: absolute;
  1077. top: 88rpx;
  1078. display: flex;
  1079. flex-direction: column;
  1080. height: 88rpx;
  1081. // line-height: 88rpx;
  1082. font-size: 36rpx;
  1083. color: #000000;
  1084. justify-content: flex-start;
  1085. padding-left: 24rpx;
  1086. .name {
  1087. font-weight: 500;
  1088. width: 183rpx;
  1089. height: 75rpx;
  1090. image {
  1091. width: 100%;
  1092. height: 100%;
  1093. }
  1094. }
  1095. .dot {
  1096. font-size: 24rpx;
  1097. color: #999999;
  1098. }
  1099. }
  1100. .func-cont {
  1101. box-sizing: border-box;
  1102. display: flex;
  1103. align-items: center;
  1104. padding: 30rpx 20rpx 30rpx 20rpx;
  1105. .search-cont {
  1106. box-sizing: border-box;
  1107. display: flex;
  1108. align-items: center;
  1109. flex: 1;
  1110. height: 72rpx;
  1111. background: #FFFFFF;
  1112. border-radius: 34rpx 34rpx 34rpx 34rpx;
  1113. border: 2rpx solid #02B176;
  1114. padding: 4rpx 4rpx 4rpx 24rpx;
  1115. .icon-search {
  1116. width: 28rpx;
  1117. height: 28rpx;
  1118. margin-right: 20rpx;
  1119. }
  1120. input {
  1121. height: 60rpx;
  1122. line-height: 60rpx;
  1123. flex: 1;
  1124. }
  1125. .search-button {
  1126. width: 120rpx;
  1127. height: 60rpx;
  1128. background: linear-gradient(90deg, #38D97D 0%, #02B176 100%);
  1129. border-radius: 30rpx 30rpx 30rpx 30rpx;
  1130. font-weight: 500;
  1131. font-size: 28rpx;
  1132. color: #FFFFFF;
  1133. text-align: center;
  1134. line-height: 60rpx;
  1135. }
  1136. }
  1137. ::v-deep.uni-badge {
  1138. border: none;
  1139. background-color: #FF3636;
  1140. font-family: Roboto;
  1141. }
  1142. .img-item {
  1143. width: 44rpx;
  1144. height: 44rpx;
  1145. margin-left: 20rpx;
  1146. image {
  1147. width: 100%;
  1148. height: 100%;
  1149. }
  1150. }
  1151. }
  1152. .tips {
  1153. margin: 0rpx 20rpx 30rpx;
  1154. height: 40rpx;
  1155. line-height: 40rpx;
  1156. display: flex;
  1157. justify-content: space-between;
  1158. align-items: center;
  1159. .left {
  1160. font-size: 30rpx;
  1161. color: #FFFFFF;
  1162. }
  1163. .right {
  1164. padding: 5rpx 20rpx;
  1165. font-size: 24rpx;
  1166. color: #FFFFFF;
  1167. background-color: #2bc7b9;
  1168. border-radius: 50rpx;
  1169. }
  1170. }
  1171. }
  1172. .banner-box {
  1173. padding: 0 20rpx;
  1174. .inner {
  1175. width: 100%;
  1176. height: 236rpx;
  1177. border-radius: 10rpx;
  1178. overflow: hidden;
  1179. .swiper,
  1180. .swiper-item,
  1181. .swiper-item image {
  1182. width: 100%;
  1183. height: 100%;
  1184. }
  1185. }
  1186. }
  1187. // tab栏切换
  1188. .pub-tab-box {
  1189. display: flex;
  1190. align-items: center;
  1191. box-sizing: border-box;
  1192. width: 100%;
  1193. padding: 0 24upx;
  1194. background-color: #FFFFFF;
  1195. justify-content: space-between;
  1196. .icon {
  1197. width: 32rpx;
  1198. height: 32rpx;
  1199. }
  1200. .tab-inner {
  1201. height: 88upx;
  1202. line-height: 88upx;
  1203. display: flex;
  1204. align-items: center;
  1205. justify-content: space-between;
  1206. overflow-x: auto;
  1207. position: relative;
  1208. margin-right: 12rpx;
  1209. .white-gradient {
  1210. position: absolute;
  1211. right: 0;
  1212. width: 64rpx;
  1213. height: 64rpx;
  1214. z-index: 1;
  1215. }
  1216. }
  1217. .item {
  1218. font-size: 30upx;
  1219. white-space: nowrap;
  1220. line-height: 1;
  1221. font-family: PingFang SC, PingFang SC;
  1222. color: #4D4D4D;
  1223. margin-right: 32upx;
  1224. display: flex;
  1225. align-items: center;
  1226. justify-content: center;
  1227. &:last-child {
  1228. margin-right: 0;
  1229. }
  1230. &.active {
  1231. font-weight: bold;
  1232. color: #333333;
  1233. }
  1234. .text {
  1235. position: relative;
  1236. z-index: 1;
  1237. }
  1238. .tab-bg {
  1239. width: 60rpx;
  1240. height: 12rpx;
  1241. background: linear-gradient(90deg, rgba(56, 217, 125, 0.5) 0%, rgba(56, 217, 125, 0) 100%);
  1242. border-radius: 6rpx 6rpx 6rpx 6rpx;
  1243. position: absolute;
  1244. top: 26upx;
  1245. left: 50%;
  1246. transform: translateX(-36upx);
  1247. z-index: -1;
  1248. }
  1249. }
  1250. }
  1251. .menu-content {
  1252. // width: 100%;
  1253. background-color: #fff;
  1254. overflow: hidden;
  1255. padding: 20rpx 20rpx 0;
  1256. }
  1257. .menu-box {
  1258. display: flex;
  1259. align-items: center;
  1260. background-color: #FFFFFF;
  1261. }
  1262. .online-inquiry {
  1263. box-sizing: border-box;
  1264. width: 100%;
  1265. height: 170rpx;
  1266. padding: 0 20rpx;
  1267. background: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 62%, rgba(255, 255, 255, 0) 100%);
  1268. display: flex;
  1269. justify-content: space-between;
  1270. .item {
  1271. // width: 46.13%;
  1272. width: 346rpx;
  1273. height: 150rpx;
  1274. position: relative;
  1275. .bg-img,
  1276. .inner {
  1277. border-radius: 15rpx;
  1278. width: 100%;
  1279. height: 100%;
  1280. position: absolute;
  1281. top: 0;
  1282. left: 0;
  1283. z-index: 1;
  1284. }
  1285. .inner {
  1286. box-sizing: border-box;
  1287. z-index: 2;
  1288. display: flex;
  1289. flex-direction: column;
  1290. justify-content: center;
  1291. padding-left: 32rpx;
  1292. .title {
  1293. font-size: 30rpx;
  1294. line-height: 1;
  1295. font-family: PingFang SC;
  1296. font-weight: 500;
  1297. color: #111111;
  1298. margin-bottom: 20rpx;
  1299. }
  1300. .sub-title {
  1301. font-size: 24rpx;
  1302. font-family: PingFang SC;
  1303. font-weight: 500;
  1304. color: #666666;
  1305. }
  1306. image {
  1307. width: 80rpx;
  1308. height: 90rpx;
  1309. position: absolute;
  1310. right: 7rpx;
  1311. bottom: 7rpx;
  1312. }
  1313. }
  1314. }
  1315. }
  1316. .index-cont {
  1317. box-sizing: border-box;
  1318. padding: 0 20rpx 120rpx;
  1319. .pub-item {
  1320. background: #FFFFFF;
  1321. border-radius: 16rpx;
  1322. margin-bottom: 20rpx;
  1323. .tabs {
  1324. width: 100%;
  1325. display: flex;
  1326. align-items: center;
  1327. justify-content: flex-start;
  1328. height: 110rpx;
  1329. background-color: #F0F3F4;
  1330. .tab {
  1331. height: 110rpx;
  1332. display: flex;
  1333. align-items: center;
  1334. justify-content: center;
  1335. position: relative;
  1336. flex: 1;
  1337. .img {
  1338. z-index: 1;
  1339. position: absolute;
  1340. top: 0rpx;
  1341. left: 0rpx;
  1342. width: 100%;
  1343. height: 100%;
  1344. }
  1345. .inner {
  1346. z-index: 2;
  1347. .title {
  1348. font-size: 32rpx;
  1349. font-family: PingFang SC;
  1350. font-weight: bold;
  1351. color: #666666;
  1352. }
  1353. .active {
  1354. color: #2BC7B9;
  1355. }
  1356. }
  1357. }
  1358. }
  1359. .pub-title-box {
  1360. box-sizing: border-box;
  1361. padding: 36rpx 30rpx;
  1362. display: flex;
  1363. align-items: center;
  1364. justify-content: space-between;
  1365. .left {
  1366. font-size: 32rpx;
  1367. line-height: 1;
  1368. font-family: PingFang SC;
  1369. font-weight: bold;
  1370. color: #111111;
  1371. }
  1372. .right {
  1373. display: flex;
  1374. align-items: center;
  1375. justify-content: center;
  1376. .text {
  1377. font-size: 24rpx;
  1378. line-height: 1;
  1379. font-family: PingFang SC;
  1380. font-weight: 500;
  1381. color: #999999;
  1382. margin-right: 10rpx;
  1383. }
  1384. image {
  1385. width: 14rpx;
  1386. height: 24rpx;
  1387. }
  1388. }
  1389. }
  1390. .doc-tab-box {
  1391. padding: 14rpx 30rpx 0rpx 30rpx;
  1392. position: relative;
  1393. .tab-inner {
  1394. padding: 14rpx 0 30rpx;
  1395. display: flex;
  1396. overflow-x: auto;
  1397. }
  1398. .item {
  1399. font-size: 28rpx;
  1400. white-space: nowrap;
  1401. line-height: 1;
  1402. font-family: PingFang SC;
  1403. font-weight: 500;
  1404. color: #666666;
  1405. margin-right: 40rpx;
  1406. position: relative;
  1407. &:last-child {
  1408. margin-right: 0;
  1409. }
  1410. &.active {
  1411. font-weight: bold;
  1412. color: #333333;
  1413. }
  1414. &.cases {
  1415. margin-right: 60rpx;
  1416. }
  1417. .text {
  1418. position: relative;
  1419. z-index: 1;
  1420. }
  1421. .tab-bg {
  1422. width: 72rpx;
  1423. height: 28rpx;
  1424. position: absolute;
  1425. top: 17rpx;
  1426. left: 50%;
  1427. transform: translateX(-36rpx);
  1428. z-index: -1;
  1429. }
  1430. }
  1431. .right-mask {
  1432. width: 56rpx;
  1433. height: 34rpx;
  1434. position: absolute;
  1435. top: 25rpx;
  1436. right: 0rpx;
  1437. z-index: 1;
  1438. }
  1439. }
  1440. .doc-list {
  1441. padding: 20rpx;
  1442. .item {
  1443. box-sizing: border-box;
  1444. background: #FFFFFF;
  1445. // border-radius: 16rpx;
  1446. display: flex;
  1447. border-bottom: 1px solid #F0F0F0;
  1448. margin-bottom: 30rpx;
  1449. .head-box {
  1450. width: 120rpx;
  1451. height: 120rpx;
  1452. background: #EDF1F4;
  1453. border-radius: 50%;
  1454. overflow: hidden;
  1455. margin-right: 30rpx;
  1456. image {
  1457. width: 100%;
  1458. height: 100%;
  1459. }
  1460. }
  1461. .info {
  1462. width: calc(100% - 150rpx);
  1463. .top {
  1464. display: flex;
  1465. align-items: center;
  1466. font-family: PingFang SC;
  1467. line-height: 1;
  1468. .name {
  1469. font-size: 34rpx;
  1470. font-weight: bold;
  1471. color: #111111;
  1472. }
  1473. .line {
  1474. width: 1px;
  1475. height: 26rpx;
  1476. background: #DDDDDD;
  1477. margin: 0 20rpx;
  1478. }
  1479. .other {
  1480. font-size: 28rpx;
  1481. font-weight: 500;
  1482. color: #333333;
  1483. }
  1484. }
  1485. .unit-box {
  1486. display: flex;
  1487. margin-top: 24rpx;
  1488. .level {
  1489. padding: 0 10rpx;
  1490. height: 30rpx;
  1491. line-height: 30rpx;
  1492. font-size: 22rpx;
  1493. font-family: PingFang SC;
  1494. font-weight: 500;
  1495. color: #FFFFFF;
  1496. background: #2BC7B9;
  1497. border-radius: 10rpx 4rpx 10rpx 4rpx;
  1498. margin-right: 12rpx;
  1499. }
  1500. .name {
  1501. font-size: 28rpx;
  1502. font-family: PingFang SC;
  1503. font-weight: 500;
  1504. color: #333333;
  1505. line-height: 30rpx;
  1506. }
  1507. }
  1508. .expertise {
  1509. font-size: 26rpx;
  1510. font-family: PingFang SC;
  1511. font-weight: 500;
  1512. color: #666666;
  1513. line-height: 42rpx;
  1514. margin: 22rpx 0 26rpx;
  1515. }
  1516. .rate-box {
  1517. display: flex;
  1518. align-items: center;
  1519. .star {
  1520. display: flex;
  1521. align-items: center;
  1522. image {
  1523. width: 22rpx;
  1524. height: 22rpx;
  1525. margin-right: 10rpx;
  1526. }
  1527. text {
  1528. font-size: 26rpx;
  1529. font-family: PingFang SC;
  1530. font-weight: bold;
  1531. color: #CEA764;
  1532. line-height: 1;
  1533. }
  1534. }
  1535. .line {
  1536. width: 1px;
  1537. height: 20rpx;
  1538. background: #DDDDDD;
  1539. margin: 0 20rpx;
  1540. }
  1541. .num-box {
  1542. display: flex;
  1543. align-items: center;
  1544. font-family: PingFang SC;
  1545. .label {
  1546. font-size: 24rpx;
  1547. font-weight: 500;
  1548. color: #999999;
  1549. line-height: 1;
  1550. margin-right: 7px;
  1551. }
  1552. .num {
  1553. font-size: 26rpx;
  1554. font-weight: bold;
  1555. color: #CEA764;
  1556. line-height: 1;
  1557. }
  1558. }
  1559. }
  1560. .price-box {
  1561. display: flex;
  1562. align-items: center;
  1563. margin-top: 38rpx;
  1564. .btn-item {
  1565. display: flex;
  1566. align-items: center;
  1567. justify-content: center;
  1568. width: 164rpx;
  1569. height: 56rpx;
  1570. line-height: 56rpx;
  1571. border: 1px solid rgba(43, 199, 185, 0.5);
  1572. border-radius: 28rpx;
  1573. font-family: PingFang SC;
  1574. margin-right: 30rpx;
  1575. &:last-child {
  1576. margin-right: 0;
  1577. }
  1578. .label {
  1579. font-size: 26rpx;
  1580. font-weight: 500;
  1581. color: #2BC7B9;
  1582. margin-right: 5rpx;
  1583. }
  1584. .num {
  1585. font-size: 28rpx;
  1586. font-weight: bold;
  1587. color: #2BC7B9;
  1588. }
  1589. }
  1590. }
  1591. }
  1592. }
  1593. .item:last-child {
  1594. border-bottom: none;
  1595. margin-bottom: 0rpx;
  1596. }
  1597. .bottom-title {
  1598. height: 50rpx;
  1599. display: flex;
  1600. align-items: center;
  1601. justify-content: center;
  1602. font-size: 26rpx;
  1603. font-family: PingFang SC;
  1604. font-weight: bold;
  1605. color: #2BC7B9;
  1606. image {
  1607. margin-left: 8rpx;
  1608. width: 14rpx;
  1609. height: 24rpx;
  1610. }
  1611. }
  1612. }
  1613. // 医师团队
  1614. .doc-cont {
  1615. box-sizing: border-box;
  1616. padding: 0 30rpx;
  1617. .inner {
  1618. padding: 4rpx 0 40rpx;
  1619. display: flex;
  1620. overflow-x: auto;
  1621. }
  1622. .item {
  1623. display: flex;
  1624. align-items: center;
  1625. flex-direction: column;
  1626. margin-right: 40rpx;
  1627. &:last-child {
  1628. margin-right: 0;
  1629. }
  1630. .head-box {
  1631. width: 120rpx;
  1632. height: 120rpx;
  1633. background: #F2F5F9;
  1634. border-radius: 50%;
  1635. margin-bottom: 20rpx;
  1636. overflow: hidden;
  1637. image {
  1638. width: 100%;
  1639. height: 100%;
  1640. }
  1641. }
  1642. .name {
  1643. max-width: 120rpx;
  1644. font-size: 28rpx;
  1645. line-height: 1;
  1646. font-family: PingFang SC;
  1647. font-weight: 500;
  1648. color: #111111;
  1649. margin-bottom: 16rpx;
  1650. text-align: center;
  1651. }
  1652. .position {
  1653. max-width: 120rpx;
  1654. font-size: 24rpx;
  1655. line-height: 1;
  1656. font-family: PingFang SC;
  1657. font-weight: 500;
  1658. color: #999999;
  1659. text-align: center;
  1660. }
  1661. }
  1662. }
  1663. .inner {
  1664. padding: 0 30rpx;
  1665. }
  1666. // 健康知识
  1667. .pub-tab-box {
  1668. position: relative;
  1669. .tab-inner {
  1670. padding: 14rpx 0 30rpx;
  1671. display: flex;
  1672. overflow-x: auto;
  1673. }
  1674. .item {
  1675. font-size: 28rpx;
  1676. white-space: nowrap;
  1677. line-height: 1;
  1678. font-family: PingFang SC;
  1679. font-weight: 500;
  1680. color: #666666;
  1681. margin-right: 40rpx;
  1682. position: relative;
  1683. &:last-child {
  1684. margin-right: 0;
  1685. }
  1686. &.active {
  1687. font-weight: bold;
  1688. color: #333333;
  1689. }
  1690. &.cases {
  1691. margin-right: 60rpx;
  1692. }
  1693. .text {
  1694. position: relative;
  1695. z-index: 1;
  1696. }
  1697. .tab-bg {
  1698. width: 72rpx;
  1699. height: 28rpx;
  1700. position: absolute;
  1701. top: 17rpx;
  1702. left: 50%;
  1703. transform: translateX(-36rpx);
  1704. z-index: -1;
  1705. }
  1706. }
  1707. .right-mask {
  1708. width: 56rpx;
  1709. height: 34rpx;
  1710. position: absolute;
  1711. top: 14rpx;
  1712. right: -30rpx;
  1713. z-index: 1;
  1714. }
  1715. }
  1716. .know-list {
  1717. padding-right: 10rpx;
  1718. .item {
  1719. padding: 30rpx 0;
  1720. display: flex;
  1721. align-items: center;
  1722. justify-content: space-between;
  1723. border-bottom: 1px solid #F0F0F0;
  1724. &:last-child {
  1725. border-bottom: none;
  1726. }
  1727. .left {
  1728. flex: 1;
  1729. padding-right: 40rpx;
  1730. height: 190rpx;
  1731. display: flex;
  1732. flex-direction: column;
  1733. justify-content: space-between;
  1734. .title {
  1735. font-size: 32rpx;
  1736. font-family: PingFang SC;
  1737. font-weight: 500;
  1738. color: #111111;
  1739. line-height: 48rpx;
  1740. }
  1741. .info-box {
  1742. width: 100%;
  1743. display: flex;
  1744. align-items: center;
  1745. justify-content: space-between;
  1746. .readers {
  1747. display: flex;
  1748. align-items: center;
  1749. .head-box {
  1750. margin-right: 27rpx;
  1751. display: flex;
  1752. align-items: center;
  1753. .head {
  1754. width: 48rpx;
  1755. height: 48rpx;
  1756. border-radius: 50%;
  1757. overflow: hidden;
  1758. box-shadow: 0 0 0 1px #fff;
  1759. margin-right: -10rpx;
  1760. image {
  1761. width: 100%;
  1762. height: 100%;
  1763. }
  1764. }
  1765. }
  1766. .readings {
  1767. display: flex;
  1768. align-items: center;
  1769. .eye {
  1770. width: 26rpx;
  1771. height: 20rpx;
  1772. margin-right: 9rpx;
  1773. }
  1774. .num {
  1775. font-size: 24rpx;
  1776. font-family: PingFang SC;
  1777. font-weight: 500;
  1778. color: #999999;
  1779. line-height: 1;
  1780. }
  1781. }
  1782. }
  1783. .time {
  1784. font-size: 24rpx;
  1785. line-height: 1;
  1786. font-family: PingFang SC;
  1787. font-weight: 500;
  1788. color: #999999;
  1789. }
  1790. }
  1791. }
  1792. .right {
  1793. width: 250rpx;
  1794. height: 190rpx;
  1795. border-radius: 8rpx;
  1796. overflow: hidden;
  1797. image {
  1798. width: 100%;
  1799. height: 100%;
  1800. }
  1801. }
  1802. }
  1803. }
  1804. // 问诊案例
  1805. .cases-list {
  1806. padding-bottom: 10rpx;
  1807. .item {
  1808. padding: 30rpx 0;
  1809. border-bottom: 1px solid #F0F0F0;
  1810. &:last-child {
  1811. border-bottom: none;
  1812. }
  1813. .dec-text {
  1814. font-size: 32rpx;
  1815. font-family: PingFang SC;
  1816. font-weight: bold;
  1817. color: #111111;
  1818. line-height: 48rpx;
  1819. }
  1820. .images-box {
  1821. margin-top: 10rpx;
  1822. display: flex;
  1823. flex-wrap: wrap;
  1824. .img-item {
  1825. width: 155rpx;
  1826. height: 155rpx;
  1827. background: #F5F5F5;
  1828. border-radius: 8rpx;
  1829. margin: 0 10rpx 10rpx 0;
  1830. overflow: hidden;
  1831. image {
  1832. width: 100%;
  1833. height: 100%;
  1834. }
  1835. &:nth-child(4n) {
  1836. margin-right: 0;
  1837. }
  1838. }
  1839. }
  1840. .doc-info {
  1841. display: flex;
  1842. align-items: center;
  1843. margin: 30rpx 0 20rpx;
  1844. .head {
  1845. width: 60rpx;
  1846. height: 60rpx;
  1847. background: #F2F5F9;
  1848. border-radius: 50%;
  1849. margin-right: 20rpx;
  1850. overflow: hidden;
  1851. image {
  1852. width: 100%;
  1853. height: 100%;
  1854. }
  1855. }
  1856. .name {
  1857. font-size: 28rpx;
  1858. line-height: 1;
  1859. font-family: PingFang SC;
  1860. font-weight: 500;
  1861. color: #111111;
  1862. }
  1863. .line {
  1864. width: 1px;
  1865. height: 22rpx;
  1866. background: #DDDDDD;
  1867. margin: 0 16rpx;
  1868. }
  1869. .posit,
  1870. .address {
  1871. font-size: 26rpx;
  1872. font-family: PingFang SC;
  1873. font-weight: 500;
  1874. color: #999999;
  1875. }
  1876. }
  1877. .answer-box {
  1878. width: 100%;
  1879. // height: 117rpx;
  1880. background: #F5F7F7;
  1881. border-radius: 10rpx;
  1882. display: flex;
  1883. flex-direction: column;
  1884. justify-content: center;
  1885. .text-inner {
  1886. // height: 84rpx;
  1887. font-size: 28rpx;
  1888. font-family: PingFang SC;
  1889. font-weight: 500;
  1890. color: #666666;
  1891. line-height: 42rpx;
  1892. padding: 15rpx;
  1893. }
  1894. }
  1895. .read-box {
  1896. margin-top: 30rpx;
  1897. display: flex;
  1898. align-items: center;
  1899. justify-content: flex-end;
  1900. image {
  1901. width: 24rpx;
  1902. height: 19rpx;
  1903. margin-right: 10rpx;
  1904. }
  1905. .text {
  1906. font-size: 24rpx;
  1907. font-family: PingFang SC;
  1908. font-weight: 500;
  1909. color: #999999;
  1910. }
  1911. }
  1912. }
  1913. }
  1914. }
  1915. // 精选药品
  1916. .feat-title {
  1917. margin-top: 30rpx;
  1918. padding: 10rpx 0 33rpx;
  1919. display: flex;
  1920. align-items: center;
  1921. justify-content: center;
  1922. image {
  1923. width: 37rpx;
  1924. height: 37rpx;
  1925. margin: 0rpx 20rpx;
  1926. }
  1927. text {
  1928. font-size: 36rpx;
  1929. line-height: 1;
  1930. font-family: PingFang SC;
  1931. font-weight: bold;
  1932. color: #111111;
  1933. }
  1934. }
  1935. .drug-list {
  1936. display: flex;
  1937. flex-wrap: wrap;
  1938. // margin-bottom: 20rpx;
  1939. .item {
  1940. margin-right: 20rpx;
  1941. margin-bottom: 20rpx;
  1942. width: 345rpx;
  1943. background: #FFFFFF;
  1944. box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
  1945. border-radius: 20rpx;
  1946. overflow: hidden;
  1947. &:nth-child(2n) {
  1948. margin-right: 0;
  1949. }
  1950. .img-box {
  1951. width: 100%;
  1952. height: 334rpx;
  1953. image {
  1954. width: 100%;
  1955. height: 100%;
  1956. }
  1957. }
  1958. .info-box {
  1959. box-sizing: border-box;
  1960. height: 182rpx;
  1961. padding: 20rpx;
  1962. .title {
  1963. height: 80rpx;
  1964. font-size: 26rpx;
  1965. font-family: PingFang SC;
  1966. font-weight: 500;
  1967. color: #111111;
  1968. line-height: 40rpx;
  1969. }
  1970. .price-box {
  1971. display: flex;
  1972. align-items: center;
  1973. margin-top: 20rpx;
  1974. .now {
  1975. color: #FF6633;
  1976. display: flex;
  1977. align-items: flex-end;
  1978. margin-right: 20rpx;
  1979. font-family: PingFang SC;
  1980. .unit {
  1981. font-size: 24rpx;
  1982. line-height: 1.4;
  1983. margin-right: 4rpx;
  1984. }
  1985. .num {
  1986. font-size: 36rpx;
  1987. font-weight: bold;
  1988. line-height: 1;
  1989. }
  1990. }
  1991. .old {
  1992. font-size: 26rpx;
  1993. font-family: PingFang SC;
  1994. text-decoration: line-through;
  1995. color: #BBBBBB;
  1996. line-height: 1;
  1997. }
  1998. }
  1999. }
  2000. }
  2001. }
  2002. }
  2003. }
  2004. .official-account {
  2005. box-sizing: border-box;
  2006. width: 100%;
  2007. height: 100rpx;
  2008. position: fixed;
  2009. bottom: 30rpx;
  2010. z-index: 99;
  2011. padding: 0 20rpx 180rpx 20rpx;
  2012. }
  2013. // 消息
  2014. .message-box {
  2015. box-sizing: border-box;
  2016. width: 100%;
  2017. height: 84rpx;
  2018. background: #F3FFFD;
  2019. border: 1px solid #C7E9E5;
  2020. box-shadow: 0px 4rpx 12rpx 0px rgba(90, 203, 138, 0.16);
  2021. border-radius: 16rpx;
  2022. position: fixed;
  2023. left: 50%;
  2024. transform: translateX(-50%);
  2025. bottom: 30rpx;
  2026. z-index: 99;
  2027. display: flex;
  2028. align-items: center;
  2029. justify-content: space-between;
  2030. padding: 0 20rpx 0 30rpx;
  2031. .left {
  2032. flex: 1;
  2033. display: flex;
  2034. align-items: center;
  2035. image {
  2036. width: 24rpx;
  2037. height: 24rpx;
  2038. margin-right: 18rpx;
  2039. }
  2040. .text {
  2041. width: 90%;
  2042. font-size: 28rpx;
  2043. font-family: PingFang SC;
  2044. font-weight: 500;
  2045. color: #2BC7B9;
  2046. }
  2047. }
  2048. .btn {
  2049. width: 100rpx;
  2050. height: 48rpx;
  2051. line-height: 48rpx;
  2052. text-align: center;
  2053. font-size: 24rpx;
  2054. font-family: PingFang SC;
  2055. font-weight: 500;
  2056. color: #FFFFFF;
  2057. border: 1px solid #D2E6FF;
  2058. background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
  2059. border-radius: 24rpx;
  2060. margin-left: 30rpx;
  2061. }
  2062. }
  2063. .contact-btn {
  2064. display: inline-block;
  2065. position: absolute;
  2066. top: 0;
  2067. left: 0;
  2068. width: 100%;
  2069. height: 100%;
  2070. opacity: 0;
  2071. }
  2072. .popup-box {
  2073. position: fixed;
  2074. top: 0;
  2075. right: 0;
  2076. left: 0;
  2077. bottom: 0;
  2078. z-index: 999;
  2079. display: flex;
  2080. justify-content: center;
  2081. align-items: center;
  2082. .info-mask {
  2083. position: fixed;
  2084. top: 0;
  2085. right: 0;
  2086. bottom: 0;
  2087. left: 0;
  2088. background-color: rgba($color: #000000, $alpha: 0.5);
  2089. z-index: 999;
  2090. }
  2091. .info-form {
  2092. z-index: 1000;
  2093. width: 450rpx;
  2094. display: flex;
  2095. flex-direction: column;
  2096. justify-content: center;
  2097. align-items: center;
  2098. position: relative;
  2099. image {
  2100. width: 100%;
  2101. }
  2102. }
  2103. }
  2104. </style>