index.vue 48 KB

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