coupon.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. <template>
  2. <!-- 优惠券 -->
  3. <view v-show="!isSortType">
  4. <common-wrapper :config="configData">
  5. <view :style="[couponWrapStyle]">
  6. <view class="coupon-wrap" v-if="couponList.length">
  7. <view v-if="dataConfig.styleConfig.tabVal == 0" class="coupon1">
  8. <scroll-view scroll-x="true">
  9. <view class="list acea-row">
  10. <view
  11. v-for="item in couponList"
  12. :key="item.id"
  13. class="item"
  14. :style="[couponItemFirstStyle]"
  15. >
  16. <view class="text">
  17. <view class="money" :style="[couponMoneyColor]">
  18. <template>
  19. {{ $t(`¥`)
  20. }}<text class="number">{{ item.coupon_price }}</text>
  21. </template>
  22. </view>
  23. <view class="info">
  24. <text v-if="item.use_min_price"
  25. >{{ $t(`满`) }}{{ item.use_min_price
  26. }}{{ $t(`可用`) }}</text
  27. >
  28. <text v-else>{{ $t(`无门槛券`) }}</text>
  29. </view>
  30. </view>
  31. <view
  32. v-if="item.is_use >= item.receive_limit"
  33. class="button"
  34. :style="[bntBgColor]"
  35. >{{ $t(`已领取`) }}</view
  36. >
  37. <view
  38. v-else
  39. class="button"
  40. :style="[bntBgColor]"
  41. @click="receiveCoupon(item)"
  42. >{{ $t(`去领取`) }}</view
  43. >
  44. </view>
  45. </view>
  46. </scroll-view>
  47. </view>
  48. <view
  49. v-else-if="dataConfig.styleConfig.tabVal == 1"
  50. class="coupon2 p-24"
  51. >
  52. <scroll-view scroll-x="true">
  53. <view class="list acea-row">
  54. <view v-for="item in couponList" :key="item.id" class="item">
  55. <view class="name">{{ item.type | typeFilter }}</view>
  56. <view class="text">
  57. <view class="money" :style="[couponMoneyColor]">
  58. <template>
  59. {{ $t(`¥`)
  60. }}<text class="number">{{ item.coupon_price }}</text>
  61. </template>
  62. </view>
  63. <view class="info">
  64. <text v-if="item.use_min_price"
  65. >{{ $t(`满`) }}{{ item.use_min_price
  66. }}{{ $t(`可用`) }}</text
  67. >
  68. <text v-else>{{ $t(`无门槛券`) }}</text>
  69. </view>
  70. </view>
  71. <view
  72. v-if="item.is_use >= item.receive_limit"
  73. class="button"
  74. :style="[bntBgColor]"
  75. >{{ $t(`已领取`) }}</view
  76. >
  77. <view
  78. v-else
  79. class="button"
  80. :style="[bntBgColor]"
  81. @click="receiveCoupon(item)"
  82. >{{ $t(`去领取`) }}</view
  83. >
  84. </view>
  85. </view>
  86. </scroll-view>
  87. </view>
  88. <view
  89. v-else-if="dataConfig.styleConfig.tabVal == 2"
  90. class="coupon3 p-24 rd-16rpx"
  91. :style="[coupon3Color]"
  92. >
  93. <scroll-view scroll-x="true">
  94. <view class="list acea-row">
  95. <view v-for="item in couponList" :key="item.id" class="item">
  96. <view class="inner acea-row">
  97. <view
  98. class="text acea-row row-column row-middle row-center"
  99. >
  100. <view class="money">
  101. <template>
  102. {{ $t(`¥`)
  103. }}<text class="number">{{ item.coupon_price }}</text>
  104. </template>
  105. </view>
  106. <view class="info">
  107. <text v-if="item.use_min_price"
  108. >{{ $t(`满`) }}{{ item.use_min_price
  109. }}{{ $t(`可用`) }}</text
  110. >
  111. <text v-else>{{ $t(`无门槛券`) }}</text>
  112. </view>
  113. </view>
  114. <view
  115. v-if="item.is_use >= item.receive_limit"
  116. class="button acea-row row-middle"
  117. >{{ $t(`已领取`) }}</view
  118. >
  119. <view
  120. v-else
  121. class="button acea-row row-middle"
  122. @click="receiveCoupon(item)"
  123. >{{ $t(`立即领取`) }}</view
  124. >
  125. </view>
  126. </view>
  127. </view>
  128. </scroll-view>
  129. </view>
  130. <view
  131. v-else-if="dataConfig.styleConfig.tabVal == 3"
  132. class="coupon4"
  133. :style="[coupon4Color]"
  134. >
  135. <view class="content">
  136. <scroll-view scroll-x="true">
  137. <view class="list acea-row">
  138. <view
  139. v-for="item in couponList"
  140. :key="item.id"
  141. :style="[couponItemStyle]"
  142. class="item"
  143. >
  144. <view class="name" :style="typeStyle">
  145. <view class="inner">{{ item.type | typeFilter }}</view>
  146. </view>
  147. <view class="text">
  148. <view class="money" :style="[couponMoneyColor]">
  149. <template>
  150. {{ $t(`¥`)
  151. }}<text class="number">{{ item.coupon_price }}</text>
  152. </template>
  153. </view>
  154. <view class="info">
  155. <text v-if="item.use_min_price"
  156. >{{ $t(`满`) }}{{ item.use_min_price
  157. }}{{ $t(`可用`) }}</text
  158. >
  159. <text v-else>{{ $t(`无门槛券`) }}</text>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. </scroll-view>
  165. <view
  166. class="station acea-row row-column row-middle row-center"
  167. :style="[bntBgColor]"
  168. >
  169. <view class="station-name">{{ $t(`先领券 再购物`) }}</view>
  170. <view class="station-info">{{
  171. $t(`领券下单·享购物优惠`)
  172. }}</view>
  173. <view class="button" @click="goCoupon">{{
  174. $t(`立即领取`)
  175. }}</view>
  176. </view>
  177. </view>
  178. </view>
  179. <view
  180. v-else-if="dataConfig.styleConfig.tabVal == 4"
  181. class="coupon5 pt-24 pb-24 pr-20 pl-20 rd-16rpx"
  182. >
  183. <scroll-view scroll-x="true">
  184. <view class="list acea-row">
  185. <view
  186. v-for="item in couponList"
  187. :key="item.id"
  188. class="item acea-row"
  189. :style="[bntBgColor]"
  190. >
  191. <view class="text acea-row row-column row-middle row-center">
  192. <view class="money" :style="[couponMoneyColor]">
  193. <template>
  194. {{ $t(`¥`)
  195. }}<text class="number">{{ item.coupon_price }}</text>
  196. </template>
  197. </view>
  198. <view class="info">
  199. <text v-if="item.use_min_price"
  200. >{{ $t(`满`) }}{{ item.use_min_price
  201. }}{{ $t(`可用`) }}</text
  202. >
  203. <text v-else>{{ $t(`无门槛券`) }}</text>
  204. </view>
  205. </view>
  206. <view
  207. v-if="item.is_use >= item.receive_limit"
  208. class="button acea-row row-middle"
  209. >{{ $t(`已领取`) }}</view
  210. >
  211. <view
  212. v-else
  213. class="button acea-row row-middle"
  214. @click="receiveCoupon(item)"
  215. >{{ $t(`领取`) }}</view
  216. >
  217. </view>
  218. </view>
  219. </scroll-view>
  220. </view>
  221. </view>
  222. </view>
  223. </common-wrapper>
  224. </view>
  225. </template>
  226. <script>
  227. import commonWrapper from "./commonWrapper.vue";
  228. import { getCoupons, setCouponReceive } from "@/api/api.js";
  229. import { mapGetters } from "vuex";
  230. export default {
  231. components: { commonWrapper },
  232. props: {
  233. dataConfig: {
  234. type: Object,
  235. default: () => {},
  236. },
  237. isSortType: {
  238. type: String | Number,
  239. default: 0,
  240. },
  241. },
  242. watch: {
  243. isLogin: {
  244. handler: function (newV, oldV) {
  245. if (newV) {
  246. this.getCoupon();
  247. }
  248. },
  249. deep: true,
  250. },
  251. },
  252. filters: {
  253. typeFilter(val) {
  254. let obj = {
  255. 0: "通用券",
  256. 1: "品类券",
  257. 2: "商品券",
  258. 3: "品牌券",
  259. };
  260. return obj[val];
  261. },
  262. },
  263. data() {
  264. return {
  265. isAuto: false, //没有授权的不会自动授权
  266. isShowAuth: false, //是否隐藏授权
  267. couponList: [],
  268. };
  269. },
  270. computed: {
  271. ...mapGetters(["isLogin"]),
  272. couponMoneyColor() {
  273. let styleObject = {};
  274. if (this.dataConfig.toneConfig.tabVal) {
  275. styleObject["color"] = this.dataConfig.couponMoneyColor.color[0].item;
  276. }
  277. return styleObject;
  278. },
  279. couponItemFirstStyle() {
  280. if (this.dataConfig.toneConfig.tabVal) {
  281. return {
  282. background: this.dataConfig.couponBgColor.color[0].item,
  283. };
  284. } else {
  285. return {
  286. background: "var(--view-theme)",
  287. };
  288. }
  289. },
  290. couponItemStyle() {
  291. return {
  292. "margin-right": `${this.dataConfig.spacingConfig.val * 2}rpx`,
  293. };
  294. },
  295. typeStyle() {
  296. if (!this.dataConfig.toneConfig.tabVal) {
  297. return {
  298. background: "var(--view-theme)",
  299. color: "var(--view-theme)",
  300. };
  301. } else {
  302. return {
  303. background: this.dataConfig.couponMoneyColor.color[0].item,
  304. color: this.dataConfig.couponMoneyColor.color[0].item,
  305. };
  306. }
  307. },
  308. bntBgColor() {
  309. let styleObject = {};
  310. if (this.dataConfig.toneConfig.tabVal) {
  311. styleObject["background"] =
  312. `linear-gradient(180deg, ${this.dataConfig.bntBgColor.color[0].item} 0%, ${this.dataConfig.bntBgColor.color[1].item} 100%)`;
  313. }
  314. return styleObject;
  315. },
  316. coupon3Color() {
  317. let styleObject = {
  318. "--coupon3-color": "var(--view-theme)",
  319. };
  320. if (this.dataConfig.toneConfig.tabVal) {
  321. styleObject["--coupon3-color"] =
  322. this.dataConfig.couponMoneyColor.color[0].item;
  323. }
  324. return styleObject;
  325. },
  326. coupon4Color() {
  327. let styleObject = {
  328. "--coupon4-color": "var(--view-theme)",
  329. };
  330. if (this.dataConfig.toneConfig.tabVal) {
  331. styleObject["--coupon4-color"] =
  332. this.dataConfig.couponBgColor.color[0].item;
  333. }
  334. return styleObject;
  335. },
  336. couponWrapBgColor() {
  337. let styleObject = {
  338. "--module-color": this.dataConfig.moduleColor.color[0].item,
  339. };
  340. if (this.dataConfig.styleConfig.tabVal == 1) {
  341. styleObject["--module-color"] =
  342. `linear-gradient(90deg,${this.dataConfig.moduleColor.color[0].item} 0%,${this.dataConfig.moduleColor.color[1].item} 100%)`;
  343. }
  344. // if (this.dataConfig.styleConfig.tabVal == 3) {
  345. let borderRadius = `${this.dataConfig.fillet.val * 2}rpx`;
  346. if (this.dataConfig.fillet.type) {
  347. borderRadius = `${this.dataConfig.fillet.valList[0].val * 2}rpx ${
  348. this.dataConfig.fillet.valList[1].val * 2
  349. }rpx ${this.dataConfig.fillet.valList[3].val * 2}rpx ${
  350. this.dataConfig.fillet.valList[2].val * 2
  351. }rpx`;
  352. }
  353. styleObject["border-radius"] = borderRadius;
  354. // }
  355. return styleObject;
  356. },
  357. configData() {
  358. return {
  359. ...this.dataConfig,
  360. paddingConfig: this.dataConfig.paddingConfig || {
  361. isAll: false,
  362. valList: [
  363. {
  364. val: this.dataConfig.topConfig
  365. ? this.dataConfig.topConfig.val
  366. : 0,
  367. },
  368. {
  369. val: this.dataConfig.prConfig ? this.dataConfig.prConfig.val : 0,
  370. },
  371. {
  372. val: this.dataConfig.bottomConfig
  373. ? this.dataConfig.bottomConfig.val
  374. : 0,
  375. },
  376. {
  377. val: this.dataConfig.prConfig ? this.dataConfig.prConfig.val : 0,
  378. },
  379. ],
  380. },
  381. marginConfig: this.dataConfig.marginConfig || {
  382. isAll: false,
  383. valList: [
  384. {
  385. val: this.dataConfig.mbConfig ? this.dataConfig.mbConfig.val : 0,
  386. },
  387. {
  388. val: 0,
  389. },
  390. {
  391. val: 0,
  392. },
  393. {
  394. val: 0,
  395. },
  396. ],
  397. },
  398. };
  399. },
  400. couponWrapStyle() {
  401. let style = {},
  402. borderRadius = `${this.dataConfig.fillet.val * 2}rpx`;
  403. if (this.dataConfig.moduleColor) {
  404. const colors = this.dataConfig.moduleColor.color.map((c) => c.item);
  405. style["background"] =
  406. style.background = `linear-gradient(0, ${colors[0]} 0%, ${colors[1]} 100%)`;
  407. }
  408. if (this.dataConfig.fillet.type) {
  409. borderRadius = `${this.dataConfig.fillet.valList[0].val * 2}rpx ${
  410. this.dataConfig.fillet.valList[1].val * 2
  411. }rpx ${this.dataConfig.fillet.valList[3].val * 2}rpx ${
  412. this.dataConfig.fillet.valList[2].val * 2
  413. }rpx`;
  414. }
  415. style["border-radius"] = borderRadius;
  416. return style;
  417. },
  418. },
  419. mounted() {
  420. this.getCoupon();
  421. },
  422. methods: {
  423. getCoupon: function () {
  424. let that = this;
  425. let limit = that.$config.LIMIT;
  426. getCoupons({
  427. page: 1,
  428. limit:
  429. this.dataConfig.numberConfig.val >= limit
  430. ? limit
  431. : this.dataConfig.numberConfig.val,
  432. type: -1,
  433. })
  434. .then((res) => {
  435. that.$set(that, "couponList", res.data.list);
  436. })
  437. .catch((err) => {
  438. return that.$util.Tips({
  439. title: err,
  440. });
  441. });
  442. },
  443. receiveCoupon: function (item) {
  444. let that = this;
  445. if (!that.isLogin) {
  446. this.$emit("changeLogin");
  447. } else {
  448. setCouponReceive(item.id)
  449. .then(function () {
  450. item.is_use = true;
  451. that.$set(that, "couponList", that.couponList);
  452. that.$util.Tips({
  453. title: "领取成功",
  454. });
  455. })
  456. .catch(function (err) {
  457. that.$util.Tips({
  458. title: err,
  459. });
  460. });
  461. }
  462. },
  463. goCoupon() {
  464. uni.navigateTo({
  465. url: "/pages/users/user_get_coupon/index",
  466. });
  467. },
  468. },
  469. };
  470. </script>
  471. <style lang="scss">
  472. .coupon-wrap {
  473. // background: var(--module-color);
  474. }
  475. .coupon1 {
  476. padding: 12rpx;
  477. .list {
  478. flex-wrap: nowrap;
  479. }
  480. .item {
  481. flex-shrink: 0;
  482. position: relative;
  483. width: 156rpx;
  484. height: 156rpx;
  485. border-radius: 32rpx;
  486. margin-top: 20rpx;
  487. margin-right: 12rpx;
  488. background: var(--view-theme);
  489. .text {
  490. width: 144rpx;
  491. height: 156rpx;
  492. padding-top: 22rpx;
  493. border: 2rpx solid #fceae9;
  494. border-radius: 16rpx;
  495. margin: -20rpx auto 0;
  496. background: #ffffff;
  497. }
  498. .money {
  499. height: 40rpx;
  500. text-align: center;
  501. font-weight: 500;
  502. font-size: 28rpx;
  503. color: var(--view-theme);
  504. }
  505. .number {
  506. font-family: SemiBold;
  507. font-size: 40rpx;
  508. line-height: 40rpx;
  509. }
  510. .info {
  511. margin-top: 10rpx;
  512. text-align: center;
  513. font-size: 18rpx;
  514. line-height: 26rpx;
  515. color: #999999;
  516. }
  517. .button {
  518. position: absolute;
  519. right: 0;
  520. bottom: 0;
  521. left: 0;
  522. height: 76rpx;
  523. padding-top: 28rpx;
  524. border-radius: 0 0 32rpx 32rpx;
  525. background: linear-gradient(
  526. 90deg,
  527. var(--view-theme) 0%,
  528. var(--view-gradient) 100%
  529. );
  530. text-align: center;
  531. font-weight: 500;
  532. font-size: 24rpx;
  533. color: #ffffff;
  534. &::before {
  535. content: "";
  536. position: absolute;
  537. top: 0;
  538. left: 0;
  539. width: 156rpx;
  540. height: 20rpx;
  541. border: 8rpx solid #fceae9;
  542. border-top-color: #ffffff;
  543. border-bottom-right-radius: 78rpx 20rpx;
  544. border-bottom-left-radius: 78rpx 20rpx;
  545. box-sizing: border-box;
  546. background: #ffffff;
  547. }
  548. }
  549. }
  550. }
  551. .coupon2 {
  552. .list {
  553. flex-wrap: nowrap;
  554. }
  555. .item {
  556. flex-shrink: 0;
  557. width: 204rpx;
  558. height: 232rpx;
  559. padding-top: 28rpx;
  560. border-radius: 16rpx;
  561. margin-top: 0;
  562. margin-right: 12rpx;
  563. background: #ffffff;
  564. }
  565. .name {
  566. text-align: center;
  567. font-weight: 500;
  568. font-size: 24rpx;
  569. line-height: 34rpx;
  570. color: #333333;
  571. }
  572. .text {
  573. margin-top: 8rpx;
  574. text-align: center;
  575. color: var(--view-theme);
  576. }
  577. .money {
  578. height: 48rpx;
  579. font-weight: 500;
  580. font-size: 28rpx;
  581. }
  582. .number {
  583. font-family: SemiBold;
  584. font-size: 44rpx;
  585. }
  586. .info {
  587. font-size: 18rpx;
  588. line-height: 26rpx;
  589. }
  590. .button {
  591. width: 136rpx;
  592. height: 48rpx;
  593. border-radius: 24rpx;
  594. margin: 12rpx auto 0;
  595. background: linear-gradient(
  596. 90deg,
  597. var(--view-theme) 0%,
  598. var(--view-gradient) 100%
  599. );
  600. text-align: center;
  601. font-weight: 500;
  602. font-size: 24rpx;
  603. line-height: 48rpx;
  604. color: #ffffff;
  605. }
  606. }
  607. .coupon3 {
  608. .list {
  609. flex-wrap: nowrap;
  610. }
  611. .item {
  612. flex-shrink: 0;
  613. width: 274rpx;
  614. height: 150rpx;
  615. border: 1rpx solid var(--coupon3-color);
  616. border-radius: 16rpx;
  617. margin-top: 0;
  618. margin-right: 12rpx;
  619. background: var(--coupon3-color);
  620. }
  621. .inner {
  622. height: 100%;
  623. border-radius: 15rpx;
  624. background: rgba(255, 255, 255, 0.9);
  625. }
  626. .text {
  627. flex: 1;
  628. position: relative;
  629. &::before {
  630. content: "";
  631. position: absolute;
  632. top: 0;
  633. right: 0;
  634. z-index: 2;
  635. width: 16rpx;
  636. height: 16rpx;
  637. border: 1rpx solid var(--coupon3-color);
  638. border-radius: 50%;
  639. background: var(--module-color);
  640. transform: translate(50%, -50%);
  641. }
  642. &::after {
  643. content: "";
  644. position: absolute;
  645. bottom: 0;
  646. right: 0;
  647. z-index: 2;
  648. width: 16rpx;
  649. height: 16rpx;
  650. border: 1rpx solid var(--coupon3-color);
  651. border-radius: 50%;
  652. background: var(--module-color);
  653. transform: translate(50%, 50%);
  654. }
  655. }
  656. .money {
  657. height: 48rpx;
  658. text-align: center;
  659. font-weight: 500;
  660. font-size: 28rpx;
  661. color: var(--coupon3-color);
  662. }
  663. .number {
  664. font-family: SemiBold;
  665. font-size: 44rpx;
  666. }
  667. .info {
  668. margin-top: 8rpx;
  669. text-align: center;
  670. font-size: 24rpx;
  671. line-height: 34rpx;
  672. color: var(--coupon3-color);
  673. }
  674. .button {
  675. position: relative;
  676. width: 74rpx;
  677. padding: 0 24rpx;
  678. font-size: 26rpx;
  679. line-height: 28rpx;
  680. color: var(--coupon3-color);
  681. &::before {
  682. content: "";
  683. position: absolute;
  684. top: 12rpx;
  685. bottom: 12rpx;
  686. left: 0;
  687. border-left: 1rpx dashed var(--coupon3-color);
  688. }
  689. }
  690. }
  691. .coupon5 {
  692. .list {
  693. flex-wrap: nowrap;
  694. }
  695. .item {
  696. flex-shrink: 0;
  697. width: 228rpx;
  698. height: 108rpx;
  699. border-radius: 12rpx;
  700. margin-right: 12rpx;
  701. background: linear-gradient(
  702. 0deg,
  703. var(--view-theme) 0%,
  704. var(--view-gradient) 100%
  705. );
  706. }
  707. .text {
  708. flex: 1;
  709. border-radius: 12rpx;
  710. background: radial-gradient(
  711. circle at left 54rpx,
  712. var(--module-color) 11rpx,
  713. rgba(255, 255, 255, 0.9) 0%,
  714. rgba(255, 255, 255, 0.8) 100%
  715. )
  716. top;
  717. }
  718. .money {
  719. height: 48rpx;
  720. font-weight: 500;
  721. font-size: 28rpx;
  722. color: var(--view-theme);
  723. }
  724. .number {
  725. font-family: SemiBold;
  726. font-size: 44rpx;
  727. }
  728. .info {
  729. font-size: 22rpx;
  730. line-height: 30rpx;
  731. color: var(--view-theme);
  732. }
  733. .button {
  734. width: 56rpx;
  735. padding: 0 16rpx;
  736. font-size: 24rpx;
  737. line-height: 28rpx;
  738. color: #ffffff;
  739. }
  740. }
  741. .coupon4 {
  742. border-radius: 16rpx;
  743. .content {
  744. position: relative;
  745. padding: 20rpx 296rpx 20rpx 20rpx;
  746. border-radius: 24rpx;
  747. background: var(--coupon4-color);
  748. }
  749. .list {
  750. flex-wrap: nowrap;
  751. }
  752. .item {
  753. flex-shrink: 0;
  754. width: 140rpx;
  755. height: 132rpx;
  756. border-radius: 12rpx;
  757. margin-right: 12rpx;
  758. background: #ffffff;
  759. }
  760. .name {
  761. width: 108rpx;
  762. height: 38rpx;
  763. line-height: 38rpx;
  764. border-radius: 0 0 19rpx 19rpx;
  765. margin: 0 auto;
  766. background: var(--coupon4-color);
  767. text-align: center;
  768. font-size: 22rpx;
  769. color: var(--coupon4-color);
  770. }
  771. .inner {
  772. width: 100%;
  773. height: 100%;
  774. border-radius: 0 0 19rpx 19rpx;
  775. background: rgba(255, 255, 255, 0.9);
  776. }
  777. .money {
  778. height: 46rpx;
  779. margin-top: 10rpx;
  780. text-align: center;
  781. font-weight: 500;
  782. font-size: 28rpx;
  783. color: var(--coupon4-color);
  784. }
  785. .number {
  786. font-family: SemiBold;
  787. font-size: 40rpx;
  788. }
  789. .info {
  790. margin-top: 4rpx;
  791. text-align: center;
  792. font-size: 18rpx;
  793. line-height: 26rpx;
  794. color: #333333;
  795. }
  796. .station {
  797. position: absolute;
  798. top: 0;
  799. right: 0;
  800. bottom: 0;
  801. width: 296rpx;
  802. // padding-left: 12rpx;
  803. border-radius: 0 24rpx 24rpx 0;
  804. // background: radial-gradient(circle at -180rpx 86rpx, transparent 200rpx, var(--coupon4-color) 0%, var(--coupon4-color) 100%);
  805. background: linear-gradient(
  806. 0deg,
  807. var(--view-theme) 0%,
  808. var(--view-gradient) 100%
  809. );
  810. // filter: drop-shadow(-16rpx 0rpx 10rpx rgba(0, 0, 0, 0.10));
  811. }
  812. .station-name {
  813. font-weight: 500;
  814. font-size: 32rpx;
  815. line-height: 44rpx;
  816. color: #ffffff;
  817. }
  818. .station-info {
  819. margin-top: 4rpx;
  820. font-size: 20rpx;
  821. line-height: 28rpx;
  822. color: #f5f5f5;
  823. }
  824. .button {
  825. width: 160rpx;
  826. height: 48rpx;
  827. border-radius: 24rpx;
  828. margin-top: 8rpx;
  829. background: rgba(255, 255, 255, 0.9);
  830. text-align: center;
  831. font-weight: 500;
  832. font-size: 24rpx;
  833. line-height: 48rpx;
  834. color: var(--coupon4-color);
  835. }
  836. }
  837. </style>