orderPay.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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 ? 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 ? 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 ? 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 ? 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.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 ? site.bizPrice : this.paySum,
  278. }
  279. }),
  280. // 优惠券
  281. couponId: this.orderType == 1 ? this.coupon.couponId : '',
  282. couponDiscountAmount: this.orderType == 1 ? this.coupon.discountAmount : '',
  283. couponType: this.orderType == 1 ? this.coupon.couponType : '',
  284. // 积分
  285. integralValue: this.orderType == 1 ? this.getIntegral() : 0,
  286. integralAmount: this.orderType == 1 ? this.getIntegral() / 100 : 0,
  287. // 金额
  288. discountAmount: this.orderType == 1 ? (parseFloat(this.coupon.discountAmount) + (this.getIntegral() / 100)) : 0,
  289. orderSum: this.orderType == 1 ? this.orderData.goodsList.reduce((total, site) => {
  290. return total + site.bizPrice * site.buyNum
  291. }, 0) : this.paySum,
  292. paySum: this.orderType == 1 ? this.getAllGoodsPrice() : this.paySum,
  293. // 支付类型
  294. flag: this.flag,
  295. orderType: this.orderType,
  296. // 备注
  297. notes: this.notes,
  298. }, 'POST').then(res => {
  299. if (res.isSuccess) {
  300. if (res.data) {
  301. this.orderId = res.data.orderId
  302. if (paySum == '0.00') {
  303. this.$refs.uTips.show({
  304. title: '购买成功',
  305. type: 'success',
  306. })
  307. setTimeout(() => {
  308. uni.redirectTo({
  309. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
  310. });
  311. }, 1000)
  312. return;
  313. }
  314. uni.requestPayment({
  315. provider: 'wxpay',
  316. timeStamp: res.data.timeStamp,
  317. nonceStr: res.data.nonceStr,
  318. package: res.data.packageValue,
  319. signType: res.data.signType,
  320. paySign: res.data.paySign,
  321. success: (payRes) => {
  322. console.log('success:' + JSON.stringify(payRes));
  323. uni.redirectTo({
  324. url: '/pagesMain/paySuccess?orderId=' + this.orderId
  325. });
  326. },
  327. fail: (error) => {
  328. console.log('fail:' + JSON.stringify(error));
  329. this.$refs.uTips.show({
  330. title: '支付未成功',
  331. type: 'warning',
  332. })
  333. setTimeout(() => {
  334. uni.redirectTo({
  335. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
  336. });
  337. }, 1000)
  338. }
  339. })
  340. } else {
  341. uni.redirectTo({
  342. url: '/pagesMain/paySuccess'
  343. });
  344. }
  345. }
  346. }).catch(error => {
  347. console.log('error提交订单失败:', error);
  348. this.$refs.uTips.show({
  349. title: error.data.msg,
  350. type: 'warning',
  351. })
  352. })
  353. }
  354. },
  355. },
  356. }
  357. </script>
  358. <style lang="less" scoped>
  359. page {
  360. width: 100%;
  361. height: 100%;
  362. }
  363. .container {
  364. width: 100%;
  365. // height: 100%; // 100%不行,屏幕长时底下有留白
  366. height: 100vh;
  367. float: left;
  368. background-color: #f7f7f7;
  369. box-sizing: border-box;
  370. padding-bottom: 70px;
  371. overflow-y: auto;
  372. .address-info-box {
  373. width: calc(100% - 32px);
  374. float: left;
  375. box-sizing: border-box;
  376. padding: 16px 18px 16px 16px;
  377. margin: 10px 16px;
  378. background: #FFFFFF;
  379. border-radius: 10px;
  380. .address-icon {
  381. width: 36px;
  382. height: 40px;
  383. float: left;
  384. align-items: center;
  385. display: flex;
  386. .iconfont {
  387. color: #52A63A;
  388. font-size: 36px;
  389. }
  390. }
  391. .address-content {
  392. width: calc(100% - 66px);
  393. height: 40px;
  394. float: left;
  395. margin: 0 8px 0 12px;
  396. .address-info {
  397. height: 20px;
  398. font-family: PingFang SC;
  399. line-height: 20px;
  400. overflow: hidden;
  401. text-overflow: ellipsis;
  402. white-space: nowrap;
  403. .address-name {
  404. font-size: 16px;
  405. color: #333333;
  406. margin-right: 14px;
  407. }
  408. .address-phone {
  409. font-size: 12px;
  410. color: #666666;
  411. }
  412. }
  413. .address-detail {
  414. height: 20px;
  415. font-size: 16px;
  416. font-family: PingFang SC;
  417. color: #333333;
  418. line-height: 20px;
  419. overflow: hidden;
  420. text-overflow: ellipsis;
  421. white-space: nowrap;
  422. }
  423. }
  424. .address-link {
  425. width: 10px;
  426. height: 40px;
  427. float: left;
  428. align-items: center;
  429. display: flex;
  430. .iconfont {
  431. color: #999999;
  432. font-size: 12px;
  433. }
  434. }
  435. }
  436. .goods-info-box {
  437. width: calc(100% - 32px);
  438. float: left;
  439. margin: 0 16px 10px 16px;
  440. background: #FFFFFF;
  441. border-radius: 10px;
  442. .shop-info {
  443. width: 100%;
  444. height: 48px;
  445. float: left;
  446. box-sizing: border-box;
  447. padding: 13px 15px 12px 15px;
  448. border-bottom: 1px solid #EEEEEE;
  449. line-height: 22px;
  450. .icondianpu {
  451. font-size: 22px;
  452. color: #333333;
  453. }
  454. .shop-name {
  455. font-size: 15px;
  456. font-family: PingFang SC;
  457. color: #333333;
  458. margin: 0 8px 0 10px;
  459. }
  460. .iconshangjia {
  461. font-size: 12px;
  462. color: #999999;
  463. }
  464. }
  465. .goods-list {
  466. width: 100%;
  467. float: left;
  468. box-sizing: border-box;
  469. padding: 10px 15px 0 15px;
  470. .goods-row {
  471. width: 100%;
  472. height: 90px;
  473. float: left;
  474. display: flex;
  475. margin-bottom: 10px;
  476. .goods-img {
  477. width: 90px;
  478. height: 90px;
  479. border-radius: 5px;
  480. object-fit: cover;
  481. }
  482. .goods-info {
  483. width: calc(100% - 106px);
  484. height: 90px;
  485. margin-left: 16px;
  486. .goods-name {
  487. width: 100%;
  488. height: 36px;
  489. float: left;
  490. font-size: 14px;
  491. font-family: PingFang SC;
  492. color: #333333;
  493. line-height: 18px;
  494. overflow: hidden;
  495. text-overflow: ellipsis;
  496. display: -webkit-box;
  497. -webkit-line-clamp: 2;
  498. -webkit-box-orient: vertical;
  499. word-wrap: break-word;
  500. }
  501. .goods-type {
  502. height: 20px;
  503. float: left;
  504. background: #F0F0F0;
  505. border-radius: 4px;
  506. padding: 0 8px;
  507. margin: 6px 0;
  508. font-size: 10px;
  509. font-family: PingFang SC;
  510. color: #666666;
  511. line-height: 20px;
  512. }
  513. .plant-area {
  514. height: 20px;
  515. float: right;
  516. margin: 6px 0;
  517. font-size: 12px;
  518. font-family: PingFang SC;
  519. color: #333333;
  520. }
  521. .goods-price-number {
  522. width: 100%;
  523. height: 20px;
  524. float: left;
  525. line-height: 20px;
  526. font-family: PingFang SC;
  527. color: #333333;
  528. .goods-unit {
  529. font-size: 12px;
  530. }
  531. .goods-price {
  532. font-size: 15px;
  533. margin-right: 6px;
  534. }
  535. .goods-number {
  536. font-size: 12px;
  537. }
  538. }
  539. .plant-text {
  540. float: right;
  541. font-size: 12px;
  542. font-family: PingFang SC;
  543. color: #333333;
  544. }
  545. }
  546. }
  547. }
  548. .order-info {
  549. width: 100%;
  550. float: left;
  551. .order-text-left {
  552. font-size: 13px;
  553. font-family: PingFang SC;
  554. color: #666666;
  555. float: left;
  556. margin-left: 16px;
  557. }
  558. .order-text-right {
  559. font-size: 13px;
  560. font-family: PingFang SC;
  561. color: #52A63A;
  562. }
  563. /deep/.u-cell_title {
  564. color: #333333;
  565. }
  566. /deep/.u-label-text {
  567. color: #333333;
  568. }
  569. }
  570. .pay-info {
  571. width: 100%;
  572. height: 46px;
  573. float: left;
  574. box-sizing: border-box;
  575. border-top: 1px solid #EEEEEE;
  576. padding-right: 15px;
  577. line-height: 44px;
  578. font-family: PingFang SC;
  579. font-size: 14px;
  580. text-align: right;
  581. white-space: nowrap;
  582. .pay-text {
  583. color: #333333;
  584. margin-right: 6px;
  585. }
  586. .pay-price {
  587. color: #52A63A;
  588. }
  589. }
  590. }
  591. .handle-box {
  592. width: 100%;
  593. height: 70px;
  594. box-sizing: border-box;
  595. padding: 15px 0 15px 16px;
  596. position: fixed;
  597. bottom: 0;
  598. background: #FFFFFF;
  599. box-shadow: 0px 3px 13px 0px rgba(0, 0, 0, 0.15);
  600. .handle-info {
  601. width: calc(100% - 110px);
  602. height: 40px;
  603. float: left;
  604. line-height: 40px;
  605. font-family: PingFang SC;
  606. text-align: left;
  607. white-space: nowrap;
  608. .handle-text {
  609. font-size: 16px;
  610. color: #666666;
  611. }
  612. .handle-price {
  613. font-size: 15px;
  614. color: #52A63A;
  615. }
  616. }
  617. .handle-button {
  618. width: 100px;
  619. height: 40px;
  620. float: right;
  621. box-sizing: border-box;
  622. padding-left: 10px;
  623. background: #52A63A;
  624. border-radius: 20px 0px 0px 20px;
  625. font-size: 15px;
  626. font-family: PingFang SC;
  627. color: #FFFFFF;
  628. line-height: 40px;
  629. text-align: center;
  630. }
  631. }
  632. .coupon-box {
  633. width: 100vw;
  634. height: 500px;
  635. background-color: #FFFFFF;
  636. border-radius: 15px 15px 0px 0px;
  637. box-sizing: border-box;
  638. padding: 16px 16px 0 16px;
  639. overflow-y: auto;
  640. .coupon-row {
  641. width: 100%;
  642. height: 105px;
  643. float: left;
  644. margin-bottom: 10px;
  645. border-radius: 10px;
  646. background: #FFFFFF;
  647. box-shadow: 0px 0px 10px 0px rgba(103, 103, 103, 0.3);
  648. overflow: hidden;
  649. .coupon-left {
  650. width: 107px;
  651. height: 105px;
  652. box-sizing: border-box;
  653. padding-right: 10px;
  654. float: left;
  655. background-size: 107px 105px;
  656. background-position: center;
  657. background-repeat: no-repeat;
  658. background-image: url(@/static/images/couponHead.png);
  659. .coupon-left-price {
  660. width: 100%;
  661. height: 24px;
  662. float: left;
  663. margin: 28px 0 12px 0;
  664. font-size: 24px;
  665. font-family: PingFang SC;
  666. color: #FFFFFF;
  667. line-height: 24px;
  668. text-align: center;
  669. }
  670. .coupon-left-text {
  671. width: 100%;
  672. height: 20px;
  673. float: left;
  674. color: #FFFFFF;
  675. font-size: 12px;
  676. font-family: PingFang SC;
  677. line-height: 20px;
  678. text-align: center;
  679. }
  680. }
  681. .coupon-info {
  682. width: calc(100% - 115px);
  683. height: 100%;
  684. float: right;
  685. box-sizing: border-box;
  686. padding: 16px 0 12px 0;
  687. .coupon-text1 {
  688. width: 100%;
  689. height: 20px;
  690. float: right;
  691. font-size: 15px;
  692. font-family: PingFang SC;
  693. color: #333333;
  694. line-height: 20px;
  695. white-space: nowrap;
  696. text-overflow: ellipsis;
  697. overflow: hidden;
  698. }
  699. .coupon-text2 {
  700. width: 100%;
  701. height: 18px;
  702. float: right;
  703. font-size: 13px;
  704. font-family: PingFang SC;
  705. color: #EB5F2F;
  706. line-height: 18px;
  707. white-space: nowrap;
  708. text-overflow: ellipsis;
  709. overflow: hidden;
  710. }
  711. }
  712. }
  713. }
  714. }
  715. </style>