orderPay.vue 20 KB

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