confirmOrder.vue 20 KB

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