create-order.vue 21 KB

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