s-goods-column.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. <!-- 页面 -->
  2. <template>
  3. <view class="ss-goods-wrap">
  4. <!-- xs卡片:横向紧凑型,一行放两个,图片左内容右边 -->
  5. <view
  6. v-if="size === 'xs'"
  7. class="xs-goods-card ss-flex ss-col-stretch"
  8. :style="[elStyles]"
  9. @tap="onClick"
  10. >
  11. <view v-if="tagStyle.show" class="tag-icon-box">
  12. <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src)"></image>
  13. </view>
  14. <image class="xs-img-box" :src="sheep.$url.cdn(data.image)" mode="aspectFit"></image>
  15. <view
  16. v-if="goodsFields.title?.show || goodsFields.price?.show"
  17. class="xs-goods-content ss-flex-col ss-row-around"
  18. >
  19. <view
  20. v-if="goodsFields.title?.show"
  21. class="xs-goods-title ss-line-1"
  22. :style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]"
  23. >
  24. {{ data.title }}
  25. </view>
  26. <view
  27. v-if="goodsFields.price?.show"
  28. class="xs-goods-price font-OPPOSANS"
  29. :style="[{ color: goodsFields.price.color }]"
  30. >
  31. <text class="price-unit ss-font-24">{{ priceUnit }}</text>
  32. {{ isArray(data.price) ? data.price[0] : data.price }}
  33. </view>
  34. </view>
  35. </view>
  36. <!-- sm卡片:竖向紧凑,一行放三个,图上内容下 -->
  37. <view v-if="size === 'sm'" class="sm-goods-card ss-flex-col" :style="[elStyles]" @tap="onClick">
  38. <view v-if="tagStyle.show" class="tag-icon-box">
  39. <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src)"></image>
  40. </view>
  41. <image class="sm-img-box" :src="sheep.$url.cdn(data.image)" mode="aspectFill"></image>
  42. <view
  43. v-if="goodsFields.title?.show || goodsFields.price?.show"
  44. class="sm-goods-content"
  45. :style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]"
  46. >
  47. <view v-if="goodsFields.title?.show" class="sm-goods-title ss-line-1 ss-m-b-16">
  48. {{ data.title }}
  49. </view>
  50. <view
  51. v-if="goodsFields.price?.show"
  52. class="sm-goods-price font-OPPOSANS"
  53. :style="[{ color: goodsFields.price.color }]"
  54. >
  55. <text class="price-unit ss-font-24">{{ priceUnit }}</text>
  56. {{ isArray(data.price) ? data.price[0] : data.price }}
  57. </view>
  58. </view>
  59. </view>
  60. <!-- md卡片:竖向,一行放两个,图上内容下 -->
  61. <view v-if="size === 'md'" class="md-goods-card ss-flex-col" :style="[elStyles]" @tap="onClick">
  62. <view v-if="tagStyle.show" class="tag-icon-box">
  63. <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src)"></image>
  64. </view>
  65. <image
  66. class="md-img-box"
  67. :src="sheep.$url.cdn(data.image)"
  68. mode="widthFix"
  69. @load="calculatePanelHeight"
  70. ></image>
  71. <view
  72. class="md-goods-content ss-flex-col ss-row-around ss-p-b-20 ss-p-t-20 ss-p-x-16"
  73. :id="elId"
  74. >
  75. <view
  76. v-if="goodsFields.title?.show"
  77. class="md-goods-title ss-line-1"
  78. :style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]"
  79. >
  80. {{ data.title }}
  81. </view>
  82. <view
  83. v-if="goodsFields.subtitle?.show"
  84. class="md-goods-subtitle ss-m-t-16 ss-line-1"
  85. :style="[{ color: subTitleColor, background: subTitleBackground }]"
  86. >
  87. {{ data.subtitle }}
  88. </view>
  89. <slot name="activity">
  90. <view v-if="data.promos?.length" class="tag-box ss-flex-wrap ss-flex ss-col-center">
  91. <view
  92. class="activity-tag ss-m-r-10 ss-m-t-16"
  93. v-for="item in data.promos"
  94. :key="item.id"
  95. >
  96. {{ item.title }}
  97. </view>
  98. </view>
  99. </slot>
  100. <view class="ss-flex ss-col-bottom">
  101. <view
  102. v-if="goodsFields.price?.show"
  103. class="md-goods-price ss-m-t-16 font-OPPOSANS ss-m-r-10"
  104. :style="[{ color: goodsFields.price.color }]"
  105. >
  106. <text class="price-unit ss-font-24">{{ priceUnit }}</text>
  107. {{ isArray(data.price) ? data.price[0] : data.price }}
  108. </view>
  109. <view
  110. v-if="goodsFields.original_price?.show && data.original_price > 0"
  111. class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex"
  112. :style="[{ color: originPriceColor }]"
  113. >
  114. <text class="price-unit ss-font-20">{{ priceUnit }}</text>
  115. <view class="ss-m-l-8">{{ data.original_price }}</view>
  116. </view>
  117. </view>
  118. <view class="ss-m-t-16 ss-flex ss-col-center ss-flex-wrap">
  119. <view class="sales-text">{{ salesAndStock }}</view>
  120. </view>
  121. </view>
  122. <slot name="cart">
  123. <view class="cart-box ss-flex ss-col-center ss-row-center">
  124. <image class="cart-icon" src="/static/img/shop/tabbar/category2.png" mode=""></image>
  125. </view>
  126. </slot>
  127. </view>
  128. <!-- lg卡片:横向型,一行放一个,图片左内容右边 -->
  129. <view
  130. v-if="size === 'lg'"
  131. class="lg-goods-card ss-flex ss-col-stretch"
  132. :style="[elStyles]"
  133. @tap="onClick"
  134. >
  135. <view v-if="tagStyle.show" class="tag-icon-box">
  136. <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src)"></image>
  137. </view>
  138. <view v-if="seckillTag" class="seckill-tag ss-flex ss-row-center"> 秒杀 </view>
  139. <view v-if="grouponTag" class="groupon-tag ss-flex ss-row-center">
  140. <view class="tag-icon">拼团</view>
  141. </view>
  142. <image class="lg-img-box" :src="sheep.$url.cdn(data.image)" mode="aspectFill"></image>
  143. <view class="lg-goods-content ss-flex-1 ss-flex-col ss-row-between ss-p-b-10 ss-p-t-20">
  144. <view>
  145. <view
  146. v-if="goodsFields.title?.show"
  147. class="lg-goods-title ss-line-2"
  148. :style="[{ color: titleColor }]"
  149. >
  150. {{ data.title }}
  151. </view>
  152. <view
  153. v-if="goodsFields.subtitle?.show"
  154. class="lg-goods-subtitle ss-m-t-10 ss-line-1"
  155. :style="[{ color: subTitleColor, background: subTitleBackground }]"
  156. >
  157. {{ data.subtitle }}
  158. </view>
  159. </view>
  160. <view>
  161. <slot name="activity">
  162. <view v-if="data.promos?.length" class="tag-box ss-flex ss-col-center">
  163. <view class="activity-tag ss-m-r-10" v-for="item in data.promos" :key="item.id">
  164. {{ item.title }}
  165. </view>
  166. </view>
  167. </slot>
  168. <view class="ss-flex ss-col-bottom ss-m-t-10">
  169. <view
  170. v-if="goodsFields.price?.show"
  171. class="lg-goods-price ss-m-r-12 ss-flex ss-col-bottom font-OPPOSANS"
  172. :style="[{ color: goodsFields.price.color }]"
  173. >
  174. <text class="ss-font-24">{{ priceUnit }}</text>
  175. {{ isArray(data.price) ? data.price[0] : data.price }}
  176. </view>
  177. <view
  178. v-if="goodsFields.original_price?.show && data.original_price > 0"
  179. class="goods-origin-price ss-flex ss-col-bottom font-OPPOSANS"
  180. :style="[{ color: originPriceColor }]"
  181. >
  182. <text class="price-unit ss-font-20">{{ priceUnit }}</text>
  183. <view class="ss-m-l-8">{{ data.original_price }}</view>
  184. </view>
  185. </view>
  186. <view class="ss-m-t-8 ss-flex ss-col-center ss-flex-wrap">
  187. <view class="sales-text">{{ salesAndStock }}</view>
  188. </view>
  189. </view>
  190. </view>
  191. <slot name="cart"
  192. ><view class="buy-box ss-flex ss-col-center ss-row-center" v-if="buttonShow"
  193. >去购买</view
  194. ></slot
  195. >
  196. </view>
  197. <!-- sl卡片:竖向型,一行放一个,图片上内容下边 -->
  198. <view v-if="size === 'sl'" class="sl-goods-card ss-flex-col" :style="[elStyles]" @tap="onClick">
  199. <view v-if="tagStyle.show" class="tag-icon-box">
  200. <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src)"></image>
  201. </view>
  202. <image class="sl-img-box" :src="sheep.$url.cdn(data.image)" mode="aspectFill"></image>
  203. <view class="sl-goods-content">
  204. <view>
  205. <view
  206. v-if="goodsFields.title?.show"
  207. class="sl-goods-title ss-line-1"
  208. :style="[{ color: titleColor }]"
  209. >
  210. {{ data.title }}
  211. </view>
  212. <view
  213. v-if="goodsFields.subtitle?.show"
  214. class="sl-goods-subtitle ss-m-t-16"
  215. :style="[{ color: subTitleColor, background: subTitleBackground }]"
  216. >
  217. {{ data.subtitle }}
  218. </view>
  219. </view>
  220. <view>
  221. <slot name="activity">
  222. <view v-if="data.promos?.length" class="tag-box ss-flex ss-col-center ss-flex-wrap">
  223. <view
  224. class="activity-tag ss-m-r-10 ss-m-t-16"
  225. v-for="item in data.promos"
  226. :key="item.id"
  227. >
  228. {{ item.title }}
  229. </view>
  230. </view>
  231. </slot>
  232. <view v-if="goodsFields.price?.show" class="ss-flex ss-col-bottom font-OPPOSANS">
  233. <view class="sl-goods-price ss-m-r-12" :style="[{ color: goodsFields.price.color }]">
  234. <text class="price-unit ss-font-24">{{ priceUnit }}</text>
  235. {{ isArray(data.price) ? data.price[0] : data.price }}
  236. </view>
  237. <view
  238. v-if="goodsFields.original_price?.show && data.original_price > 0"
  239. class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex"
  240. :style="[{ color: originPriceColor }]"
  241. >
  242. <text class="price-unit ss-font-20">{{ priceUnit }}</text>
  243. <view class="ss-m-l-8">{{ data.original_price }}</view>
  244. </view>
  245. </view>
  246. <view class="ss-m-t-16 ss-flex ss-flex-wrap">
  247. <view class="sales-text">{{ salesAndStock }}</view>
  248. </view>
  249. </view>
  250. </view>
  251. <slot name="cart"
  252. ><view class="buy-box ss-flex ss-col-center ss-row-center">去购买</view></slot
  253. >
  254. </view>
  255. </view>
  256. </template>
  257. <script setup>
  258. /**
  259. * 商品卡片
  260. *
  261. * @property {Array} size = [xs | sm | md | lg | sl ] - 列表数据
  262. * @property {String} tag - md及以上才有
  263. * @property {String} img - 图片
  264. * @property {String} background - 背景色
  265. * @property {String} topRadius - 上圆角
  266. * @property {String} bottomRadius - 下圆角
  267. * @property {String} title - 标题
  268. * @property {String} titleColor - 标题颜色
  269. * @property {Number} titleWidth = 0 - 标题宽度,默认0,单位rpx
  270. * @property {String} subTitle - 副标题
  271. * @property {String} subTitleColor - 副标题颜色
  272. * @property {String} subTitleBackground - 副标题背景
  273. * @property {String | Number} price - 价格
  274. * @property {String} priceColor - 价格颜色
  275. * @property {String | Number} originPrice - 原价/划线价
  276. * @property {String} originPriceColor - 原价颜色
  277. * @property {String | Number} sales - 销售数量
  278. * @property {String} salesColor - 销售数量颜色
  279. *
  280. * @slots activity - 活动插槽
  281. * @slots cart - 购物车插槽,默认包含文字,背景色,文字颜色 || 图片 || 行为
  282. *
  283. * @event {Function()} click - 点击卡片
  284. *
  285. */
  286. import { computed, reactive, getCurrentInstance } from 'vue';
  287. import sheep from '@/sheep';
  288. import { formatSales } from '@/sheep/hooks/useGoods';
  289. import { formatStock } from '@/sheep/hooks/useGoods';
  290. import goodsCollectVue from '@/pages/user/goods-collect.vue';
  291. import { isArray } from 'lodash';
  292. // 数据
  293. const state = reactive({});
  294. // 接收参数
  295. const props = defineProps({
  296. goodsFields: {
  297. type: [Array, Object],
  298. default() {
  299. return {
  300. title: { show: true },
  301. subtitle: { show: true },
  302. price: { show: true },
  303. original_price: { show: true },
  304. sales: { show: true },
  305. stock: { show: true },
  306. };
  307. },
  308. },
  309. tagStyle: {
  310. type: Object,
  311. default: {},
  312. },
  313. data: {
  314. type: Object,
  315. default: {},
  316. },
  317. size: {
  318. type: String,
  319. default: 'sl',
  320. },
  321. background: {
  322. type: String,
  323. default: '',
  324. },
  325. topRadius: {
  326. type: Number,
  327. default: 0,
  328. },
  329. bottomRadius: {
  330. type: Number,
  331. default: 0,
  332. },
  333. titleWidth: {
  334. type: Number,
  335. default: 0,
  336. },
  337. titleColor: {
  338. type: String,
  339. default: '#333',
  340. },
  341. priceColor: {
  342. type: String,
  343. default: '',
  344. },
  345. originPriceColor: {
  346. type: String,
  347. default: '#C4C4C4',
  348. },
  349. priceUnit: {
  350. type: String,
  351. default: '¥',
  352. },
  353. subTitleColor: {
  354. type: String,
  355. default: '#999999',
  356. },
  357. subTitleBackground: {
  358. type: String,
  359. default: '',
  360. },
  361. buttonShow: {
  362. type: Boolean,
  363. default: true,
  364. },
  365. seckillTag: {
  366. type: Boolean,
  367. default: false,
  368. },
  369. grouponTag: {
  370. type: Boolean,
  371. default: false,
  372. },
  373. });
  374. // 组件样式
  375. const elStyles = computed(() => {
  376. return {
  377. background: props.background,
  378. 'border-top-left-radius': props.topRadius + 'px',
  379. 'border-top-right-radius': props.topRadius + 'px',
  380. 'border-bottom-left-radius': props.bottomRadius + 'px',
  381. 'border-bottom-right-radius': props.bottomRadius + 'px',
  382. };
  383. });
  384. // 格式化销量、库存信息
  385. const salesAndStock = computed(() => {
  386. let text = [];
  387. if (props.goodsFields.sales?.show) {
  388. text.push(formatSales(props.data.sales_show_type, props.data.sales));
  389. }
  390. if (props.goodsFields.stock?.show) {
  391. text.push(formatStock(props.data.stock_show_type, props.data.stock));
  392. }
  393. return text.join(' | ');
  394. });
  395. // 返回事件
  396. const emits = defineEmits(['click', 'getHeight']);
  397. const onClick = () => {
  398. emits('click');
  399. };
  400. // 获取实时卡片高度
  401. const { proxy } = getCurrentInstance();
  402. const elId = `sheep_${Math.ceil(Math.random() * 10e5).toString(36)}`;
  403. function calculatePanelHeight(e) {
  404. if (props.size === 'md') {
  405. const view = uni.createSelectorQuery().in(proxy);
  406. view.select(`#${elId}`).fields({ size: true, scrollOffset: true });
  407. view.exec((data) => {
  408. const goodsPriceCard = data[0];
  409. const card = {
  410. width: goodsPriceCard.width,
  411. height: (goodsPriceCard.width / e.detail.width) * e.detail.height + goodsPriceCard.height,
  412. };
  413. emits('getHeight', card.height);
  414. });
  415. }
  416. }
  417. </script>
  418. <style lang="scss" scoped>
  419. .tag-icon-box {
  420. position: absolute;
  421. left: 0;
  422. top: 0;
  423. z-index: 2;
  424. .tag-icon {
  425. width: 72rpx;
  426. height: 44rpx;
  427. }
  428. }
  429. .seckill-tag {
  430. position: absolute;
  431. left: 0;
  432. top: 0;
  433. z-index: 2;
  434. width: 68rpx;
  435. height: 38rpx;
  436. background: linear-gradient(90deg, #ff5854 0%, #ff2621 100%);
  437. border-radius: 10rpx 0px 10rpx 0px;
  438. font-size: 24rpx;
  439. font-weight: 500;
  440. color: #ffffff;
  441. line-height: 32rpx;
  442. }
  443. .groupon-tag {
  444. position: absolute;
  445. left: 0;
  446. top: 0;
  447. z-index: 2;
  448. width: 68rpx;
  449. height: 38rpx;
  450. background: linear-gradient(90deg, #fe832a 0%, #ff6600 100%);
  451. border-radius: 10rpx 0px 10rpx 0px;
  452. font-size: 24rpx;
  453. font-weight: 500;
  454. color: #ffffff;
  455. line-height: 32rpx;
  456. }
  457. .goods-img {
  458. width: 100%;
  459. height: 100%;
  460. background-color: #f5f5f5;
  461. }
  462. .price-unit {
  463. margin-right: -4px;
  464. }
  465. .sales-text {
  466. display: table;
  467. font-size: 24rpx;
  468. transform: scale(0.8);
  469. margin-left: 0rpx;
  470. color: #c4c4c4;
  471. }
  472. .activity-tag {
  473. font-size: 20rpx;
  474. color: #ff0000;
  475. line-height: 30rpx;
  476. padding: 0 10rpx;
  477. border: 1px solid rgba(#ff0000, 0.25);
  478. border-radius: 4px;
  479. flex-shrink: 0;
  480. }
  481. .goods-origin-price {
  482. font-size: 20rpx;
  483. color: #c4c4c4;
  484. line-height: 36rpx;
  485. text-decoration: line-through;
  486. }
  487. // xs
  488. .xs-goods-card {
  489. overflow: hidden;
  490. // max-width: 375rpx;
  491. background-color: $white;
  492. position: relative;
  493. .xs-img-box {
  494. width: 128rpx;
  495. height: 128rpx;
  496. margin-right: 20rpx;
  497. }
  498. .xs-goods-title {
  499. font-size: 26rpx;
  500. color: #333;
  501. font-weight: 500;
  502. }
  503. .xs-goods-price {
  504. font-size: 30rpx;
  505. color: $red;
  506. }
  507. }
  508. // sm
  509. .sm-goods-card {
  510. overflow: hidden;
  511. // width: 223rpx;
  512. // width: 100%;
  513. background-color: $white;
  514. position: relative;
  515. .sm-img-box {
  516. // width: 228rpx;
  517. width: 100%;
  518. height: 208rpx;
  519. }
  520. .sm-goods-content {
  521. padding: 20rpx 16rpx;
  522. box-sizing: border-box;
  523. }
  524. .sm-goods-title {
  525. font-size: 26rpx;
  526. color: #333;
  527. }
  528. .sm-goods-price {
  529. font-size: 30rpx;
  530. color: $red;
  531. }
  532. }
  533. // md
  534. .md-goods-card {
  535. overflow: hidden;
  536. width: 100%;
  537. position: relative;
  538. z-index: 1;
  539. background-color: $white;
  540. position: relative;
  541. .md-img-box {
  542. width: 100%;
  543. }
  544. .md-goods-title {
  545. font-size: 26rpx;
  546. color: #333;
  547. width: 100%;
  548. }
  549. .md-goods-subtitle {
  550. font-size: 24rpx;
  551. font-weight: 400;
  552. color: #999999;
  553. }
  554. .md-goods-price {
  555. font-size: 30rpx;
  556. color: $red;
  557. line-height: 36rpx;
  558. }
  559. .cart-box {
  560. width: 54rpx;
  561. height: 54rpx;
  562. background: linear-gradient(90deg, #fe8900, #ff5e00);
  563. border-radius: 50%;
  564. position: absolute;
  565. bottom: 50rpx;
  566. right: 20rpx;
  567. z-index: 2;
  568. .cart-icon {
  569. width: 30rpx;
  570. height: 30rpx;
  571. }
  572. }
  573. }
  574. // lg
  575. .lg-goods-card {
  576. overflow: hidden;
  577. position: relative;
  578. z-index: 1;
  579. background-color: $white;
  580. height: 280rpx;
  581. .lg-img-box {
  582. width: 280rpx;
  583. height: 280rpx;
  584. margin-right: 20rpx;
  585. }
  586. .lg-goods-title {
  587. font-size: 28rpx;
  588. font-weight: 500;
  589. color: #333333;
  590. // line-height: 36rpx;
  591. // width: 410rpx;
  592. }
  593. .lg-goods-subtitle {
  594. font-size: 24rpx;
  595. font-weight: 400;
  596. color: #999999;
  597. // line-height: 30rpx;
  598. // width: 410rpx;
  599. }
  600. .lg-goods-price {
  601. font-size: 30rpx;
  602. color: $red;
  603. line-height: 36rpx;
  604. }
  605. .buy-box {
  606. position: absolute;
  607. bottom: 20rpx;
  608. right: 20rpx;
  609. z-index: 2;
  610. width: 120rpx;
  611. height: 50rpx;
  612. background: linear-gradient(90deg, #fe8900, #ff5e00);
  613. border-radius: 25rpx;
  614. font-size: 24rpx;
  615. color: #ffffff;
  616. }
  617. .tag-box {
  618. width: 100%;
  619. }
  620. }
  621. // sl
  622. .sl-goods-card {
  623. overflow: hidden;
  624. position: relative;
  625. z-index: 1;
  626. width: 100%;
  627. background-color: $white;
  628. .sl-goods-content {
  629. padding: 20rpx 20rpx;
  630. box-sizing: border-box;
  631. }
  632. .sl-img-box {
  633. width: 100%;
  634. height: 360rpx;
  635. }
  636. .sl-goods-title {
  637. font-size: 26rpx;
  638. color: #333;
  639. font-weight: 500;
  640. }
  641. .sl-goods-subtitle {
  642. font-size: 24rpx;
  643. font-weight: 400;
  644. color: #999999;
  645. line-height: 30rpx;
  646. }
  647. .sl-goods-price {
  648. font-size: 30rpx;
  649. color: $red;
  650. line-height: 36rpx;
  651. }
  652. .buy-box {
  653. position: absolute;
  654. bottom: 20rpx;
  655. right: 20rpx;
  656. z-index: 2;
  657. width: 148rpx;
  658. height: 50rpx;
  659. background: linear-gradient(90deg, #fe8900, #ff5e00);
  660. border-radius: 25rpx;
  661. font-size: 24rpx;
  662. color: #ffffff;
  663. }
  664. }
  665. </style>