confirmOrder.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960
  1. <template>
  2. <view>
  3. <view class="inner-box">
  4. <!-- 收货人 -->
  5. <view class="address-box" v-if="address==null" @click="openAddress()">
  6. <view class="left">
  7. <view class="name-box">
  8. <text class="text name">添加收货地址</text>
  9. </view>
  10. </vie>
  11. </view>
  12. <view class="arrow-box">
  13. <image src="../../static/images/arrow_gray.png" mode=""></image>
  14. </view>
  15. </view>
  16. <view class="address-box" v-if="address!=null" @click="openAddress()">
  17. <view class="left">
  18. <view class="name-box">
  19. <text class="text name">{{address.realName}}</text>
  20. <text class="text" v-if="address.phone!=null">{{utils.parsePhone(address.phone)}}</text>
  21. </view>
  22. <view class="address">
  23. {{address.province}}{{address.city}}{{address.district}}{{address.detail}}
  24. </view>
  25. </view>
  26. <view class="arrow-box">
  27. <image src="../../static/images/arrow_gray.png" mode=""></image>
  28. </view>
  29. </view>
  30. <!-- 药品列表 -->
  31. <view class="shopbox" v-for="(shop,idx) in carts" :key="idx">
  32. <view class="shopbox-name" v-if="shop.storeName && shop.storeName != 'null'">
  33. <text>{{shop.storeName}}</text>
  34. </view>
  35. <view class="goods-list">
  36. <view v-for="(item,index) in shop.list" :key="index" class="item">
  37. <view class="img-box">
  38. <image :src="item.productAttrImage || item.productImage" mode="aspectFill"></image>
  39. </view>
  40. <view class="info-box">
  41. <view>
  42. <view class="name-box ellipsis2">
  43. <view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}
  44. </view>{{item.productName}}
  45. </view>
  46. <view class="spec ellipsis2">{{item.productAttrName}}</view>
  47. </view>
  48. <view class="price-num">
  49. <view class="price">
  50. <text class="unit">¥</text>
  51. <text class="num">{{item.price.toFixed(2)}}</text>
  52. </view>
  53. <view class="num">x{{item.cartNum}}</view>
  54. </view>
  55. </view>
  56. </view>
  57. <!-- 运费 -->
  58. <view class="points">
  59. <view class="left">
  60. <text class="text">运费</text>
  61. </view>
  62. <view class="right" v-if="price&&price.length > 0">
  63. <text
  64. class="text">{{price[idx].payPostage==null||price[idx].payPostage==0?'免运费':price[idx].payPostage.toFixed(2)}}</text>
  65. </view>
  66. </view>
  67. <!-- 备注 -->
  68. <view class="points">
  69. <view class="left">
  70. <text class="text">备注</text>
  71. </view>
  72. <view class="remarks">
  73. <input type="text" v-model="shop.markinfo" placeholder="备注留言(选填)"
  74. placeholder-class="input" />
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 积分 -->
  80. <view class="price-info">
  81. <view class="price-info-title">价格明细</view>
  82. <view class="points">
  83. <view class="left">
  84. <text class="text">商品总价</text>
  85. </view>
  86. <view class="right" style="align-items: baseline;">
  87. <text class="price-info-unit">¥</text>
  88. <text class="price-info-num">{{priceAll.totalPrice.toFixed(2)}}</text>
  89. </view>
  90. </view>
  91. <view class="points">
  92. <view class="left">
  93. <image src="../../static/images/points.png" mode=""></image>
  94. <text class="text">可用积分</text>
  95. </view>
  96. <view class="right">
  97. <text class="text">{{priceAll.usedIntegral}}积分</text>
  98. <evan-switch @change="integralChange" v-model="checked" activeColor="#0bb3f2"
  99. inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
  100. </view>
  101. </view>
  102. <view class="points" @click="openCoupon()">
  103. <view class="left">
  104. <text class="text">优惠券</text>
  105. </view>
  106. <view class="right">
  107. <text class="text">{{couponText}}</text>
  108. <image src="/static/images/arrow4.png" mode=""></image>
  109. </view>
  110. </view>
  111. <view class="points">
  112. <view class="left">
  113. <text class="text">合计</text>
  114. </view>
  115. <view class="right" style="align-items: baseline;">
  116. <text class="price-info-unit">¥</text>
  117. <text class="price-info-num">{{priceAll.payPrice.toFixed(2)}}</text>
  118. </view>
  119. </view>
  120. </view>
  121. <!-- <view class="points">
  122. <view class="left">
  123. <text class="text">运费</text>
  124. </view>
  125. <view class="right">
  126. <text class="text">{{price.payPostage==null||price.payPostage==0?'免运费':price.payPostage.toFixed(2)}}</text>
  127. </view>
  128. </view> -->
  129. <!-- 备注 -->
  130. <!-- <view class="remarks">
  131. <input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
  132. </view> -->
  133. </view>
  134. <!-- 底部按钮 -->
  135. <view class="btn-foot">
  136. <view class="right">
  137. <view class="total">
  138. <text class="label">合计:</text>
  139. <view class="price">
  140. <text class="unit">¥</text>
  141. <text class="num">{{priceAll.payPrice.toFixed(2)}}</text>
  142. </view>
  143. </view>
  144. <view class="btn" @click="submitOrder">提交订单</view>
  145. </view>
  146. </view>
  147. <popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5" radius="30" maxHeight="60%">
  148. <view class="coupon" style="height:650rpx;">
  149. <div class="coupon-list" v-if="couponsList.length > 0">
  150. <div class="item acea-row row-center-wrapper" v-for="(item, index) in couponsList" :key="index">
  151. <div class="money">
  152. <image v-if="item.status==0" class="img"
  153. src="https://user.test.ylrztop.com/images/coupon1.png" mode="widthFix"></image>
  154. <image v-if="item.status!=0" class="img"
  155. src="https://user.test.ylrztop.com/images/coupon2.png" mode="widthFix"></image>
  156. <div style="z-index: 999;">
  157. ¥<span class="num">{{ item.couponPrice }}</span>
  158. </div>
  159. <div class="pic-num">满{{ item.useMinPrice }}元可用</div>
  160. </div>
  161. <div class="text">
  162. <div class="condition line1">
  163. {{ item.couponTitle }}
  164. </div>
  165. <div class="data acea-row row-between-wrapper">
  166. <div>{{ item.limitTime }}到期</div>
  167. <div class="bnt bg-color-red" @click="couponSelect(item)">选择</div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. <view v-if="couponsList.length == 0" class="no-data-box">
  173. <image src="/static/images/no_data.png" mode="aspectFit"></image>
  174. <view class="empty-title">暂无数据</view>
  175. </view>
  176. </view>
  177. </popupBottom>
  178. </view>
  179. </template>
  180. <script>
  181. import {
  182. getWeixinOrderTemps
  183. } from '@/api/common'
  184. import {
  185. confirm,
  186. computed,
  187. create
  188. } from '@/api/storeOrder'
  189. import {
  190. getMyEnableCouponList
  191. } from '@/api/coupon'
  192. import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
  193. import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
  194. export default {
  195. components: {
  196. EvanSwitch,
  197. popupBottom
  198. },
  199. data() {
  200. return {
  201. temps: [],
  202. couponUserId: null,
  203. couponText: "请选择",
  204. couponsList: [],
  205. couponVisible: false,
  206. price: [],
  207. priceAll: {
  208. payPrice: 0,
  209. totalPostage: 0,
  210. usedIntegral: 0,
  211. totalPrice: 0.00,
  212. },
  213. address: null,
  214. carts: [],
  215. checked: false,
  216. type: null,
  217. cartIds: null,
  218. storeId: null,
  219. form: {
  220. useIntegral: 0,
  221. orderKey: null,
  222. addressId: null,
  223. mark: null,
  224. companyId: null,
  225. companyUserId: null
  226. },
  227. confirmParam:[]
  228. }
  229. },
  230. onLoad(option) {
  231. this.form.companyId = option.companyId;
  232. this.form.companyUserId = option.companyUserId;
  233. // this.cartIds=option.cartIds;
  234. this.type = option.type;
  235. this.storeId = option.storeId;
  236. this.confirmParam = JSON.parse(decodeURIComponent(option.confirmParam))
  237. this.confirm();
  238. uni.$on('updateAddress', (e) => {
  239. this.address = e;
  240. this.form.addressId = e.id;
  241. })
  242. this.getWeixinOrderTemps();
  243. },
  244. methods: {
  245. getWeixinOrderTemps: function() {
  246. getWeixinOrderTemps().then(
  247. res => {
  248. if (res.code == 200) {
  249. this.temps = res.temp
  250. } else {
  251. }
  252. },
  253. rej => {}
  254. );
  255. },
  256. couponSelect(item) {
  257. this.couponText = "-¥" + item.couponPrice.toFixed(2);
  258. this.couponUserId = item.id;
  259. this.couponVisible = false;
  260. this.computed();
  261. },
  262. openCoupon() {
  263. let that = this;
  264. var data = {
  265. couponType: 0,
  266. useMinPrice: this.price.payPrice
  267. };
  268. getMyEnableCouponList(data).then(res => {
  269. this.couponVisible = true;
  270. that.couponsList = res.data
  271. })
  272. },
  273. integralChange(e) {
  274. this.form.useIntegral = e ? 1 : 0
  275. this.computed()
  276. },
  277. confirm(item) {
  278. // let data = {type:this.type,cartIds:this.cartIds};
  279. if (this.confirmParam&&this.confirmParam.length>0) {
  280. confirm(this.confirmParam).then(
  281. res => {
  282. if (res.code == 200) {
  283. this.carts = res.carts.map(item => ({
  284. ...item,
  285. markinfo: ""
  286. }));
  287. this.form.orderKey = res.orderKeys;
  288. if (res.address != null) {
  289. this.form.addressId = res.address.id;
  290. this.address = res.address;
  291. }
  292. this.computed()
  293. } else {
  294. uni.showToast({
  295. icon: 'none',
  296. title: res.msg,
  297. });
  298. }
  299. },
  300. rej => {}
  301. );
  302. } else {
  303. uni.showToast({
  304. icon: 'none',
  305. title: '订单参数不存在~',
  306. });
  307. }
  308. },
  309. computed(item) {
  310. let data = {
  311. couponUserId: this.couponUserId,
  312. orderKeys: this.form.orderKey,
  313. addressId: this.form.addressId,
  314. useIntegral: this.form.useIntegral,
  315. };
  316. computed(data).then(
  317. res => {
  318. if (res.code == 200) {
  319. this.price = res.data && res.data.length > 0 ? res.data : []
  320. this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length - 1] : {
  321. payPrice: 0,
  322. totalPostage: 0,
  323. usedIntegral: 0,
  324. totalPrice: 0.00,
  325. }
  326. } else {
  327. if (res.code == 501) {
  328. uni.showToast({
  329. icon: 'none',
  330. title: res.msg,
  331. });
  332. setTimeout(function() {
  333. uni.navigateBack({
  334. delta: 1
  335. })
  336. }, 500);
  337. return;
  338. } else {
  339. uni.showToast({
  340. icon: 'none',
  341. title: res.msg,
  342. });
  343. }
  344. }
  345. },
  346. rej => {}
  347. );
  348. },
  349. // 提交订单
  350. submitOrder() {
  351. var that = this;
  352. if (this.form.orderKey == null || this.form.orderKey.length == 0) {
  353. uni.showToast({
  354. icon: 'none',
  355. title: '订单KEY不存在',
  356. });
  357. return;
  358. }
  359. if (this.form.addressId == null) {
  360. uni.showToast({
  361. icon: 'none',
  362. title: '收货地址不能为空',
  363. });
  364. return;
  365. }
  366. uni.requestSubscribeMessage({
  367. tmplIds: this.temps,
  368. success(res) {
  369. that.createOrder();
  370. },
  371. fail(res) {
  372. that.createOrder();
  373. }
  374. })
  375. },
  376. createOrder() {
  377. const mark = this.carts.map(item => item.markinfo)
  378. var that = this;
  379. var data = null;
  380. var tuiUserId = uni.getStorageSync('tuiUserId');
  381. uni.showLoading({
  382. title: '正在处理中...'
  383. });
  384. if (tuiUserId != null && tuiUserId != undefined && tuiUserId > 0) {
  385. data = {
  386. orderCreateType: 1,
  387. tuiUserId: tuiUserId,
  388. companyId: this.form.companyId,
  389. companyUserId: this.form.companyUserId,
  390. couponUserId: this.couponUserId,
  391. mark: mark,
  392. orderKeys: this.form.orderKey,
  393. addressId: this.form.addressId,
  394. useIntegral: this.form.useIntegral,
  395. payType: 1
  396. };
  397. } else {
  398. data = {
  399. orderCreateType: 1,
  400. companyId: this.form.companyId,
  401. companyUserId: this.form.companyUserId,
  402. couponUserId: this.couponUserId,
  403. mark: mark,
  404. orderKeys: this.form.orderKey,
  405. addressId: this.form.addressId,
  406. useIntegral: this.form.useIntegral,
  407. payType: 1
  408. };
  409. }
  410. if (this.storeId != null && this.storeId > 0) {
  411. data.storeId = this.storeId;
  412. }
  413. create(data).then(
  414. res => {
  415. uni.hideLoading()
  416. if (!res.code && res.code !== 0) {
  417. uni.hideLoading()
  418. if (res.some(item => item.order.isPrescribe) == 1) {
  419. setTimeout(function() {
  420. let orderIds = res.filter(item => item.order.isPrescribe == 1).map(it => it
  421. .order.id)
  422. orderIds = orderIds.join(',')
  423. uni.redirectTo({
  424. url: "prescribe?orderId=" + orderIds + "&combinationOrderId=" +
  425. encodeURIComponent(res[0].order.combinationOrderId)
  426. })
  427. }, 200);
  428. } else {
  429. setTimeout(function() {
  430. uni.redirectTo({
  431. url: './paymentOrder?combinationOrderId=' + encodeURIComponent(
  432. res[0].order.combinationOrderId)
  433. })
  434. }, 200);
  435. }
  436. return;
  437. } else {
  438. if (res.code == 501) {
  439. uni.showToast({
  440. icon: 'none',
  441. title: res.msg,
  442. });
  443. setTimeout(function() {
  444. uni.navigateBack({
  445. delta: 1
  446. })
  447. }, 200);
  448. return;
  449. } else {
  450. uni.showToast({
  451. icon: 'none',
  452. title: res.msg,
  453. });
  454. }
  455. }
  456. },
  457. rej => {}
  458. );
  459. },
  460. openAddress() {
  461. uni.navigateTo({
  462. url: '/pages_user/user/address'
  463. })
  464. }
  465. }
  466. }
  467. </script>
  468. <style lang="scss">
  469. .inner-box {
  470. padding: 20upx 20upx 140upx;
  471. .address-box {
  472. box-sizing: border-box;
  473. min-height: 171upx;
  474. margin-bottom: 20rpx;
  475. background: #FFFFFF;
  476. border-radius: 16upx;
  477. background-image: url(../../static/images/address_bg.png);
  478. background-repeat: no-repeat;
  479. background-size: 100% 30upx;
  480. background-position: left bottom;
  481. padding: 38upx 30upx 36upx;
  482. display: flex;
  483. align-items: center;
  484. justify-content: space-between;
  485. .left {
  486. width: 92%;
  487. .name-box {
  488. display: flex;
  489. align-items: center;
  490. .text {
  491. font-size: 32upx;
  492. font-family: PingFang SC;
  493. font-weight: bold;
  494. color: #111111;
  495. line-height: 1;
  496. &.name {
  497. margin-right: 30upx;
  498. }
  499. }
  500. }
  501. .address {
  502. font-size: 28upx;
  503. font-family: PingFang SC;
  504. font-weight: 500;
  505. color: #666666;
  506. line-height: 42upx;
  507. text-align: left;
  508. margin-top: 23upx;
  509. }
  510. }
  511. .arrow-box {
  512. width: 12upx;
  513. height: 23upx;
  514. display: flex;
  515. align-items: cenetr;
  516. justify-content: cenetr;
  517. image {
  518. width: 100%;
  519. height: 100%;
  520. }
  521. }
  522. }
  523. .shopbox {
  524. background: #FFFFFF;
  525. border-radius: 16rpx;
  526. margin-bottom: 20rpx;
  527. .points {
  528. padding: 0 !important;
  529. }
  530. .remarks {
  531. padding: 0 !important;
  532. }
  533. }
  534. .shopbox-name {
  535. padding: 30rpx 30rpx 0 30rpx;
  536. font-family: PingFang SC, PingFang SC;
  537. font-weight: 400;
  538. font-size: 30rpx;
  539. color: #111;
  540. overflow: hidden;
  541. white-space: nowrap;
  542. text-overflow: ellipsis;
  543. }
  544. .goods-list {
  545. // margin-top: 20upx;
  546. padding: 0 30upx;
  547. background-color: #FFFFFF;
  548. border-radius: 16upx;
  549. .item {
  550. padding: 30upx 0;
  551. border-bottom: 1px solid #EDEEEF;
  552. display: flex;
  553. align-items: center;
  554. .img-box {
  555. width: 160upx;
  556. height: 160upx;
  557. margin-right: 30upx;
  558. image {
  559. width: 100%;
  560. height: 100%;
  561. }
  562. }
  563. .info-box {
  564. width: calc(100% - 190upx);
  565. height: 160upx;
  566. display: flex;
  567. flex-direction: column;
  568. justify-content: space-between;
  569. .name-box {
  570. font-size: 28upx;
  571. font-family: PingFang SC;
  572. font-weight: 500;
  573. color: #111111;
  574. line-height: 40upx;
  575. .tag {
  576. display: inline-block;
  577. padding: 0 6upx;
  578. height: 30upx;
  579. background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
  580. border-radius: 4upx;
  581. margin-right: 10upx;
  582. font-size: 22upx;
  583. font-family: PingFang SC;
  584. font-weight: bold;
  585. color: #FFFFFF;
  586. line-height: 30upx;
  587. float: left;
  588. margin-top: 7upx;
  589. }
  590. }
  591. .spec {
  592. margin-top: 10upx;
  593. font-size: 24upx;
  594. font-family: PingFang SC;
  595. font-weight: 500;
  596. color: #999999;
  597. line-height: 1;
  598. }
  599. .price-num {
  600. display: flex;
  601. align-items: center;
  602. justify-content: space-between;
  603. .price {
  604. display: flex;
  605. align-items: flex-end;
  606. .unit {
  607. font-size: 24upx;
  608. font-family: PingFang SC;
  609. font-weight: 500;
  610. color: #111111;
  611. line-height: 1.2;
  612. margin-right: 4upx;
  613. }
  614. .num {
  615. font-size: 32upx;
  616. font-family: PingFang SC;
  617. font-weight: 500;
  618. color: #111111;
  619. line-height: 1;
  620. }
  621. }
  622. .num {
  623. font-size: 24upx;
  624. font-family: PingFang SC;
  625. font-weight: 500;
  626. color: #999999;
  627. line-height: 1;
  628. }
  629. }
  630. }
  631. }
  632. .sub-total {
  633. height: 88upx;
  634. display: flex;
  635. align-items: center;
  636. justify-content: flex-end;
  637. .label {
  638. font-size: 24upx;
  639. font-family: PingFang SC;
  640. font-weight: 500;
  641. color: #999999;
  642. }
  643. .price {
  644. display: flex;
  645. align-items: flex-end;
  646. .unit {
  647. font-size: 24upx;
  648. font-family: PingFang SC;
  649. font-weight: 500;
  650. color: #FF6633;
  651. line-height: 1.2;
  652. margin-right: 4upx;
  653. }
  654. .num {
  655. font-size: 32upx;
  656. font-family: PingFang SC;
  657. font-weight: bold;
  658. color: #FF6633;
  659. line-height: 1;
  660. }
  661. }
  662. }
  663. }
  664. .price-info {
  665. background: #FFFFFF;
  666. border-radius: 16upx;
  667. &-title {
  668. padding: 30rpx 30rpx 20rpx 30rpx;
  669. font-family: PingFang SC, PingFang SC;
  670. font-weight: 500;
  671. font-size: 30rpx;
  672. color: #111;
  673. }
  674. &-unit {
  675. font-size: 24rpx;
  676. }
  677. &-num {
  678. font-size: 28rpx;
  679. }
  680. }
  681. .points {
  682. height: 88upx;
  683. width: 100%;
  684. padding: 0 30upx;
  685. box-sizing: border-box;
  686. background: #FFFFFF;
  687. border-radius: 16upx;
  688. display: flex;
  689. align-items: center;
  690. justify-content: space-between;
  691. .left {
  692. display: flex;
  693. align-items: center;
  694. image {
  695. width: 28upx;
  696. height: 28upx;
  697. margin-right: 20upx;
  698. }
  699. .text {
  700. font-size: 28upx;
  701. font-family: PingFang SC;
  702. font-weight: 500;
  703. color: #666666;
  704. }
  705. }
  706. .right {
  707. display: flex;
  708. align-items: center;
  709. .text {
  710. font-size: 28upx;
  711. font-family: PingFang SC;
  712. font-weight: 500;
  713. color: #111111;
  714. }
  715. image {
  716. margin-left: 15upx;
  717. width: 14upx;
  718. height: 24upx;
  719. }
  720. }
  721. }
  722. .remarks {
  723. height: 88upx;
  724. padding: 0 30upx;
  725. background: #FFFFFF;
  726. border-radius: 16upx;
  727. display: flex;
  728. align-items: center;
  729. input {
  730. width: 100%;
  731. font-size: 28upx;
  732. font-family: PingFang SC;
  733. font-weight: 500;
  734. color: #000000;
  735. }
  736. .input {
  737. font-size: 28upx;
  738. font-family: PingFang SC;
  739. font-weight: 500;
  740. color: #999999;
  741. }
  742. }
  743. }
  744. .btn-foot {
  745. box-sizing: border-box;
  746. width: 100%;
  747. height: 121upx;
  748. background: #FFFFFF;
  749. padding: 16upx 30upx 16upx 60upx;
  750. display: flex;
  751. align-items: center;
  752. justify-content: flex-end;
  753. position: fixed;
  754. left: 0;
  755. bottom: 0;
  756. z-index: 99;
  757. .right {
  758. display: flex;
  759. align-items: center;
  760. .total {
  761. display: flex;
  762. align-items: flex-end;
  763. margin-right: 36upx;
  764. .label {
  765. font-size: 26upx;
  766. font-family: PingFang SC;
  767. font-weight: 500;
  768. color: #999999;
  769. line-height: 1.5;
  770. }
  771. .price {
  772. display: flex;
  773. align-items: flex-end;
  774. .unit {
  775. font-size: 32upx;
  776. font-family: PingFang SC;
  777. font-weight: bold;
  778. color: #FF6633;
  779. line-height: 1.2;
  780. margin-right: 10upx;
  781. }
  782. .num {
  783. font-size: 50upx;
  784. font-family: PingFang SC;
  785. font-weight: bold;
  786. color: #FF6633;
  787. line-height: 1;
  788. }
  789. }
  790. }
  791. .btn {
  792. width: 200upx;
  793. height: 88upx;
  794. line-height: 88upx;
  795. text-align: center;
  796. font-size: 30upx;
  797. font-family: PingFang SC;
  798. font-weight: bold;
  799. color: #FFFFFF;
  800. background: #0bb3f2;
  801. border-radius: 44upx;
  802. }
  803. }
  804. }
  805. </style>
  806. <style lang="less" scoped>
  807. .coupon {
  808. height: 100%;
  809. }
  810. /*优惠券列表公共*/
  811. .coupon-list {}
  812. .coupon-list .item {
  813. display: flex;
  814. flex-direction: column;
  815. justify-content: center;
  816. align-items: center;
  817. width: 100%;
  818. height: 1.7 * 100rpx;
  819. margin-bottom: 0.16 * 100rpx;
  820. }
  821. .coupon-list .item .money {
  822. background-size: 100% 100%;
  823. width: 2.4 * 100rpx;
  824. height: 100%;
  825. color: #fff;
  826. font-size: 0.36 * 100rpx;
  827. font-weight: bold;
  828. text-align: center;
  829. display: flex;
  830. flex-direction: column;
  831. align-items: center;
  832. justify-content: center;
  833. position: relative;
  834. }
  835. .coupon-list .item .money .img {
  836. position: absolute;
  837. width: 2.4 * 100rpx;
  838. height: 100%;
  839. color: #fff;
  840. }
  841. .coupon-list .item .money .num {
  842. font-size: 0.6 * 100rpx;
  843. }
  844. .coupon-list .item .money .pic-num {
  845. font-size: 20rpx;
  846. z-index: 99;
  847. }
  848. .coupon-list .item .text {
  849. width: 4.5 * 100rpx;
  850. padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
  851. background-color: #fff;
  852. box-sizing: border-box;
  853. }
  854. .coupon-list .item .text .condition {
  855. font-size: 0.3 * 100rpx;
  856. color: #282828;
  857. height: 0.93 * 100rpx;
  858. line-height: 0.93 * 100rpx;
  859. border-bottom: 1px solid #f0f0f0;
  860. }
  861. .coupon-list .item .text .data {
  862. font-size: 0.2 * 100rpx;
  863. color: #999;
  864. height: 0.76 * 100rpx;
  865. }
  866. .coupon-list .item .text .data .bnt {
  867. width: 1.36 * 100rpx;
  868. height: 0.44 * 100rpx;
  869. border-radius: 0.22 * 100rpx;
  870. font-size: 0.22 * 100rpx;
  871. color: #fff;
  872. text-align: center;
  873. line-height: 0.44 * 100rpx;
  874. background-color: red;
  875. }
  876. .coupon-list .item .text .data .bnt.gray {
  877. background-color: #ccc;
  878. }
  879. </style>