index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. <template>
  2. <view class="sell-container">
  3. <!-- 顶部背景图 -->
  4. <image class="top-bg-image" src="/pages-sell/static/top-bg.png" mode="widthFix"></image>
  5. <!-- 导航栏 -->
  6. <view class="custom-navbar" :style="{ paddingTop: statusBarHeight + 'px' }">
  7. <view class="navbar-content">
  8. <text class="navbar-title">书嗨</text>
  9. <!-- 右侧胶囊占位,保持布局平衡 -->
  10. <view class="nav-right-placeholder"></view>
  11. </view>
  12. </view>
  13. <!-- 主要内容区域 -->
  14. <view class="main-content" :style="{ marginTop: (statusBarHeight + 44) + 'px' }">
  15. <!-- 搜索框 -->
  16. <view class="search-wrapper" @click="navigateTo('/pages-sell/pages/search')">
  17. <view class="search-box-uview">
  18. <u-search placeholder="搜索关键字" :show-action="false" bg-color="transparent" height="40"
  19. :clearabled="true" v-model="keyword" :disabled="true"
  20. search-icon="/pages-sell/static/search-icon.png"></u-search>
  21. <view class="search-btn-overlay">
  22. <text>搜索</text>
  23. </view>
  24. </view>
  25. </view>
  26. <!-- tab标签 -->
  27. <!-- <view class="tabs-wrapper">
  28. <u-tabs :list="hotTagList" :current="currentHotTag" @change="changeHotTag" bgColor="transparent"
  29. lineColor="transparent" :active-item-style="{ fontWeight: 'bold', color: '#333' }"
  30. inactive-color="#3C4F3E" :barStyle="barStyle" :bar-height="27" :bar-width="52"></u-tabs>
  31. </view> -->
  32. <!-- 顶部横幅 Banner -->
  33. <view class="top-banner-wrapper">
  34. <image src="/pages-sell/static/top-banner.png" class="top-banner-img" mode="widthFix"></image>
  35. </view>
  36. <!-- 金刚区分类图标 (2行5列) -->
  37. <view class="category-grid">
  38. <view class="grid-item" v-for="(item, index) in categoryList" :key="index"
  39. @click="handleCategory(item)">
  40. <view class="icon-circle">
  41. <image :src="item.imgUrl" class="cat-icon" mode="aspectFit"></image>
  42. </view>
  43. <text class="cat-name">{{ item.showCateName || '-' }}</text>
  44. </view>
  45. </view>
  46. <!-- 推广与热销双卡片 -->
  47. <view class="promo-dual-card">
  48. <!-- 左侧:推广卖书 -->
  49. <view class="card-left">
  50. <view class="card-content">
  51. <u-swiper :list="swiperList" :autoplay="true" :interval="3000" name="imgUrl"></u-swiper>
  52. </view>
  53. </view>
  54. <!-- 右侧:热销商品 -->
  55. <view class="card-right">
  56. <view class="right-header" @click="navigateTo('/pages-sell/pages/hot-sell')">
  57. <image src="/pages-sell/static/icon-fire.png" class="fire-icon" mode="widthFix"></image>
  58. <text class="right-title">热销商品</text>
  59. <image src="/pages-sell/static/icon-fire.png" class="fire-icon flip" mode="widthFix"></image>
  60. </view>
  61. <view class="products-container">
  62. <!-- 使用网络图片作为书的封面占位 -->
  63. <image v-for="(item, index) in bookList" :key="index" :src="item.imgUrl" class="product-cover"
  64. mode="aspectFill" @click="navigateTo(item.jumpUrl)"></image>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- 健康与成长双卡片 -->
  69. <view class="info-dual-card">
  70. <swiper class="info-card-swiper" :autoplay="true" :interval="3000" :circular="true">
  71. <swiper-item v-for="(item, index) in leftBookList" :key="index">
  72. <view class="info-card bg-orange" @click="navigateTo(item.jumpUrl)">
  73. <view class="info-text-group">
  74. <text class="info-title text-orange">{{ item.showCateName }}</text>
  75. <text class="info-desc text-orange-light">{{ item.remark }}</text>
  76. </view>
  77. <image :src="item.imgUrl" class="info-icon" mode="aspectFit"
  78. style="width: 125rpx;height: 111rpx;"></image>
  79. </view>
  80. </swiper-item>
  81. </swiper>
  82. <swiper class="info-card-swiper" :autoplay="true" :interval="3500" :circular="true">
  83. <swiper-item v-for="(item, index) in rightBookList" :key="index">
  84. <view class="info-card bg-green" @click="navigateTo(item.jumpUrl)">
  85. <view class="info-text-group">
  86. <text class="info-title text-green">{{ item.showCateName }}</text>
  87. <text class="info-desc text-green-light">{{ item.remark }}</text>
  88. </view>
  89. <image :src="item.imgUrl" class="info-icon" mode="aspectFit"></image>
  90. </view>
  91. </swiper-item>
  92. </swiper>
  93. </view>
  94. <!-- 公众号横幅 -->
  95. <view class="gzh-section" @click="navigateToOfficialAccount">
  96. <view class="gzh-bg-wrapper">
  97. <image src="/pages-sell/static/gzh-banner.png" class="gzh-img-bg" mode="aspectFill"></image>
  98. <view class="gzh-content-overlay">
  99. <text class="gzh-title">关注公众号 ,定期领红包</text>
  100. <view class="gzh-subtitle-pill">
  101. <text class="gzh-subtitle">别让好书蒙尘 ,书嗨陪你逐页品读</text>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <!-- 书嗨推荐 -->
  107. <view class="recommend-section" @click="navigateTo(item.jumpUrl)" v-for="(item, index) in topicList"
  108. :key="index">
  109. <view class="section-header">
  110. <text class="section-title">{{ item.showCateName }}</text>
  111. <view class="view-more">
  112. <text>查看全部</text>
  113. <image src="/pages-sell/static/right-arrow.png" class="arrow-icon" mode="widthFix"></image>
  114. </view>
  115. </view>
  116. <view class="book-list">
  117. <view class="book-item" v-for="(book, index) in getDisplayBooks(item)" :key="index"
  118. @click.stop="navigateTo('/pages-sell/pages/detail?isbn=' + book.bookIsbn)">
  119. <image :src="book.bookImg" class="book-image" mode="aspectFill"></image>
  120. <text class="book-name">{{ book.bookName }}</text>
  121. <view class="price-row">
  122. <text class="currency">¥</text>
  123. <text class="price-val">{{ book.bookPrice }}</text>
  124. <text class="price-old">¥{{ book.bookOriginalPrice }}</text>
  125. </view>
  126. <view class="add-btn">
  127. <text>加入购物车</text>
  128. <image src="/pages-sell/static/shape-10.png" class="cart-symbol"></image>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. <!-- 底部留白,防止遮挡 -->
  134. <view class="bottom-safe-area"></view>
  135. </view>
  136. <!-- 分享红包悬浮按钮 -->
  137. <FloatingDrag :width="126" :height="140" :initial-position="redPacketPosition"
  138. @position-change="handleRedPacketPositionChange" v-if="shareList.length > 0">
  139. <button class="red-packet-btn" @click="navigateToRedPacket">
  140. <image src="/packet/static/index/btn_share.png" mode="widthFix" style="width: 126rpx; height: 140rpx">
  141. </image>
  142. </button>
  143. </FloatingDrag>
  144. </view>
  145. </template>
  146. <script>
  147. import FloatingDrag from "@/components/floating-drag.vue";
  148. export default {
  149. name: 'SellContainer',
  150. components: {
  151. FloatingDrag
  152. },
  153. data() {
  154. return {
  155. // 红包悬浮按钮位置
  156. redPacketPosition: {
  157. left: 'auto',
  158. right: 0,
  159. bottom: '15%',
  160. },
  161. barStyle: {
  162. backgroundColor: 'transparent',
  163. background: "url('/pages-sell/static/tab-selected.png') no-repeat center",
  164. backgroundSize: '100% 100%',
  165. position: 'relative',
  166. top: '-6rpx',
  167. },
  168. swiperList: [],
  169. statusBarHeight: 20,
  170. keyword: '',
  171. // u-tabs 需要对象数组 [{name: 'xxx'}]
  172. hotTagList: [
  173. { name: '热搜' },
  174. { name: '励志' },
  175. { name: '绘本' },
  176. { name: '诺贝尔文学奖' },
  177. { name: '茅盾奖' },
  178. { name: '童书' }
  179. ],
  180. currentHotTag: 0,
  181. // 临时的网络书封面图片
  182. bookCoverUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
  183. categoryList: [], //金刚区
  184. bookList: [], // 右侧推荐书籍
  185. recommendBooks: [
  186. { title: '山河岁月', price: '6.80', original: '36.80', cover: 'https://img.yzcdn.cn/vant/cat.jpeg' },
  187. { title: '山河岁月', price: '6.80', original: '36.80', cover: 'https://img.yzcdn.cn/vant/cat.jpeg' },
  188. { title: '山河岁月', price: '6.80', original: '36.80', cover: 'https://img.yzcdn.cn/vant/cat.jpeg' }
  189. ],
  190. topicList: [], //专题推荐
  191. leftBookList: [], // 左侧推荐书籍
  192. rightBookList: [], // 右侧推荐书籍
  193. shareList: [], // 分享列表
  194. }
  195. },
  196. created() {
  197. const systemInfo = uni.getSystemInfoSync();
  198. this.statusBarHeight = systemInfo.statusBarHeight || 20;
  199. this.hasShareList()
  200. this.getIndexCateInfo()
  201. },
  202. methods: {
  203. //是否有分享列表数据
  204. async hasShareList() {
  205. const res = await this.$u.api.getShareRedBagListAjax();
  206. if (res.code === 200 || res.code === 0) {
  207. this.shareList = res.data || [];
  208. }
  209. },
  210. handleCategory(item) {
  211. if (!item.jumpUrl) return
  212. this.navigateTo(item.jumpUrl)
  213. },
  214. changeHotTag(index) {
  215. this.currentHotTag = index;
  216. console.log('切换标签:', index);
  217. },
  218. //跳转 URL
  219. navigateTo(url) {
  220. if (!url) return
  221. console.log(url)
  222. uni.navigateTo({
  223. url: url
  224. });
  225. },
  226. navigateToOfficialAccount() {
  227. // 打开公众号
  228. uni.getProvider({
  229. service: "oauth",
  230. success: function (res) {
  231. if (res.provider.includes("weixin")) {
  232. // 调用微信小程序的 wx.openOfficialAccountProfile
  233. wx.openOfficialAccountProfile({
  234. username: "bookersea",
  235. success: function (res) {
  236. console.log("打开公众号资料页成功", res);
  237. },
  238. fail: function (err) {
  239. console.log("打开公众号资料页失败", err);
  240. },
  241. complete: function () {
  242. console.log("接口调用结束");
  243. },
  244. });
  245. }
  246. },
  247. });
  248. },
  249. goRecommend() {
  250. uni.navigateTo({
  251. url: '/pages-sell/pages/recommend'
  252. });
  253. },
  254. goHotSell() {
  255. uni.navigateTo({
  256. url: '/pages-sell/pages/hot-sell'
  257. });
  258. },
  259. //获取首页装修信息
  260. getIndexCateInfo() {
  261. uni.$u.http.get('/token/shop/showIndex/getIndexCateInfo').then(res => {
  262. console.log(res)
  263. if (res.code == 200) {
  264. console.log(res.data)
  265. this.categoryList = res.data.find(item => item.position == 'diamond_area')?.shopIndexCateVo || []
  266. this.swiperList = res.data.find(item => item.position == 'left_banner')?.shopIndexCateVo || []
  267. this.bookList = res.data.find(item => item.position == 'right_banner')?.shopIndexCateVo || []
  268. this.leftBookList = res.data.find(item => item.position == 'left_book_list')?.shopIndexCateVo || []
  269. this.rightBookList = res.data.find(item => item.position == 'right_book_list')?.shopIndexCateVo || []
  270. //获取专题推荐
  271. this.topicList = res.data.find(item => item.position == 'topic')?.shopIndexCateVo || []
  272. }
  273. })
  274. },
  275. getDisplayBooks(item) {
  276. if (!item.bookInfoList) return []
  277. let limit = 3
  278. if (item.topicType === 2) {
  279. limit = 6
  280. }
  281. return item.bookInfoList.slice(0, limit)
  282. },
  283. // 跳转到红包分享页面
  284. navigateToRedPacket() {
  285. uni.navigateTo({
  286. url: '/packet/pages/share'
  287. });
  288. },
  289. // 红包按钮位置变化
  290. handleRedPacketPositionChange(position) {
  291. this.redPacketPosition = position;
  292. }
  293. }
  294. }
  295. </script>
  296. <style lang="scss" scoped>
  297. .sell-container {
  298. position: relative;
  299. min-height: 100vh;
  300. background-color: #F6F6F6;
  301. overflow-x: hidden;
  302. }
  303. /* 顶部大背景图 */
  304. .top-bg-image {
  305. position: absolute;
  306. top: 0;
  307. left: 0;
  308. width: 100%;
  309. z-index: 0;
  310. display: block;
  311. }
  312. /* 导航栏 */
  313. .custom-navbar {
  314. position: fixed;
  315. top: 0;
  316. left: 0;
  317. width: 100%;
  318. z-index: 100;
  319. display: flex;
  320. align-items: center;
  321. justify-content: center;
  322. .navbar-content {
  323. height: 44px;
  324. width: 100%;
  325. display: flex;
  326. align-items: center;
  327. justify-content: center;
  328. position: relative;
  329. .navbar-title {
  330. color: #fff;
  331. font-size: 36rpx;
  332. font-weight: 600;
  333. }
  334. }
  335. }
  336. .main-content {
  337. position: relative;
  338. z-index: 1;
  339. padding: 0 24rpx;
  340. }
  341. /* 搜索框 */
  342. .search-wrapper {
  343. margin-top: 10rpx;
  344. margin-bottom: 20rpx;
  345. .search-box-uview {
  346. height: 80rpx;
  347. background-color: #fff;
  348. border-radius: 40rpx;
  349. display: flex;
  350. align-items: center;
  351. padding: 0 10rpx 0 16rpx;
  352. position: relative;
  353. /* 覆盖 u-search 的 padding 以适配 */
  354. ::v-deep .u-search {
  355. flex: 1;
  356. /* 让输入框不遮挡右侧按钮 */
  357. padding-right: 140rpx !important;
  358. }
  359. .search-btn-overlay {
  360. position: absolute;
  361. right: 8rpx;
  362. top: 50%;
  363. transform: translateY(-50%);
  364. width: 140rpx;
  365. height: 64rpx;
  366. background: linear-gradient(0deg, #37C148 0%, #6ADD83 100%);
  367. border-radius: 32rpx;
  368. display: flex;
  369. align-items: center;
  370. justify-content: center;
  371. z-index: 2;
  372. text {
  373. color: #fff;
  374. font-size: 28rpx;
  375. font-weight: 500;
  376. }
  377. }
  378. }
  379. }
  380. /* 顶部横幅 */
  381. .top-banner-wrapper {
  382. width: 100%;
  383. margin-bottom: 30rpx;
  384. position: relative;
  385. .top-banner-img {
  386. width: 100%;
  387. border-radius: 40rpx;
  388. display: block;
  389. }
  390. }
  391. /* 分类图标 */
  392. .category-grid {
  393. display: flex;
  394. flex-wrap: wrap;
  395. margin-bottom: 10rpx;
  396. .grid-item {
  397. width: 20%;
  398. display: flex;
  399. flex-direction: column;
  400. align-items: center;
  401. margin-bottom: 30rpx;
  402. .icon-circle {
  403. width: 96rpx;
  404. height: 96rpx;
  405. display: flex;
  406. align-items: center;
  407. justify-content: center;
  408. margin-bottom: 12rpx;
  409. .cat-icon {
  410. width: 100%;
  411. height: 100%;
  412. }
  413. }
  414. .cat-name {
  415. font-size: 24rpx;
  416. color: #333;
  417. font-weight: 500;
  418. }
  419. }
  420. }
  421. /* 推广双卡片 */
  422. .promo-dual-card {
  423. display: flex;
  424. justify-content: space-between;
  425. margin-bottom: 24rpx;
  426. .card-left {
  427. width: 48%;
  428. height: 252rpx;
  429. border-radius: 20rpx;
  430. position: relative;
  431. overflow: hidden;
  432. }
  433. .card-right {
  434. width: 48%;
  435. height: 252rpx;
  436. /* Updated background per request */
  437. background: linear-gradient(to bottom, #FFD7C3 0%, #FFFFFF 32%);
  438. border-radius: 20rpx;
  439. padding: 20rpx;
  440. box-sizing: border-box;
  441. .right-header {
  442. display: flex;
  443. align-items: center;
  444. justify-content: center;
  445. margin-bottom: 20rpx;
  446. .right-title {
  447. font-size: 30rpx;
  448. font-weight: bold;
  449. color: #333;
  450. margin: 0 10rpx;
  451. }
  452. .fire-icon {
  453. width: 30rpx;
  454. height: 30rpx;
  455. }
  456. .flip {
  457. transform: scaleX(-1);
  458. }
  459. }
  460. .products-container {
  461. display: flex;
  462. justify-content: space-between;
  463. gap: 20rpx;
  464. .product-cover {
  465. flex: 1;
  466. height: 160rpx;
  467. border-radius: 12rpx;
  468. background-color: #f0f0f0;
  469. }
  470. }
  471. }
  472. }
  473. /* 信息双卡片 */
  474. .info-dual-card {
  475. display: flex;
  476. justify-content: space-between;
  477. margin-bottom: 24rpx;
  478. .info-card-swiper {
  479. width: 48%;
  480. height: 140rpx;
  481. border-radius: 12px;
  482. overflow: hidden;
  483. }
  484. .info-card {
  485. width: 100%;
  486. padding: 24rpx;
  487. border-radius: 12px;
  488. /* Updated radius */
  489. display: flex;
  490. justify-content: space-between;
  491. align-items: center;
  492. height: 140rpx;
  493. box-sizing: border-box;
  494. position: relative;
  495. /* For absolute icon */
  496. overflow: hidden;
  497. &.bg-orange {
  498. background: #FFF3E0;
  499. border: 1px solid #FFB72A;
  500. }
  501. &.bg-green {
  502. background: #D4F1D8;
  503. border: 1px solid #54A94E;
  504. }
  505. .info-text-group {
  506. flex: 1;
  507. z-index: 1;
  508. /* Ensure text is above */
  509. .info-title {
  510. font-size: 28rpx;
  511. font-weight: bold;
  512. display: block;
  513. margin-bottom: 6rpx;
  514. }
  515. .info-desc {
  516. font-size: 22rpx;
  517. line-height: 1.2;
  518. }
  519. .text-orange {
  520. color: #DB832D;
  521. }
  522. .text-orange-light {
  523. color: #DB832D;
  524. }
  525. .text-green {
  526. color: #1F8049;
  527. }
  528. .text-green-light {
  529. color: #1F8049;
  530. }
  531. }
  532. .info-icon {
  533. width: 100rpx;
  534. /* Slightly larger maybe */
  535. height: 100rpx;
  536. position: absolute;
  537. right: 0;
  538. bottom: 0;
  539. z-index: 0;
  540. opacity: 0.8;
  541. }
  542. }
  543. }
  544. /* 公众号 */
  545. .gzh-section {
  546. margin-bottom: 30rpx;
  547. height: 180rpx;
  548. /* Fixed height for consistency */
  549. border-radius: 20rpx;
  550. overflow: hidden;
  551. .gzh-bg-wrapper {
  552. width: 100%;
  553. height: 100%;
  554. position: relative;
  555. .gzh-img-bg {
  556. width: 100%;
  557. height: 100%;
  558. position: absolute;
  559. top: 0;
  560. left: 0;
  561. }
  562. .gzh-content-overlay {
  563. position: absolute;
  564. top: 0;
  565. left: 0;
  566. width: 60%;
  567. /* Only cover left side */
  568. height: 100%;
  569. padding: 30rpx;
  570. display: flex;
  571. flex-direction: column;
  572. justify-content: center;
  573. .gzh-title {
  574. font-size: 32rpx;
  575. font-weight: bold;
  576. color: #134E13;
  577. /* Dark green */
  578. margin-bottom: 16rpx;
  579. }
  580. .gzh-subtitle-pill {
  581. background: #FFF;
  582. border-radius: 24rpx;
  583. padding: 0 14rpx;
  584. line-height: 1.4;
  585. align-self: flex-start;
  586. .gzh-subtitle {
  587. font-size: 22rpx;
  588. color: #134E13;
  589. font-weight: 500;
  590. }
  591. }
  592. }
  593. }
  594. }
  595. /* 书嗨推荐 */
  596. .recommend-section {
  597. background-color: #fff;
  598. border-radius: 20rpx;
  599. padding: 30rpx;
  600. margin-bottom: 24rpx;
  601. .section-header {
  602. display: flex;
  603. justify-content: space-between;
  604. align-items: center;
  605. margin-bottom: 24rpx;
  606. .section-title {
  607. font-size: 32rpx;
  608. font-weight: bold;
  609. color: #333;
  610. }
  611. .view-more {
  612. display: flex;
  613. align-items: center;
  614. font-size: 24rpx;
  615. color: #8D8D8D;
  616. .arrow-icon {
  617. width: 12rpx;
  618. margin-left: 6rpx;
  619. }
  620. }
  621. }
  622. .book-list {
  623. display: flex;
  624. flex-wrap: wrap;
  625. justify-content: space-between;
  626. }
  627. .book-item {
  628. width: 200rpx;
  629. margin-bottom: 24rpx;
  630. display: flex;
  631. flex-direction: column;
  632. .book-image {
  633. width: 200rpx;
  634. height: 255rpx;
  635. border-radius: 2rpx;
  636. margin-bottom: 16rpx;
  637. background-color: #f9f9f9;
  638. }
  639. .book-name {
  640. font-family: 'Source Han Sans SC';
  641. font-weight: bold;
  642. font-size: 28rpx;
  643. color: #303030;
  644. margin-bottom: 10rpx;
  645. overflow: hidden;
  646. text-overflow: ellipsis;
  647. white-space: nowrap;
  648. }
  649. .price-row {
  650. display: flex;
  651. align-items: baseline;
  652. margin-bottom: 12rpx;
  653. .currency {
  654. font-family: 'Source Han Sans SC';
  655. font-weight: 500;
  656. font-size: 22rpx;
  657. color: #D81A00;
  658. }
  659. .price-val {
  660. font-family: 'Source Han Sans SC';
  661. font-weight: 500;
  662. font-size: 28rpx;
  663. color: #D81A00;
  664. margin-right: 12rpx;
  665. }
  666. .price-old {
  667. font-family: 'Source Han Sans SC';
  668. font-weight: 500;
  669. font-size: 22rpx;
  670. color: #999999;
  671. text-decoration: line-through;
  672. }
  673. }
  674. .add-btn {
  675. width: fit-content;
  676. height: 36rpx;
  677. line-height: 36rpx;
  678. background: linear-gradient(0deg, #4ED964 0%, #4ED964 100%);
  679. border-radius: 18rpx;
  680. padding: 0 20rpx;
  681. display: flex;
  682. align-items: center;
  683. justify-content: center;
  684. text {
  685. font-size: 22rpx;
  686. color: #fff;
  687. }
  688. .cart-symbol {
  689. width: 24rpx;
  690. height: 24rpx;
  691. margin-left: 6rpx;
  692. }
  693. }
  694. }
  695. }
  696. .bottom-safe-area {
  697. height: 30rpx
  698. }
  699. .red-packet-btn {
  700. width: 126rpx;
  701. height: 140rpx;
  702. background: transparent;
  703. border: none;
  704. padding: 0;
  705. margin: 0;
  706. display: flex;
  707. align-items: center;
  708. justify-content: center;
  709. &::after {
  710. border: none;
  711. }
  712. }
  713. </style>