index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. <template>
  2. <zzx-navbar :scrollable="true" :back="true" title="详情"></zzx-navbar>
  3. <view class="detail-header">
  4. <image class="header-bg" :src="courseDetailInfo?.cover" mode="">
  5. </image>
  6. <view class="back-icon" :style="{ paddingTop: (statusBarHeight + 10) + 'px' }" @click="RouterUtils.back()">
  7. <zzx-icon name="back"></zzx-icon>
  8. </view>
  9. <view :style="{ height: (statusBarHeight + 70) + 'px' }"></view>
  10. <scroll-view class="header-swiper content" scroll-x="true" :show-scrollbar="false">
  11. <view class="swiper-inner">
  12. <block v-if="courseDetailInfo?.video">
  13. <video v-for="(item, index) in videoList" :key="index" :src="item"></video>
  14. </block>
  15. <image @click="_previewImage(bannerList, item)" v-for="(item, index) in bannerList" :key="index"
  16. :src="item" mode=""></image>
  17. </view>
  18. </scroll-view>
  19. </view>
  20. <view :style="{ height: (statusBarHeight + 34) + 'px' }"></view>
  21. <view class="header-info">
  22. <view class="c-price-info">
  23. <view class="price-info">
  24. <view class="new-price">¥{{ courseDetailInfo?.sellingPrice.toFixed(2) }}</view>
  25. <view class="old-price" v-if="courseDetailInfo?.originalPrice">¥{{
  26. courseDetailInfo?.originalPrice.toFixed(2) }}</view>
  27. </view>
  28. <view class="sales">年售{{ courseDetailInfo?.sales }}</view>
  29. </view>
  30. <view class="c-name">
  31. {{ courseDetailInfo?.name }}
  32. </view>
  33. <view class="c-detail-info">
  34. <view class="c-time">课时:{{ courseDetailInfo?.startTime }}-{{ courseDetailInfo?.endTime }}</view>
  35. <view class="c-address" @click="openMap">
  36. <view class="">上课地点:{{ courseDetailInfo?.address }} | {{ courseDetailInfo?.km.toFixed(2) }} km</view>
  37. <zzx-icon name="ashRight" size="10"></zzx-icon>
  38. </view>
  39. <view class="c-instructor">
  40. <view class="c-instructor-title">授课教练:</view>
  41. <view class="c-instructor-name">
  42. <image :src="courseDetailInfo?.instructorAvatar" mode=""></image>
  43. <view class="">{{ courseDetailInfo?.instructorName }}</view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="c-line"></view>
  48. <view class="c-rules">限制:每人限购{{courseDetailInfo?.limitNum}}张</view>
  49. </view>
  50. <view class="content">
  51. <uv-sticky offset-top="70">
  52. <view class="detail-select">
  53. <view :class="sel_index === index ? 'select-text' : 'notsel-text'" v-for="(item, index) in selectList"
  54. :key="index" @click="sel_tab(index)">
  55. <text>{{ item }}</text>
  56. </view>
  57. </view>
  58. </uv-sticky>
  59. <view class="c-tabbar">
  60. <view class="c-tabbar-detail" id="detail">
  61. <rich-text :nodes="courseDetailInfo?.details"></rich-text>
  62. </view>
  63. <view class="c-notice" id="notice">
  64. <view class="title">购买须知</view>
  65. <view class="tips-text">
  66. <view class="text">
  67. <rich-text :nodes="courseDetailInfo?.reminder"></rich-text>
  68. </view>
  69. <!-- <view class="more">
  70. <text>查看更多</text>
  71. <zzx-icon name="more" size="10"></zzx-icon>
  72. </view> -->
  73. </view>
  74. </view>
  75. <view class="c-schedule" id="schedule">
  76. <view class="title">课程表</view>
  77. <view class="list-card">
  78. <view class="card-title">总共{{ courseDetailInfo?.courseDetail?.length }}节</view>
  79. <view class="schedule-list" v-for="item in courseDetailInfo?.courseDetail" :key="item.id">
  80. <view class="time">
  81. <text>{{ item.startTime }}-{{ item.endTime }}</text>
  82. </view>
  83. <view class="name">{{ item?.name }}</view>
  84. </view>
  85. <!-- <view class="more">
  86. <text>查看更多</text>
  87. <zzx-icon name="more" size="10"></zzx-icon>
  88. </view> -->
  89. </view>
  90. </view>
  91. <view class="appraise-card" id="appraise">
  92. <view class="appraise-title">
  93. <view class="title">评价</view>
  94. <view class="comments">
  95. <view class="a-star">
  96. <zzx-icon name="star" size="10"></zzx-icon>
  97. <text>{{ appraiseList.averageScore }}</text>
  98. </view>
  99. <view class="a-text">| {{ appraiseList.scoreNum }}人评论</view>
  100. </view>
  101. </view>
  102. <view class="appraise-info" v-for="item in appraiseList.records" :key="item.id">
  103. <view class="a-user-info">
  104. <view class="info">
  105. <image :src="item.avatar" mode=""></image>
  106. <view class="name">{{ item.username }}</view>
  107. </view>
  108. <view class="time">{{ DateUtils.formatDateToMMDD(item.createTime) }}</view>
  109. </view>
  110. <view class="a-score">
  111. <text>{{ item.score.toFixed(1) }}</text>
  112. <uni-rate :readonly="true" size="16" :value="item.score" />
  113. </view>
  114. <view class="a-content">
  115. {{ item.evaluateContent }}
  116. </view>
  117. <scroll-view class="scroll-view_H" scroll-x="true" :show-scrollbar="false">
  118. <view class="scroll-view-item_H uni-bg-red" v-for="(img, idx) in item.images.split(',')"
  119. :key="idx">
  120. <image @click="_previewImage(item.images.split(','), img)" :src="img" mode=""></image>
  121. </view>
  122. </scroll-view>
  123. </view>
  124. <view class="not-data" v-if="!appraiseList?.records?.length">暂无评价数据</view>
  125. </view>
  126. </view>
  127. </view>
  128. <view style="height: 160rpx;"></view>
  129. <view class="c-bottom">
  130. <view class="c-share">
  131. <zzx-icon name="share"></zzx-icon>
  132. <view class="">分享</view>
  133. <button class="g-share-btn" open-type="share"></button>
  134. </view>
  135. <view class="c-buy-btn">
  136. <view class="buy" v-if="type == 3" @click="toOrderPage(0)">
  137. <view class="buy-text">抢购</view>
  138. <view class="buy-price">
  139. <text>¥{{ courseDetailInfo?.sellingPrice }}</text>
  140. <text>省10</text>
  141. </view>
  142. </view>
  143. <block v-else>
  144. <view class="buy" @click="toOrderPage(0)">
  145. <view class="buy-text">直接购买</view>
  146. <view class="buy-price">
  147. <text>¥{{ courseDetailInfo?.sellingPrice }}</text>
  148. <text v-if="courseDetailInfo?.originalPrice">省{{ (courseDetailInfo?.originalPrice -
  149. courseDetailInfo?.sellingPrice) }}</text>
  150. </view>
  151. </view>
  152. <view class="gratis" @click="toOrderPage(1)" v-if="courseDetailInfo?.hasDiscount">
  153. <view class="gratis-tips">只能试听第一节,请按课表上课,超时作废</view>
  154. 免费试听
  155. </view>
  156. </block>
  157. </view>
  158. </view>
  159. </template>
  160. <script lang="ts" setup>
  161. import { ref, onMounted, getCurrentInstance, nextTick } from 'vue';
  162. import { RouterUtils, _previewImage, TipsUtils } from '@/utils/util';
  163. import { http } from '@/utils/http'
  164. import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
  165. import { onLoad, onPageScroll, onShareAppMessage } from '@dcloudio/uni-app';
  166. import { useCacheStore } from '@/stores/cache'
  167. const statusBarHeight = ref(0);
  168. const sectionTops = ref<number[]>([]);
  169. const isScrollingByTab = ref(false);
  170. const scrollTimer = ref<any>(null);
  171. const sel_index = ref(0);
  172. const selectList = ref(['详情', '须知', '课表', '评价']);
  173. const instance = getCurrentInstance();
  174. const cache = useCacheStore()
  175. const type = ref()
  176. onLoad((option) => {
  177. console.log(option);
  178. courseId.value = option.id
  179. type.value = option.type
  180. appraiseFormData.value.siteId = option.id
  181. if (option.type == 'sharecourse') {
  182. cache.set('COURSE_ID', courseDetailInfo.value.id)
  183. }
  184. })
  185. onShareAppMessage((res) => {
  186. if (res.from === 'button') {// 来自页面内分享按钮
  187. console.log(res.target)
  188. }
  189. return {
  190. title: `邀请您报名《${courseDetailInfo.value.name}》`,
  191. path: `/pages/index/courseDetail/index?id=${courseDetailInfo.value.id}&type=sharecourse`,
  192. imageUrl: courseDetailInfo.value.cover,
  193. }
  194. })
  195. onMounted(() => {
  196. get_navheight()
  197. nextTick(() => {
  198. setTimeout(() => getSectionsTop(), 300);
  199. });
  200. get_courseInfo()
  201. getFindByOrderPage()
  202. })
  203. const openMap = () => {
  204. uni.openLocation({
  205. latitude: courseDetailInfo.value.latitude,
  206. longitude: courseDetailInfo.value.longitude,
  207. name: courseDetailInfo.value.name,
  208. address: courseDetailInfo.value.address,
  209. success: function () {
  210. console.log('success');
  211. }
  212. });
  213. }
  214. // 获取所有模块的位置信息
  215. const getSectionsTop = () => {
  216. const ids = ['detail', 'notice', 'schedule', 'appraise'];
  217. const query = uni.createSelectorQuery().in(instance.proxy);
  218. ids.forEach(id => {
  219. query.select(`#${id}`).boundingClientRect();
  220. });
  221. query.exec((rects) => {
  222. // 计算各模块相对于页面顶部的距离
  223. sectionTops.value = rects.map((rect: any) => rect.top - 130);
  224. })
  225. };
  226. //滚动事件
  227. onPageScroll((e) => {
  228. if (isScrollingByTab.value) return;
  229. if (scrollTimer.value) return;
  230. scrollTimer.value = setTimeout(() => {
  231. updateActiveTab(e.scrollTop);
  232. scrollTimer.value = null;
  233. }, 100);
  234. });
  235. // 根据滚动位置更新激活的Tab
  236. const updateActiveTab = (scrollTop: number) => {
  237. const offset = 130;
  238. const scrollPosition = scrollTop + offset;
  239. let activeIndex = 0;
  240. for (let i = 0; i < sectionTops.value.length; i++) {
  241. if (scrollPosition >= sectionTops.value[i]) {
  242. activeIndex = i;
  243. } else {
  244. break; // 模块位置已排序,可提前结束
  245. }
  246. }
  247. if (sel_index.value !== activeIndex) {
  248. sel_index.value = activeIndex;
  249. }
  250. };
  251. const get_navheight = () => {
  252. const systemInfo = uni.getSystemInfoSync();
  253. statusBarHeight.value = systemInfo.statusBarHeight || 0;
  254. }
  255. const sel_tab = async (i: number) => {
  256. isScrollingByTab.value = true; // 标记为Tab点击触发的滚动
  257. sel_index.value = i;
  258. const ids = ['detail', 'notice', 'schedule', 'appraise'];
  259. const id = ids[i];
  260. await scrollToTop();
  261. await nextTick();
  262. const query = uni.createSelectorQuery().in(instance.proxy);
  263. query.select(`#${id}`).boundingClientRect(data => {
  264. if (!data) return;
  265. uni.pageScrollTo({
  266. scrollTop: data.top - 130,
  267. duration: 500,
  268. complete: () => {
  269. setTimeout(() => {
  270. isScrollingByTab.value = false;
  271. }, 300);
  272. }
  273. });
  274. }).exec();
  275. }
  276. const scrollToTop = () => {
  277. return new Promise(resolve => {
  278. uni.pageScrollTo({
  279. scrollTop: 0,
  280. duration: 0,
  281. success: resolve
  282. });
  283. });
  284. }
  285. const toOrderPage = (buyType: number) => {
  286. RouterUtils.to_page(`/pages/index/gymPay/index?courseId=${courseId.value}&type=${type.value}&orderType=2&buyType=${buyType}`)
  287. }
  288. // 获取评价
  289. const appraiseFormData = ref({
  290. coursesId: null,
  291. pageNo: 1,
  292. pageSize: 10
  293. })
  294. const appraiseList = ref([])
  295. const getFindByOrderPage = () => {
  296. http.get('/my/evaluate/findByOrderPage', { data: appraiseFormData.value, loading: true }).then((res) => {
  297. if (appraiseFormData.value.pageNo == 1) {
  298. appraiseList.value = res.result
  299. } else {
  300. appraiseList.value = [...appraiseList.value, ...res.result]
  301. }
  302. })
  303. }
  304. const courseId = ref()
  305. const courseDetailInfo = ref()
  306. const bannerList = ref([])
  307. const videoList = ref([])
  308. const get_courseInfo = () => {
  309. http.get('/detail/getCourseInfo', { data: { id: courseId.value || '22222', latitude: cache.get('LAT'), longitude: cache.get('LON') }, loading: true }).then((res) => {
  310. if (res.result && res.result.details) {
  311. res.result.details = fixImgStyle(res.result.details);
  312. }
  313. const startIndex = res.result.backgroundImage ? res.result.backgroundImage.indexOf('"') + 1 : 0;
  314. const endIndex = res.result.backgroundImage ? res.result.backgroundImage.lastIndexOf('') : 0;
  315. bannerList.value = res.result.backgroundImage ? res.result.backgroundImage.slice(startIndex, endIndex).split(',') : [];
  316. let videoIndex = res.result.video ? res.result.video.indexOf('"') + 1 : 0;
  317. let videoEndIndex = res.result.video ? res.result.video.lastIndexOf('') : 0;
  318. videoList.value = res.result.video ? res.result.video.slice(videoIndex, videoEndIndex).split(',') : [];
  319. courseDetailInfo.value = res.result
  320. })
  321. }
  322. const fixImgStyle = (html: string) => {
  323. if (!html) return html;
  324. return html.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block;"');
  325. };
  326. </script>
  327. <style lang="less" scoped>
  328. .detail-header {
  329. position: relative;
  330. .header-bg {
  331. position: absolute;
  332. width: 100%;
  333. height: 432rpx;
  334. z-index: -100;
  335. }
  336. .back-icon {
  337. position: absolute;
  338. left: 20rpx;
  339. z-index: 9999;
  340. }
  341. .header-swiper {
  342. position: absolute;
  343. width: 740rpx;
  344. white-space: nowrap;
  345. overflow: hidden;
  346. /* 隐藏滚动条 */
  347. /deep/ ::-webkit-scrollbar {
  348. display: none;
  349. width: 0 !important;
  350. height: 0 !important;
  351. background: transparent;
  352. }
  353. .swiper-inner {
  354. display: inline-flex;
  355. align-items: center;
  356. gap: 14rpx;
  357. height: 100%;
  358. &>video,
  359. &>image {
  360. width: 220rpx;
  361. height: 126rpx;
  362. border-radius: 16rpx;
  363. flex-shrink: 0;
  364. }
  365. }
  366. }
  367. }
  368. .header-info {
  369. padding: 20rpx;
  370. background: #FFFFFF;
  371. border-radius: 16rpx 16rpx 0rpx 0rpx;
  372. .c-price-info {
  373. display: flex;
  374. align-items: center;
  375. justify-content: space-between;
  376. .price-info {
  377. display: flex;
  378. align-items: center;
  379. gap: 20rpx;
  380. .new-price {
  381. font-weight: 800;
  382. font-size: 48rpx;
  383. color: #FB5B5B;
  384. }
  385. .old-price {
  386. font-size: 24rpx;
  387. color: #AAAAAA;
  388. text-decoration: line-through;
  389. }
  390. }
  391. .sales {
  392. font-size: 24rpx;
  393. color: #AAAAAA;
  394. }
  395. }
  396. .c-name {
  397. margin-top: 44rpx;
  398. font-weight: 800;
  399. font-size: 32rpx;
  400. color: #222222;
  401. }
  402. .c-detail-info {
  403. font-size: 24rpx;
  404. color: #AAAAAA;
  405. .c-time {
  406. margin-top: 20rpx;
  407. }
  408. .c-address {
  409. display: flex;
  410. align-items: center;
  411. justify-content: space-between;
  412. margin-top: 20rpx;
  413. }
  414. .c-instructor {
  415. margin-top: 20rpx;
  416. display: flex;
  417. align-items: center;
  418. gap: 20rpx;
  419. font-size: 24rpx;
  420. color: #AAAAAA;
  421. .c-instructor-title {}
  422. .c-instructor-name {
  423. text-align: center;
  424. &>image {
  425. width: 60rpx;
  426. height: 60rpx;
  427. border-radius: 50%;
  428. }
  429. }
  430. }
  431. }
  432. .c-line {
  433. border: 1rpx solid #F0F0F0;
  434. margin-top: 20rpx;
  435. }
  436. .c-rules {
  437. margin-top: 20rpx;
  438. font-size: 24rpx;
  439. color: #222222;
  440. }
  441. }
  442. .detail-select {
  443. display: flex;
  444. align-items: center;
  445. gap: 60rpx;
  446. margin-top: 20rpx;
  447. height: 80rpx;
  448. background-color: #F6F6F6;
  449. .select-text,
  450. .notsel-text {
  451. position: relative;
  452. transition: all 0.3s ease;
  453. }
  454. .select-text {
  455. font-weight: 800;
  456. font-size: 32rpx;
  457. color: #222222;
  458. position: relative;
  459. }
  460. .notsel-text {
  461. font-size: 32rpx;
  462. color: #AAAAAA;
  463. }
  464. .select-text::after {
  465. position: absolute;
  466. content: '';
  467. width: 40rpx;
  468. height: 20rpx;
  469. background-color: #C8FF0C;
  470. border-radius: 4rpx;
  471. left: 050%;
  472. transform: translateX(-50%);
  473. bottom: -16rpx;
  474. transition: all 0.3s ease;
  475. opacity: 1;
  476. }
  477. .notsel-text::after {
  478. content: '';
  479. position: absolute;
  480. left: 50%;
  481. bottom: -16rpx;
  482. width: 0;
  483. height: 20rpx;
  484. background-color: #C8FF0C;
  485. border-radius: 4rpx;
  486. transform: translateX(-50%);
  487. opacity: 0;
  488. transition: all 0.3s ease;
  489. }
  490. }
  491. .c-tabbar {
  492. margin-top: 10rpx;
  493. .c-tabbar-detail {
  494. background: #FFFFFF;
  495. border-radius: 32rpx;
  496. padding: 20rpx;
  497. font-size: 24rpx;
  498. color: #222222;
  499. }
  500. .c-notice {
  501. margin-top: 20rpx;
  502. .title {
  503. font-weight: bold;
  504. font-size: 32rpx;
  505. color: #222222;
  506. }
  507. .tips-text {
  508. margin-top: 20rpx;
  509. background: #FFFFFF;
  510. border-radius: 32rpx;
  511. padding: 20rpx;
  512. .text {
  513. font-size: 24rpx;
  514. color: #222222;
  515. &>view {
  516. margin-top: 20rpx;
  517. }
  518. }
  519. .more {
  520. margin-top: 20rpx;
  521. display: flex;
  522. align-items: center;
  523. justify-content: center;
  524. gap: 20rpx;
  525. font-size: 24rpx;
  526. color: #AAAAAA;
  527. }
  528. }
  529. }
  530. .c-schedule {
  531. .title {
  532. font-weight: bold;
  533. font-size: 32rpx;
  534. color: #222222;
  535. }
  536. .list-card {
  537. margin-top: 20rpx;
  538. background: #FFFFFF;
  539. border-radius: 32rpx;
  540. padding: 20rpx;
  541. font-size: 24rpx;
  542. color: #222222;
  543. .card-title {}
  544. .schedule-list {
  545. margin-top: 20rpx;
  546. .time {
  547. border-left: 8rpx solid #D3FD76;
  548. &>text {
  549. margin-left: 20rpx;
  550. }
  551. }
  552. .name {
  553. margin-left: 20rpx;
  554. margin-top: 20rpx;
  555. }
  556. }
  557. .more {
  558. margin-top: 20rpx;
  559. display: flex;
  560. align-items: center;
  561. justify-content: center;
  562. gap: 20rpx;
  563. font-size: 24rpx;
  564. color: #AAAAAA;
  565. }
  566. }
  567. }
  568. .appraise-card {
  569. padding: 20rpx;
  570. background: #FFFFFF;
  571. border-radius: 32rpx;
  572. margin-top: 20rpx;
  573. .appraise-title {
  574. display: flex;
  575. align-items: center;
  576. justify-content: space-between;
  577. .title {
  578. font-weight: 800;
  579. font-size: 32rpx;
  580. color: #222222;
  581. }
  582. .comments {
  583. display: flex;
  584. align-items: center;
  585. gap: 16rpx;
  586. .a-star {
  587. font-size: 24rpx;
  588. color: #FDD143;
  589. }
  590. .a-text {
  591. font-size: 24rpx;
  592. color: #AAAAAA;
  593. }
  594. }
  595. }
  596. .appraise-info {
  597. margin-top: 20rpx;
  598. .a-user-info {
  599. display: flex;
  600. align-items: center;
  601. justify-content: space-between;
  602. .info {
  603. display: flex;
  604. align-items: center;
  605. gap: 20rpx;
  606. &>image {
  607. width: 60rpx;
  608. height: 60rpx;
  609. border-radius: 50%;
  610. }
  611. .name {
  612. font-weight: bold;
  613. font-size: 24rpx;
  614. color: #222222;
  615. }
  616. }
  617. .time {
  618. font-size: 24rpx;
  619. color: #AAAAAA;
  620. }
  621. }
  622. .a-score {
  623. font-size: 24rpx;
  624. color: #AAAAAA;
  625. display: flex;
  626. align-items: center;
  627. gap: 20rpx;
  628. margin-top: 20rpx;
  629. }
  630. .a-content {
  631. margin-top: 20rpx;
  632. font-size: 28rpx;
  633. color: #222222;
  634. }
  635. .scroll-view_H {
  636. white-space: nowrap;
  637. width: 100%;
  638. height: 220rpx;
  639. margin-top: 20rpx;
  640. border-bottom: 1rpx solid #F0F0F0;
  641. .scroll-view-item_H {
  642. display: inline-block;
  643. text-align: center;
  644. margin-right: 14rpx;
  645. &>image {
  646. width: 202rpx;
  647. height: 200rpx;
  648. background: #D8D8D8;
  649. border-radius: 32rpx;
  650. }
  651. }
  652. }
  653. }
  654. }
  655. }
  656. .c-bottom {
  657. display: flex;
  658. align-items: center;
  659. justify-content: space-between;
  660. position: fixed;
  661. bottom: 0;
  662. width: 95%;
  663. padding: 20rpx;
  664. background: #fff;
  665. box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09);
  666. border-radius: 32rpx 32rpx 0rpx 0rpx;
  667. .c-share {
  668. font-weight: bold;
  669. font-size: 28rpx;
  670. color: #222222;
  671. text-align: center;
  672. position: relative;
  673. .g-share-btn {
  674. position: absolute;
  675. width: 80rpx;
  676. height: 90rpx;
  677. top: -12rpx;
  678. opacity: 0;
  679. }
  680. }
  681. .c-buy-btn {
  682. display: flex;
  683. align-items: center;
  684. gap: 16rpx;
  685. .buy {
  686. width: 226rpx;
  687. height: 100rpx;
  688. background: #222222;
  689. border-radius: 60rpx;
  690. text-align: center;
  691. .buy-text {
  692. margin-top: 8rpx;
  693. font-weight: bold;
  694. font-size: 32rpx;
  695. color: #D3FD76;
  696. }
  697. .buy-price {
  698. color: #D3FD76;
  699. &>text:first-child {
  700. font-weight: bold;
  701. font-size: 28rpx;
  702. }
  703. &>text:last-child {
  704. margin-left: 6rpx;
  705. font-size: 22rpx;
  706. }
  707. }
  708. }
  709. .gratis {
  710. width: 226rpx;
  711. height: 100rpx;
  712. background: #D3FD76;
  713. border-radius: 60rpx;
  714. font-weight: bold;
  715. font-size: 32rpx;
  716. color: #222222;
  717. text-align: center;
  718. line-height: 100rpx;
  719. position: relative;
  720. .gratis-tips {
  721. position: absolute;
  722. width: 552rpx;
  723. height: 80rpx;
  724. font-size: 28rpx;
  725. color: #FFFFFF;
  726. background: rgba(0, 0, 0, 0.6);
  727. border-radius: 8rpx;
  728. line-height: 80rpx;
  729. right: 20rpx;
  730. bottom: 110rpx;
  731. }
  732. }
  733. }
  734. }
  735. </style>