index.vue 52 KB

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