newVip.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948
  1. <template>
  2. <view v-if="couponList.length || productList.length || newcomer_integral">
  3. <common-wrapper :config="configData">
  4. <view
  5. class="newVip2"
  6. :style="[newVip2Background, newVipBorderRadius]"
  7. v-if="dataConfig.styleConfig.tabVal"
  8. >
  9. <view class="header acea-row row-between row-middle">
  10. <view class="title-box acea-row row-middle">
  11. <image
  12. :src="`${imgHost}/statics/images/newVip1.png`"
  13. class="image"
  14. ></image>
  15. <view class="info">{{ $t(`超值优惠 限时专享`) }}</view>
  16. </view>
  17. <view class="more" @click="goNewList"
  18. >{{ $t(`去逛逛`) }}<text class="iconfont icon-ic_rightarrow"></text
  19. ></view>
  20. </view>
  21. <view class="wrapper">
  22. <view
  23. class="coupon"
  24. v-if="couponList.length && dataConfig.checkboxInfo.type.includes(1)"
  25. >
  26. <view class="title">{{ $t(`新人红包`) }}</view>
  27. <view class="content">
  28. <scroll-view scroll-x="true">
  29. <view class="list acea-row">
  30. <view v-for="item in couponList" :key="item.id" class="item">
  31. <view class="back" :style="[couponStyle]"></view>
  32. <view class="money" :style="[moneyStyle]">
  33. <view v-if="item.coupon_type == 1"
  34. >{{ $t(`¥`)
  35. }}<text class="number">{{
  36. item.coupon_price
  37. }}</text></view
  38. >
  39. <view v-else-if="item.coupon_type == 2"
  40. ><text class="number">{{
  41. parseFloat(item.coupon_price) / 10
  42. }}</text
  43. >{{ $t(`折`) }}</view
  44. >
  45. </view>
  46. <view
  47. v-if="item.use_min_price"
  48. class="info"
  49. :style="[couponInfoStyle]"
  50. >{{ $t(`满`) }}{{ item.use_min_price
  51. }}{{ $t(`可用`) }}</view
  52. >
  53. <view v-else class="info" :style="[couponInfoStyle]">{{
  54. $t(`无门槛券`)
  55. }}</view>
  56. </view>
  57. </view>
  58. </scroll-view>
  59. </view>
  60. </view>
  61. <view
  62. class="product"
  63. v-if="
  64. productList.length && dataConfig.checkboxInfo.type.includes(2)
  65. "
  66. >
  67. <view class="title">{{ $t(`新人商品专区`) }}</view>
  68. <view class="content">
  69. <scroll-view scroll-x="true">
  70. <view class="list acea-row">
  71. <view
  72. class="item"
  73. v-for="item in productList"
  74. :key="item.id"
  75. @click="goDetail(item)"
  76. >
  77. <easy-loadimage
  78. mode="widthFix"
  79. :image-src="item.image"
  80. width="144rpx"
  81. height="144rpx"
  82. borderRadius="12rpx"
  83. ></easy-loadimage>
  84. <view class="money"
  85. >{{ $t(`¥`)
  86. }}<text class="number">{{ item.price }}</text></view
  87. >
  88. <view class="name line1">{{ item.store_name }}</view>
  89. </view>
  90. </view>
  91. </scroll-view>
  92. </view>
  93. </view>
  94. </view>
  95. <view
  96. class="bonus acea-row row-middle"
  97. v-if="dataConfig.checkboxInfo.type.includes(0)"
  98. >
  99. <image
  100. :src="`${imgHost}/statics/images/newVip2.png`"
  101. class="image"
  102. ></image>
  103. <view class="text">
  104. <view class="info acea-row row-middle">
  105. {{ $t(`新用户注册领积分`) }}
  106. <view class="red" :style="[bonusRedStyle]">
  107. <view class="inner acea-row row-middle">
  108. <image
  109. :src="`${imgHost}/statics/images/newVip3.png`"
  110. class="image"
  111. ></image>
  112. +{{ newcomer_integral }}
  113. </view>
  114. </view>
  115. </view>
  116. <view class="">{{ $t(`新用户注册后即可获得积分`) }}</view>
  117. </view>
  118. <view class="button" :style="[buttonStyle]" @click="goNewList">{{
  119. $t(`去看看`)
  120. }}</view>
  121. </view>
  122. </view>
  123. <view class="newVip" :style="[newVipBorderRadius]" v-else>
  124. <view class="header acea-row row-between row-middle">
  125. <view class="title">{{ $t(`新人专享福利`) }}</view>
  126. <view class="more" @click="goNewList"
  127. >{{ $t(`更多优惠`)
  128. }}<text class="iconfont icon-ic_rightarrow"></text
  129. ></view>
  130. </view>
  131. <view
  132. class="bonus"
  133. :style="[bonusStyle]"
  134. v-if="dataConfig.checkboxInfo.type.includes(0)"
  135. >
  136. <view class="inner acea-row row-middle">
  137. <image
  138. :src="`${imgHost}/statics/images/newVip3.png`"
  139. class="image"
  140. ></image>
  141. {{ $t(`新用户注册即可`) }}
  142. <text class="red" :style="[bonusRedStyle]">{{
  143. $t(`赠送积分`)
  144. }}</text>
  145. </view>
  146. </view>
  147. <view
  148. class="coupon"
  149. v-if="dataConfig.checkboxInfo.type.includes(1) && couponList.length"
  150. >
  151. <view class="title">{{ $t(`专属优惠券`) }}</view>
  152. <view class="content acea-row" :style="[couponContentStyle]">
  153. <scroll-view scroll-x="true">
  154. <view class="list acea-row">
  155. <view
  156. v-for="item in couponList"
  157. :key="item.id"
  158. class="item"
  159. :style="[couponStyle]"
  160. >
  161. <view class="item-top acea-row row-center row-middle">
  162. <view class="money" :style="[moneyStyle]">
  163. <view v-if="item.coupon_type == 1"
  164. >{{ $t(`¥`)
  165. }}<text class="number">{{
  166. item.coupon_price
  167. }}</text></view
  168. >
  169. <view v-else-if="item.coupon_type == 2"
  170. ><text class="number">{{
  171. parseFloat(item.coupon_price) / 10
  172. }}</text
  173. >折</view
  174. >
  175. </view>
  176. </view>
  177. <view
  178. class="item-bottom acea-row row-column row-center row-middle"
  179. >
  180. <view class="name" :style="[couponTypeStyle]">
  181. <text v-if="item.coupon_type == 1">{{
  182. $t(`品类券`)
  183. }}</text>
  184. <text v-else-if="item.coupon_type == 2">{{
  185. $t(`商品券`)
  186. }}</text>
  187. <text v-else-if="item.coupon_type == 3">{{
  188. $t(`品牌券`)
  189. }}</text>
  190. <text v-else>{{ $t(`通用券`) }}</text>
  191. </view>
  192. <view v-if="item.use_min_price" class="info"
  193. >{{ $t(`满`) }}{{ item.use_min_price
  194. }}{{ $t(`可用`) }}</view
  195. >
  196. <view v-else class="info">{{ $t(`无门槛券`) }}</view>
  197. </view>
  198. </view>
  199. </view>
  200. </scroll-view>
  201. <view class="station" :style="[stationStyle]">
  202. <view class="money"
  203. >{{ $t(`¥`) }}<text class="number">{{ totalPrice }}</text></view
  204. >
  205. <view class="info">{{ $t(`新人专享优惠券`) }}</view>
  206. <view class="button" :style="[buttonStyle]" @click="goUser">{{
  207. $t(`一键领取`)
  208. }}</view>
  209. </view>
  210. </view>
  211. </view>
  212. <view
  213. class="product"
  214. v-if="productList.length && dataConfig.checkboxInfo.type.includes(2)"
  215. >
  216. <view class="title">{{ $t(`新人商品专区`) }}</view>
  217. <view class="content">
  218. <scroll-view scroll-x="true">
  219. <view class="list acea-row">
  220. <view
  221. class="item"
  222. v-for="item in productList"
  223. :key="item.id"
  224. @click="goDetail(item)"
  225. >
  226. <easy-loadimage
  227. mode="widthFix"
  228. :image-src="item.image"
  229. width="158rpx"
  230. height="158rpx"
  231. borderRadius="12rpx"
  232. ></easy-loadimage>
  233. <view class="name line1">{{ item.store_name }}</view>
  234. <view class="money" :style="[productMoneyStyle]"
  235. >{{ $t(`¥`)
  236. }}<text class="number">{{ item.price }}</text></view
  237. >
  238. </view>
  239. </view>
  240. </scroll-view>
  241. </view>
  242. </view>
  243. </view>
  244. </common-wrapper>
  245. </view>
  246. </template>
  247. <script>
  248. import commonWrapper from "./commonWrapper.vue";
  249. import { newcomerList } from "@/api/api.js";
  250. import { mapGetters } from "vuex";
  251. import { HTTP_REQUEST_URL } from "@/config/app";
  252. export default {
  253. components: { commonWrapper },
  254. computed: mapGetters(["isLogin"]),
  255. props: {
  256. dataConfig: {
  257. type: Object,
  258. default: () => {},
  259. },
  260. isSortType: {
  261. type: String | Number,
  262. default: 0,
  263. },
  264. },
  265. data() {
  266. return {
  267. imgHost: HTTP_REQUEST_URL,
  268. couponList: [],
  269. productList: [],
  270. newcomer_integral: "",
  271. };
  272. },
  273. created() {
  274. this.getList();
  275. },
  276. computed: {
  277. totalPrice() {
  278. return this.couponList.reduce((total, item) => {
  279. return this.$util.$h.Add(total, item.coupon_price);
  280. }, 0);
  281. },
  282. bonusStyle() {
  283. let styleObject = {};
  284. if (this.dataConfig.toneConfig.tabVal) {
  285. styleObject["border-color"] =
  286. this.dataConfig.integralBgColor.color[0].item;
  287. styleObject["background"] =
  288. this.dataConfig.integralBgColor.color[0].item;
  289. }
  290. return styleObject;
  291. },
  292. bonusRedStyle() {
  293. let styleObject = {};
  294. if (this.dataConfig.toneConfig.tabVal) {
  295. if (this.dataConfig.styleConfig.tabVal) {
  296. styleObject["background"] =
  297. this.dataConfig.integralTxtColor.color[0].item;
  298. styleObject["color"] = this.dataConfig.integralTxtColor.color[0].item;
  299. } else {
  300. styleObject["color"] = this.dataConfig.tipsColor.color[0].item;
  301. }
  302. }
  303. return styleObject;
  304. },
  305. moneyStyle() {
  306. let styleObject = {};
  307. if (this.dataConfig.toneCouponConfig.tabVal) {
  308. styleObject["color"] = this.dataConfig.couponMoneyColor.color[0].item;
  309. }
  310. return styleObject;
  311. },
  312. buttonStyle() {
  313. let styleObject = {};
  314. if (this.dataConfig.toneConfig.tabVal) {
  315. if (this.dataConfig.styleConfig.tabVal) {
  316. styleObject[
  317. "background"
  318. ] = `linear-gradient(90deg, ${this.dataConfig.bntColor.color[0].item} 0%, ${this.dataConfig.bntColor.color[1].item} 100%)`;
  319. }
  320. }
  321. if (this.dataConfig.toneCouponConfig.tabVal) {
  322. if (!this.dataConfig.styleConfig.tabVal) {
  323. styleObject["color"] = this.dataConfig.bntTxtColor.color[0].item;
  324. }
  325. }
  326. return styleObject;
  327. },
  328. couponTypeStyle() {
  329. let styleObject = {};
  330. if (this.dataConfig.toneCouponConfig.tabVal) {
  331. styleObject["color"] = this.dataConfig.couponTypeColor.color[0].item;
  332. }
  333. return styleObject;
  334. },
  335. couponStyle() {
  336. let styleObject = {};
  337. if (this.dataConfig.toneCouponConfig.tabVal) {
  338. if (this.dataConfig.styleConfig.tabVal) {
  339. styleObject["margin-right"] = `${
  340. this.dataConfig.spacingConfig2.val * 2
  341. }rpx`;
  342. styleObject["background"] =
  343. this.dataConfig.couponBgColor2.color[0].item;
  344. } else {
  345. styleObject["margin-right"] = `${
  346. this.dataConfig.spacingConfig.val * 2
  347. }rpx`;
  348. }
  349. }
  350. return styleObject;
  351. },
  352. couponContentStyle() {
  353. let styleObject = {};
  354. if (this.dataConfig.toneCouponConfig.tabVal) {
  355. styleObject[
  356. "background"
  357. ] = `linear-gradient(90deg, ${this.dataConfig.couponBgColor.color[0].item} 0%, ${this.dataConfig.couponBgColor.color[1].item} 100%)`;
  358. }
  359. return styleObject;
  360. },
  361. stationStyle() {
  362. let styleObject = {};
  363. if (this.dataConfig.toneCouponConfig.tabVal) {
  364. styleObject[
  365. "background"
  366. ] = `linear-gradient(90deg, ${this.dataConfig.vipBgColor.color[0].item} 0%, ${this.dataConfig.vipBgColor.color[1].item} 100%)`;
  367. }
  368. return styleObject;
  369. },
  370. productMoneyStyle() {
  371. let styleObject = {};
  372. if (this.dataConfig.toneGoodsConfig.tabVal) {
  373. styleObject["color"] = this.dataConfig.priceColor.color[0].item;
  374. }
  375. return styleObject;
  376. },
  377. couponInfoStyle() {
  378. let styleObject = {};
  379. if (this.dataConfig.toneCouponConfig.tabVal) {
  380. styleObject[
  381. "background"
  382. ] = `linear-gradient(90deg, ${this.dataConfig.bntBgColor.color[1].item} 0%, ${this.dataConfig.bntBgColor.color[0].item} 100%)`;
  383. }
  384. return styleObject;
  385. },
  386. // 组件背景
  387. newVip2Background() {
  388. return {
  389. background: `linear-gradient(90deg, ${this.dataConfig.moduleColor.color[0].item} 0%, ${this.dataConfig.moduleColor.color[1].item} 99%)`,
  390. };
  391. },
  392. // 背景圆角
  393. newVipBorderRadius() {
  394. let borderRadius = `${this.dataConfig.fillet.val * 2}rpx`;
  395. if (this.dataConfig.fillet.type) {
  396. borderRadius = `${this.dataConfig.fillet.valList[0].val * 2}rpx ${
  397. this.dataConfig.fillet.valList[1].val * 2
  398. }rpx ${this.dataConfig.fillet.valList[3].val * 2}rpx ${
  399. this.dataConfig.fillet.valList[2].val * 2
  400. }rpx`;
  401. }
  402. return {
  403. "border-radius": borderRadius,
  404. };
  405. },
  406. // 底部背景
  407. newVipWrapStyle() {
  408. return {
  409. "margin-top": `${this.dataConfig.mbConfig.val * 2}rpx`,
  410. background: this.dataConfig.bottomBgColor.color[0].item,
  411. };
  412. },
  413. },
  414. watch: {
  415. isLogin: {
  416. handler: function (newV, oldV) {
  417. if (newV) {
  418. this.getList();
  419. }
  420. },
  421. deep: true,
  422. },
  423. },
  424. methods: {
  425. goDetail(item) {
  426. uni.navigateTo({
  427. url: `/pages/activity/goods_details/index?id=${item.id}&type=7`,
  428. });
  429. },
  430. goNewList() {
  431. uni.navigateTo({
  432. url: `/pages/activity/new_customer/index`,
  433. });
  434. },
  435. goUser() {
  436. uni.switchTab({
  437. url: `/pages/users/user_coupon/index`,
  438. });
  439. },
  440. getList() {
  441. let limit = this.$config.LIMIT;
  442. newcomerList({
  443. page: 1,
  444. limit: limit,
  445. })
  446. .then((res) => {
  447. let newcomer_integral = res.data.newcomer_integral;
  448. this.couponList = res.data.newcomer_coupon;
  449. this.productList = res.data.newcomer_products;
  450. if (Array.isArray(newcomer_integral)) {
  451. this.newcomer_integral = 0;
  452. } else {
  453. this.newcomer_integral = newcomer_integral;
  454. }
  455. })
  456. .catch((err) => {
  457. return this.$util.Tips({
  458. title: err.msg,
  459. });
  460. });
  461. },
  462. },
  463. };
  464. </script>
  465. <style lang="scss">
  466. .newVip {
  467. padding: 0 20rpx 40rpx;
  468. border-radius: 16rpx;
  469. background: #ffffff;
  470. .header {
  471. height: 96rpx;
  472. .title {
  473. font-weight: bold;
  474. font-size: 32rpx;
  475. color: #333333;
  476. }
  477. .more {
  478. font-size: 24rpx;
  479. color: #999999;
  480. }
  481. .iconfont {
  482. font-size: 24rpx;
  483. }
  484. }
  485. .bonus {
  486. border: 1rpx solid var(--view-theme);
  487. border-radius: 17rpx;
  488. background: var(--view-theme);
  489. .inner {
  490. height: 80rpx;
  491. padding: 0 32rpx;
  492. border-radius: 16rpx;
  493. background: rgba(255, 255, 255, 0.8);
  494. font-size: 26rpx;
  495. color: #333333;
  496. }
  497. .image {
  498. width: 48rpx;
  499. height: 48rpx;
  500. margin-right: 16rpx;
  501. }
  502. .red {
  503. color: var(--view-theme);
  504. }
  505. }
  506. .coupon {
  507. .title {
  508. padding: 28rpx 0 20rpx;
  509. font-weight: bold;
  510. font-size: 28rpx;
  511. line-height: 40rpx;
  512. color: #333333;
  513. }
  514. .content {
  515. position: relative;
  516. padding: 12rpx 190rpx 12rpx 12rpx;
  517. border-radius: 24rpx;
  518. background: linear-gradient(
  519. 270deg,
  520. var(--view-theme) 0%,
  521. var(--view-gradient) 100%
  522. );
  523. }
  524. .list {
  525. flex-wrap: nowrap;
  526. }
  527. .item {
  528. flex-shrink: 0;
  529. position: relative;
  530. width: 144rpx;
  531. height: 188rpx;
  532. border-radius: 12rpx;
  533. margin-top: 0;
  534. margin-right: 8rpx;
  535. background: radial-gradient(
  536. circle at left center,
  537. transparent 6rpx,
  538. #ffffff 6rpx
  539. )
  540. top left,
  541. radial-gradient(circle at right center, transparent 6rpx, #ffffff 6rpx)
  542. top right;
  543. background-repeat: no-repeat;
  544. background-size: 78rpx 188rpx;
  545. &::before {
  546. content: "";
  547. position: absolute;
  548. top: 94rpx;
  549. right: 10rpx;
  550. left: 10rpx;
  551. border-top: 1rpx dashed #d8d8d8;
  552. }
  553. .item-top,
  554. .item-bottom {
  555. height: 94rpx;
  556. }
  557. .money {
  558. font-weight: 500;
  559. font-size: 28rpx;
  560. color: var(--view-theme);
  561. }
  562. .number {
  563. font-family: SemiBold;
  564. font-size: 40rpx;
  565. }
  566. .name {
  567. font-weight: 500;
  568. font-size: 22rpx;
  569. line-height: 30rpx;
  570. color: var(--view-theme);
  571. }
  572. .info {
  573. margin-top: 4rpx;
  574. font-size: 18rpx;
  575. line-height: 26rpx;
  576. color: #666666;
  577. }
  578. }
  579. .station {
  580. position: absolute;
  581. top: 0;
  582. right: 0;
  583. width: 190rpx;
  584. height: 100%;
  585. padding-top: 40rpx;
  586. border-radius: 0 24rpx 24rpx 0;
  587. background: linear-gradient(
  588. 270deg,
  589. var(--view-theme) 0%,
  590. var(--view-gradient) 100%
  591. );
  592. &::before {
  593. content: "";
  594. position: absolute;
  595. top: 0;
  596. left: -20rpx;
  597. width: 20rpx;
  598. height: 210rpx;
  599. background: linear-gradient(
  600. 270deg,
  601. rgba(0, 0, 0, 0.2) 0%,
  602. rgba(255, 255, 255, 0) 100%
  603. );
  604. }
  605. .money {
  606. text-align: center;
  607. font-weight: 500;
  608. font-size: 28rpx;
  609. color: #ffffff;
  610. }
  611. .number {
  612. font-family: SemiBold;
  613. font-size: 40rpx;
  614. }
  615. .info {
  616. margin-top: 18rpx;
  617. text-align: center;
  618. font-size: 20rpx;
  619. line-height: 28rpx;
  620. color: #ffffff;
  621. }
  622. .button {
  623. width: 136rpx;
  624. height: 52rpx;
  625. border-radius: 26rpx;
  626. margin: 12rpx auto 0;
  627. background: #ffffff;
  628. text-align: center;
  629. font-weight: 500;
  630. font-size: 22rpx;
  631. line-height: 52rpx;
  632. color: var(--view-theme);
  633. }
  634. }
  635. }
  636. .product {
  637. .title {
  638. padding: 28rpx 0 20rpx;
  639. font-weight: bold;
  640. font-size: 28rpx;
  641. line-height: 40rpx;
  642. color: #333333;
  643. }
  644. .list {
  645. flex-wrap: nowrap;
  646. }
  647. .item {
  648. width: 158rpx;
  649. margin-top: 0;
  650. margin-right: 12rpx;
  651. }
  652. .name {
  653. margin-top: 12rpx;
  654. text-align: center;
  655. font-size: 24rpx;
  656. line-height: 34rpx;
  657. color: #333333;
  658. }
  659. .money {
  660. margin-top: 8rpx;
  661. text-align: center;
  662. font-weight: 600;
  663. font-size: 22rpx;
  664. color: var(--view-theme);
  665. }
  666. .number {
  667. font-family: SemiBold;
  668. font-size: 32rpx;
  669. }
  670. }
  671. }
  672. .newVip2 {
  673. padding: 0 24rpx 32rpx;
  674. border-radius: 24rpx;
  675. background: linear-gradient(270deg, #ff7931 0%, #e93323 100%);
  676. .header {
  677. height: 92rpx;
  678. .info {
  679. position: relative;
  680. padding-left: 12rpx;
  681. margin-left: 16rpx;
  682. font-size: 24rpx;
  683. color: #ffffff;
  684. &::before {
  685. content: "";
  686. position: absolute;
  687. top: 50%;
  688. left: 0;
  689. width: 1rpx;
  690. height: 20rpx;
  691. background-color: #ffffff;
  692. transform: translateY(-50%);
  693. }
  694. }
  695. .more {
  696. font-size: 24rpx;
  697. color: #ffffff;
  698. }
  699. .iconfont {
  700. font-size: 24rpx;
  701. }
  702. .image {
  703. width: 156rpx;
  704. height: 28rpx;
  705. }
  706. }
  707. .wrapper {
  708. border-radius: 16rpx;
  709. background: #ffffff;
  710. }
  711. .coupon {
  712. padding-bottom: 20rpx;
  713. .title {
  714. padding: 24rpx 20rpx 20rpx;
  715. font-weight: bold;
  716. font-size: 28rpx;
  717. line-height: 40rpx;
  718. color: #333333;
  719. }
  720. .list {
  721. flex-wrap: nowrap;
  722. padding-left: 20rpx;
  723. }
  724. .item {
  725. flex-shrink: 0;
  726. position: relative;
  727. width: 152rpx;
  728. height: 168rpx;
  729. margin-top: 0;
  730. margin-right: 24rpx;
  731. }
  732. .back {
  733. position: absolute;
  734. bottom: 0;
  735. left: 0;
  736. width: 152rpx;
  737. height: 148rpx;
  738. border-radius: 20rpx;
  739. background: var(--view-theme);
  740. }
  741. .money {
  742. position: absolute;
  743. bottom: 12rpx;
  744. left: 6rpx;
  745. width: 140rpx;
  746. height: 156rpx;
  747. padding-top: 36rpx;
  748. border: 2rpx solid #fceae9;
  749. border-radius: 20rpx;
  750. background: #ffffff;
  751. text-align: center;
  752. font-weight: 500;
  753. font-size: 28rpx;
  754. color: var(--view-theme);
  755. .number {
  756. font-family: SemiBold;
  757. font-size: 40rpx;
  758. }
  759. }
  760. .info {
  761. position: absolute;
  762. bottom: 0;
  763. left: 0;
  764. width: 152rpx;
  765. height: 78rpx;
  766. padding-top: 34rpx;
  767. border-radius: 0 0 20rpx 20rpx;
  768. background: linear-gradient(
  769. 90deg,
  770. var(--view-theme) 0%,
  771. var(--view-gradient) 100%
  772. );
  773. text-align: center;
  774. font-size: 20rpx;
  775. line-height: 28rpx;
  776. color: #ffffff;
  777. &::before {
  778. content: "";
  779. position: absolute;
  780. top: 0;
  781. left: 0;
  782. width: 152rpx;
  783. height: 20rpx;
  784. border: 8rpx solid #fceae9;
  785. border-bottom-right-radius: 76rpx 20rpx;
  786. border-bottom-left-radius: 76rpx 20rpx;
  787. border-top-color: transparent;
  788. box-sizing: border-box;
  789. background: #ffffff;
  790. }
  791. }
  792. }
  793. .product {
  794. padding-bottom: 20rpx;
  795. .title {
  796. padding: 20rpx 20rpx 20rpx;
  797. font-weight: bold;
  798. font-size: 28rpx;
  799. line-height: 40rpx;
  800. color: #333333;
  801. }
  802. .list {
  803. padding: 0 20rpx;
  804. }
  805. .item {
  806. width: 144rpx;
  807. margin-top: 0;
  808. margin-right: 15rpx;
  809. }
  810. .money {
  811. margin-top: 18rpx;
  812. text-align: center;
  813. font-weight: 500;
  814. font-size: 32rpx;
  815. color: #333333;
  816. }
  817. .number {
  818. font-family: SemiBold;
  819. }
  820. .name {
  821. margin-top: 6rpx;
  822. text-align: center;
  823. font-size: 24rpx;
  824. line-height: 34rpx;
  825. color: #333333;
  826. }
  827. }
  828. .bonus {
  829. padding: 26rpx 26rpx 26rpx 20rpx;
  830. border-radius: 16rpx;
  831. margin-top: 20rpx;
  832. background: #ffffff;
  833. .image {
  834. width: 88rpx;
  835. height: 88rpx;
  836. }
  837. .text {
  838. flex: 1;
  839. padding-left: 20rpx;
  840. font-size: 24rpx;
  841. color: #999999;
  842. }
  843. .info {
  844. margin-bottom: 10rpx;
  845. font-weight: bold;
  846. font-size: 30rpx;
  847. line-height: 42rpx;
  848. color: #333333;
  849. }
  850. .red {
  851. border-radius: 16rpx;
  852. margin-left: 8rpx;
  853. background: var(--view-theme);
  854. font-weight: 400;
  855. font-size: 20rpx;
  856. line-height: 32rpx;
  857. color: var(--view-theme);
  858. .image {
  859. width: 24rpx;
  860. height: 24rpx;
  861. }
  862. .inner {
  863. height: 32rpx;
  864. padding: 0 7rpx;
  865. border-radius: 16rpx;
  866. background: rgba(255, 255, 255, 0.9);
  867. }
  868. }
  869. .button {
  870. width: 114rpx;
  871. height: 52rpx;
  872. border-radius: 26rpx;
  873. background: linear-gradient(
  874. 90deg,
  875. var(--view-theme) 0%,
  876. var(--view-gradient) 100%
  877. );
  878. text-align: center;
  879. font-weight: 500;
  880. font-size: 22rpx;
  881. line-height: 52rpx;
  882. color: #ffffff;
  883. }
  884. }
  885. }
  886. </style>