confirmCreateOrder.vue 21 KB

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