orderPay.vue 21 KB

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