confirmCreateOrder.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  1. <template>
  2. <view>
  3. <view class="inner-box">
  4. <!-- 收货人 -->
  5. <view class="address-box" v-if="address==null" @click="openAddress()">
  6. <view class="left">
  7. <view class="name-box">
  8. <text class="text name">添加收货地址</text>
  9. </view>
  10. </view>
  11. <view class="arrow-box">
  12. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/arrow_gray.png"
  13. mode=""></image>
  14. </view>
  15. </view>
  16. <view class="address-box" v-if="address!=null" @click="openAddress()">
  17. <view class="left">
  18. <view class="name-box">
  19. <text class="text name">{{address.realName}}</text>
  20. <text class="text" v-if="address.phone!=null">{{address.phone}}</text>
  21. </view>
  22. <view class="address">
  23. {{address.province}}{{address.city}}{{address.district}}{{address.detail}}
  24. </view>
  25. </view>
  26. <view class="arrow-box">
  27. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/arrow_gray.png"
  28. mode=""></image>
  29. </view>
  30. </view>
  31. <!-- 积分 -->
  32. <view class="price-info">
  33. <view class="price-info-title">价格明细</view>
  34. <view class="points">
  35. <view class="left">
  36. <text class="text">商品总价</text>
  37. </view>
  38. <view class="right" style="align-items: baseline;">
  39. <text class="price-info-unit">¥</text>
  40. <text class="price-info-num">{{(safeOrderData.totalPrice||0).toFixed(2)}}</text>
  41. <!-- <text class="price-info-num">{{(orderData.totalPrice||0).toFixed(2)}}</text> -->
  42. </view>
  43. </view>
  44. <view class="points" @click="couponVisible = true;">
  45. <view class="left">
  46. <text class="text">优惠券</text>
  47. </view>
  48. <view class="right">
  49. <text class="text">{{couponText}}</text>
  50. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/arrow4.png"
  51. mode=""></image>
  52. </view>
  53. </view>
  54. <view class="points">
  55. <view class="left">
  56. <text class="text">运费</text>
  57. </view>
  58. <view class="right">
  59. <text class="text"
  60. v-if="address!=null">{{orderData.payDelivery==null||orderData.payDelivery==0?'免运费':orderData.payDelivery.toFixed(2)}}</text>
  61. <text class="text" v-if="address==null">--</text>
  62. </view>
  63. </view>
  64. <!-- 备注 -->
  65. <view class="remarks">
  66. <input type="text" v-model="safeOrderData.remark" placeholder="备注留言(选填)"
  67. placeholder-class="input" />
  68. </view>
  69. <view class="points">
  70. <view class="left">
  71. <text class="text">合计</text>
  72. </view>
  73. <view class="right" style="align-items: baseline;">
  74. <text class="price-info-unit">¥</text>
  75. <text class="price-info-num">{{(orderData.payPrice||0).toFixed(2)}}</text>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="btn-foot">
  81. <view class="right">
  82. <view class="total">
  83. <text class="label">合计:</text>
  84. <view class="price">
  85. <text class="unit">¥</text>
  86. <text class="num">{{(orderData.payPrice||0).toFixed(2)}}</text>
  87. </view>
  88. </view>
  89. <view class="btn" @click="submitOrder" :disabled="submittingOrder" :style="submittingOrder ? 'background: #ccc; color: #999;' : ''">提交订单</view>
  90. </view>
  91. </view>
  92. <popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5" radius="30" maxHeight="60%">
  93. <view class="coupon" style="height:650rpx;">
  94. <div class="coupon-list" v-if="couponsList.length > 0">
  95. <div class="item acea-row row-center-wrapper" v-for="(item, index) in couponsList" :key="index">
  96. <div class="money">
  97. <image v-if="item.status==0&&item.useMinPrice<=orderData.totalPrice" class="img"
  98. src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/coupon1.png"
  99. mode="widthFix"></image>
  100. <image v-if="item.status!=0||item.useMinPrice>orderData.totalPrice" class="img"
  101. src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/coupon2.png"
  102. mode="widthFix"></image>
  103. <div style="z-index: 999;">
  104. ¥<span class="num">{{ item.couponPrice }}</span>
  105. </div>
  106. <div class="pic-num">满{{ item.useMinPrice }}元可用</div>
  107. </div>
  108. <div class="text">
  109. <div class="condition line1">
  110. {{ item.couponTitle }}
  111. </div>
  112. <div class="data acea-row row-between-wrapper">
  113. <div>{{ item.limitTime }}到期</div>
  114. <div v-if=" item.status==0&&item.useMinPrice<=orderData.totalPrice"
  115. class="bnt bg-color-red" @click="couponSelect(item)">选择</div>
  116. <div v-else-if="item.status!=0" class="bnt " style="background-color: #878787;">已失效
  117. </div>
  118. <div v-else-if="item.useMinPrice>orderData.totalPrice" class="bnt "
  119. style="background-color: #878787;">未达门槛</div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <view v-if="couponsList.length == 0" class="no-data-box">
  125. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/no_data.png"
  126. mode="aspectFit"></image>
  127. <view class="empty-title">暂无数据</view>
  128. </view>
  129. </view>
  130. </popupBottom>
  131. </view>
  132. </template>
  133. <script>
  134. import {
  135. createliveOrder, // 创建订单
  136. createReward, // 创建中奖订单
  137. userAddr, // 获取用户收货地址
  138. computed,
  139. computedReward,
  140. liveOrderKey, // 生成订单key
  141. } from "@/api/order.js"
  142. import {
  143. curCoupon
  144. } from "@/api/living.js"
  145. import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
  146. export default {
  147. components: {
  148. popupBottom
  149. },
  150. data() {
  151. return {
  152. orderData: {
  153. totalPrice: null,
  154. remark: ''
  155. },
  156. cityId: null,
  157. address: null,
  158. addressId: null,
  159. totalNum: null,
  160. orderKey: null,
  161. goodsId: null,
  162. liveId: null,
  163. submittingOrder: false, // 防止重复提交订单
  164. orderList: [],
  165. temps: [],
  166. couponUserId: null,
  167. couponText: "请选择",
  168. couponsList: [],
  169. couponVisible: false,
  170. carts: [],
  171. checked: false,
  172. cartIds: null,
  173. confirmParam: [],
  174. type: '',
  175. isFirstLoad: true,
  176. recordId: '',
  177. productValueSelect: ''
  178. }
  179. },
  180. onLoad(options) {
  181. console.log("确认订单", options)
  182. this.orderKey = options.orderKey || '';
  183. this.liveId = options.liveId || '';
  184. this.goodsId = options.goodsId || '';
  185. this.productId = options.productId || '';
  186. this.totalNum = Number(options.totalNum) || 0;
  187. this.type = options.type;
  188. this.isFirstLoad = true;
  189. this.recordId = options.recordId || '';
  190. this.productValueSelect = options.productValueSelect || ''
  191. if (options.type == 'win') {
  192. this.getKey()
  193. }
  194. },
  195. computed: {
  196. safeOrderData() {
  197. return this.orderData || {
  198. totalPrice: 0,
  199. payPrice: 0,
  200. payDelivery: 0,
  201. remark: ''
  202. };
  203. }
  204. },
  205. onShow() {
  206. // 页面返回时重置提交状态,避免无法再次提交
  207. this.submittingOrder = false;
  208. this.openCoupon()
  209. if (this.type == 'win') {
  210. this.computedRewardOrder()
  211. } else {
  212. this.computedOrder()
  213. }
  214. if (!this.cityId) {
  215. this.getUserAddr()
  216. }
  217. // this.getUserAddr()
  218. uni.$on('updateAddress', (e) => {
  219. this.address = e;
  220. this.addressId = e.addressId;
  221. this.cityId = e.cityId;
  222. console.log("地址", e.cityId)
  223. });
  224. },
  225. mounted() {
  226. // uni.$on('updateAddress', (e) => {
  227. // this.address = e;
  228. // this.addressId = e.addressId;
  229. // });
  230. },
  231. onUnload() {
  232. uni.$off('updateAddress', this.handleAddressUpdate);
  233. },
  234. beforeDestroy() {
  235. uni.$off('updateAddress');
  236. },
  237. methods: {
  238. handleAddressUpdate(item) {
  239. console.log('接收到地址数据:', item);
  240. this.cityId = item.cityId;
  241. this.address = item;
  242. this.addressId = item.addressId;
  243. if (this.type == 'win') {
  244. this.computedRewardOrder()
  245. } else {
  246. this.computedOrder()
  247. }
  248. },
  249. // 获取用户收货地址
  250. getUserAddr() {
  251. userAddr().then(res => {
  252. if (res.code == 200) {
  253. console.log("用户收货地址>>>>", res.data)
  254. if (res.data && !this.address) {
  255. this.address = res.data;
  256. }
  257. if (res.data && res.data.cityIds) {
  258. this.cityId = res.data.cityIds;
  259. }
  260. if (this.type == 'win') {
  261. this.computedRewardOrder()
  262. } else {
  263. this.computedOrder()
  264. }
  265. } else {
  266. uni.showToast({
  267. title: res.msg,
  268. icon: 'none'
  269. });
  270. }
  271. },
  272. rej => {}
  273. );
  274. },
  275. // 获得key
  276. getKey() {
  277. liveOrderKey().then(res => {
  278. if (res.code == 200) {
  279. this.orderKey = res.orderKey
  280. } else {
  281. uni.showToast({
  282. title: res.msg,
  283. icon: 'none'
  284. });
  285. }
  286. },
  287. rej => {}
  288. );
  289. },
  290. // 查询创建订单信息
  291. computedOrder() {
  292. let data = {
  293. cityId: this.cityId || '',
  294. totalNum: this.totalNum,
  295. productId: this.productId,
  296. orderKey: this.orderKey,
  297. couponUserId: this.couponUserId || '',
  298. attrValueId: this.productValueSelect
  299. }
  300. computed(data).then(res => {
  301. if (res.code == 200) {
  302. console.log("查询创建订单信息>>>>", res.data)
  303. this.orderData = res.data
  304. } else {
  305. uni.showToast({
  306. title: res.msg,
  307. icon: 'none'
  308. });
  309. }
  310. },
  311. rej => {}
  312. );
  313. },
  314. // 查询中奖创建订单信息
  315. computedRewardOrder() {
  316. let data = {
  317. cityId: this.cityId || '',
  318. productId: this.productId,
  319. orderKey: this.orderKey,
  320. totalNum: 1,
  321. remark: this.orderData.remark || ''
  322. }
  323. computedReward(data).then(res => {
  324. if (res.code == 200) {
  325. console.log("查询创建订单信息>>>>", res.data)
  326. this.orderData = res.data || {}
  327. } else {
  328. uni.showToast({
  329. title: res.msg,
  330. icon: 'none'
  331. });
  332. }
  333. },
  334. rej => {}
  335. );
  336. },
  337. // 创建订单
  338. createLiveOrder() {
  339. let data = {
  340. cityId: this.cityId,
  341. liveId: this.liveId,
  342. orderKey: this.orderKey,
  343. userName: this.address.realName,
  344. remark: (this.orderData && this.orderData.remark) || '', // 安全访问
  345. userPhone: this.address.phone,
  346. userAddress: this.address.province + ' ' + this.address.city + ' ' + this.address.district + ' ' +
  347. this.address.detail,
  348. cartId: "5",
  349. productId: this.productId,
  350. totalNum: this.totalNum,
  351. couponUserId: this.couponUserId,
  352. attrValueId: this.productValueSelect,
  353. appId: wx.getAccountInfoSync().miniProgram.appId
  354. }
  355. return createliveOrder(data).then(res => {
  356. if (res.code == 200) {
  357. this.orderList = res.order;
  358. return res.order;
  359. } else {
  360. uni.showToast({
  361. title: res.msg,
  362. icon: 'none'
  363. });
  364. throw new Error(res.msg);
  365. }
  366. });
  367. },
  368. // 创建抽奖订单
  369. createRewardOrder() {
  370. let data = {
  371. cityId: this.cityId,
  372. liveId: this.liveId,
  373. orderKey: this.orderKey,
  374. userName: this.address.realName,
  375. userPhone: this.address.phone,
  376. userAddress: this.address.province + ' ' + this.address.city + ' ' + this.address.district + ' ' +
  377. this.address.detail,
  378. cartId: "5",
  379. remark: this.orderData.remark || '',
  380. productId: this.productId,
  381. totalNum: 1,
  382. couponUserId: this.couponUserId,
  383. recordId: this.recordId,
  384. appId: wx.getAccountInfoSync().miniProgram.appId
  385. }
  386. return createReward(data).then(res => {
  387. if (res.code == 200) {
  388. this.orderList = res.order || {};
  389. return res.order || {};
  390. } else {
  391. uni.showToast({
  392. title: res.msg,
  393. icon: 'none'
  394. });
  395. throw new Error(res.msg);
  396. }
  397. });
  398. },
  399. couponSelect(item) {
  400. this.couponText = "-¥" + (item.couponPrice || 0).toFixed(2);
  401. this.couponUserId = item.id;
  402. this.couponVisible = false;
  403. if (this.type == 'win') {
  404. this.computedRewardOrder()
  405. } else {
  406. this.computedOrder()
  407. }
  408. },
  409. // 自动选择最大优惠券
  410. autoSelectMaxCoupon() {
  411. if (this.couponsList.length === 0 || !this.isFirstLoad) {
  412. return;
  413. }
  414. const availableCoupons = this.couponsList.filter(item =>
  415. item.status === 0 && item.useMinPrice <= (this.orderData.totalPrice || 0)
  416. );
  417. if (availableCoupons.length === 0) {
  418. return;
  419. }
  420. availableCoupons.sort((a, b) => b.couponPrice - a.couponPrice);
  421. const maxCoupon = availableCoupons[0];
  422. this.couponText = "-¥" + (maxCoupon.couponPrice || 0).toFixed(2);
  423. this.couponUserId = maxCoupon.id;
  424. console.log('自动选择最大优惠券:', maxCoupon);
  425. this.isFirstLoad = false;
  426. // 重新计算订单价格
  427. if (this.type == 'win') {
  428. this.computedRewardOrder()
  429. } else {
  430. this.computedOrder()
  431. }
  432. },
  433. openCoupon() {
  434. console.log("点了优惠券列表")
  435. if (!this.liveId || !this.goodsId) {
  436. console.log('缺少必要参数,跳过优惠券请求');
  437. return;
  438. }
  439. const data = {
  440. liveId: this.liveId,
  441. goodsId: this.goodsId
  442. };
  443. curCoupon(data).then(res => {
  444. this.couponsList = res.data || [];
  445. if (this.isFirstLoad) {
  446. setTimeout(() => {
  447. this.autoSelectMaxCoupon();
  448. }, 100);
  449. }
  450. })
  451. },
  452. openAddress() {
  453. uni.navigateTo({
  454. url: '/pages_user/user/address'
  455. })
  456. },
  457. // 提交订单
  458. async submitOrder() {
  459. // 防重复提交 - 必须在函数最开始检查并设置
  460. if (this.submittingOrder) {
  461. uni.showToast({
  462. icon: 'none',
  463. title: '订单提交中,请勿重复点击',
  464. });
  465. return;
  466. }
  467. // 立即标记提交中,防止快速重复点击
  468. this.submittingOrder = true;
  469. try {
  470. // 参数校验
  471. if (this.orderKey == null) {
  472. this.submittingOrder = false; // 校验失败,重置状态
  473. uni.showToast({
  474. icon: 'none',
  475. title: '订单KEY不存在',
  476. });
  477. return;
  478. }
  479. if (this.address == null) {
  480. this.submittingOrder = false; // 校验失败,重置状态
  481. uni.showToast({
  482. icon: 'none',
  483. title: '收货地址不能为空',
  484. });
  485. return;
  486. }
  487. // 创建订单
  488. let orderList;
  489. if (this.type == "win") {
  490. orderList = await this.createRewardOrder(); // 中奖订单
  491. } else {
  492. orderList = await this.createLiveOrder(); // 购买订单
  493. }
  494. console.log("orderList>>", orderList)
  495. const orderListStr = encodeURIComponent(JSON.stringify(orderList));
  496. // 跳转到支付页面
  497. uni.redirectTo({
  498. url: `/pages_shopping/live/paymentOrder?orderList=${orderListStr}&couponUserId=${this.couponUserId}&type=${this.type}&liveId=${this.liveId}`,
  499. success: () => {
  500. // 跳转成功,不重置状态(页面会跳转走)
  501. // 如果跳转失败,会在 fail 回调中重置
  502. },
  503. fail: (err) => {
  504. // 跳转失败,重置状态允许重试
  505. this.submittingOrder = false;
  506. console.error('跳转支付页失败:', err);
  507. uni.showToast({
  508. icon: 'none',
  509. title: '跳转失败,请重试',
  510. });
  511. }
  512. });
  513. } catch (error) {
  514. // 异常情况,重置状态允许重试
  515. this.submittingOrder = false;
  516. console.error('提交订单错误:', error);
  517. uni.showToast({
  518. title: error.message || '提交订单失败',
  519. icon: 'none'
  520. });
  521. }
  522. // 注意:成功跳转后不重置状态,因为页面会跳转走
  523. },
  524. }
  525. }
  526. </script>
  527. <style lang="scss">
  528. .inner-box {
  529. padding: 20rpx 20rpx 140rpx;
  530. .address-box {
  531. margin-bottom: 20rpx;
  532. box-sizing: border-box;
  533. min-height: 171rpx;
  534. background: #FFFFFF;
  535. border-radius: 16rpx;
  536. background-repeat: no-repeat;
  537. background-size: 100% 30rpx;
  538. background-position: left bottom;
  539. padding: 38rpx 30rpx 36rpx;
  540. display: flex;
  541. align-items: center;
  542. justify-content: space-between;
  543. .left {
  544. width: 92%;
  545. .name-box {
  546. display: flex;
  547. align-items: center;
  548. .text {
  549. font-size: 32rpx;
  550. font-family: PingFang SC;
  551. font-weight: bold;
  552. color: #111111;
  553. line-height: 1;
  554. &.name {
  555. margin-right: 30rpx;
  556. }
  557. }
  558. }
  559. .address {
  560. font-size: 28rpx;
  561. font-family: PingFang SC;
  562. font-weight: 500;
  563. color: #666666;
  564. line-height: 42rpx;
  565. text-align: left;
  566. margin-top: 23rpx;
  567. }
  568. }
  569. .arrow-box {
  570. width: 12rpx;
  571. height: 23rpx;
  572. display: flex;
  573. align-items: cenetr;
  574. justify-content: cenetr;
  575. image {
  576. width: 100%;
  577. height: 100%;
  578. }
  579. }
  580. }
  581. .price-info {
  582. background: #FFFFFF;
  583. border-radius: 16rpx;
  584. &-title {
  585. padding: 30rpx 30rpx 20rpx 30rpx;
  586. font-family: PingFang SC, PingFang SC;
  587. font-weight: 500;
  588. font-size: 30rpx;
  589. color: #111;
  590. }
  591. &-unit {
  592. font-size: 24rpx;
  593. }
  594. &-num {
  595. font-size: 28rpx;
  596. }
  597. }
  598. .remarks {
  599. height: 88upx;
  600. padding: 0 30upx;
  601. background: #FFFFFF;
  602. border-radius: 16upx;
  603. margin-top: 20upx;
  604. display: flex;
  605. align-items: center;
  606. input {
  607. width: 100%;
  608. font-size: 28upx;
  609. font-family: PingFang SC;
  610. font-weight: 500;
  611. color: #000000;
  612. }
  613. .input {
  614. font-size: 28upx;
  615. font-family: PingFang SC;
  616. font-weight: 500;
  617. color: #999999;
  618. }
  619. }
  620. .points {
  621. height: 88rpx;
  622. padding: 0 30rpx;
  623. background: #FFFFFF;
  624. border-radius: 16rpx;
  625. display: flex;
  626. align-items: center;
  627. justify-content: space-between;
  628. .left {
  629. display: flex;
  630. align-items: center;
  631. image {
  632. width: 28rpx;
  633. height: 28rpx;
  634. margin-right: 20rpx;
  635. }
  636. .text {
  637. font-size: 28rpx;
  638. font-family: PingFang SC;
  639. font-weight: 500;
  640. color: #666666;
  641. }
  642. }
  643. .right {
  644. display: flex;
  645. align-items: center;
  646. .text {
  647. font-size: 28rpx;
  648. font-family: PingFang SC;
  649. font-weight: 500;
  650. color: #111111;
  651. }
  652. image {
  653. margin-left: 15rpx;
  654. width: 14rpx;
  655. height: 24rpx;
  656. }
  657. }
  658. }
  659. }
  660. .btn-foot {
  661. box-sizing: border-box;
  662. width: 100%;
  663. height: 121rpx;
  664. background: #FFFFFF;
  665. padding: 16rpx 30rpx 16rpx 60rpx;
  666. display: flex;
  667. align-items: center;
  668. justify-content: flex-end;
  669. position: fixed;
  670. left: 0;
  671. bottom: 0;
  672. z-index: 99;
  673. .right {
  674. display: flex;
  675. align-items: center;
  676. .total {
  677. display: flex;
  678. align-items: flex-end;
  679. margin-right: 36rpx;
  680. .label {
  681. font-size: 26rpx;
  682. font-family: PingFang SC;
  683. font-weight: 500;
  684. color: #999999;
  685. line-height: 1.5;
  686. }
  687. .price {
  688. display: flex;
  689. align-items: flex-end;
  690. .unit {
  691. font-size: 32rpx;
  692. font-family: PingFang SC;
  693. font-weight: bold;
  694. color: #FF6633;
  695. line-height: 1.2;
  696. margin-right: 10rpx;
  697. }
  698. .num {
  699. font-size: 50rpx;
  700. font-family: PingFang SC;
  701. font-weight: bold;
  702. color: #FF6633;
  703. line-height: 1;
  704. }
  705. }
  706. }
  707. .btn {
  708. width: 200rpx;
  709. height: 88rpx;
  710. line-height: 88rpx;
  711. text-align: center;
  712. font-size: 30rpx;
  713. font-family: PingFang SC;
  714. font-weight: bold;
  715. color: #FFFFFF;
  716. background: #2BC7B9;
  717. border-radius: 44rpx;
  718. }
  719. }
  720. }
  721. .coupon {
  722. height: 100%;
  723. }
  724. /*优惠券列表公共*/
  725. .coupon-list {}
  726. .coupon-list .item {
  727. display: flex;
  728. flex-direction: column;
  729. justify-content: center;
  730. align-items: center;
  731. width: 100%;
  732. height: 1.7 * 100rpx;
  733. margin-bottom: 0.16 * 100rpx;
  734. }
  735. .coupon-list .item .money {
  736. background-size: 100% 100%;
  737. width: 2.4 * 100rpx;
  738. height: 100%;
  739. color: #fff;
  740. font-size: 0.36 * 100rpx;
  741. font-weight: bold;
  742. text-align: center;
  743. display: flex;
  744. flex-direction: column;
  745. align-items: center;
  746. justify-content: center;
  747. position: relative;
  748. }
  749. .coupon-list .item .money .img {
  750. position: absolute;
  751. width: 2.4 * 100rpx;
  752. height: 100%;
  753. color: #fff;
  754. }
  755. .coupon-list .item .money .num {
  756. font-size: 0.6 * 100rpx;
  757. }
  758. .coupon-list .item .money .pic-num {
  759. font-size: 20rpx;
  760. z-index: 99;
  761. }
  762. .coupon-list .item .text {
  763. width: 4.5 * 100rpx;
  764. padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
  765. background-color: #fff;
  766. box-sizing: border-box;
  767. }
  768. .coupon-list .item .text .condition {
  769. font-size: 0.3 * 100rpx;
  770. color: #282828;
  771. height: 0.93 * 100rpx;
  772. line-height: 0.93 * 100rpx;
  773. border-bottom: 1px solid #f0f0f0;
  774. }
  775. .coupon-list .item .text .data {
  776. font-size: 0.2 * 100rpx;
  777. color: #999;
  778. height: 0.76 * 100rpx;
  779. }
  780. .coupon-list .item .text .data .bnt {
  781. width: 1.36 * 100rpx;
  782. height: 0.44 * 100rpx;
  783. border-radius: 0.22 * 100rpx;
  784. font-size: 0.22 * 100rpx;
  785. color: #fff;
  786. text-align: center;
  787. line-height: 0.44 * 100rpx;
  788. background-color: red;
  789. }
  790. </style>