index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="modal_container" v-if="visible" @touchmove.stop.prevent>
  3. <view class="modal_box relative">
  4. <view class="h-172 flex-col flex-center">
  5. <view class="fs-32 lh-44rpx fw-500">核销信息</view>
  6. <view class="fs-26 lh-36rpx mt-28" v-if="productType == 4">已核销 {{writeOff}} / 需要核销 {{writeTimes}}</view>
  7. </view>
  8. <view class="mt-52 flex-col flex-center">
  9. <view class="qrcode flex-center">
  10. <view class="qrcode_content">
  11. <!-- #ifdef MP -->
  12. <image :src="qrc" class="image"></image>
  13. <!-- #endif -->
  14. <!-- #ifdef H5 -->
  15. <image v-if="$wechat.isWeixin()" :src="qrc" class="image"></image>
  16. <w-qrcode v-else :options="qrcode"></w-qrcode>
  17. <!-- #endif -->
  18. <!-- #ifdef APP-PLUS -->
  19. <w-qrcode :options="qrcode"></w-qrcode>
  20. <!-- #endif -->
  21. </view>
  22. </view>
  23. <view class="bg-primary-light qrocode-num rd-16rpx flex-center fs-32 fw-500 font-num mt-48">{{verifyCode}}</view>
  24. <view class="mt-24 text--w111-999 fs-24" v-if="writeDay">核销时间:{{writeDay}}</view>
  25. </view>
  26. <text class="iconfont icon-ic_close1 close fs-48 text--w111-fff"></text>
  27. </view>
  28. <view class="mask z-90" @click="closeModal"></view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. props:{
  34. visible: {
  35. type: Boolean,
  36. default: false,
  37. },
  38. qrcode:{
  39. type:Object,
  40. default: ()=>{}
  41. },
  42. verifyCode:{
  43. type: String,
  44. default:""
  45. },
  46. writeDay:{
  47. type: String,
  48. default:""
  49. },
  50. writeOff:{
  51. type: [String, Number],
  52. default: 0
  53. },
  54. writeTimes:{
  55. type: [String, Number],
  56. default: 0
  57. },
  58. productType:{
  59. type: Number,
  60. default: 0
  61. },
  62. qrc:{
  63. type: String,
  64. default:""
  65. },
  66. },
  67. methods:{
  68. moveHandle(){
  69. return false
  70. },
  71. closeModal(){
  72. this.$emit('closeModal');
  73. }
  74. }
  75. }
  76. </script>
  77. <style>
  78. .modal_box{
  79. position: fixed;
  80. left: 50%;
  81. top: 50%;
  82. transform: translate(-50%,-50%);
  83. z-index: 99;
  84. width:600rpx;
  85. height:906rpx;
  86. background:#fff;
  87. border-radius:32rpx;
  88. -webkit-mask: radial-gradient(circle at 14rpx 172rpx, transparent 14rpx, red 0) -14rpx;
  89. }
  90. .h-172{
  91. height:172rpx;
  92. border-bottom: 1px dashed #ccc;
  93. }
  94. .z-90{
  95. z-index:90;
  96. }
  97. .qrcode{
  98. width:440rpx;
  99. height:440rpx;
  100. background-image: url('../../static/qrcode_bg.png');
  101. background-size:100%;
  102. background-repeat: no-repeat;
  103. }
  104. .qrcode_content{
  105. width:360rpx;
  106. height:360rpx;
  107. }
  108. .bg-primary-light{
  109. background: var(--view-minorColorT);
  110. }
  111. .qrocode-num{
  112. width:440rpx;
  113. height:80rpx;
  114. }
  115. .close{
  116. position: absolute;
  117. left:50%;
  118. bottom: -96rpx;
  119. transform: translateX(-50%);
  120. }
  121. .qrcode_content .image {
  122. width: 100%;
  123. height: 100%;
  124. }
  125. </style>