404.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="container">
  3. <view class="img">
  4. <img src="@/static/6.png" />
  5. </view>
  6. <view class="info">
  7. {{ info }}
  8. </view>
  9. <!-- 弹窗区域 -->
  10. <uni-popup ref="popup" :is-mask-click="false">
  11. <view class="pop">
  12. <image class="pop_img" src="/static/3.png" mode="aspectFill"></image>
  13. <!-- 关闭图标 -->
  14. <uni-icons class="pop_close" type="closeempty" color="#808080" size="20" @click="handleClose"></uni-icons>
  15. <view class="pop_title">温馨提示</view>
  16. <view class="pop_text" v-if="pageValue == 2">{{ tips.chooseDormitory }}</view>
  17. <view class="pop_text" v-if="pageValue == 3">{{ tips.carOrder }}</view>
  18. <view class="pop_btn" @click="handleFinish">去完成缴费</view>
  19. </view>
  20. </uni-popup>
  21. </view>
  22. </template>
  23. <script setup>
  24. import { ref, nextTick } from 'vue'
  25. import { onLoad } from '@dcloudio/uni-app'
  26. import { getQueryString } from '../../utils/getParams.js'
  27. import { getSettingsInfoReq } from '@/api/index.js'
  28. const info = ref('')
  29. const popup = ref()
  30. // 页面类型
  31. const pageValue = ref()
  32. const tips = ref({})
  33. onLoad((options) => {
  34. // console.log(options)
  35. if (options.pageValue) {
  36. pageValue.value = options.pageValue
  37. }
  38. // 获取设置数据
  39. getSettingsInfo()
  40. nextTick(() => {
  41. getMessage()
  42. })
  43. })
  44. const getMessage = () => {
  45. const message = getQueryString('message')
  46. if (message) {
  47. info.value = message
  48. if (message == '请先完成缴费') {
  49. popup.value.open()
  50. }
  51. } else {
  52. info.value = '404'
  53. }
  54. }
  55. // 获取设置数据
  56. const getSettingsInfo = async () => {
  57. const res = await getSettingsInfoReq()
  58. // console.log(res)
  59. if (res.code == 200) {
  60. tips.value = res.data
  61. }
  62. }
  63. // 弹窗关闭图标回调
  64. const handleClose = () => {
  65. popup.value.close()
  66. }
  67. // 去完成缴费回调
  68. const handleFinish = () => {
  69. window.location.href = `https://pay.ncjti.edu.cn`
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .container {
  74. display: flex;
  75. flex-direction: column;
  76. align-items: center;
  77. .img {
  78. margin-top: 200rpx;
  79. width: 480rpx;
  80. height: 508rpx;
  81. img {
  82. width: 100%;
  83. height: 100%;
  84. }
  85. }
  86. .info {
  87. padding: 0 30rpx;
  88. }
  89. .pop {
  90. position: relative;
  91. box-sizing: border-box;
  92. padding: 150rpx 20rpx 50rpx;
  93. width: 659rpx;
  94. height: 728rpx;
  95. border-radius: 15rpx;
  96. background: linear-gradient(180deg, #ebf2ff 0%, #ffffff 100%);
  97. .pop_img {
  98. position: absolute;
  99. top: -103rpx;
  100. left: 227rpx;
  101. width: 206rpx;
  102. height: 206rpx;
  103. }
  104. .pop_close {
  105. position: absolute;
  106. top: 19rpx;
  107. right: 29rpx;
  108. }
  109. .pop_title {
  110. margin-bottom: 28rpx;
  111. font-size: 32rpx;
  112. font-weight: bold;
  113. }
  114. .pop_text {
  115. font-size: 28rpx;
  116. line-height: 50rpx;
  117. }
  118. .pop_btn {
  119. display: flex;
  120. align-items: center;
  121. justify-content: center;
  122. margin: 90rpx auto 0;
  123. width: 543rpx;
  124. height: 100rpx;
  125. color: #fff;
  126. font-size: 32rpx;
  127. border-radius: 8rpx;
  128. background-color: #0061ff;
  129. }
  130. }
  131. }
  132. </style>