indexOld.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335
  1. <template>
  2. <view class="content">
  3. <view class="cont">
  4. <view class="bg">
  5. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/image/index_img/home_top_bg.png"></image>
  6. </view>
  7. <view class="top-box" :style="{ background: bg }" >
  8. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  9. <view class="top-title">
  10. <view class="name" :style="{ color: titleColor }">医健宝互联网医院</view>
  11. <view class="desc-box" >
  12. <image v-if="!isTop" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/dui1.png"></image>
  13. <image v-if="isTop" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/dui1.png"></image>
  14. <view class="desc" :style="{ color: descColor }">卫健部门权威认证机构,世界各地千万用户健康选择</view>
  15. </view>
  16. </view>
  17. <view class="search">
  18. <view class="search-box" @click="navTo('/pages_index/search')">
  19. <image class="img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_search.png" mode=""></image>
  20. <input disabled type="text" placeholder="搜索医生、疾病、知识" placeholder-class="input-place">
  21. </view>
  22. <!-- <view class="msg">
  23. <image v-if="!isTop" class="msg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/msg.png"></image>
  24. <image v-if="isTop" class="msg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/msg1.png"></image>
  25. <button class='contact-btn' open-type="contact">
  26. </button>
  27. </view> -->
  28. </view>
  29. </view>
  30. <view class="cont-box">
  31. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  32. <view style="padding-bottom:178rpx" >
  33. </view>
  34. <view class="banner" v-if="advImgs.length>0">
  35. <u-swiper
  36. :list="advImgs"
  37. indicator
  38. indicatorMode="line"
  39. circular
  40. height="233rpx"
  41. @click="handleAdvClick">
  42. </u-swiper>
  43. </view>
  44. <view class="btns">
  45. <view class="btn1" @click="navTo('/pages_doctor/doctorList')">
  46. <view class="title-box">
  47. <view class="title">专家问诊</view>
  48. <view class="desc">名医问诊处方</view>
  49. </view>
  50. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/4c28bef97d714e569e672e006ee471e2.png"></image>
  51. <image class="mask" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/mask.png"></image>
  52. </view>
  53. <view class="btn2" @click="navTo('/pages_order/inquirySelectType')">
  54. <view class="title-box">
  55. <view class="title">健康咨询</view>
  56. <view class="desc">快速健康咨询</view>
  57. </view>
  58. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/86e6f39efbc54d2dadf058dde269e573.png"></image>
  59. <image class="mask" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/mask.png"></image>
  60. </view>
  61. </view>
  62. <view class="modules">
  63. <view class="module" v-for="(it,index) in layouts" :key="index">
  64. <view class="menus" v-if="it.id==1&&it.isShow">
  65. <view class="title">{{it.name}}</view>
  66. <view class="menu-box">
  67. <view class="menu" @click="navTo('/pages_index/testList')">
  68. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6104b270481040dd8340859c9d901c09.png"></image>
  69. </view>
  70. <view class="menu" @click="navTo('/pages_user/integralGoodsList')">
  71. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f9f2f6c6b4d24f1ba9a637dfed74f8c3.png"></image>
  72. </view>
  73. <view class="menu" @click="navTo('/pages_order/inquirySelect?inquiryType=3')">
  74. <image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/76f15105ebe442398da1fe57e080bcd4.png"></image>
  75. </view>
  76. <view class="menu" @click="switchTab('/pages/store/index')">
  77. <image src="https://cos.his.cdwjyyh.com/fs/20240509/908255a8d8134a5482f0314bfbb42c02.png"></image>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="depts" v-if="it.id==2&&it.isShow">
  82. <view class="title">
  83. {{it.name}}
  84. </view>
  85. <view class="dept-box">
  86. <view @click="navTo('/pages_doctor/doctorList?deptId='+item.deptId)" class="dept" v-for="(item,index) in depts" :key="index">
  87. <image class="icon" :src="item.iconUrl"></image>
  88. <view class="title">{{item.deptName}}</view>
  89. </view>
  90. <view @click="navTo('/pages_doctor/doctorList?deptId=0')" class="dept">
  91. <image class="icon" src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/acbb520df8284c6aaff601cb06411c2a.png"></image>
  92. <view class="title">更多科室</view>
  93. </view>
  94. </view>
  95. </view>
  96. <view class="depts" v-if="it.id==3&&it.isShow">
  97. <view class="title">
  98. {{it.name}}
  99. </view>
  100. <view class="dept-box">
  101. <view @click="yangshengClick(item)" class="dept" v-for="(item,index) in yangshengs" :key="index">
  102. <image class="icon" :src="item.icon"></image>
  103. <view class="title" >{{item.title}}</view>
  104. </view>
  105. </view>
  106. </view>
  107. <view class="doctor-articles" v-if="it.id==4&&it.isShow" >
  108. <view class="title-box">
  109. <view class="title">{{it.name}}</view>
  110. <view class="more" @click="navTo('/pages_doctor/doctorArticleList')" >
  111. <view class="text">更多</view>
  112. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  113. </view>
  114. </view>
  115. <scroll-view :scroll-x="true" style="white-space: nowrap;">
  116. <view class="article-box" >
  117. <view class="article" @click="navTo('/pages_doctor/doctorArticleDetails?articleId='+item.articleId)" v-for="(item,index) in doctocArticles" :key="index">
  118. <view class="image-box">
  119. <image mode="aspectFill" :src="item.imageUrl"></image>
  120. <view class="views">
  121. {{item.views}}人观看
  122. </view>
  123. <view class="doctor">
  124. <image mode="aspectFill" :src="item.avatar"></image>
  125. <view class="right">
  126. <view class="doc-name ellipsis">{{item.doctorName}}</view>
  127. <view class="doc-position ellipsis">{{item.position}}</view>
  128. </view>
  129. </view>
  130. </view>
  131. <view class="article-title-box">
  132. <view class="article-title ellipsis">{{item.title}}</view>
  133. </view>
  134. </view>
  135. </view>
  136. </scroll-view>
  137. </view>
  138. <view class="doctors" v-if="it.id==5&&it.isShow">
  139. <view class="title-box">
  140. <view class="title">{{it.name}}</view>
  141. <view class="more" @click="navTo('/pages_doctor/doctorList')">
  142. <view class="text">更多</view>
  143. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  144. </view>
  145. </view>
  146. <view class="doctor-box" v-if="doctors.length>0">
  147. <view class="doctor" @click="navTo('/pages_doctor/doctorDetails?doctorId='+item.doctorId)" v-for="(item,index) in doctors" :key="index">
  148. <view class="item">
  149. <view class="left">
  150. <view class="head-box">
  151. <image mode="aspectFill" class="doc-img" :src="item.avatar"></image>
  152. <view class="isline" v-if="item.workStatus==1">
  153. <view class="img">
  154. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/isline.png"></image>
  155. <view class="name">在线</view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. <view class="right">
  161. <view class="doc-box">
  162. <view class="doc-name">
  163. {{item.doctorName}}
  164. </view>
  165. <view class="doc-position">{{item.position}}</view>
  166. <view class="doc-dept">{{item.deptName}}</view>
  167. </view>
  168. <view class="hospital-box">
  169. <!-- <view class="tag" v-if="item.hospitalLevel!=null">
  170. <text>{{$getDictLabelName(hosLevelOptions,item.hospitalLevel)}}</text>
  171. </view> -->
  172. <view class="name">{{item.hospitalName||''}} </view>
  173. </view>
  174. <view class="doc-spec">
  175. <view class="spec ellipsis2">{{item.speciality}}</view>
  176. </view>
  177. <view class="doc-count">
  178. <view class="name">好评:</view>
  179. <view class="count">{{item.pingStar}}分</view>
  180. <view class="name">接诊量:</view>
  181. <view class="count">{{item.orderNumber}}</view>
  182. <view class="name">平均响应:</view>
  183. <view class="count"></view>
  184. </view>
  185. <view class="doc-price" >
  186. <view class="btn">
  187. 咨询医生¥
  188. <text v-for="(price,index) in item.prices" :key="index">
  189. {{price.price.toFixed(2)}} <text v-if="index==0">/</text>
  190. </text>
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. <view class="articles" v-if="it.id==6&&it.isShow">
  199. <view class="title-box">
  200. <view class="title">{{it.name}}</view>
  201. <view class="more" @click="navTo('/pages_index/articleList')">
  202. <view class="text">更多</view>
  203. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  204. </view>
  205. </view>
  206. <view class="article-box" v-if="articles.length>0">
  207. <view class="item" @click="navTo('/pages_index/articleDetails?articleId='+item.articleId)" v-for="(item,index) in articles" :key="index">
  208. <view class="left">
  209. <view class="title">
  210. {{item.title}}
  211. </view>
  212. <view class="views">
  213. 浏览量 {{item.views}}
  214. </view>
  215. </view>
  216. <view class="right">
  217. <image :src="item.imageUrl"></image>
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. <view class="packages" v-if="it.id==7&&it.isShow">
  223. <view class="title-box">
  224. <view class="title">{{it.name}}</view>
  225. <view class="more" @click="navTo('/pages_index/packageList')">
  226. <view class="text">更多</view>
  227. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  228. </view>
  229. </view>
  230. <view class="package-box" >
  231. <view class="item" @click="navTo('/pages_index/packageDetails?packageId='+item.packageId)" v-for="(item,index) in packages" :key="index">
  232. <view class="top">
  233. <image :src="item.imgUrl"></image>
  234. </view>
  235. <view class="bottom">
  236. <view class="title ellipsis2">
  237. {{item.packageName}}
  238. </view>
  239. <view class="price-box">
  240. <view class="price">¥{{item.price.toFixed(2)}}元/日</view>
  241. <view class="count">{{item.sales}}人已购</view>
  242. </view>
  243. </view>
  244. </view>
  245. </view>
  246. </view>
  247. </view>
  248. </view>
  249. </view>
  250. </view>
  251. </view>
  252. </template>
  253. <script>
  254. import {getConfigByKey} from '@/api/common'
  255. import {getPackageList} from '@/api/package.js'
  256. import {getDoctorArticleList} from '@/api/doctorArticle.js'
  257. import {getDoctorList} from '@/api/doctor.js'
  258. import {getArticleList} from '@/api/article.js'
  259. import {getAdvList} from '@/api/adv.js'
  260. import {getDepartmentList} from '@/api/department.js'
  261. import {getDictByKey} from '@/api/common.js'
  262. export default {
  263. data() {
  264. return {
  265. layouts:[],
  266. yangshengs:[
  267. {id:"0",title:"AI舌诊",page:"/pages_user/tongue/index",icon:"https://cos.his.cdwjyyh.com/fs/20240919/647fb42de0ab4e96a6c3097f3c3d9cf5.png"},
  268. {id:"1",title:"药膳食疗",page:"/pages_index/medicatedFoodList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3cfbd47911cf4753aa9497eac500728d.png"},
  269. {id:"2",title:"经络穴位",page:"/pages_index/vesselList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e93536a9dc1a4f8ca09545097b12fdea.png"},
  270. {id:"3",title:"问答专区",page:"/pages_index/questionsList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e896972bd56f4e358188af36f2c5af42.png"},
  271. {id:"4",title:"疾病",page:"/pages_index/diseaseList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d6f1851cccae414b8baf2ba07782f91b.png"},
  272. {id:"5",title:"中药图解",page:"/pages_index/chineseMedicineList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ff43572d0d004285b5a3b0ef2663c471.png"},
  273. {id:"6",title:"名方今用",page:"/pages_index/famousPrescribeList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/45db770e58c34963b0d2ba24a958b617.png"},
  274. {id:"7",title:"康复医案",page:"/pages_doctor/doctorArticleList",icon:"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e793942797b24035b51f94d894bdfa0b.png"}
  275. ],
  276. isTop:false,
  277. titleColor:"#ffffff",
  278. descColor:"#ffffff",
  279. top:0,
  280. // 状态栏的高度
  281. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  282. advImgs:[],
  283. doctors:[],
  284. advs:[],
  285. articles:[],
  286. depts:[],
  287. doctocArticles:[],
  288. hosLevelOptions:[],
  289. packages:[]
  290. }
  291. },
  292. onLoad() {
  293. this.getDictByKey("sys_hospital_level");
  294. uni.$on('refreshMsgCount', () => {
  295. try{
  296. let totalUnreadCount = uni.$TUIKit.getTotalUnreadMessageCount();
  297. if(totalUnreadCount>0){
  298. try{
  299. uni.setTabBarBadge({ //显示数字
  300. index: 1, //tabbar下标
  301. text: totalUnreadCount+"" //数字
  302. })
  303. }
  304. catch(e){
  305. }
  306. }
  307. else{
  308. try{
  309. uni.hideTabBarRedDot({ //隐藏红点
  310. index: 1 //tabbar下标
  311. })
  312. }
  313. catch(e){
  314. }
  315. }
  316. }catch(e){
  317. }
  318. });
  319. },
  320. onShow() {
  321. this.getDoctorList();
  322. this.getArticleList();
  323. this.getAdvList();
  324. this.getDepartmentList();
  325. this.getDoctorArticleList();
  326. this.getPackageList();
  327. this.getConfigByKey("his.appShow");
  328. var that=this;
  329. uni.$emit('refreshMsgCount');
  330. },
  331. onPageScroll(e) {
  332. this.top=e.scrollTop;
  333. },
  334. //发送给朋友
  335. onShareAppMessage(res) {
  336. if(this.$isLogin()){
  337. return {
  338. title: "医健宝互联网医院",
  339. path: '/pages/index/index',
  340. imageUrl: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  341. }
  342. }
  343. },
  344. //分享到朋友圈
  345. onShareTimeline(res) {
  346. if(this.$isLogin()){
  347. return {
  348. title: "医健宝互联网医院",
  349. imageUrl: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  350. }
  351. }
  352. },
  353. computed: {
  354. bg: function() {
  355. var top=this.top/120;
  356. if(top>0){
  357. this.isTop=true;
  358. this.titleColor="#fff"
  359. this.descColor="#fff"
  360. }
  361. else{
  362. this.isTop=false;
  363. this.titleColor="#fff"
  364. this.descColor="#fff"
  365. }
  366. return 'rgba(37, 131, 235, ' + top + ')';
  367. },
  368. },
  369. methods: {
  370. dev(){
  371. uni.showToast({
  372. icon:"none",
  373. title: '敬请期待'
  374. })
  375. },
  376. getConfigByKey(key){
  377. var that=this;
  378. var data={key:key}
  379. getConfigByKey(data).then(
  380. res => {
  381. if(res.code==200){
  382. this.layouts=JSON.parse(res.data);
  383. this.layouts.sort((a, b) => a.sort - b.sort)
  384. this.layouts.forEach(function(element) {
  385. if(element.id=="4"){
  386. if(!element.isShow){
  387. that.yangshengs.splice(6,1);
  388. }
  389. }
  390. if(element.id=="7"){
  391. // if(!element.isShow){
  392. // uni.setTabBarItem({
  393. // index:2, //从左到右 0开始
  394. // visible:false //默认true false隐藏
  395. // })
  396. // }
  397. // else{
  398. // uni.setTabBarItem({
  399. // index:2, //从左到右 0开始
  400. // visible:true //默认true false隐藏
  401. // })
  402. // }
  403. }
  404. });
  405. }
  406. },
  407. rej => {}
  408. );
  409. },
  410. yangshengClick(item){
  411. // uni.navigateTo({
  412. // url: '/pages/index/webview?url=' + encodeURIComponent('rtlive://course?courseId=1')
  413. // });
  414. // return;
  415. if(item.id==0){
  416. // this.$isLogin().then(
  417. // res => {
  418. // if(res){
  419. uni.navigateTo({
  420. url:item.page
  421. });
  422. // }
  423. // else{
  424. // uni.navigateTo({
  425. // url:'/pages/auth/login'
  426. // })
  427. // }
  428. // }
  429. // );
  430. }
  431. else{
  432. if(item.page==""){
  433. uni.showToast({
  434. icon:"none",
  435. title: '暂无更多'
  436. })
  437. return;
  438. }
  439. uni.navigateTo({
  440. url:item.page
  441. })
  442. }
  443. },
  444. switchTab(url){
  445. uni.switchTab({
  446. url:url
  447. })
  448. },
  449. navToMiniProgram(){
  450. uni.navigateToMiniProgram({
  451. // appid 写你要跳转的小程序的 appid
  452. appId: 'wx45cf09091aead547',
  453. // 路径写 src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
  454. path: '/pages/common/launch',
  455. extraData: {
  456. // 'type': 'out'
  457. },
  458. // 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
  459. envVersion: 'develop',
  460. success(res) {
  461. // 打开成功
  462. // uni.showToast({
  463. // title: '跳转成功'
  464. // })
  465. },
  466. fail(err) {
  467. // 打开失败/取消
  468. // uni.showToast({
  469. // title: '跳转不成功'
  470. // })
  471. }
  472. })
  473. },
  474. getDictByKey(key){
  475. var data={key:key}
  476. getDictByKey(data).then(
  477. res => {
  478. if(res.code==200){
  479. if(key=="sys_hospital_level"){
  480. this.hosLevelOptions=res.data;
  481. }
  482. }
  483. },
  484. err => {
  485. }
  486. );
  487. },
  488. getDoctorArticleList(page) {
  489. //联网加载数据
  490. var that = this;
  491. var data = {
  492. pageNum:1,
  493. pageSize:10,
  494. };
  495. getDoctorArticleList(data).then(res => {
  496. if(res.code==200){
  497. this.doctocArticles=res.data.list;
  498. }else{
  499. }
  500. });
  501. },
  502. getDepartmentList(page) {
  503. //联网加载数据
  504. var that = this;
  505. var data = {
  506. isTui:1
  507. };
  508. getDepartmentList(data).then(res => {
  509. if(res.code==200){
  510. this.depts=res.data;
  511. }
  512. });
  513. },
  514. handleAdvClick(index){
  515. var ad=this.advs[index];
  516. console.log(ad.advUrl);
  517. if(ad.showType==1){
  518. uni.setStorageSync('url',ad.advUrl);
  519. uni.navigateTo({
  520. url:"h5"
  521. })
  522. }
  523. else if(ad.showType==2){
  524. uni.navigateTo({
  525. url:ad.advUrl
  526. })
  527. }
  528. else if(ad.showType==3){
  529. uni.setStorageSync('content',ad.content);
  530. uni.navigateTo({
  531. url:"content"
  532. })
  533. }
  534. },
  535. getAdvList() {
  536. //联网加载数据
  537. var that = this;
  538. var data = {
  539. advType:1
  540. };
  541. getAdvList(data).then(res => {
  542. if(res.code==200){
  543. that.advImgs=[];
  544. that.advs=[];
  545. res.data.forEach(function(element) {
  546. if(element.imageUrl!=null&&element.imageUrl!=""){
  547. that.advs.push(element);
  548. that.advImgs.push(element.imageUrl);
  549. }
  550. });
  551. }else{
  552. uni.showToast({
  553. icon:'none',
  554. title: "请求失败",
  555. });
  556. }
  557. });
  558. },
  559. getArticleList() {
  560. //联网加载数据
  561. var that = this;
  562. var data = {
  563. isTui:1,
  564. pageNum:1,
  565. pageSize:10,
  566. };
  567. getArticleList(data).then(res => {
  568. if(res.code==200){
  569. this.articles=res.data.list;
  570. }else{
  571. uni.showToast({
  572. icon:'none',
  573. title: "请求失败",
  574. });
  575. }
  576. });
  577. },
  578. getDoctorList() {
  579. //联网加载数据
  580. var that = this;
  581. var data = {
  582. isTui:1,
  583. pageNum:1,
  584. pageSize:10,
  585. };
  586. getDoctorList(data).then(res => {
  587. if(res.code==200){
  588. this.doctors=res.data.list;
  589. this.doctors.forEach(function(value,index,array){
  590. value.prices=JSON.parse(value.priceJson)
  591. });
  592. }else{
  593. uni.showToast({
  594. icon:'none',
  595. title: "请求失败",
  596. });
  597. }
  598. });
  599. },
  600. getPackageList() {
  601. //联网加载数据
  602. var that = this;
  603. var data = {
  604. isShow:1,
  605. pageNum:1,
  606. pageSize:10,
  607. };
  608. getPackageList(data).then(res => {
  609. if(res.code==200){
  610. this.packages=res.data.list;
  611. }else{
  612. uni.showToast({
  613. icon:'none',
  614. title: "请求失败",
  615. });
  616. }
  617. });
  618. },
  619. loginNavTo(url){
  620. this.$isLogin().then(
  621. res => {
  622. if(res){
  623. console.log(res)
  624. uni.navigateTo({
  625. url: url
  626. })
  627. }
  628. else{
  629. uni.navigateTo({
  630. url:'/pages/auth/login'
  631. })
  632. }
  633. }
  634. );
  635. },
  636. navTo(url){
  637. if(url=="dev"){
  638. uni.showToast({
  639. icon:'none',
  640. title: "尽情期待...",
  641. });
  642. return;
  643. }
  644. console.log(url)
  645. uni.navigateTo({
  646. url: url
  647. })
  648. },
  649. navToTest() {
  650. const course = {"companyId":100,"companyUserId":6806,"corpId":"ww5a88c4f879f204c5","courseId":63,"link":"1899022782092541952","linkType":3,"qwExternalId":9914983,"qwUserId":"18931","videoId":409}
  651. uni.navigateTo({
  652. url: '/pages_course/video?course='+JSON.stringify(course)
  653. })
  654. }
  655. }
  656. }
  657. </script>
  658. <style scoped lang="scss">
  659. .content{
  660. height: 100%;
  661. .cont{
  662. position: relative;
  663. width: 100%;
  664. display: flex;
  665. flex-direction: column;
  666. .bg{
  667. width: 100%;
  668. height:450rpx;
  669. // background-color: #2583EB;
  670. // background: linear-gradient(#2583EB, #88e2da);
  671. position: fixed;
  672. image{
  673. border-radius: 0rpx 0rpx 50rpx 50rpx;
  674. width: 100%;
  675. height:100%;
  676. }
  677. }
  678. .top-box{
  679. width: 100%;
  680. position: fixed;
  681. top: 0;
  682. left: 0;
  683. z-index: 1001;
  684. .top-title{
  685. height: 88upx;
  686. // line-height: 88upx;
  687. display: flex;
  688. flex-direction: column;
  689. align-items: flex-start;
  690. justify-content: center;
  691. margin-left: 15rpx;
  692. .name{
  693. font-size: 32upx;
  694. font-family: Source Han Sans CN;
  695. font-weight: bold;
  696. color: #fff;
  697. }
  698. .desc-box{
  699. display: flex;
  700. align-items: center;
  701. justify-content: flex-start;
  702. margin-top: 10rpx;
  703. image{
  704. width:24rpx;
  705. height:24rpx;
  706. }
  707. .desc{
  708. margin-left: 5rpx;
  709. font-size: 20upx;
  710. font-family: Source Han Sans CN;
  711. color: #626468;
  712. }
  713. }
  714. }
  715. .search{
  716. box-sizing: border-box;
  717. z-index: 101;
  718. padding: 15rpx;
  719. width: 100%;
  720. display: flex;
  721. align-items: center;
  722. justify-content: center;
  723. .search-box{
  724. flex: 1;
  725. margin-right: 10rpx;
  726. height: 60upx;
  727. line-height: 60upx;
  728. border-radius: 30upx;
  729. background-color: #fff;
  730. padding: 0 30upx;
  731. display: flex;
  732. align-items: center;
  733. transition: all .5s;
  734. .img{
  735. width: 30upx;
  736. height: 30upx;
  737. margin-right: 10upx;
  738. }
  739. input{
  740. flex: 1;
  741. font-size: 24upx;
  742. color: #000;
  743. }
  744. .input-place{
  745. font-size: 24upx;
  746. color: #878787;
  747. }
  748. }
  749. .msg{
  750. position: relative;
  751. width:50rpx;
  752. height:50rpx;
  753. image{
  754. width: 100%;
  755. height:100%;
  756. }
  757. .contact-btn {
  758. top: 0;
  759. position: absolute;
  760. width:100%;
  761. height:100%;
  762. opacity: 0;
  763. }
  764. }
  765. }
  766. }
  767. .cont-box{
  768. z-index: 100;
  769. .banner{
  770. margin: 20rpx auto auto;
  771. width: 702rpx;
  772. }
  773. .btns{
  774. padding: 0 20upx;
  775. margin-top: 20rpx;
  776. width: 100%;
  777. display: flex;
  778. align-items: center;
  779. justify-content: center;
  780. .btn1{
  781. position: relative;
  782. background: linear-gradient(to bottom, #EEC992, #CDA569);
  783. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  784. margin-right: 30rpx;
  785. border-radius: 15rpx;
  786. height:180rpx;
  787. padding: 15rpx 30rpx;
  788. width:50%;
  789. display: flex;
  790. align-items: center;
  791. justify-content: space-between;
  792. &:last-child{
  793. margin-right: 0rpx;
  794. }
  795. image{
  796. width:104rpx;
  797. height:104rpx;
  798. }
  799. .mask{
  800. position: absolute;
  801. top:0rpx;
  802. right:0rpx;
  803. width: 100rpx;
  804. height:100rpx;
  805. }
  806. .title-box{
  807. display: flex;
  808. align-items: flex-start;
  809. justify-content: center;
  810. flex-direction: column;
  811. .title{
  812. font-size: 36upx;
  813. font-weight: bold;
  814. color: #ffffff;
  815. }
  816. .desc{
  817. margin-top: 6rpx;
  818. opacity: 0.8;
  819. font-size: 26upx;
  820. color: #ffffff;
  821. }
  822. }
  823. }
  824. .btn2{
  825. position: relative;
  826. background: linear-gradient(to bottom, #EE8C5F, #EA5733);
  827. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  828. margin-right: 30rpx;
  829. border-radius: 15rpx;
  830. height:180rpx;
  831. padding: 15rpx 30rpx;
  832. width:50%;
  833. display: flex;
  834. align-items: center;
  835. justify-content: space-between;
  836. &:last-child{
  837. margin-right: 0rpx;
  838. }
  839. image{
  840. width:104rpx;
  841. height:104rpx;
  842. }
  843. .mask{
  844. position: absolute;
  845. top:0rpx;
  846. right:0rpx;
  847. width: 100rpx;
  848. height:100rpx;
  849. }
  850. .title-box{
  851. display: flex;
  852. align-items: flex-start;
  853. justify-content: center;
  854. flex-direction: column;
  855. .title{
  856. font-size: 36upx;
  857. font-weight: bold;
  858. color: #ffffff;
  859. }
  860. .desc{
  861. margin-top: 6rpx;
  862. opacity: 0.8;
  863. font-size: 26upx;
  864. font-weight: bold;
  865. color: #ffffff;
  866. }
  867. }
  868. }
  869. }
  870. .modules{
  871. .module{
  872. .menus{
  873. z-index: 101;
  874. margin: 20rpx 15rpx 0rpx;
  875. padding: 20rpx;
  876. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  877. background-color: #fff;
  878. border-radius: 15rpx;
  879. .title{
  880. font-size: 32upx;
  881. font-family: PingFang SC;
  882. font-weight: bold;
  883. color: #2A2B2E;
  884. }
  885. .menu-box{
  886. display: flex;
  887. align-items: center;
  888. justify-content: flex-start;
  889. flex-wrap:wrap;
  890. .menu{
  891. padding: 15rpx;
  892. width:50%;
  893. display: flex;
  894. flex-direction: column;
  895. align-items: center;
  896. justify-content: center;
  897. flex-wrap: wrap;
  898. image{
  899. width:100%;
  900. height:180rpx;
  901. }
  902. }
  903. }
  904. }
  905. .depts{
  906. z-index: 101;
  907. margin: 20rpx 15rpx 0rpx;
  908. padding: 20rpx;
  909. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  910. background-color: #fff;
  911. border-radius: 15rpx;
  912. .title{
  913. font-size: 32upx;
  914. font-family: PingFang SC;
  915. font-weight: bold;
  916. color: #2A2B2E;
  917. }
  918. .dept-box{
  919. margin-top: 15rpx;
  920. display: flex;
  921. align-items: center;
  922. justify-content: flex-start;
  923. flex-wrap:wrap;
  924. .dept{
  925. padding: 15rpx 5rpx;
  926. width:25%;
  927. display: flex;
  928. flex-direction: column;
  929. align-items: center;
  930. justify-content: center;
  931. .icon{
  932. width:58rpx;
  933. height:58rpx;
  934. }
  935. .title{
  936. margin-top: 10rpx;
  937. font-size: 24upx;
  938. font-family: PingFang SC;
  939. font-weight: 500;
  940. color: #111111;
  941. }
  942. }
  943. }
  944. }
  945. .doctor-articles{
  946. z-index: 101;
  947. margin: 20rpx 15rpx 0rpx;
  948. padding: 20rpx;
  949. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  950. background-color: #fff;
  951. border-radius: 15rpx;
  952. .title-box{
  953. display: flex;
  954. flex-direction: row;
  955. align-items: center;
  956. justify-content: space-between;
  957. .title{
  958. font-size: 32upx;
  959. font-family: PingFang SC;
  960. font-weight: bold;
  961. color: #111111;
  962. }
  963. .more{
  964. display: flex;
  965. align-items: center;
  966. justify-content: flex-end;
  967. .text{
  968. font-size: 24rpx;
  969. font-family: PingFang SC;
  970. color: #9B9B9B;
  971. }
  972. image{
  973. margin-left: 10rpx;
  974. width:15rpx;
  975. height:20rpx;
  976. }
  977. }
  978. }
  979. .article-box{
  980. padding: 20rpx 0rpx;
  981. overflow-x: auto;
  982. box-sizing: border-box;
  983. display: flex;
  984. align-items: center;
  985. justify-content: flex-start;
  986. .article{
  987. width: 300rpx;
  988. margin-right: 20rpx;
  989. background: #f9f8fe;
  990. display: flex;
  991. flex-direction: column;
  992. align-items: flex-start;
  993. justify-content: flex-start;
  994. &:last-child{
  995. margin-right: 0rpx;
  996. }
  997. .image-box{
  998. width: 300rpx;
  999. height:400rpx;
  1000. position: relative;
  1001. border-radius: 20rpx;
  1002. image{
  1003. border-radius: 20rpx;
  1004. width: 300rpx;
  1005. height:400rpx;
  1006. }
  1007. .views{
  1008. position: absolute;
  1009. top:0rpx;
  1010. left:0rpx;
  1011. padding: 5rpx 10rpx;
  1012. background: rgba(0,0,0,0.25);
  1013. border-radius: 12rpx 0px 12rpx 0px;
  1014. opacity: 1;
  1015. font-size: 20rpx;
  1016. font-family: PingFang SC-Bold, PingFang SC;
  1017. font-weight: bold;
  1018. color: #FFFFFF;
  1019. }
  1020. .doctor{
  1021. margin: 10rpx;
  1022. display: flex;
  1023. align-items: center;
  1024. justify-content: flex-start;
  1025. position: absolute;
  1026. bottom:0rpx;
  1027. left:0rpx;
  1028. image{
  1029. border-radius: 50%;
  1030. width: 64rpx;
  1031. height:64rpx;
  1032. }
  1033. .right{
  1034. width: 200rpx;
  1035. margin-left: 10rpx;
  1036. display: flex;
  1037. flex-direction: column;
  1038. align-items: flex-start;
  1039. justify-content: space-between;
  1040. .doc-name{
  1041. width: 200rpx;
  1042. font-size: 30rpx;
  1043. font-weight: bold;
  1044. font-family: PingFang SC;
  1045. color: #fff;
  1046. }
  1047. .doc-position{
  1048. width: 100%;
  1049. font-size: 28rpx;
  1050. font-family: PingFang SC;
  1051. color: #fff;
  1052. font-weight: bold;
  1053. opacity: 0.8;
  1054. }
  1055. }
  1056. }
  1057. }
  1058. .article-title-box{
  1059. width: 100%;
  1060. margin-top: 10rpx;
  1061. display: flex;
  1062. align-items: center;
  1063. justify-content: flex-start;
  1064. .article-title{
  1065. font-size: 30rpx;
  1066. font-weight: bold;
  1067. font-family: PingFang SC;
  1068. color: #2A2B2E;
  1069. }
  1070. }
  1071. }
  1072. }
  1073. }
  1074. .doctors{
  1075. z-index: 101;
  1076. margin: 20rpx 15rpx;
  1077. padding: 20rpx;
  1078. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  1079. background-color: #fff;
  1080. border-radius: 15rpx;
  1081. .title-box{
  1082. display: flex;
  1083. flex-direction: row;
  1084. align-items: center;
  1085. justify-content: space-between;
  1086. .title{
  1087. font-size: 32upx;
  1088. font-family: PingFang SC;
  1089. font-weight: bold;
  1090. color: #111111;
  1091. }
  1092. .more{
  1093. display: flex;
  1094. align-items: center;
  1095. justify-content: flex-end;
  1096. .text{
  1097. font-size: 24rpx;
  1098. font-family: PingFang SC;
  1099. color: #9B9B9B;
  1100. }
  1101. image{
  1102. margin-left: 10rpx;
  1103. width:15rpx;
  1104. height:20rpx;
  1105. }
  1106. }
  1107. }
  1108. }
  1109. .articles{
  1110. z-index: 101;
  1111. margin: 20rpx 15rpx;
  1112. padding: 20rpx;
  1113. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  1114. background-color: #fff;
  1115. border-radius: 15rpx;
  1116. .title-box{
  1117. display: flex;
  1118. flex-direction: row;
  1119. align-items: center;
  1120. justify-content: space-between;
  1121. .title{
  1122. font-size: 32upx;
  1123. font-family: PingFang SC;
  1124. font-weight: bold;
  1125. color: #111111;
  1126. }
  1127. .more{
  1128. display: flex;
  1129. align-items: center;
  1130. justify-content: flex-end;
  1131. .text{
  1132. font-size: 24rpx;
  1133. font-family: PingFang SC;
  1134. color: #9B9B9B;
  1135. }
  1136. image{
  1137. margin-left: 10rpx;
  1138. width:15rpx;
  1139. height:20rpx;
  1140. }
  1141. }
  1142. }
  1143. .article-box{
  1144. margin-top: 15rpx;
  1145. padding: 20rpx 0rpx 0rpx;
  1146. display: flex;
  1147. flex-direction: column;
  1148. align-items: flex-start;
  1149. justify-content: flex-start;
  1150. .item{
  1151. width: 100%;
  1152. margin-bottom: 20rpx;
  1153. display: flex;
  1154. align-items: flex-start;
  1155. justify-content: flex-start;
  1156. &:last-child{
  1157. margin-bottom: 0rpx;
  1158. }
  1159. .left{
  1160. flex:1;
  1161. height:160rpx;
  1162. margin-right: 15rpx;
  1163. display: flex;
  1164. flex-direction: column;
  1165. align-items: flex-start;
  1166. justify-content: space-between;
  1167. .title{
  1168. font-size: 28upx;
  1169. font-family: PingFang SC;
  1170. font-weight: bold;
  1171. color: #111111;
  1172. }
  1173. .views{
  1174. font-size: 24upx;
  1175. font-family: PingFang SC;
  1176. color: #9a9a9c;
  1177. }
  1178. }
  1179. .right{
  1180. image{
  1181. border-radius: 10rpx;
  1182. width:220rpx;
  1183. height:160rpx;
  1184. border: 1px solid #eeeeee;
  1185. }
  1186. }
  1187. }
  1188. }
  1189. }
  1190. .packages{
  1191. z-index: 101;
  1192. margin: 20rpx 15rpx;
  1193. padding: 20rpx;
  1194. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  1195. background-color: #fff;
  1196. border-radius: 15rpx;
  1197. .title-box{
  1198. display: flex;
  1199. flex-direction: row;
  1200. align-items: center;
  1201. justify-content: space-between;
  1202. .title{
  1203. font-size: 32upx;
  1204. font-family: PingFang SC;
  1205. font-weight: bold;
  1206. color: #111111;
  1207. }
  1208. .more{
  1209. display: flex;
  1210. align-items: center;
  1211. justify-content: flex-end;
  1212. .text{
  1213. font-size: 24rpx;
  1214. font-family: PingFang SC;
  1215. color: #9B9B9B;
  1216. }
  1217. image{
  1218. margin-left: 10rpx;
  1219. width:15rpx;
  1220. height:20rpx;
  1221. }
  1222. }
  1223. }
  1224. .package-box{
  1225. padding: 20rpx 0rpx 0rpx;
  1226. display: flex;
  1227. align-items: flex-start;
  1228. justify-content: flex-start;
  1229. flex-wrap: wrap;
  1230. .item{
  1231. width: calc(50% - 20rpx);
  1232. border-radius: 15rpx;
  1233. margin: 10rpx;
  1234. display: flex;
  1235. flex-direction: column;
  1236. align-items: flex-start;
  1237. justify-content: flex-start;
  1238. &:last-child{
  1239. }
  1240. .top{
  1241. width:100%;
  1242. height:300rpx;
  1243. image{
  1244. border-radius: 15rpx 15rpx 0rpx 0rpx;
  1245. width:100%;
  1246. height:300rpx;
  1247. }
  1248. }
  1249. .bottom{
  1250. width: 100%;
  1251. margin-top: 15rpx;
  1252. .title{
  1253. font-weight: bold;
  1254. font-size: 28upx;
  1255. font-family: PingFang SC;
  1256. color: #111111;
  1257. }
  1258. .price-box{
  1259. margin-top: 10rpx;
  1260. display: flex;
  1261. align-items: center;
  1262. justify-content: space-between;
  1263. width: 100%;
  1264. .price{
  1265. padding: 5rpx 10rpx;
  1266. background-color: #2583EB;
  1267. border-radius: 30rpx;
  1268. font-size: 20upx;
  1269. font-family: PingFang SC;
  1270. color: #ffffff;
  1271. }
  1272. .count{
  1273. font-size: 24upx;
  1274. font-family: PingFang SC;
  1275. color: #333333;
  1276. }
  1277. }
  1278. }
  1279. }
  1280. }
  1281. }
  1282. }
  1283. }
  1284. }
  1285. }
  1286. }
  1287. </style>