packageOrderPay.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  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. </view>
  11. <view class="arrow-box">
  12. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png" mode=""></image>
  13. </view>
  14. </view>
  15. <view class="address-box" v-if="address!=null" @click="openAddress()">
  16. <view class="left">
  17. <view class="name-box">
  18. <text class="text name">{{address.realName}}</text>
  19. <text class="text" v-if="address.phone!=null">{{address.phone}}</text>
  20. </view>
  21. <view class="address">
  22. {{address.address}}
  23. </view>
  24. </view>
  25. <view class="arrow-box">
  26. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png" mode=""></image>
  27. </view>
  28. </view>
  29. <view class="other-info">
  30. <view class="title">支付明细</view>
  31. <view class="item">
  32. <view class="left">
  33. <text class="label">应付金额:</text>
  34. </view>
  35. <view class="right">
  36. <text class="text" >{{payPrice}}</text>
  37. </view>
  38. </view>
  39. <view class="item" v-if="order!=null&&(order.userCouponId==null||order.userCouponId==0)" @click.stop="openCoupon()">
  40. <view class="left">
  41. <text class="label">优惠券:</text>
  42. </view>
  43. <view class="right">
  44. <text class="text">{{couponText}}</text>
  45. <image v-if="userCouponId!=0" @click.stop="delCoupon()" class="ic-close" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/close.png"></image>
  46. <image class="ic-back" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
  47. </view>
  48. </view>
  49. <view class="item" >
  50. <view class="left">
  51. <text class="label">优惠金额:</text>
  52. </view>
  53. <view class="right">
  54. <text class="text">{{discountMoney}}</text>
  55. </view>
  56. </view>
  57. <view class="item">
  58. <view class="left">
  59. <text class="label">支付金额:</text>
  60. </view>
  61. <view class="right">
  62. <text class="text">{{payMoney}}</text>
  63. </view>
  64. </view>
  65. <view class="item">
  66. <view class="left">
  67. <text class="label">物流代收:</text>
  68. </view>
  69. <view class="right">
  70. <text class="text">{{payRemain}}</text>
  71. </view>
  72. </view>
  73. <view class="item">
  74. <view class="left">
  75. <text class="label">邮费:</text>
  76. </view>
  77. <view class="right">
  78. <text class="text">{{payDelivery}}</text>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="pay-type">
  83. <view class="title">支付方式</view>
  84. <radio-group @change="payTypeChange" >
  85. <view class="item" v-if="checkPayType('1')&&choose!=1" >
  86. <view class="left" >
  87. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/wecha_pay.png" mode=""></image>
  88. <text class="text">全款支付</text>
  89. </view>
  90. <label>
  91. <text v-show="payType==1" class="text" style="margin-right: 14rpx;">赠送积分:{{integral}}</text>
  92. <radio :value="1" :checked="payType=='1'" />
  93. </label>
  94. </view>
  95. <view class="item" v-if="checkPayType('2')" >
  96. <view class="left" >
  97. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/pay_de.png" mode=""></image>
  98. <text class="text">物流代收</text>
  99. </view>
  100. <label>
  101. <text v-show="payType==2" class="text" style="margin-right: 14rpx;">赠送积分:{{integral}}</text>
  102. <radio :value="2" :checked="payType=='2'" />
  103. </label>
  104. </view>
  105. <view class="item" v-if="checkPayType('3')&&choose!=2" >
  106. <view class="left">
  107. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/pay_1.png" mode=""></image>
  108. <text class="text">货到付款</text>
  109. </view>
  110. <label>
  111. <text v-show="payType==3" class="text" style="margin-right: 14rpx;">赠送积分:{{integral}}</text>
  112. <radio :value="3" :checked="payType=='3'" />
  113. </label>
  114. </view>
  115. </radio-group>
  116. </view>
  117. <!-- v-if="payType=='1'&&order!=null&&order.companyId!=null&&order.companyId>0&&giftPrice<=payPrice" -->
  118. <view class="other-info" v-if="gifts.length>0">
  119. <view class="title">赠品</view>
  120. <view class="drug-list" >
  121. <view v-for="(product) in gifts" class="drug-item" >
  122. <view class="img-box">
  123. <image :src="product.image" mode="aspectFill"></image>
  124. </view>
  125. <view class="drug-info" >
  126. <view>
  127. <view class="name-box ellipsis2">
  128. {{product.productName}}
  129. </view>
  130. <view class="spec">{{product.sku}}</view>
  131. </view>
  132. <view class="num-box">
  133. <view class="price">
  134. <text class="unit">¥</text>
  135. <text class="num">{{product.price.toFixed(2)}}</text>
  136. </view>
  137. <view class="amount">x{{product.count}}</view>
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. <!-- 备注 -->
  144. <view class="remarks" v-if="order!=null">
  145. <input type="text" v-model="order.remark" placeholder="备注留言(选填)" placeholder-class="input" />
  146. </view>
  147. </view>
  148. <u-popup :closeable="true" :show="couponShow" :round="10" mode="bottom" @close="close" @open="open">
  149. <view class="coupon">
  150. <view class="coupon-box" v-if="coupons.length>0" >
  151. <view @click="couponSelect(item)" class="coupon-item" v-for="(item) in coupons">
  152. <view class="left" >
  153. <image v-if="item.status==0" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/0fdd75d89db84458886d38e615011048.png" mode="widthFix"></image>
  154. <image v-if="item.status!=0" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/d950e4c7af1e4464be1a7777e9dca576.png" mode="widthFix"></image>
  155. <view style="z-index: 999;">
  156. ¥<span class="num">{{item.price.toFixed(2)}}</span>
  157. </view>
  158. <view class="pic-num" >满{{item.minPrice.toFixed(2)}}元可用</view>
  159. </view>
  160. <view class="right">
  161. <view class="title">
  162. {{item.title}}
  163. </view>
  164. <view class="btns">
  165. <view v-if="item.status==0||item.status==2" >{{item.limitTime}} 到期</view>
  166. <view v-if="item.status==1">使用时间 {{item.useTime}}</view>
  167. <view class="bnt gray" v-if="item.status==1" >已使用</view>
  168. <view class="bnt gray" v-if="item.status==2" >已过期</view>
  169. <view class="btn" v-if="item.status==0" >使用</view>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. <view class="empty" v-if="coupons.length==0">
  175. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png"></image>
  176. </view>
  177. </view>
  178. </u-popup>
  179. <!-- 底部按钮 -->
  180. <view class="btn-box">
  181. <view class="btn" v-if="order!=null" @click="payOrder()">支付{{payMoney}}元</view>
  182. </view>
  183. </view>
  184. </template>
  185. <script>
  186. import {getConfigByKey} from '@/api/common'
  187. import {getAddressByDefault} from '@/api/userAddress.js'
  188. import {getMyEnableCouponList} from '@/api/user.js'
  189. import {getPackageById} from '@/api/package.js'
  190. import {getPackageOrderById,pay,compute} from '@/api/packageOrder'
  191. export default {
  192. data() {
  193. return {
  194. giftPrice:0.00,
  195. payTypes:[],
  196. addressId:null,
  197. wxPay: true,
  198. address:null,
  199. orderId:null,
  200. order:null,
  201. items:null,
  202. payType:"1",
  203. couponText:"请选择优惠券",
  204. userCouponId:0,
  205. coupons:[],
  206. couponShow:false,
  207. payMoney:0.00,
  208. discountMoney:0,
  209. payRemain:0,
  210. payDelivery:0,
  211. payPrice:0,
  212. gifts:[],
  213. choose: 0,
  214. subMsg: 0, // 0 表示弹出订阅,1表示不需要弹出订阅
  215. integral:0
  216. }
  217. },
  218. onLoad(option) {
  219. this.subMsg = option.subMsg || 0
  220. this.choose = option.choose || 0
  221. this.payType = this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
  222. this.orderId=option.orderId;
  223. var that=this;
  224. uni.$on('updateAddress', (e) => {
  225. that.addressId=e.addressId;
  226. that.address=e;
  227. that.address.address=e.province+e.city+e.district+e.detail
  228. })
  229. this.getAddressByDefault();
  230. },
  231. onShow() {
  232. this.getPackageOrderById();
  233. // this.getPackageById();
  234. this.getConfigByKey();
  235. },
  236. methods: {
  237. getAddressByDefault(){
  238. var data={};
  239. getAddressByDefault(data).then(
  240. res => {
  241. if(res.code==200){
  242. if(res.data!=null){
  243. this.addressId=res.data.addressId;
  244. this.address=res.data;
  245. this.address.address=res.data.province+res.data.city+res.data.district+res.data.detail
  246. }
  247. }else{
  248. uni.showToast({
  249. icon:'none',
  250. title: res.msg,
  251. });
  252. }
  253. },
  254. rej => {}
  255. );
  256. },
  257. getConfigByKey(){
  258. var that=this;
  259. var data={key:"his.package"}
  260. getConfigByKey(data).then(
  261. res => {
  262. if(res.code==200){
  263. this.giftPrice=JSON.parse(res.data).giftPrice;
  264. }
  265. },
  266. rej => {}
  267. );
  268. },
  269. checkPayType(payType){
  270. var flag=false
  271. this.payTypes.forEach(function(value,index,array){
  272. if(value.toString()==payType.toString()){
  273. flag=true;
  274. }
  275. });
  276. return flag;
  277. },
  278. payTypeChange(e){
  279. this.payType=e.detail.value;
  280. this.compute()
  281. },
  282. couponSelect(item){
  283. this.couponShow = false;
  284. //计算金额
  285. this.userCouponId=item.id;
  286. this.couponText=item.price+"元优惠券"
  287. this.compute()
  288. },
  289. open() {
  290. },
  291. close() {
  292. this.couponShow = false
  293. },
  294. openCoupon(){
  295. this.couponShow=true;
  296. },
  297. delCoupon(){
  298. this.userCouponId=0;
  299. this.couponText="请选择优惠券";
  300. this.compute();
  301. },
  302. compute(){
  303. var data={
  304. payType:this.payType,
  305. orderId:this.orderId,
  306. userCouponId:this.userCouponId,
  307. companyId:this.companyId,
  308. companyUserId:this.companyUserId
  309. }
  310. compute(data).then(
  311. res => {
  312. if(res.code==200){
  313. this.payPrice=res.moneys.payPrice.toFixed(2);
  314. this.payMoney=res.moneys.payMoney.toFixed(2);
  315. this.discountMoney=res.moneys.discountMoney.toFixed(2);
  316. this.payDelivery=res.moneys.payDelivery.toFixed(2);
  317. this.payRemain=res.moneys.payRemain.toFixed(2);
  318. this.gifts=res.moneys.gifts;
  319. this.integral = res.moneys.integral;
  320. }
  321. else{
  322. if(res.msg=='用户OPENID不存在 '){
  323. this.$reLoginCheck(res.msg)
  324. return
  325. }
  326. this.payType=1;
  327. this.compute()
  328. this.userCouponId=0;
  329. this.couponText="请选择优惠券"
  330. uni.showToast({
  331. icon:'none',
  332. title: res.msg,
  333. });
  334. }
  335. },
  336. err => {
  337. }
  338. );
  339. },
  340. getMyEnableCouponList(){
  341. var data={
  342. orderId: this.orderId
  343. }
  344. if(this.package.isShow==0){
  345. data.couponType=5;
  346. data.cateId=this.package.privateType
  347. }
  348. else if(this.package.isShow==1){
  349. data.couponType=6;
  350. data.cateId=this.package.diseaseType
  351. }
  352. getMyEnableCouponList(data).then(
  353. res => {
  354. if(res.code==200){
  355. this.coupons=res.data;
  356. }
  357. },
  358. err => {
  359. }
  360. );
  361. },
  362. getPackageOrderById(){
  363. var data={orderId:this.orderId};
  364. getPackageOrderById(data).then(
  365. res => {
  366. if(res.code==200){
  367. this.order=res.order
  368. this.choose = res.choose || 0
  369. this.payType = this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
  370. this.compute();
  371. this.getPackageById(this.order.packageId)
  372. }else{
  373. }
  374. },
  375. rej => {}
  376. );
  377. },
  378. getPackageById(packageId){
  379. let data={packageId:packageId};
  380. if(this.choose == 1 || this.choose == 2) {
  381. data={
  382. packageId:packageId,
  383. choose: this.choose
  384. };
  385. }
  386. getPackageById(data).then(
  387. res => {
  388. if(res.code==200){
  389. this.package=res.data;
  390. this.payTypes=res.data.payType.split(',');
  391. this.payType=this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
  392. this.getMyEnableCouponList();
  393. }else{
  394. }
  395. },
  396. rej => {}
  397. );
  398. },
  399. openAddress(){
  400. uni.navigateTo({
  401. url: '/pages_user/address'
  402. })
  403. },
  404. payOrder(){
  405. var data = {
  406. payType:this.payType,
  407. userCouponId:this.userCouponId,
  408. addressId:this.addressId,
  409. remark:this.order.remark,
  410. orderId:this.order.orderId,
  411. appId: getApp().globalData.appId
  412. };
  413. var that=this;
  414. uni.showLoading();
  415. pay(data).then(
  416. res => {
  417. if(res.code==200){
  418. if(that.subMsg == 1) {
  419. uni.redirectTo({
  420. url:"./packagePayment?orderId="+that.orderId
  421. })
  422. } else {
  423. var temps=['wqKEklE_w5N19w9VAGY74TltPE6Ne3BaFObDD47uDEo']
  424. uni.requestSubscribeMessage({
  425. tmplIds: temps,
  426. success(e) {
  427. setTimeout(function(){
  428. uni.redirectTo({
  429. url:"./packagePayment?orderId="+that.orderId
  430. })
  431. },200);
  432. },
  433. fail(e) {
  434. setTimeout(function(){
  435. uni.redirectTo({
  436. url:"./packagePayment?orderId="+that.orderId
  437. })
  438. },200);
  439. }
  440. })
  441. }
  442. }else{
  443. uni.showToast({
  444. icon:'none',
  445. title: res.msg,
  446. });
  447. this.$reLoginCheck(res.msg)
  448. }
  449. },
  450. rej => {}
  451. );
  452. }
  453. }
  454. }
  455. </script>
  456. <style lang="scss">
  457. .inner-box{
  458. padding: 20upx 20upx 300upx;
  459. .address-box{
  460. box-sizing: border-box;
  461. min-height: 171upx;
  462. background: #FFFFFF;
  463. border-radius: 16upx;
  464. background-image: url(https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/address_bg.png);
  465. background-repeat: no-repeat;
  466. background-size: 100% 30upx;
  467. background-position: left bottom;
  468. padding: 38upx 30upx 36upx;
  469. display: flex;
  470. align-items: center;
  471. justify-content: space-between;
  472. .left{
  473. width: 92%;
  474. .name-box{
  475. display: flex;
  476. align-items: center;
  477. .text{
  478. font-size: 32upx;
  479. font-family: PingFang SC;
  480. font-weight: bold;
  481. color: #111111;
  482. line-height: 1;
  483. &.name{
  484. margin-right: 30upx;
  485. }
  486. }
  487. }
  488. .address{
  489. font-size: 28upx;
  490. font-family: PingFang SC;
  491. font-weight: 500;
  492. color: #666666;
  493. line-height: 42upx;
  494. text-align:left;
  495. margin-top: 23upx;
  496. }
  497. }
  498. .arrow-box{
  499. width: 12upx;
  500. height: 23upx;
  501. display: flex;
  502. align-items: cenetr;
  503. justify-content: cenetr;
  504. image{
  505. width: 100%;
  506. height: 100%;
  507. }
  508. }
  509. }
  510. .goods-list{
  511. margin-top: 20upx;
  512. padding: 0 30upx;
  513. background-color: #FFFFFF;
  514. border-radius: 16upx;
  515. .item{
  516. padding: 30upx 0;
  517. border-bottom: 1px solid #EDEEEF;
  518. display: flex;
  519. align-items: center;
  520. .img-box{
  521. width: 160upx;
  522. height: 160upx;
  523. margin-right: 30upx;
  524. image{
  525. width: 100%;
  526. height: 100%;
  527. }
  528. }
  529. .info-box{
  530. width: calc(100% - 190upx);
  531. height: 160upx;
  532. display: flex;
  533. flex-direction: column;
  534. justify-content: space-between;
  535. .name-box{
  536. font-size: 28upx;
  537. font-family: PingFang SC;
  538. font-weight: 500;
  539. color: #111111;
  540. line-height: 40upx;
  541. .tag{
  542. display: inline-block;
  543. padding: 0 6upx;
  544. height: 30upx;
  545. background: linear-gradient(90deg, #2583EB 0%, #2EDAD4 100%);
  546. border-radius: 4upx;
  547. margin-right: 10upx;
  548. font-size: 22upx;
  549. font-family: PingFang SC;
  550. font-weight: bold;
  551. color: #FFFFFF;
  552. line-height: 30upx;
  553. float: left;
  554. margin-top: 7upx;
  555. }
  556. }
  557. .spec{
  558. margin-top: 10upx;
  559. font-size: 24upx;
  560. font-family: PingFang SC;
  561. font-weight: 500;
  562. color: #999999;
  563. line-height: 1;
  564. }
  565. .price-num{
  566. display: flex;
  567. align-items: center;
  568. justify-content: space-between;
  569. .price{
  570. display: flex;
  571. align-items: flex-end;
  572. .unit{
  573. font-size: 24upx;
  574. font-family: PingFang SC;
  575. font-weight: 500;
  576. color: #111111;
  577. line-height: 1.2;
  578. margin-right: 4upx;
  579. }
  580. .num{
  581. font-size: 32upx;
  582. font-family: PingFang SC;
  583. font-weight: 500;
  584. color: #111111;
  585. line-height: 1;
  586. }
  587. }
  588. .num{
  589. font-size: 24upx;
  590. font-family: PingFang SC;
  591. font-weight: 500;
  592. color: #999999;
  593. line-height: 1;
  594. }
  595. }
  596. }
  597. }
  598. .sub-total{
  599. height: 88upx;
  600. display: flex;
  601. align-items: center;
  602. justify-content: flex-end;
  603. .label{
  604. font-size: 24upx;
  605. font-family: PingFang SC;
  606. font-weight: 500;
  607. color: #999999;
  608. }
  609. .price{
  610. display: flex;
  611. align-items: flex-end;
  612. .unit{
  613. font-size: 24upx;
  614. font-family: PingFang SC;
  615. font-weight: 500;
  616. color: #FF6633;
  617. line-height: 1.2;
  618. margin-right: 4upx;
  619. }
  620. .num{
  621. font-size: 32upx;
  622. font-family: PingFang SC;
  623. font-weight: bold;
  624. color: #FF6633;
  625. line-height: 1;
  626. }
  627. }
  628. }
  629. }
  630. .other-info{
  631. margin-top: 20upx;
  632. background-color: #fff;
  633. border-radius: 20upx;
  634. overflow: hidden;
  635. padding: 0 30upx;
  636. .title{
  637. height: 80upx;
  638. line-height: 80upx;
  639. font-size: 30upx;
  640. color: #000;
  641. font-weight: bold;
  642. border-bottom: 2upx solid #eeeeee;
  643. }
  644. .drug-list{
  645. margin-top: 15rpx;
  646. .drug-item{
  647. padding-bottom: 15upx;
  648. border-bottom: 1px soli #F0F0F0;
  649. display: flex;
  650. align-items: center;
  651. .img-box{
  652. width: 160upx;
  653. height: 160upx;
  654. margin-right: 30upx;
  655. flex-shrink: 0;
  656. image{
  657. width: 100%;
  658. height: 100%;
  659. }
  660. }
  661. .drug-info{
  662. width: calc(100% - 190upx);
  663. height: 160upx;
  664. display: flex;
  665. flex-direction: column;
  666. justify-content: space-between;
  667. .name-box{
  668. font-size: 28upx;
  669. font-family: PingFang SC;
  670. font-weight: 500;
  671. color: #111111;
  672. line-height: 40upx;
  673. .tag{
  674. display: inline-block;
  675. padding: 0 6upx;
  676. height: 30upx;
  677. background: linear-gradient(90deg, #2583EB 0%, #92C1F5 100%);
  678. border-radius: 4upx;
  679. margin-right: 10upx;
  680. font-size: 22upx;
  681. font-family: PingFang SC;
  682. font-weight: bold;
  683. color: #FFFFFF;
  684. line-height: 30upx;
  685. float: left;
  686. margin-top: 7upx;
  687. }
  688. }
  689. .spec{
  690. font-size: 24upx;
  691. font-family: PingFang SC;
  692. font-weight: 500;
  693. color: #999999;
  694. line-height: 1;
  695. margin-top: 10upx;
  696. }
  697. .num-box{
  698. display: flex;
  699. align-items: center;
  700. justify-content: space-between;
  701. .price{
  702. display: flex;
  703. align-items: flex-end;
  704. .unit{
  705. font-size: 24upx;
  706. font-family: PingFang SC;
  707. font-weight: 500;
  708. color: #111111;
  709. line-height: 1.2;
  710. margin-right: 4upx;
  711. }
  712. .num{
  713. font-size: 32upx;
  714. font-family: PingFang SC;
  715. font-weight: 500;
  716. color: #111111;
  717. line-height: 1;
  718. }
  719. }
  720. .use{
  721. font-size: 24upx;
  722. font-family: PingFang SC;
  723. color: #999999;
  724. }
  725. .amount{
  726. font-size: 24upx;
  727. font-family: PingFang SC;
  728. font-weight: 500;
  729. color: #999999;
  730. line-height: 1;
  731. }
  732. }
  733. }
  734. }
  735. }
  736. .item{
  737. height: 80upx;
  738. display: flex;
  739. align-items: center;
  740. justify-content: space-between;
  741. &:last-child{
  742. border-bottom: none;
  743. }
  744. .left{
  745. flex: 1;
  746. display: flex;
  747. align-items: center;
  748. .label{
  749. min-width: 140rpx;
  750. font-size: 28upx;
  751. color: #000;
  752. }
  753. .text{
  754. font-size: 28upx;
  755. color: #1b1b1b;
  756. }
  757. }
  758. .right{
  759. display: flex;
  760. align-items: center;
  761. justify-content: flex-end;
  762. .text{
  763. font-size: 28upx;
  764. color: #1b1b1b;
  765. }
  766. .ic-close{
  767. margin-left: 10rpx;
  768. width: 30rpx;
  769. height:30rpx;
  770. }
  771. .ic-back{
  772. margin-left: 10rpx;
  773. width: 15rpx;
  774. height:30rpx;
  775. }
  776. }
  777. .item-btn{
  778. max-width: 200rpx;
  779. padding: 0rpx 15rpx;
  780. height: 48upx;
  781. border-radius: 24upx;
  782. line-height: 48upx;
  783. font-size: 24upx;
  784. color: #000;
  785. border: 1upx solid #d8d8d8;
  786. display: flex;
  787. align-items: center;
  788. justify-content: center;
  789. }
  790. }
  791. }
  792. .remarks{
  793. height: 88upx;
  794. padding: 0 30upx;
  795. background: #FFFFFF;
  796. border-radius: 16upx;
  797. margin-top: 20upx;
  798. display: flex;
  799. align-items: center;
  800. input{
  801. width: 100%;
  802. font-size: 28upx;
  803. font-family: PingFang SC;
  804. font-weight: 500;
  805. color: #000000;
  806. }
  807. .input{
  808. font-size: 28upx;
  809. font-family: PingFang SC;
  810. font-weight: 500;
  811. color: #999999;
  812. }
  813. }
  814. }
  815. .btn-box{
  816. z-index: 9999;
  817. width: 100%;
  818. padding: 30rpx 30upx 0rpx;
  819. position: fixed;
  820. bottom: 0;
  821. left: 0;
  822. box-sizing: border-box;
  823. background-color: #ffffff;
  824. display: flex;
  825. flex-direction: column;
  826. align-items: center;
  827. justify-content: center;
  828. .btn{
  829. margin-bottom: 20rpx;
  830. width: 100%;
  831. height: 88upx;
  832. line-height: 88upx;
  833. text-align: center;
  834. font-size: 34upx;
  835. font-family: PingFang SC;
  836. font-weight: 400;
  837. color: #FFFFFF;
  838. background: #2583EB;
  839. border-radius: 10upx;
  840. position: relative;
  841. .contact-btn {
  842. position: absolute;
  843. width:100%;
  844. height:100%;
  845. display: flex;
  846. opacity: 0;
  847. }
  848. }
  849. .btn1{
  850. margin-bottom: 20rpx;
  851. width: 100%;
  852. height: 88upx;
  853. line-height: 88upx;
  854. text-align: center;
  855. font-size: 34upx;
  856. font-family: PingFang SC;
  857. font-weight: 400;
  858. color: #2583EB;
  859. border: 1rpx solid #2583EB;
  860. border-radius: 10upx;
  861. position: relative;
  862. .contact-btn {
  863. position: absolute;
  864. width:100%;
  865. height:100%;
  866. display: flex;
  867. opacity: 0;
  868. }
  869. }
  870. }
  871. .pay-type{
  872. box-sizing: border-box;
  873. background: #FFFFFF;
  874. border-radius: 16upx;
  875. margin-top: 20upx;
  876. padding: 40upx 30upx 20rpx;
  877. display: flex;
  878. flex-direction: column;
  879. justify-content: space-between;
  880. .title{
  881. font-size: 28upx;
  882. font-family: PingFang SC;
  883. font-weight: 500;
  884. color: #999999;
  885. line-height: 1;
  886. margin-bottom: 10upx;
  887. }
  888. .item{
  889. padding: 15upx 0upx;
  890. display: flex;
  891. align-items: center;
  892. justify-content: space-between;
  893. .left{
  894. display: flex;
  895. align-items: center;
  896. image{
  897. width: 44upx;
  898. height: 44upx;
  899. margin-right: 20upx;
  900. }
  901. .text{
  902. font-size: 30upx;
  903. font-family: PingFang SC;
  904. font-weight: bold;
  905. color: #222222;
  906. line-height: 1;
  907. }
  908. }
  909. }
  910. }
  911. .coupon{
  912. height: 100%;
  913. .empty{
  914. display: flex;
  915. align-items: center;
  916. justify-content: center;
  917. height: 650rpx;
  918. width: 100%;
  919. image{
  920. width: 280rpx;
  921. height: 200rpx;
  922. }
  923. }
  924. }
  925. .coupon-box{
  926. overflow-y: auto;
  927. padding: 80rpx 20rpx 80rpx;
  928. height: 650rpx;
  929. width: 100%;
  930. display: flex;
  931. flex-direction: column;
  932. align-items: flex-start;
  933. justify-content: flex-start;
  934. box-sizing: border-box;
  935. .coupon-item{
  936. width: 100%;
  937. display: flex;
  938. align-items: center;
  939. justify-content: flex-start;
  940. margin-bottom: 16rpx;
  941. height:170rpx;
  942. &:last-child{
  943. margin-bottom: 0rpx;
  944. }
  945. .left{
  946. color: #fff;
  947. font-size: 36rpx;
  948. font-weight: bold;
  949. text-align: center;
  950. display: flex;
  951. flex-direction: column;
  952. align-items: center;
  953. justify-content: center;
  954. position: relative;
  955. width: 230rpx;
  956. image{
  957. position: absolute;
  958. width: 230rpx;
  959. height:170rpx;
  960. color: #fff;
  961. }
  962. .num{
  963. font-size: 40rpx;
  964. }
  965. .pic-num{
  966. font-size: 20rpx;
  967. z-index: 99;
  968. }
  969. }
  970. .right{
  971. display: flex;
  972. flex-direction: column;
  973. align-items: flex-start;
  974. justify-content: flex-start;
  975. height:170rpx;
  976. width: calc(100% - 230rpx);
  977. padding: 0 17rpx 0 24rpx;
  978. background-color: #fff;
  979. box-sizing: border-box;
  980. .title{
  981. width: 100%;
  982. font-size: 0.3 * 100rpx;
  983. color: #282828;
  984. height: 0.93 * 100rpx;
  985. line-height: 0.93 * 100rpx;
  986. border-bottom: 1px solid #f0f0f0;
  987. }
  988. .btns{
  989. display: flex;
  990. align-items: center;
  991. justify-content: space-between;
  992. width: 100%;
  993. font-size: 0.2 * 100rpx;
  994. color: #999;
  995. height: 0.76 * 100rpx;
  996. .btn{
  997. width: 1.36 * 100rpx;
  998. height: 0.44 * 100rpx;
  999. border-radius: 0.22 * 100rpx;
  1000. font-size: 0.22 * 100rpx;
  1001. color: #fff;
  1002. text-align: center;
  1003. line-height: 0.44 * 100rpx;
  1004. background-color: #2583EB;
  1005. .gray{
  1006. background-color: #ccc;
  1007. }
  1008. }
  1009. }
  1010. }
  1011. }
  1012. }
  1013. </style>