index.vue 48 KB

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