create-order.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. <template>
  2. <view class="container order clearfix" :style="{ paddingBottom: isIphoneX ? '200rpx' : '164rpx' }">
  3. <!-- 地址选择 -->
  4. <cm-address-temp ref="choiceAddress" v-if="isRequest" :addressData="addressData" />
  5. <!-- 商品 -->
  6. <cm-goods-temp
  7. ref="goods"
  8. v-if="isRequest"
  9. :goodsData="goodsData"
  10. @handleGoodList="handChangeInputGoodsList"
  11. :freightData="freightData"
  12. :coldChain="handleColdChain"
  13. @show-freight="showFreight"
  14. />
  15. <!-- 发票信息 -->
  16. <cm-invice-popup
  17. ref="invoice"
  18. v-if="isRequest"
  19. :invoiceDatas="invoiceData"
  20. @handleChoiceaInvoice="handleChoiceaInvoiceData"
  21. />
  22. <!-- 底部 -->
  23. <view class="footer-wrapper" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  24. <view class="footer">
  25. <view class="footer-le">
  26. <view class="footer-count">
  27. <text>共{{ totalCount }}件商品</text>
  28. </view>
  29. <view class="footer-price">
  30. <view class="sum none">
  31. 总价:
  32. <text class="price">¥{{ orderShouldPayFee | NumFormat }}</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="footer-submit" @click.stop="orderSubmitMit">
  37. <view class="btn" :class="isSubLoading ? 'disabled' : ''">提交订单</view>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 提示弹窗 -->
  42. <tui-modal
  43. :show="showModal"
  44. @click="handleClick"
  45. @cancel="hideMobel"
  46. :content="contentModalText"
  47. :button="modalButton"
  48. color="#333"
  49. :size="28"
  50. shape="circle"
  51. :maskClosable="false"
  52. />
  53. </view>
  54. </template>
  55. <script>
  56. import { mapState, mapMutations } from 'vuex'
  57. import cmAddressTemp from './components/cm-address-temp'
  58. import cmGoodsTemp from './components/cm-goods-temp'
  59. import cmInvicePopup from './components/cm-invice-popup'
  60. export default {
  61. components: {
  62. cmAddressTemp,
  63. cmGoodsTemp,
  64. cmInvicePopup
  65. },
  66. data() {
  67. return {
  68. skeletonShow: true,
  69. isIphoneX: this.$store.state.isIphoneX,
  70. isSubLoading: false,
  71. confirmType: 1,
  72. orderID: 0,
  73. cartParam: {
  74. // 购物车立即结算确认订单参数
  75. skuIds: 0, // 商品Id(逗号隔开)
  76. source: 2, // 来源:1WWW 2小程序
  77. userId: 0 ,// 用户Id
  78. townId: '', // 区域id
  79. },
  80. productParam: {
  81. // 商品立即购买确认订单参数
  82. productCount: 0, // 商品数量
  83. productId: 0, // 商品Id
  84. source: 2, // 来源:1WWW 2小程序
  85. userId: 0 ,// 用户Id
  86. cityId: '', // 区域id
  87. },
  88. supportParm: {
  89. // 组合商品立即购买确认订单参数
  90. productInfo: '',
  91. source: 2, // 来源:1WWW 2小程序
  92. userId: 0 ,// 用户Id
  93. cityId: '', // 区域id
  94. },
  95. postageParam: {
  96. // 邮费计算参数
  97. skuIds: 0, // 商品Id(逗号隔开)
  98. userId: 0, // 用户Id
  99. cityId: 0 // 地区Id
  100. },
  101. confirmParam: {
  102. cartType: 1, // 购买类型:(1自主下单, 3协销下单)
  103. orderMiniType: 0, // 订单提交状态 0初始提交 1 继续提交
  104. orderSource: 6, // 订单来源 1WWW 6小程序[采美,星范]
  105. addressId: 0, // 收货地址Id
  106. clubCouponId: 0, // 关联优惠券Id
  107. clubId: 0, // 机构Id
  108. orderInfo: [], // 订单商品数据
  109. orderInvoice: { type: 0 }, // 订单发票信息
  110. payInfo: {
  111. // 订单金额数据
  112. orderShouldPayFee: 0, // 订单最终支付金额
  113. balancePayFlag: 0, // 勾选余额的状态(1使用,0不使用)
  114. clauseId: 0, // 条款Id
  115. postage: '0.00', // 运费金额
  116. postageFlag: 0, // 运费类型
  117. userBeans: 0, // 抵扣采美豆数量
  118. rebateFlag: 0 // 是否返佣订单
  119. },
  120. unionId: uni.getStorageSync('unionId') // 用户unionId
  121. }, // 提交订单参数
  122. productIds: '', // 获取上一级页面商品信息
  123. submitState: '', // 提交状态
  124. totalCount: 1, // 订单提交总数量
  125. allPrice: 0.0, // 订单总金额
  126. orderShouldPayFee: 0, // 订单最终支付金额
  127. isRequest: false, // 是否加载完成渲染子组件
  128. isFreight: false, // 是否加载完成渲染子组件
  129. isAddress: false, // 是否加载完成地址
  130. isExchangePopup: false, // 控制兑换优惠券弹窗
  131. designatedFlag: '', // 是否为指定商品 1.仅为指定商品 2.仅为供应商商品 3.指定商品+供应商商品
  132. hanldFreePostFlag: '', // 邮费状态
  133. hanldFreight: '', // 邮费
  134. addressData: {}, // 初始化地址信息
  135. goodsData: [], // 初始化商品信息
  136. goodsCloneData: [], // 初始化商品信息
  137. couponList: [], // 初始化优惠券信息
  138. invoiceData: { type: 0 }, // 初始化发票信息
  139. freightData: {}, // 邮费数据
  140. orderInfo: [], // 提交的商品信息
  141. handleColdChain: 0, // 指定商品冷链费
  142. freightColdChain: 0, // 存储冷链费
  143. contentModalText: '采购金额过小,将扣除500采美豆,建议您前往采美旗下“颜选美学”小程序购买小额商品。', //操作文字提示语句
  144. modalButton: [
  145. {
  146. text: '前往颜选美学',
  147. type: 'gray',
  148. plain: true //是否空心
  149. },
  150. {
  151. text: '继续提交',
  152. customStyle: {
  153. color: '#fff',
  154. bgColor: 'linear-gradient(90deg, #F28F31 0%, #F3B574 100%)'
  155. },
  156. plain: false
  157. }
  158. ],
  159. showModal: false,
  160. showModalstauts: 0,
  161. popupShow: false ,// 运费选择弹窗
  162. storeOptions: {}, // 上一页商品数据
  163. }
  164. },
  165. onLoad(option) {
  166. //商品数据
  167. this.storeOptions = option
  168. this.initCreateOrderInfo(option)
  169. },
  170. filters: {
  171. NumFormat(value) {
  172. //处理金额
  173. return Number(value).toFixed(2)
  174. }
  175. },
  176. methods: {
  177. // 运费底部上拉框
  178. showFreight($event) {
  179. this.popupShow = $event
  180. },
  181. async initCreateOrderInfo(option) {
  182. const data = JSON.parse(option.data)
  183. const userInfo = await this.$api.getStorage()
  184. this.productParam.userId = this.cartParam.userId = userInfo.userId
  185. this.supportParm.userId = this.postageParam.userId = userInfo.userId
  186. this.confirmParam.clubId = userInfo.clubId
  187. switch (option.type) {
  188. case '1': // 商品详情立即购买
  189. this.confirmParam.cartType = 2
  190. this.productParam.productCount = data.data.productCount
  191. this.productParam.productId = data.data.productIds
  192. this.productParam.skuId = data.data.skuId
  193. this.productIds = data.data.productIds
  194. this.getAddressData(userInfo.userId,1)
  195. break
  196. case '2': // 购物车结算
  197. this.confirmParam.cartType = 1
  198. this.confirmType = 2
  199. this.cartParam.skuIds = data.data.skuIds
  200. this.getAddressData(userInfo.userId,2)
  201. break
  202. case '3': // 组合商品立即购买
  203. this.confirmParam.cartType = 2
  204. this.confirmType = 2
  205. this.supportParm.productInfo = JSON.stringify(data.data)
  206. this.getAddressData(userInfo.userId,3)
  207. }
  208. },
  209. // 商品立即购买确认订单数据初始化
  210. async GetProductCreateOrderInfo() {
  211. try {
  212. const res = await this.OrderService.ProductCreateOrderInfo(this.productParam)
  213. this.setCreatDataInfo(res.data)
  214. } catch (error) {
  215. console.log('商品立即购买订单初始化异常')
  216. }
  217. },
  218. // 组合商品立即购买确认订单数据初始化
  219. async GetOrderClubProductSupporting() {
  220. try {
  221. const res = await this.OrderService.OrderClubProductSupporting(this.supportParm)
  222. this.setCreatDataInfo(res.data)
  223. } catch (error) {
  224. console.log('组合商品立即购买订单初始化异常')
  225. }
  226. },
  227. // 购物车去结算确认订单数据初始化
  228. async CartCreateOrderInfo() {
  229. try {
  230. const res = await this.OrderService.CartCreateOrderInfo(this.cartParam)
  231. this.setCreatDataInfo(res.data)
  232. } catch (error) {
  233. console.log('购物车结算订单初始化异常')
  234. }
  235. },
  236. // 公共初始化数据
  237. setCreatDataInfo(data) {
  238. this.isRequest = true
  239. this.goodsData = data.list
  240. if(uni.getStorageSync('goodsData')) {
  241. uni.removeStorageSync('goodsData')
  242. }
  243. uni.setStorageSync('goodsData', JSON.stringify(data.list))
  244. // console.log(JSON.parse(uni.getStorageSync('goodsData')))
  245. this.goodsCloneData = data.list
  246. this.couponList = data.couponList
  247. this.handleColdChain = this.freightColdChain = data.coldChain
  248. this.userMoney = data.userMoney
  249. this.totalCount = data.totalCount
  250. this.allPrice = data.totalPrice
  251. this.orderShouldPayFee = this.allPrice
  252. },
  253. // 获取订单SKUId列表
  254. getProductIds(list) {
  255. const skuId = []
  256. list.forEach(function(supplier) {
  257. supplier.cartList.forEach(function(product) {
  258. skuId.push(product.skuId)
  259. })
  260. })
  261. // console.log(list);
  262. return skuId.join(',')
  263. },
  264. //获取地址信息
  265. async getAddressData(userId, type) {
  266. try {
  267. const userInfo = await this.$api.getStorage()
  268. const res = await this.UserService.QueryAddressList({
  269. pageNum: 1,
  270. pageSize: 1,
  271. userId: userId
  272. })
  273. const data = res.data
  274. if (data.list.length > 0) {
  275. this.isAddress = true
  276. this.addressData = {}
  277. this.confirmParam.addressId = data.list[0].addressId
  278. this.productParam.cityId = data.list[0].cityId
  279. this.cartParam.cityId = data.list[0].cityId
  280. this.supportParm.cityId = data.list[0].cityId
  281. this.addressData = data.list[0]
  282. }
  283. // 根据类型调方法
  284. if (type === 1) {
  285. //立即都买提交
  286. this.GetProductCreateOrderInfo()
  287. }
  288. if (type === 2) {
  289. //购物车提交
  290. this.CartCreateOrderInfo()
  291. }
  292. if (type === 3) {
  293. //组合商品提交
  294. this.GetOrderClubProductSupporting()
  295. }
  296. } catch (error) {
  297. console.log('error', error)
  298. }
  299. },
  300. //对应供应商的留言信息
  301. handChangeInputGoodsList(data) {
  302. this.goodsCloneData = data
  303. this.orderShouldPayFee = 0
  304. data.forEach(i => {
  305. this.orderShouldPayFee += i.totalPrice
  306. })
  307. this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee
  308. },
  309. //获取发票信息
  310. handleChoiceaInvoiceData(data) {
  311. this.confirmParam.orderInvoice = data
  312. },
  313. // 提交订单按钮点击事件
  314. orderSubmitMit() {
  315. this.handleClickOrderSubmitMit()
  316. },
  317. // 提交订单
  318. handleClickOrderSubmitMit() {
  319. if (this.isSubLoading) {
  320. return
  321. }
  322. if (this.confirmParam.addressId === 0) {
  323. this.$util.msg('请先添加收货地址~', 2000)
  324. return
  325. }
  326. this.confirmParam.orderInfo = this.hanldeProcessing()
  327. this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
  328. this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
  329. this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
  330. this.confirmParam.orderInvoice = JSON.stringify(this.confirmParam.orderInvoice)
  331. console.log(this.confirmParam)
  332. this.isSubLoading = true
  333. this.hanldeOrderSubmit(this.confirmParam)
  334. },
  335. // 处理数据格式
  336. hanldeProcessing() {
  337. return this.goodsCloneData.map(el => {
  338. let productInfo = []
  339. el.cartList.forEach(pros => {
  340. productInfo.push({
  341. skuId: pros.skuId,
  342. productNum: pros.number,
  343. presentNum: 0,
  344. productType: pros.giftType
  345. })
  346. })
  347. return {
  348. splitCode: el.splitCode,
  349. shopId: el.shopId,
  350. note: el.note ? el.note : '',
  351. postage: el.isColdChina
  352. ? parseInt(el.postage + el.coldChain).toFixed(2)
  353. : parseInt(el.postage).toFixed(2),
  354. postageFlag: el.postageFlag,
  355. isColdChina: el.isColdChina ? 1 : 0,
  356. productInfo: productInfo
  357. }
  358. })
  359. },
  360. async hanldeOrderSubmit(params) {
  361. // 提交订单
  362. try {
  363. const res = await this.OrderService.CreatedOrderSubmit(params)
  364. const data = res.data
  365. if (data.code === 1) {
  366. this.submitState = 'success'
  367. setTimeout(() => {
  368. this.isSubLoading = false
  369. }, 2000)
  370. this.$api.redirectTo(
  371. `/pages/user/order/success?data=${JSON.stringify({ data: { orderId: data.orderId } })}`
  372. )
  373. } else {
  374. this.submitState = 'confirm'
  375. this.$util.msg('订单提交成功', 2000, true, 'success')
  376. setTimeout(() => {
  377. this.isSubLoading = false
  378. this.$api.redirectTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
  379. }, 2000)
  380. }
  381. } catch (error) {
  382. console.log(error)
  383. this.formatConfirmParam()
  384. this.isSubLoading = false
  385. }
  386. },
  387. formatConfirmParam() {
  388. // 还原提交订单参数格式
  389. this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
  390. this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
  391. this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
  392. },
  393. handleClick(e) {
  394. // 采购量过小提示弹窗
  395. if (e.index === 1) {
  396. if (this.showModalstauts === 1) {
  397. this.showModal = false
  398. this.confirmParam.orderMiniType = 1
  399. this.handleClickOrderSubmitMit()
  400. } else if (this.showModalstauts === 2) {
  401. this.showModal = false
  402. this.isSubLoading = false
  403. this.$api.navigateTo('/pages/login/apply')
  404. } else {
  405. this.showModal = false
  406. this.handleClickHeHeMiniApplet()
  407. }
  408. } else {
  409. if (this.showModalstauts == 1) {
  410. this.showModal = false
  411. this.handleClickHeHeMiniApplet()
  412. } else if (this.showModalstauts === 2) {
  413. this.showModal = false
  414. this.confirmParam.orderMiniType = 2
  415. this.handleClickOrderSubmitMit()
  416. } else {
  417. this.showModal = false
  418. }
  419. }
  420. },
  421. handleClickHeHeMiniApplet() {
  422. // 跳转颜选美学小程序
  423. uni.navigateToMiniProgram({
  424. appId: 'wx2c3b0a7f343235b1',
  425. path: '/pages/tabBar/index/index',
  426. extraData: {
  427. data1: 'test'
  428. },
  429. envVersion: 'develop',
  430. success(res) {
  431. // 打开成功
  432. console.log(res)
  433. }
  434. })
  435. }
  436. },
  437. onShow() {
  438. let pages = getCurrentPages()
  439. let currPage = pages[pages.length - 1]
  440. if (currPage.data.select == 'select') {
  441. this.isAddress = true
  442. let SelectData = uni.getStorageSync('selectAddress')
  443. this.confirmParam.addressId = SelectData.addressId
  444. this.productParam.cityId = SelectData.cityId
  445. this.cartParam.cityId = SelectData.cityId
  446. this.supportParm.cityId = SelectData.cityId
  447. this.addressData = SelectData
  448. if (this.storeOptions.type == 1) {
  449. //立即都买提交
  450. this.GetProductCreateOrderInfo()
  451. }
  452. if (this.storeOptions.type == 2) {
  453. //购物车提交
  454. this.CartCreateOrderInfo()
  455. }
  456. if (this.storeOptions.type == 3) {
  457. //组合商品提交
  458. this.GetOrderClubProductSupporting()
  459. }
  460. }
  461. }
  462. }
  463. </script>
  464. <style lang="scss">
  465. page {
  466. height: auto;
  467. background: #f7f7f7;
  468. }
  469. .btn-hover {
  470. background: #ffffff;
  471. }
  472. .animation {
  473. /* transition: transform 0.3s ease;*/
  474. transition-property: transform;
  475. transition-duration: 0.3s;
  476. transition-timing-function: ease;
  477. }
  478. .order {
  479. padding-bottom: 134rpx;
  480. }
  481. .invoice-balance {
  482. width: 702rpx;
  483. height: auto;
  484. padding: 0 24rpx;
  485. background: #ffffff;
  486. float: left;
  487. margin-top: 24rpx;
  488. margin-bottom: 24rpx;
  489. .balabce-t {
  490. width: 100%;
  491. height: 86rpx;
  492. line-height: 86rpx;
  493. font-size: $font-size-28;
  494. color: $text-color;
  495. float: left;
  496. .balabce-t-le {
  497. float: left;
  498. font-weight: bold;
  499. }
  500. .balabce-t-ri {
  501. float: right;
  502. display: flex;
  503. align-items: center;
  504. .money {
  505. display: flex;
  506. float: left;
  507. }
  508. .checkbox-box {
  509. display: flex;
  510. width: 60rpx;
  511. float: left;
  512. height: 100%;
  513. font-size: $font-size-24;
  514. .checkbox {
  515. width: 40rpx;
  516. text-align: right;
  517. box-sizing: border-box;
  518. text-align: center;
  519. text-decoration: none;
  520. border-radius: 0;
  521. -webkit-tap-highlight-color: transparent;
  522. overflow: hidden;
  523. color: $color-system;
  524. }
  525. }
  526. }
  527. }
  528. .balabce-b {
  529. width: 100%;
  530. float: left;
  531. overflow: hidden;
  532. .balabce-b-text {
  533. width: 100%;
  534. line-height: 58rpx;
  535. font-size: $font-size-24;
  536. color: #ff2a2a;
  537. text-align: right;
  538. float: right;
  539. }
  540. &.balabce-b--hide {
  541. padding: 0 0;
  542. height: 0px;
  543. line-height: 0px;
  544. }
  545. }
  546. }
  547. .footer-wrapper {
  548. position: fixed;
  549. left: 0;
  550. bottom: 0;
  551. background-color: #ffffff;
  552. z-index: 990;
  553. .footer {
  554. display: flex;
  555. align-items: center;
  556. width: 100%;
  557. height: 110rpx;
  558. line-height: 110rpx;
  559. justify-content: space-between;
  560. font-size: $font-size-28;
  561. color: $text-color;
  562. }
  563. .footer-le {
  564. width: 570rpx;
  565. height: 100%;
  566. float: left;
  567. }
  568. .footer-count {
  569. float: left;
  570. padding-left: 24rpx;
  571. box-sizing: border-box;
  572. }
  573. .footer-price {
  574. width: 370rpx;
  575. float: right;
  576. text-align: right;
  577. color: $text-color;
  578. padding: 10rpx 20rpx 10rpx 0;
  579. box-sizing: border-box;
  580. .sum-none {
  581. width: 100%;
  582. height: 45rpx;
  583. line-height: 45rpx;
  584. color: $text-color;
  585. float: left;
  586. text-align: right;
  587. .money {
  588. font-size: $font-size-26;
  589. color: #999999;
  590. text-decoration: line-through;
  591. }
  592. .money-sign {
  593. font-size: $font-size-26;
  594. color: #999999;
  595. text-decoration: line-through;
  596. }
  597. .money-reduced {
  598. margin-left: 10rpx;
  599. font-size: $font-size-26;
  600. color: #ff2a2a;
  601. }
  602. }
  603. .sum {
  604. width: 100%;
  605. height: 45rpx;
  606. line-height: 45rpx;
  607. float: left;
  608. &.none {
  609. height: 90rpx;
  610. line-height: 90rpx;
  611. }
  612. .price {
  613. font-size: $font-size-32;
  614. color: #ff2a2a;
  615. }
  616. }
  617. }
  618. .footer-submit {
  619. display: flex;
  620. align-items: center;
  621. justify-content: center;
  622. width: 180rpx;
  623. height: 100%;
  624. box-sizing: border-box;
  625. padding: 15rpx 5rpx;
  626. .btn {
  627. width: 100%;
  628. height: 100%;
  629. color: #ffffff;
  630. background: $btn-confirm;
  631. font-size: $font-size-26;
  632. text-align: center;
  633. line-height: 80rpx;
  634. border-radius: 40rpx;
  635. &.disabled {
  636. background: #e4e8eb;
  637. color: #999999;
  638. }
  639. }
  640. }
  641. }
  642. .coupon-content-model {
  643. width: 100%;
  644. height: 100%;
  645. background: rgba(0, 0, 0, 0.5);
  646. position: fixed;
  647. top: 0;
  648. left: 0;
  649. z-index: 8888;
  650. transition: all 0.4s;
  651. .coupon-alert-content {
  652. width: 600rpx;
  653. height: 612rpx;
  654. position: absolute;
  655. top: 0;
  656. left: 0;
  657. bottom: 0;
  658. right: 0;
  659. margin: auto;
  660. box-sizing: border-box;
  661. padding-top: 92rpx;
  662. .coupon {
  663. width: 600rpx;
  664. height: 522rpx;
  665. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbg@2x.png);
  666. background-size: cover;
  667. box-sizing: border-box;
  668. padding: 230rpx 40rpx 0 40rpx;
  669. .coupon-list {
  670. width: 100%;
  671. height: 147rpx;
  672. margin-bottom: 32rpx;
  673. box-sizing: border-box;
  674. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-bg@2x.png);
  675. background-size: cover;
  676. position: relative;
  677. .list-cell-tags {
  678. display: inline-block;
  679. padding: 0 10rpx;
  680. height: 32rpx;
  681. line-height: 32rpx;
  682. background-color: #f94b4b;
  683. color: #ffffff;
  684. font-size: 18rpx;
  685. border-radius: 16rpx 0 16rpx 0;
  686. text-align: center;
  687. position: absolute;
  688. top: 0;
  689. left: 0;
  690. }
  691. .list-cell-le {
  692. width: 154rpx;
  693. height: 100%;
  694. box-sizing: border-box;
  695. padding: 30rpx 0;
  696. float: left;
  697. .coupon-maxMoney {
  698. width: 100%;
  699. height: 54rpx;
  700. line-height: 54rpx;
  701. font-size: 42rpx;
  702. color: #f94b4b;
  703. text-align: center;
  704. margin-top: 10rpx;
  705. .small {
  706. font-size: $font-size-20;
  707. }
  708. }
  709. .coupon-minMoney {
  710. width: 100%;
  711. height: 28rpx;
  712. float: left;
  713. box-sizing: border-box;
  714. padding-left: 24rpx;
  715. .txt {
  716. display: block;
  717. height: 28rpx;
  718. line-height: 28rpx;
  719. font-size: 16rpx;
  720. color: #f94b4b;
  721. text-align: center;
  722. padding: 0 5rpx;
  723. background-color: #fff1eb;
  724. border-radius: 4rpx;
  725. float: left;
  726. }
  727. }
  728. }
  729. .list-cell-ri {
  730. width: 366rpx;
  731. height: 100%;
  732. box-sizing: border-box;
  733. padding: 30rpx 20rpx;
  734. float: left;
  735. .list-cell-top {
  736. width: 100%;
  737. height: 64rpx;
  738. line-height: 64rpx;
  739. font-size: $font-size-26;
  740. color: #333333;
  741. float: left;
  742. text-overflow: ellipsis;
  743. display: -webkit-box;
  744. word-break: break-all;
  745. -webkit-box-orient: vertical;
  746. -webkit-line-clamp: 1;
  747. overflow: hidden;
  748. }
  749. .list-cell-time {
  750. width: 100%;
  751. height: 28rpx;
  752. line-height: 28rpx;
  753. text-align: left;
  754. font-size: $font-size-20;
  755. color: #999999;
  756. }
  757. }
  758. }
  759. .coupon-btn {
  760. width: 100%;
  761. height: 78rpx;
  762. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbtnbg@2x.png);
  763. background-size: cover;
  764. line-height: 78rpx;
  765. text-align: center;
  766. color: #ffffff;
  767. font-size: $font-size-36;
  768. }
  769. }
  770. }
  771. }
  772. </style>