create-order.vue 28 KB

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