pay.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="paybox">
  3. <view class="pay pt40">
  4. <view class="paytit mb9 txc">实付金额</view>
  5. <view class="paynum mb9 txc">¥357.20</view>
  6. <view class="paytit txc">剩余支付时间<text class="text">14:59</text></view>
  7. <view class="paystu mt35">
  8. <view class="tit mb16">支付方式</view>
  9. <view class="buylist flexc mb10">
  10. <image :src="zfbimg" class="zfbimg"></image>
  11. <view class="tit flex1">支付宝支付</view>
  12. <image :src="chose" class="choseimg" v-if="paystu=='zfb'"></image>
  13. <image :src="nchose" class="choseimg" v-else></image>
  14. </view>
  15. <view class="buylist flexc mb12">
  16. <image :src="wximg" class="zfbimg"></image>
  17. <view class="tit flex1">微信支付</view>
  18. <image :src="chose" class="choseimg" v-if="paystu=='wx'"></image>
  19. <image :src="nchose" class="choseimg" v-else></image>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="pay pt16">
  24. <view class="paystu">
  25. <view class="tit mb16 flexc">选择优惠方式<image :src="ywico" class="ywico"></image></view>
  26. <view class="buylist flexc mb10">
  27. <view class="tit flex1">附近商超优惠券200元</view>
  28. <image :src="chose" class="choseimg" v-if="paystu=='zfb'"></image>
  29. <image :src="nchose" class="choseimg" v-else></image>
  30. </view>
  31. <view class="buylist flexc">
  32. <view class="tit flex1">支付立减20元</view>
  33. <image :src="chose" class="choseimg" v-if="paystu=='wx'"></image>
  34. <image :src="nchose" class="choseimg" v-else></image>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="plr12 mt40">
  39. <view class="rhbtn" @click="getSubmit">立即支付</view>
  40. </view>
  41. <loading></loading>
  42. </view>
  43. </template>
  44. <script>
  45. import config from '@/config'
  46. const baseUrl = config.baseUrl
  47. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  48. export default{
  49. components:{},
  50. data(){
  51. return{
  52. chose:require("@/work/static/chose.png"),
  53. nchose:require("@/work/static/nchose.png"),
  54. zfbimg:require("@/work/static/zfb.png"),
  55. wximg:require("@/work/static/wx.png"),
  56. ywico:require("@/work/static/manage/ywico.png"),
  57. rimg:require("@/static/images/rimg.png"),
  58. list:[],
  59. pageSize: 10,
  60. pageNum: 1,
  61. reachflag: true,
  62. wtdt:'',
  63. }
  64. },
  65. onLoad: function() {
  66. },
  67. methods:{
  68. checkPermi, checkRole,
  69. getSubmit(){
  70. this.$tab.navigateTo("/work/pages/manage/success")
  71. },
  72. getDataFn(){
  73. var params={
  74. pageSize:this.pageSize,
  75. pageNum: this.pageNum,
  76. }
  77. params.noticeType=this.tabidx
  78. getNoticeList(params).then(res=>{
  79. if(res.code==200){
  80. if (res.rows.length < this.pageSize) {
  81. this.reachflag = false
  82. this.wtdt = '到底了~';
  83. } else {
  84. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  85. if (num < res.total) {
  86. this.reachflag = true
  87. this.wtdt = ''
  88. } else {
  89. this.reachflag = false
  90. this.wtdt = '到底了~';
  91. }
  92. }
  93. if (this.pageNum == 1) {
  94. this.list = res.rows;
  95. } else {
  96. this.list = this.list.concat(res.rows)
  97. }
  98. }else{
  99. this.$toast(res.msg)
  100. }
  101. })
  102. },
  103. }
  104. }
  105. </script>
  106. <style>
  107. page{background: #F3F3F0;}
  108. </style>
  109. <style lang="scss" scoped>
  110. .paybox{padding: 20rpx 24rpx;
  111. .pay{background: #FFFFFF;margin-bottom: 24rpx;border-radius: 20rpx;
  112. .paytit{font-weight: 500;font-size: 24rpx;color: #666666;
  113. .text{color: #F40027;margin-left: 12rpx;}
  114. }
  115. .paynum{font-weight: bold;font-size: 48rpx;
  116. color: #321E1E;}
  117. .ywico{width: 24rpx;height: 24rpx;margin-left: 16rpx;}
  118. }
  119. .paystu{padding:0 24rpx 22rpx;
  120. .buylist{padding:0 26rpx;min-height: 80rpx;
  121. .txt{font-weight: 500;font-size: 24rpx;color: #AAAAAA;flex: 0 0 auto;margin-left:16rpx;}
  122. .rimg{width: 16rpx;height: 24rpx;flex: 0 0 auto;margin-left:16rpx;}
  123. .zfbimg{width: 58rpx;height: 58rpx;margin-right: 20rpx;flex: 0 0 auto;}
  124. .choseimg{width: 30rpx;height: 30rpx;margin-left: 30rpx;flex: 0 0 auto;}
  125. }
  126. }
  127. }
  128. </style>