home.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  1. <template>
  2. <view class="container">
  3. <view class="container">
  4. <!-- <view class="swiper">
  5. <view class="swiper-box">
  6. <swiper circular="true" autoplay="true" @change="swiperChange">
  7. <swiper-item v-for="swiper in banner" :key="swiper.id">
  8. <image :src="swiper.pic"></image>
  9. </swiper-item>
  10. </swiper>
  11. <view class="indicator">
  12. <view class="dots" v-for="(swiper, index) in banner" :class="[swiperCurrent >= index ? 'on' : '']"
  13. :key="index"></view>
  14. </view>
  15. </view>
  16. </view> -->
  17. <view class="top-banner">
  18. <image src="../../static/img/banner.png" mode="widthFix"></image>
  19. </view>
  20. <view class="banner" style="margin: 20rpx atuo;background-color: #fff;" @click="ToDoclist"
  21. v-if="userInfo.type && (userInfo.type == 1 || userInfo.type == 3)">
  22. <image src="../../static/img/goxzyy.png" mode="widthFix"
  23. style="width: 700rpx;margin: auto;display: block;"></image>
  24. </view>
  25. <view class="Live-list"
  26. v-if="userInfo.type && (userInfo.type == 1 || userInfo.type == 3) && (DoctorList.length > 0)">
  27. <view class="list-name flex" @click="ToDoclist">
  28. <view class="list-tip">
  29. <view class="tip"></view>
  30. 咨询问诊
  31. </view>
  32. <view class="list-more">
  33. 更多
  34. <text class="iconfont iconenter"></text>
  35. </view>
  36. </view>
  37. <view v-for="(item, index) in DoctorList" :key="index" class="template flex_item"
  38. @click="ToExpert(item.uid)">
  39. <view class="left-img">
  40. <image :src="item.photo"></image>
  41. </view>
  42. <view class="center-word">
  43. <text class="one">{{ item.name }}</text>
  44. <text class="two">
  45. 职位:{{ item.doctor_level == 1 ? "初级" : item.doctor_level == 2 ? "中级" : item.doctor_level == 3 ? "副高级" : "正高级"}}
  46. </text>
  47. </view>
  48. <view class="right-label flex">
  49. <image src="../../static/img/img014.png"></image>
  50. 咨询问诊
  51. </view>
  52. </view>
  53. </view>
  54. <view class="Live-list" v-if="broadList.length > 0">
  55. <view class="list-name flex" @click="ToLive">
  56. <view class="list-tip">
  57. <view class="tip"></view>
  58. 正在直播
  59. </view>
  60. <view class="list-more">
  61. 更多
  62. <text class="iconfont iconenter"></text>
  63. </view>
  64. </view>
  65. <scroll-view class="floor-list" scroll-x>
  66. <view class="scoll-wrapper position-relative">
  67. <view class="floor-item" v-for="ls in broadList" @click="ToLiveDetails(ls)">
  68. <view class="img-box">
  69. <image class="list-image" :src="ls.image"></image>
  70. <view class="tip">好评</view>
  71. </view>
  72. <view class="title clamp">{{ls.title}}</view>
  73. <view class="tip-box flex_item">
  74. <view v-for="item in ls.label" class="tip">{{item}}</view>
  75. </view>
  76. <view class="info ellipsis">{{ls.abstract}}</view>
  77. </view>
  78. </view>
  79. </scroll-view>
  80. </view>
  81. <view class="Live-list">
  82. <view class="list-name flex" @click="ToCourse">
  83. <view class="list-tip">
  84. <view class="tip"></view>
  85. 精选好课
  86. </view>
  87. <view class="list-more">
  88. 更多
  89. <text class="iconfont iconenter"></text>
  90. </view>
  91. </view>
  92. <view id="list-box" class="list-box">
  93. <view class="guess-section flex">
  94. <view class="guess-item" v-for="ls in courseList" @click="ToCourseDetails(ls)">
  95. <view class="imagewrapper">
  96. <image :src="ls.image"></image>
  97. </view>
  98. <text class="title clamp">{{ls.title}}</text>
  99. <view class="tip-box flex_item">
  100. <view v-for="item in ls.label" class="tip">{{item}}</view>
  101. </view>
  102. <view class="info clamp">¥{{ls.money}}</view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </template>
  110. <script>
  111. import {
  112. getDoctorList
  113. } from '@/api/doctor.js';
  114. import {
  115. course_list
  116. } from '@/api/course.js';
  117. import {
  118. getUserInfo
  119. } from '@/api/login.js';
  120. export default {
  121. data() {
  122. return {
  123. userInfo: '',
  124. header_color: 'linear-gradient(52deg, rgba(151,143,250,1) 0%, rgba(126,153,254,1) 100%)', //轮播图背景色渐变
  125. navP: 0, // 导航栏透明度
  126. DoctorList: [],
  127. limit: 10, //每次加载数据条数
  128. page: 1, //当前页数
  129. loadingType: 'more', //加载更多状态
  130. loading: 0, //判断是否为点击搜索按钮跳转加载
  131. addr_color: '',
  132. swiperCurrent: 0, //轮播图
  133. swiperHeight: 300,
  134. banner: '', //轮播图
  135. recommend: '', //列表数据
  136. courseList: '', //专题列表
  137. broadList: '', //直播列表
  138. };
  139. },
  140. onLoad(option) {
  141. let obj = this
  142. if (option.spread) {
  143. // 存储邀请人
  144. this.spread = option.spread;
  145. uni.setStorageSync('spread', option.spread);
  146. }
  147. getUserInfo({}).then(e => {
  148. obj.userInfo = e.data
  149. uni.setStorageSync('userInfo', e.data);
  150. if (!obj.userInfo.ext_info) {
  151. uni.navigateTo({
  152. url: '/pages/index/identity'
  153. })
  154. }
  155. let gz = uni.getStorageSync('gz') || 'more'
  156. if (obj.userInfo.subscribe != 1 && gz == 'more') {
  157. uni.showModal({
  158. title: '温馨提醒',
  159. content: '为更好的接收消息推送,请关注公众号。',
  160. success: res => {
  161. uni.setStorageSync('gz','loaded')
  162. // 判断是否点击了确认
  163. if (res.confirm) {
  164. uni.navigateTo({
  165. url: '/pages/public/erweima'
  166. });
  167. }
  168. }
  169. });
  170. }
  171. })
  172. this.loadData();
  173. this.getDoctorList()
  174. },
  175. onShow() {
  176. let obj = this;
  177. getUserInfo({})
  178. .then(function(e) {
  179. obj.userInfo = e.data;
  180. uni.setStorageSync('userInfo', e.data);
  181. if (obj.userInfo.type == 2) {
  182. uni.setTabBarItem({
  183. index: 0,
  184. text: '首页',
  185. iconPath: 'static/tabBar/tab-home.png',
  186. selectedIconPath: 'static/tabBar/tab-home-current.png'
  187. });
  188. uni.setTabBarItem({
  189. index: 1,
  190. text: '我的病人',
  191. iconPath: 'static/tabBar/tab-cate.png',
  192. selectedIconPath: 'static/tabBar/tab-cate-current.png',
  193. visible: true
  194. });
  195. uni.setTabBarItem({
  196. index: 2,
  197. text: '科普学习',
  198. iconPath: 'static/tabBar/tab-study.png',
  199. selectedIconPath: 'static/tabBar/tab-study-current.png',
  200. visible: false
  201. });
  202. uni.setTabBarItem({
  203. index: 3,
  204. text: '接单',
  205. iconPath: 'static/tabBar/jd.png',
  206. selectedIconPath: 'static/tabBar/jd-act.png',
  207. visible: true
  208. })
  209. uni.setTabBarItem({
  210. index: 4,
  211. text: '我的',
  212. iconPath: 'static/tabBar/tab-my.png',
  213. selectedIconPath: 'static/tabBar/tab-my-current.png'
  214. });
  215. }
  216. if (obj.userInfo.type == 3) {
  217. uni.setTabBarItem({
  218. index: 0,
  219. text: '首页',
  220. iconPath: 'static/tabBar/tab-home.png',
  221. selectedIconPath: 'static/tabBar/tab-home-current.png'
  222. });
  223. uni.setTabBarItem({
  224. index: 1,
  225. text: '咨询记录',
  226. iconPath: 'static/tabBar/tab-cate.png',
  227. selectedIconPath: 'static/tabBar/tab-cate-current.png',
  228. visible: true
  229. });
  230. uni.setTabBarItem({
  231. index: 2,
  232. text: '科普学习',
  233. iconPath: 'static/tabBar/tab-study.png',
  234. selectedIconPath: 'static/tabBar/tab-study-current.png',
  235. visible: false
  236. });
  237. uni.setTabBarItem({
  238. index: 3,
  239. text: '发布订单',
  240. iconPath: 'static/tabBar/jd.png',
  241. selectedIconPath: 'static/tabBar/jd-act.png',
  242. pagePath: '/pages/dd/dd',
  243. visible: true
  244. })
  245. uni.setTabBarItem({
  246. index: 4,
  247. text: '我的',
  248. iconPath: 'static/tabBar/tab-my.png',
  249. selectedIconPath: 'static/tabBar/tab-my-current.png'
  250. });
  251. }
  252. if (obj.userInfo.type == 1) {
  253. console.log('普通用户')
  254. uni.setTabBarItem({
  255. index: 0,
  256. text: '首页',
  257. iconPath: 'static/tabBar/tab-home.png',
  258. selectedIconPath: 'static/tabBar/tab-home-current.png',
  259. visible: true
  260. });
  261. uni.setTabBarItem({
  262. index: 1,
  263. text: '咨询记录',
  264. iconPath: 'static/tabBar/tab-cate.png',
  265. selectedIconPath: 'static/tabBar/tab-cate-current.png',
  266. visible: true
  267. });
  268. // uni.setTabBarItem({
  269. // index: 2,
  270. // text: '科普学习',
  271. // iconPath: 'static/tabBar/tab-study.png',
  272. // selectedIconPath: 'static/tabBar/tab-study-current.png',
  273. // visible: true
  274. // });
  275. uni.setTabBarItem({
  276. index: 3,
  277. text: '接单',
  278. iconPath: 'static/tabBar/jd.png',
  279. selectedIconPath: 'static/tabBar/jd-act.png',
  280. visible: false
  281. })
  282. uni.setTabBarItem({
  283. index: 4,
  284. text: '我的',
  285. iconPath: 'static/tabBar/tab-my.png',
  286. selectedIconPath: 'static/tabBar/tab-my-current.png',
  287. visible: true
  288. });
  289. }
  290. })
  291. .catch(function(e) {
  292. console.log(e);
  293. });
  294. },
  295. methods: {
  296. ToRegister(item) {
  297. if (item == 1) {
  298. uni.navigateTo({
  299. url: '/pages/doctor/doclist'
  300. });
  301. } else {
  302. uni.switchTab({
  303. url: '/pages/index/index'
  304. });
  305. }
  306. },
  307. add() {
  308. let log = this.$log.getLog();
  309. // uni.showModal({
  310. // title: '日志',
  311. // content: JSON.stringify(log),
  312. // showCancel: false,
  313. // });
  314. this.$log.showLog();
  315. },
  316. loadData() {
  317. let obj = this;
  318. course_list({
  319. page: obj.page,
  320. limit: obj.limit
  321. })
  322. .then(data => {
  323. obj.banner = data.data.banner;
  324. obj.recommend = data.data.recommend;
  325. obj.courseList = data.data.recommend['精品课程排行'].list;
  326. if (data.data.recommend['在线直播'].list) {
  327. obj.broadList = data.data.recommend['在线直播'].list;
  328. }
  329. })
  330. .catch(e => {
  331. console.log(e.message);
  332. });
  333. },
  334. //获取医生列表
  335. getDoctorList(type) {
  336. let obj = this;
  337. //这里是将订单挂载到tab列表下
  338. if (type !== 'refresh') {
  339. //没有更多数据直接跳出方法
  340. if (obj.loadingType === 'nomore') {
  341. return;
  342. } else {
  343. // 设置当前为数据载入中
  344. obj.loadingType = 'loading';
  345. }
  346. } else {
  347. //当重新加载数据时更新状态为可继续添加数据
  348. obj.loadingType = 'more';
  349. }
  350. getDoctorList({
  351. hospital: '',
  352. keyword: '',
  353. sort: '',
  354. page: obj.page,
  355. limit: obj.limit
  356. })
  357. .then(data => {
  358. if (type === 'refresh') {
  359. obj.DoctorList = [];
  360. }
  361. obj.DoctorList = obj.DoctorList.concat(data.data.list);
  362. //判断是否还有下一页,有是more 没有是nomore
  363. if (obj.limit == obj.DoctorList.length) {
  364. obj.page++;
  365. obj.loadingType = 'more';
  366. } else {
  367. obj.loadingType = 'nomore';
  368. }
  369. // 判断是否为刷新数据
  370. if (type === 'refresh') {
  371. // 判断是否为点击搜索按钮跳转加载
  372. if (obj.loading == 1) {
  373. uni.hideLoading();
  374. } else {
  375. uni.stopPullDownRefresh();
  376. }
  377. }
  378. })
  379. .catch(e => {
  380. console.log(e.message);
  381. if (e.message == '请登录') {
  382. uni.showModal({
  383. title: '提示',
  384. content: '您未登录,是否马上登陆',
  385. success: function(res) {
  386. if (res.confirm) {
  387. interceptor();
  388. } else if (res.cancel) {
  389. console.log('用户点击取消');
  390. }
  391. }
  392. });
  393. }
  394. obj.loadingType = 'nomore';
  395. // obj.$api.msg(e.message);
  396. uni.hideLoading();
  397. });
  398. },
  399. //专题列表
  400. ToCourse() {
  401. let recommend = this.recommend['精品课程排行'];
  402. uni.navigateTo({
  403. url: '/pages/course/course?recommend_id=' + recommend.id + '&type=' + recommend.type +
  404. '&title=' + recommend.title + '&typesetting=' + recommend.typesetting
  405. });
  406. },
  407. //专题详情
  408. ToCourseDetails(item) {
  409. console.log(item)
  410. let id = item.link_id;
  411. uni.navigateTo({
  412. url: '/pages/course/detail?id=' + id
  413. });
  414. },
  415. //医生详情
  416. ToExpert(item) {
  417. uni.navigateTo({
  418. url: '/pages/doctor/expert?id=' + item
  419. });
  420. },
  421. //医生列表
  422. ToDoclist() {
  423. uni.navigateTo({
  424. url: '/pages/doctor/doclist'
  425. });
  426. },
  427. //直播列表
  428. ToLive() {
  429. console.log(this.recommend)
  430. let recommend = this.recommend['在线直播'];
  431. uni.navigateTo({
  432. url: '/pages/live/list?recommend_id=' + recommend.id + '&type=' + recommend.type +
  433. '&title=' +
  434. recommend.title + '&typesetting=' + recommend.typesetting
  435. });
  436. },
  437. //直播详情
  438. ToLiveDetails(ls) {
  439. console.log(ls)
  440. uni.navigateTo({
  441. url: '/pages/live/details?id=' + ls.link_id
  442. });
  443. },
  444. //轮播图
  445. swiperChange(e) {
  446. const index = e.detail.current;
  447. this.swiperCurrent = index;
  448. }
  449. }
  450. };
  451. </script>
  452. <style lang="scss">
  453. // page {
  454. // background: #ffffff;
  455. // height: 100%;
  456. // }
  457. // .container {
  458. // width: 100%;
  459. // // padding: 90rpx 60rpx;
  460. // }
  461. // .name {
  462. // padding: 60rpx 0rpx;
  463. // color: #323232;
  464. // font-size: 50rpx;
  465. // font-weight: bold;
  466. // }
  467. // .image {
  468. // width: 100%;
  469. // height: 250rpx;
  470. // position: relative;
  471. // margin-bottom: 65rpx;
  472. // image {
  473. // width: 100%;
  474. // height: 100%;
  475. // }
  476. // .identity {
  477. // position: absolute;
  478. // top: 60rpx;
  479. // left: 50rpx;
  480. // color: #ffffff;
  481. // font-size: 40rpx;
  482. // }
  483. // .info {
  484. // position: absolute;
  485. // left: 50rpx;
  486. // top: 125rpx;
  487. // color: #ffffff;
  488. // font-size: 24rpx;
  489. // opacity: 0.5;
  490. // }
  491. // }
  492. // .top-img {
  493. // width: 100%;
  494. // margin-bottom: 20rpx;
  495. // image {
  496. // width: 100%;
  497. // }
  498. // }
  499. page {
  500. background: #f5f5f5;
  501. }
  502. .top_header {
  503. padding: 25rpx 0rpx;
  504. .top-address {
  505. position: fixed;
  506. top: 0;
  507. width: 100% !important;
  508. z-index: 999;
  509. padding-bottom: 25rpx;
  510. //地址
  511. .header {
  512. width: 100%;
  513. padding: 0 4%;
  514. height: 100rpx;
  515. display: flex;
  516. align-items: center;
  517. .addr {
  518. height: 60rpx;
  519. flex-shrink: 0;
  520. display: flex;
  521. align-items: center;
  522. font-size: 36rpx;
  523. font-weight: bold;
  524. width: 90%;
  525. color: #ffffff;
  526. .icon {
  527. height: 60rpx;
  528. margin-right: 15rpx;
  529. display: flex;
  530. align-items: center;
  531. font-size: 42rpx;
  532. color: #ffffff;
  533. }
  534. }
  535. .config {
  536. width: 120rpx;
  537. height: 60rpx;
  538. flex-shrink: 0;
  539. display: flex;
  540. .message {
  541. width: 65rpx;
  542. height: 65rpx;
  543. display: flex;
  544. justify-content: flex-end;
  545. align-items: center;
  546. font-size: 42rpx;
  547. color: #ffffff;
  548. }
  549. }
  550. }
  551. }
  552. .zhanwei {
  553. width: 100% !important;
  554. height: 60rpx;
  555. }
  556. }
  557. .search-box {
  558. height: 120rpx;
  559. }
  560. //搜索框
  561. .input-box {
  562. width: 80%;
  563. margin-left: 25rpx;
  564. height: 70rpx;
  565. background-color: #ffffff;
  566. border-radius: 50rpx;
  567. position: relative;
  568. display: flex;
  569. align-items: center;
  570. .icon {
  571. display: flex;
  572. align-items: center;
  573. position: absolute;
  574. top: 0;
  575. left: 35rpx;
  576. width: 60rpx;
  577. height: 70rpx;
  578. font-size: 34rpx;
  579. color: #c0c0c0;
  580. }
  581. input {
  582. padding-left: 100rpx;
  583. height: 28rpx;
  584. font-size: 28rpx;
  585. }
  586. }
  587. .queding {
  588. color: #ffffff;
  589. font-size: 35rpx;
  590. padding: 25rpx 25rpx;
  591. }
  592. //轮播图
  593. .swiper {
  594. width: 100%;
  595. display: flex;
  596. justify-content: center;
  597. .swiper-box {
  598. width: 100%;
  599. height: 346rpx;
  600. overflow: hidden;
  601. // box-shadow: 0upx 8upx 25upx rgba(0, 0, 0, 0.2);
  602. //兼容ios,微信小程序
  603. position: relative;
  604. z-index: 1;
  605. swiper {
  606. width: 100%;
  607. height: 346rpx;
  608. swiper-item {
  609. image {
  610. width: 100%;
  611. height: 346rpx;
  612. }
  613. }
  614. }
  615. .indicator {
  616. position: absolute;
  617. bottom: 20upx;
  618. left: 20upx;
  619. background-color: rgba(255, 255, 255, 0.4);
  620. width: 150upx;
  621. height: 5upx;
  622. border-radius: 3upx;
  623. overflow: hidden;
  624. display: flex;
  625. .dots {
  626. width: 0upx;
  627. background-color: rgba(255, 255, 255, 1);
  628. transition: all 0.3s ease-out;
  629. &.on {
  630. width: (100%/3);
  631. }
  632. }
  633. }
  634. }
  635. }
  636. //正在直播
  637. .Live-list {
  638. margin-top: 25rpx;
  639. width: 100%;
  640. background-color: #ffffff;
  641. font-size: 24rpx;
  642. padding: 35rpx 35rpx;
  643. .list-name {
  644. padding-bottom: 35rpx;
  645. .list-tip {
  646. position: relative;
  647. padding-left: 25rpx;
  648. color: #6786fb;
  649. font-size: 32rpx;
  650. .tip {
  651. position: absolute;
  652. left: 0rpx;
  653. width: 10rpx;
  654. height: 45rpx;
  655. background-color: #6786fb;
  656. border-radius: 25rpx;
  657. }
  658. }
  659. .list-more {
  660. color: #999999;
  661. font-size: 24rpx;
  662. }
  663. }
  664. }
  665. .scoll-wrapper {
  666. display: flex;
  667. align-items: flex-start;
  668. .floor-item {
  669. width: 220rpx;
  670. font-size: $font-sm + 2rpx;
  671. margin-right: 25rpx;
  672. .img-box {
  673. position: relative;
  674. .list-image {
  675. width: 220rpx;
  676. height: 144rpx;
  677. border-radius: 15rpx;
  678. box-shadow: 0px 6px 10px 0px rgba(0, 0, 0, 0.04);
  679. }
  680. .tip {
  681. position: absolute;
  682. right: 15rpx;
  683. top: 0rpx;
  684. background: #ff6700;
  685. width: 45rpx;
  686. text-align: center;
  687. font-size: 18rpx;
  688. color: #ffffff;
  689. padding: 10rpx 0rpx;
  690. border-bottom-left-radius: 25rpx;
  691. border-bottom-right-radius: 25rpx;
  692. }
  693. }
  694. .tip-box {
  695. display: flex;
  696. flex-wrap: wrap;
  697. padding-top: 5rpx;
  698. .tip {
  699. background: rgba(103, 134, 251, 0.18);
  700. color: #6786FB;
  701. margin-right: 15rpx;
  702. margin-top: 10rpx;
  703. padding: 2rpx 10rpx;
  704. }
  705. }
  706. .title {
  707. font-size: 26rpx !important;
  708. font-weight: 500;
  709. }
  710. .info {
  711. color: #999999;
  712. font-size: 24rpx;
  713. padding-top: 15rpx;
  714. }
  715. }
  716. }
  717. /*公用边框样式*/
  718. %icon {
  719. margin-right: 10rpx;
  720. display: inline-block;
  721. padding: 2rpx 10rpx;
  722. border: 1rpx solid $color-yellow;
  723. color: $color-yellow;
  724. line-height: 1;
  725. font-size: $font-base;
  726. border-radius: 10rpx;
  727. }
  728. //精选好课
  729. .guess-section {
  730. display: flex;
  731. flex-wrap: wrap;
  732. .guess-item {
  733. position: relative;
  734. overflow: hidden;
  735. display: flex;
  736. flex-direction: column;
  737. width: 47%;
  738. margin-bottom: 2%;
  739. background-color: white;
  740. padding-bottom: 30rpx;
  741. // &:nth-child(2n + 1) {
  742. // margin-right: 15rpx;
  743. // }
  744. }
  745. .tip-box {
  746. display: flex;
  747. flex-wrap: wrap;
  748. padding-top: 5rpx;
  749. .tip {
  750. background: rgba(103, 134, 251, 0.18);
  751. color: #6786FB;
  752. margin-right: 15rpx;
  753. margin-top: 10rpx;
  754. padding: 2rpx 10rpx;
  755. }
  756. }
  757. .imagewrapper {
  758. width: 100%;
  759. height: 204rpx;
  760. margin-bottom: 15rpx;
  761. image {
  762. border-radius: 15rpx;
  763. width: 100%;
  764. height: 100%;
  765. }
  766. }
  767. .title {
  768. font-size: 30rpx;
  769. color: $font-color-dark;
  770. }
  771. .info {
  772. color: #e73932;
  773. padding-top: 15rpx;
  774. font-size: 30rpx;
  775. }
  776. }
  777. .preferred_centent {
  778. width: 100%;
  779. .preferred_item {
  780. width: 100%;
  781. height: 100%;
  782. border-top: 1px solid #f0f0f0;
  783. padding: 35rpx 0rpx;
  784. .goods_image image {
  785. width: 140rpx;
  786. height: 140rpx;
  787. border-radius: 100%;
  788. }
  789. .goods_name {
  790. padding-left: 25rpx;
  791. width: 50%;
  792. .goods_title {
  793. white-space: nowrap;
  794. overflow: hidden;
  795. text-overflow: ellipsis;
  796. font-size: 30rpx;
  797. font-weight: 400;
  798. }
  799. .goods_info {
  800. padding-top: 15rpx;
  801. font-size: 24rpx;
  802. color: #999999;
  803. }
  804. }
  805. .btn-tpl {
  806. margin-left: 10rpx;
  807. border: 2rpx solid #305cec;
  808. padding: 13rpx 20rpx;
  809. color: #6786fb;
  810. border-radius: 15rpx;
  811. .tpl-img {
  812. padding-right: 10rpx;
  813. image {
  814. margin-top: 8rpx;
  815. width: 35rpx;
  816. height: 35rpx;
  817. }
  818. }
  819. }
  820. }
  821. }
  822. .top-banner {
  823. width: 100%;
  824. image {
  825. width: 100%;
  826. }
  827. }
  828. .template {
  829. width: 100%;
  830. background: #ffffff;
  831. overflow: hidden;
  832. padding: 25rpx;
  833. box-shadow: 0px 5px 5px 0px rgba(35, 24, 21, 0.06);
  834. border-radius: 12rpx;
  835. position: relative;
  836. .left-img {
  837. width: 140rpx;
  838. height: 140rpx;
  839. image {
  840. width: 100%;
  841. height: 100%;
  842. ;
  843. border-radius: 100%;
  844. }
  845. }
  846. .center-word {
  847. width: 52%;
  848. padding-left: 25rpx;
  849. .one {
  850. font-size: $uni-font-size-lg - 2rpx;
  851. font-weight: 500;
  852. color: $uni-text-color;
  853. line-height: 36rpx;
  854. display: block;
  855. margin-bottom: 10rpx;
  856. }
  857. .two {
  858. font-size: $uni-font-size-sm;
  859. font-weight: 500;
  860. color: #666666;
  861. line-height: 36rpx;
  862. display: block;
  863. }
  864. }
  865. .right-label {
  866. padding: 16rpx;
  867. border: 1px solid $base-color;
  868. border-radius: 7rpx;
  869. font-size: $font-sm - 1rpx;
  870. font-weight: 500;
  871. color: $base-color;
  872. align-items: center;
  873. image {
  874. width: 30rpx;
  875. height: 26rpx;
  876. margin-right: 8rpx;
  877. }
  878. }
  879. }
  880. </style>