create-order.vue 21 KB

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