orderPay.vue 19 KB

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