orderPay.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. <template>
  2. <view class="container">
  3. <view class="address-info-box" @click="selectAddress()">
  4. <view class="address-icon">
  5. <text class="iconfont icondizhi"></text>
  6. </view>
  7. <view class="address-content">
  8. <text class="address-info">
  9. <text class="address-name">{{addressData.username}}</text>
  10. <text class="address-phone">{{addressData.phone}}</text>
  11. </text>
  12. <view class="address-detail">{{addressData.address}}</view>
  13. </view>
  14. <view class="address-link">
  15. <text class="iconfont iconfangxiang"></text>
  16. </view>
  17. </view>
  18. <view class="goods-info-box">
  19. <view class="shop-info">
  20. <text class="iconfont icondianpu"></text>
  21. <text class="shop-name">{{orderData.supplierName}}</text>
  22. <text class="iconfont iconfangxiang"></text>
  23. </view>
  24. <view class="goods-list">
  25. <view class="goods-row" v-for="(item, index) in orderData.goodsList" :key="index">
  26. <image class="goods-img" mode="aspectFill" :src="item.imgUrl"></image>
  27. <view class="goods-info">
  28. <view class="goods-name">{{item.productName}}</view>
  29. <view class="goods-type">
  30. 类型:{{item.productType == 1 ? '普通商品' : (item.productType == 2 ? '拍卖商品' : (item.productType == 3 ? '自助采摘' : '共享种植'))}}
  31. </view>
  32. <view class="plant-area" v-if="orderType == 3">面积:{{orderData.areaSize}}㎡</view>
  33. <view class="goods-price-number">
  34. <text class="goods-unit">¥</text>
  35. <text class="goods-price">{{(orderType == 1 || orderType == 3) ? item.bizPrice : paySum}}</text>
  36. <text class="goods-number">x{{item.buyNum}}</text>
  37. <text class="plant-text" v-if="orderType == 3">有效期:{{orderData.term}}天</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="order-info">
  43. <u-cell-group :border="false">
  44. <u-cell-item title="商品金额" :arrow="false" :border-bottom="false" title-width="170" :title-style="{textAlign: 'right'}">
  45. <text class="order-text-right">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsInitialPrice() : paySum}}</text>
  46. </u-cell-item>
  47. <u-cell-item title="积分抵扣" :arrow="false" :border-bottom="false" title-width="170" :title-style="{textAlign: 'right'}"
  48. v-if="orderType == 1">
  49. <view>
  50. <text class="order-text-left">-{{getIntegral()+'积分'}}</text>
  51. <text class="order-text-right">-¥{{(getIntegral()/100).toFixed(2)}}</text>
  52. </view>
  53. </u-cell-item>
  54. <u-cell-item title="优惠券" :border-bottom="false" title-width="170" :title-style="{textAlign: 'right'}" @click="showCoupon()"
  55. v-if="orderType == 1">
  56. <view>
  57. <text class="order-text-left">{{coupon.couponName}}</text>
  58. <text class="order-text-right">{{couponList.length ? ('-¥'+coupon.discountAmount) : '无可用优惠券'}}</text>
  59. </view>
  60. </u-cell-item>
  61. <u-field label="备注" v-model="notes" placeholder="请输入备注" :border-bottom="false" label-align="right" label-width="170"
  62. :field-style="{marginLeft: '16px'}"></u-field>
  63. </u-cell-group>
  64. </view>
  65. <view class="pay-info">
  66. <text class="pay-text">共{{getAllGoodsNumber()}}件</text>
  67. <text class="pay-text">总计</text>
  68. <text class="pay-price">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsPrice() : paySum}}</text>
  69. </view>
  70. </view>
  71. <view class="handle-box">
  72. <view class="handle-info">
  73. <text class="handle-text" style="margin-right: 12px;">共{{getAllGoodsNumber()}}件</text>
  74. <text class="handle-text">合计:</text>
  75. <text class="handle-price">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsPrice() : paySum}}</text>
  76. </view>
  77. <view class="handle-button" @click="submitOrder()">提交订单</view>
  78. </view>
  79. <uni-popup ref="popup" type="bottom">
  80. <view class="coupon-box">
  81. <view class="coupon-row" v-for="(item, index) in couponList" :key="index" @click="selectCoupon(item)">
  82. <view class="coupon-left">
  83. <view class="coupon-left-price"><text style="font-size: 16px;">¥</text>{{item.discountAmount}}</view>
  84. <view class="coupon-left-text">满减金额</view>
  85. </view>
  86. <view class="coupon-info">
  87. <view class="coupon-text1">{{item.couponName}}</view>
  88. <view class="coupon-text1" style="margin-bottom: 4px;">满{{item.fullAmount}}减{{item.discountAmount}}</view>
  89. <view class="coupon-text2">{{item.couponType == 1 ? '仅限用于' + item.supplierName + '的店铺' : ''}}</view>
  90. <view class="coupon-text2" style="color: #999999;">有效期:{{item.publishStartTime}}~{{item.useEndTime}}</view>
  91. </view>
  92. </view>
  93. </view>
  94. </uni-popup>
  95. <u-top-tips ref="uTips"></u-top-tips>
  96. </view>
  97. </template>
  98. <script>
  99. const NET = require('@/utils/request')
  100. const API = require('@/config/api')
  101. export default {
  102. data() {
  103. return {
  104. flag: 1,
  105. orderType: 1,
  106. addressData: {
  107. memberAddressId: '',
  108. username: '',
  109. phone: '',
  110. province: '',
  111. city: '',
  112. area: '',
  113. address: '',
  114. },
  115. userData: {},
  116. orderData: {
  117. tenantCode: '',
  118. supplierName: '',
  119. areaSize: '',
  120. term: '',
  121. goodsList: []
  122. },
  123. integral: 0,
  124. coupon: {
  125. couponId: '',
  126. couponName: '',
  127. discountAmount: 0,
  128. couponType: '',
  129. },
  130. couponList: [],
  131. notes: '',
  132. paySum: 0,
  133. mineIntegral: {},
  134. orderId: '',
  135. goodType: false,
  136. }
  137. },
  138. onLoad(options) {
  139. this.orderType = options.orderType
  140. this.paySum = options.paySum ? options.paySum : 0
  141. this.flag = options.flag
  142. this.userData = uni.getStorageSync("userData")
  143. this.orderData = uni.getStorageSync("orderData")
  144. if (!uni.getStorageSync("defaultAddress")) {
  145. NET.request(API.getAddressList, {}, 'POST').then(res => {
  146. if (res.data.find(site => site.isDefault == 1)) {
  147. let address = res.data.find(site => site.isDefault == 1)
  148. this.addressData = {
  149. memberAddressId: address.id,
  150. username: address.username,
  151. phone: address.phone,
  152. province: address.province,
  153. city: address.city,
  154. area: address.area,
  155. address: address.address
  156. }
  157. }
  158. }).catch(error => {
  159. this.$refs.uTips.show({
  160. title: '获取默认地址失败',
  161. type: 'warning',
  162. })
  163. })
  164. }
  165. if (this.orderType == 1) {
  166. NET.request(API.getIntegral, {}, 'POST').then(res => {
  167. this.integral = res.data.usableIntegral
  168. }).catch(error => {
  169. this.$refs.uTips.show({
  170. title: '获取个人积分失败',
  171. type: 'warning',
  172. })
  173. })
  174. NET.request(API.getUsableCouponList, {
  175. tenantCode: this.orderData.tenantCode,
  176. totalPrice: this.getAllGoodsInitialPrice(),
  177. }, 'GET').then(res => {
  178. this.couponList = res.data
  179. }).catch(error => {
  180. this.$refs.uTips.show({
  181. title: res.msg,
  182. type: 'warning',
  183. })
  184. })
  185. }
  186. },
  187. onReady() {
  188. this.goodType = (this.orderData.goodsList.filter(site => site.productType == 3).length > 0) ? 3 : ''
  189. },
  190. onShow() {
  191. if (uni.getStorageSync("defaultAddress")) {
  192. this.addressData = uni.getStorageSync("defaultAddress")
  193. }
  194. },
  195. methods: {
  196. // 获取全部商品原价格
  197. getAllGoodsInitialPrice() {
  198. let price = this.orderData.goodsList.reduce((total, site) => {
  199. return total + site.bizPrice * site.buyNum
  200. }, 0)
  201. return price.toFixed(2)
  202. },
  203. // 获取全部价格
  204. getAllGoodsPrice() {
  205. let price = this.orderData.goodsList.reduce((total, site) => {
  206. return total + site.bizPrice * site.buyNum
  207. }, 0)
  208. return (price - this.coupon.discountAmount - (this.getIntegral() / 100)).toFixed(2)
  209. },
  210. // 获取全部商品数量
  211. getAllGoodsNumber() {
  212. let number = this.orderData.goodsList.reduce((total, site) => {
  213. return total + site.buyNum
  214. }, 0)
  215. return number
  216. },
  217. // 选择地址
  218. selectAddress() {
  219. uni.navigateTo({
  220. url: '/pagesMain/addressList?type=2'
  221. });
  222. },
  223. // 获取积分
  224. getIntegral() {
  225. let price = this.orderData.goodsList.reduce((total, site) => {
  226. return total + site.bizPrice * site.buyNum
  227. }, 0) - this.coupon.discountAmount
  228. if (this.integral / 100 > price) {
  229. return price * 100
  230. } else {
  231. return this.integral
  232. }
  233. },
  234. // 显示优惠券弹窗
  235. showCoupon() {
  236. if (!this.couponList.length) {
  237. return
  238. }
  239. this.$refs.popup.open()
  240. },
  241. // 选择优惠券
  242. selectCoupon(item) {
  243. this.coupon = {
  244. couponId: item.couponId,
  245. couponName: item.couponName,
  246. discountAmount: parseFloat(item.discountAmount).toFixed(2),
  247. couponType: item.couponType,
  248. }
  249. this.$refs.popup.close()
  250. },
  251. // 提交订单
  252. submitOrder() {
  253. if (!this.addressData.username) {
  254. this.$refs.uTips.show({
  255. title: '请选择地址',
  256. type: 'warning',
  257. })
  258. } else {
  259. let paySum = (this.orderType == 1 || this.orderType == 3) ? this.getAllGoodsPrice() : this.paySum
  260. NET.request(API.submitOrder, {
  261. // 会员
  262. mid: this.userData.userId,
  263. nickname: this.userData.userName,
  264. // 地址
  265. ...this.addressData,
  266. // 商铺
  267. supplierName: this.orderData.supplierName,
  268. tenantCode: this.orderData.tenantCode,
  269. // 商品
  270. productIds: this.orderData.goodsList.map(site => {
  271. return site.productId
  272. }).join(','),
  273. productType: this.orderData.goodsList.map(site => {
  274. return site.productType
  275. }).join(','),
  276. products: this.orderData.goodsList.map(site => {
  277. return {
  278. ...site,
  279. supplierName: this.orderData.supplierName,
  280. tenantCode: this.orderData.tenantCode,
  281. bizPrice: (this.orderType == 1 || this.orderType == 3) ? site.bizPrice : this.paySum,
  282. }
  283. }),
  284. // 优惠券
  285. couponId: this.orderType == 1 ? this.coupon.couponId : '',
  286. // 优惠券优惠总额
  287. couponDiscountAmount: this.orderType == 1 ? this.coupon.discountAmount : '',
  288. couponType: this.orderType == 1 ? this.coupon.couponType : '',
  289. // 积分
  290. integralValue: this.orderType == 1 ? this.getIntegral() : 0,
  291. // 积分优惠总额
  292. integralAmount: this.orderType == 1 ? this.getIntegral() / 100 : 0,
  293. // 总优惠金额
  294. discountAmount: this.orderType == 1 ? (parseFloat(this.coupon.discountAmount) + (this.getIntegral() / 100)) : 0, // 订单总金额(优惠前)
  295. orderSum: (this.orderType == 1 || this.orderType == 3) ? this.orderData.goodsList.reduce((total, site) => {
  296. return total + site.bizPrice * site.buyNum
  297. }, 0) : this.paySum,
  298. paySum: (this.orderType == 1 || this.orderType == 3) ? this.getAllGoodsPrice() : this.paySum,
  299. // 支付类型
  300. flag: this.flag,
  301. orderType: this.orderType,
  302. // 备注
  303. notes: this.notes,
  304. }, 'POST').then(res => {
  305. if (res.isSuccess) {
  306. if (res.data) {
  307. this.orderId = res.data.orderId
  308. if (paySum == '0.00') {
  309. this.$refs.uTips.show({
  310. title: '购买成功',
  311. type: 'success',
  312. })
  313. setTimeout(() => {
  314. uni.navigateTo({
  315. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
  316. });
  317. }, 1000)
  318. return;
  319. }
  320. if (this.goodType == 3) {
  321. setTimeout(() => {
  322. uni.redirectTo({
  323. url: '/pagesMain/paySuccess?orderId=' + this.orderId + '&orderStatus=' + 1 + '&goodType=' + this.goodType + '&tenantCode=' + res.data.tenantCode
  324. });
  325. }, 1000)
  326. return;
  327. }
  328. uni.requestPayment({
  329. provider: 'wxpay',
  330. timeStamp: res.data.timeStamp,
  331. nonceStr: res.data.nonceStr,
  332. package: res.data.packageValue,
  333. signType: res.data.signType,
  334. paySign: res.data.paySign,
  335. success: (payRes) => {
  336. console.log('success:' + JSON.stringify(payRes));
  337. uni.redirectTo({
  338. url: '/pagesMain/paySuccess?orderId=' + this.orderId + '&orderStatus=' + 2
  339. });
  340. },
  341. fail: (error) => {
  342. console.log('fail:' + JSON.stringify(error));
  343. this.$refs.uTips.show({
  344. title: '支付未成功',
  345. type: 'warning',
  346. })
  347. setTimeout(() => {
  348. // uni.redirectTo({
  349. // url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
  350. // });
  351. uni.navigateTo({
  352. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
  353. });
  354. }, 1000)
  355. }
  356. })
  357. } else {
  358. uni.redirectTo({
  359. url: '/pagesMain/paySuccess'
  360. });
  361. }
  362. }
  363. }).catch(error => {
  364. console.log('error提交订单失败:', error);
  365. this.$refs.uTips.show({
  366. title: error.data.msg,
  367. type: 'warning',
  368. })
  369. })
  370. }
  371. },
  372. },
  373. }
  374. </script>
  375. <style lang="less" scoped>
  376. page {
  377. width: 100%;
  378. height: 100%;
  379. }
  380. .container {
  381. width: 100%;
  382. // height: 100%; // 100%不行,屏幕长时底下有留白
  383. height: 100vh;
  384. float: left;
  385. background-color: #f7f7f7;
  386. box-sizing: border-box;
  387. padding-bottom: 70px;
  388. overflow-y: auto;
  389. .address-info-box {
  390. width: calc(100% - 32px);
  391. float: left;
  392. box-sizing: border-box;
  393. padding: 16px 18px 16px 16px;
  394. margin: 10px 16px;
  395. background: #FFFFFF;
  396. border-radius: 10px;
  397. .address-icon {
  398. width: 36px;
  399. height: 40px;
  400. float: left;
  401. align-items: center;
  402. display: flex;
  403. .iconfont {
  404. color: #52A63A;
  405. font-size: 36px;
  406. }
  407. }
  408. .address-content {
  409. width: calc(100% - 66px);
  410. height: 40px;
  411. float: left;
  412. margin: 0 8px 0 12px;
  413. .address-info {
  414. height: 20px;
  415. font-family: PingFang SC;
  416. line-height: 20px;
  417. overflow: hidden;
  418. text-overflow: ellipsis;
  419. white-space: nowrap;
  420. .address-name {
  421. font-size: 16px;
  422. color: #333333;
  423. margin-right: 14px;
  424. }
  425. .address-phone {
  426. font-size: 12px;
  427. color: #666666;
  428. }
  429. }
  430. .address-detail {
  431. height: 20px;
  432. font-size: 16px;
  433. font-family: PingFang SC;
  434. color: #333333;
  435. line-height: 20px;
  436. overflow: hidden;
  437. text-overflow: ellipsis;
  438. white-space: nowrap;
  439. }
  440. }
  441. .address-link {
  442. width: 10px;
  443. height: 40px;
  444. float: left;
  445. align-items: center;
  446. display: flex;
  447. .iconfont {
  448. color: #999999;
  449. font-size: 12px;
  450. }
  451. }
  452. }
  453. .goods-info-box {
  454. width: calc(100% - 32px);
  455. float: left;
  456. margin: 0 16px 10px 16px;
  457. background: #FFFFFF;
  458. border-radius: 10px;
  459. .shop-info {
  460. width: 100%;
  461. height: 48px;
  462. float: left;
  463. box-sizing: border-box;
  464. padding: 13px 15px 12px 15px;
  465. border-bottom: 1px solid #EEEEEE;
  466. line-height: 22px;
  467. .icondianpu {
  468. font-size: 22px;
  469. color: #333333;
  470. }
  471. .shop-name {
  472. font-size: 15px;
  473. font-family: PingFang SC;
  474. color: #333333;
  475. margin: 0 8px 0 10px;
  476. }
  477. .iconshangjia {
  478. font-size: 12px;
  479. color: #999999;
  480. }
  481. }
  482. .goods-list {
  483. width: 100%;
  484. float: left;
  485. box-sizing: border-box;
  486. padding: 10px 15px 0 15px;
  487. .goods-row {
  488. width: 100%;
  489. height: 90px;
  490. float: left;
  491. display: flex;
  492. margin-bottom: 10px;
  493. .goods-img {
  494. width: 90px;
  495. height: 90px;
  496. border-radius: 5px;
  497. object-fit: cover;
  498. }
  499. .goods-info {
  500. width: calc(100% - 106px);
  501. height: 90px;
  502. margin-left: 16px;
  503. .goods-name {
  504. width: 100%;
  505. height: 36px;
  506. float: left;
  507. font-size: 14px;
  508. font-family: PingFang SC;
  509. color: #333333;
  510. line-height: 18px;
  511. overflow: hidden;
  512. text-overflow: ellipsis;
  513. display: -webkit-box;
  514. -webkit-line-clamp: 2;
  515. -webkit-box-orient: vertical;
  516. word-wrap: break-word;
  517. }
  518. .goods-type {
  519. height: 20px;
  520. float: left;
  521. background: #F0F0F0;
  522. border-radius: 4px;
  523. padding: 0 8px;
  524. margin: 6px 0;
  525. font-size: 10px;
  526. font-family: PingFang SC;
  527. color: #666666;
  528. line-height: 20px;
  529. }
  530. .plant-area {
  531. height: 20px;
  532. float: right;
  533. margin: 6px 0;
  534. font-size: 12px;
  535. font-family: PingFang SC;
  536. color: #333333;
  537. }
  538. .goods-price-number {
  539. width: 100%;
  540. height: 20px;
  541. float: left;
  542. line-height: 20px;
  543. font-family: PingFang SC;
  544. color: #333333;
  545. .goods-unit {
  546. font-size: 12px;
  547. }
  548. .goods-price {
  549. font-size: 15px;
  550. margin-right: 6px;
  551. }
  552. .goods-number {
  553. font-size: 12px;
  554. }
  555. }
  556. .plant-text {
  557. float: right;
  558. font-size: 12px;
  559. font-family: PingFang SC;
  560. color: #333333;
  561. }
  562. }
  563. }
  564. }
  565. .order-info {
  566. width: 100%;
  567. float: left;
  568. .order-text-left {
  569. font-size: 13px;
  570. font-family: PingFang SC;
  571. color: #666666;
  572. float: left;
  573. margin-left: 16px;
  574. }
  575. .order-text-right {
  576. font-size: 13px;
  577. font-family: PingFang SC;
  578. color: #52A63A;
  579. }
  580. /deep/.u-cell_title {
  581. color: #333333;
  582. }
  583. /deep/.u-label-text {
  584. color: #333333;
  585. }
  586. }
  587. .pay-info {
  588. width: 100%;
  589. height: 46px;
  590. float: left;
  591. box-sizing: border-box;
  592. border-top: 1px solid #EEEEEE;
  593. padding-right: 15px;
  594. line-height: 44px;
  595. font-family: PingFang SC;
  596. font-size: 14px;
  597. text-align: right;
  598. white-space: nowrap;
  599. .pay-text {
  600. color: #333333;
  601. margin-right: 6px;
  602. }
  603. .pay-price {
  604. color: #52A63A;
  605. }
  606. }
  607. }
  608. .handle-box {
  609. width: 100%;
  610. height: 70px;
  611. box-sizing: border-box;
  612. padding: 15px 0 15px 16px;
  613. position: fixed;
  614. bottom: 0;
  615. background: #FFFFFF;
  616. box-shadow: 0px 3px 13px 0px rgba(0, 0, 0, 0.15);
  617. .handle-info {
  618. width: calc(100% - 110px);
  619. height: 40px;
  620. float: left;
  621. line-height: 40px;
  622. font-family: PingFang SC;
  623. text-align: left;
  624. white-space: nowrap;
  625. .handle-text {
  626. font-size: 16px;
  627. color: #666666;
  628. }
  629. .handle-price {
  630. font-size: 15px;
  631. color: #52A63A;
  632. }
  633. }
  634. .handle-button {
  635. width: 100px;
  636. height: 40px;
  637. float: right;
  638. box-sizing: border-box;
  639. padding-left: 10px;
  640. background: #52A63A;
  641. border-radius: 20px 0px 0px 20px;
  642. font-size: 15px;
  643. font-family: PingFang SC;
  644. color: #FFFFFF;
  645. line-height: 40px;
  646. text-align: center;
  647. }
  648. }
  649. .coupon-box {
  650. width: 100vw;
  651. height: 500px;
  652. background-color: #FFFFFF;
  653. border-radius: 15px 15px 0px 0px;
  654. box-sizing: border-box;
  655. padding: 16px 16px 0 16px;
  656. overflow-y: auto;
  657. .coupon-row {
  658. width: 100%;
  659. height: 105px;
  660. float: left;
  661. margin-bottom: 10px;
  662. border-radius: 10px;
  663. background: #FFFFFF;
  664. box-shadow: 0px 0px 10px 0px rgba(103, 103, 103, 0.3);
  665. overflow: hidden;
  666. .coupon-left {
  667. width: 107px;
  668. height: 105px;
  669. box-sizing: border-box;
  670. padding-right: 10px;
  671. float: left;
  672. background-size: 107px 105px;
  673. background-position: center;
  674. background-repeat: no-repeat;
  675. background-image: url(@/static/images/couponHead.png);
  676. .coupon-left-price {
  677. width: 100%;
  678. height: 24px;
  679. float: left;
  680. margin: 28px 0 12px 0;
  681. font-size: 24px;
  682. font-family: PingFang SC;
  683. color: #FFFFFF;
  684. line-height: 24px;
  685. text-align: center;
  686. }
  687. .coupon-left-text {
  688. width: 100%;
  689. height: 20px;
  690. float: left;
  691. color: #FFFFFF;
  692. font-size: 12px;
  693. font-family: PingFang SC;
  694. line-height: 20px;
  695. text-align: center;
  696. }
  697. }
  698. .coupon-info {
  699. width: calc(100% - 115px);
  700. height: 100%;
  701. float: right;
  702. box-sizing: border-box;
  703. padding: 16px 0 12px 0;
  704. .coupon-text1 {
  705. width: 100%;
  706. height: 20px;
  707. float: right;
  708. font-size: 15px;
  709. font-family: PingFang SC;
  710. color: #333333;
  711. line-height: 20px;
  712. white-space: nowrap;
  713. text-overflow: ellipsis;
  714. overflow: hidden;
  715. }
  716. .coupon-text2 {
  717. width: 100%;
  718. height: 18px;
  719. float: right;
  720. font-size: 13px;
  721. font-family: PingFang SC;
  722. color: #EB5F2F;
  723. line-height: 18px;
  724. white-space: nowrap;
  725. text-overflow: ellipsis;
  726. overflow: hidden;
  727. }
  728. }
  729. }
  730. }
  731. }
  732. </style>