payInfo.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view class="container">
  3. <image class="image" src="/static/9.png" mode="aspectFill"></image>
  4. <view class="title">缴费详情</view>
  5. <view class="box header">
  6. <view class="box_item">缴费类别</view>
  7. <view class="box_item">应缴金额</view>
  8. <view class="box_item">实缴金额</view>
  9. </view>
  10. <view class="box" v-for="(item, index) in dataList" :key="index">
  11. <view class="box_item">{{ item.payName }}</view>
  12. <view class="box_item">{{ item.yjje }}</view>
  13. <view class="box_item">{{ item.sjje }}</view>
  14. </view>
  15. <view class="nodata" v-if="!dataList.length">暂无数据</view>
  16. <!-- 按钮区域 -->
  17. <view class="btns">
  18. <view class="btn" @click="handleUp">上一步</view>
  19. <view class="btn mt20" @click="handleSelect">去选宿舍</view>
  20. <view class="btn mt20" @click="handlePay">继续支付</view>
  21. <view class="btn jump mt20" @click="handleJump">跳过选择宿舍</view>
  22. </view>
  23. <!-- web弹窗区域 -->
  24. <uni-popup ref="popup_web" :is-mask-click="false">
  25. <view class="pop_web">
  26. <!-- 关闭图标 -->
  27. <uni-icons class="pop_close" type="closeempty" color="#808080" size="20" @click="handleClose_web"></uni-icons>
  28. <view class="web">
  29. <iframe class="iframe" src="https://pay.ncjti.edu.cn" frameborder="0"></iframe>
  30. </view>
  31. </view>
  32. </uni-popup>
  33. </view>
  34. </template>
  35. <script setup>
  36. import { ref } from 'vue'
  37. import { onLoad } from '@dcloudio/uni-app'
  38. import { getStudentPayInfo } from '@/api/index.js'
  39. const dataList = ref([])
  40. const isPay = ref()
  41. const popup_web = ref()
  42. onLoad(() => {
  43. getInfo()
  44. })
  45. const getInfo = async () => {
  46. const res = await getStudentPayInfo({
  47. admissNum: uni.getStorageSync('studentInfo').admissNum
  48. })
  49. // console.log(res)
  50. if (res.code == 200) {
  51. dataList.value = res.data.pays
  52. isPay.value = res.data.isPay
  53. }
  54. }
  55. // 上一步按钮回调
  56. const handleUp = () => {
  57. uni.navigateTo({
  58. url: '/pages/arrive/arrive'
  59. })
  60. }
  61. // 点击去选宿舍按钮回调
  62. const handleSelect = () => {
  63. if (isPay.value == 0) {
  64. uni.showToast({
  65. title: '未完成缴费,不可进行当前操作',
  66. icon: 'none'
  67. })
  68. } else if (isPay.value == 1) {
  69. uni.navigateTo({
  70. url: '/pages/select/select'
  71. })
  72. }
  73. }
  74. // 点击跳过按钮回调
  75. const handleJump = () => {
  76. uni.showModal({
  77. title: '提示',
  78. content: '确定跳过选择宿舍前往军训服装尺码采集吗?',
  79. success: (res) => {
  80. if (res.confirm) {
  81. window.location.href = `https://wj.qq.com/s2/14907423/70b4/`
  82. }
  83. }
  84. })
  85. }
  86. // 继续支付按钮
  87. const handlePay = () => {
  88. popup_web.value.open()
  89. }
  90. const handleClose_web = () => {
  91. popup_web.value.close()
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .container {
  96. display: flex;
  97. flex-direction: column;
  98. align-items: center;
  99. box-sizing: border-box;
  100. padding: 30rpx;
  101. min-height: 100vh;
  102. .image {
  103. width: 300rpx;
  104. height: 300rpx;
  105. }
  106. .title {
  107. margin-top: 50rpx;
  108. }
  109. .box {
  110. display: flex;
  111. align-items: center;
  112. justify-content: space-evenly;
  113. width: 100%;
  114. height: 70rpx;
  115. border-bottom: 2rpx solid #e6e6e6;
  116. .box_item {
  117. flex: 1;
  118. box-sizing: border-box;
  119. padding: 0 10rpx;
  120. text-align: center;
  121. text-overflow: ellipsis;
  122. white-space: nowrap;
  123. overflow: hidden;
  124. }
  125. }
  126. .header {
  127. margin-top: 30rpx;
  128. border: none;
  129. background-color: #f0f3f7;
  130. }
  131. .nodata {
  132. margin-top: 15rpx;
  133. }
  134. .btns {
  135. margin-top: 50rpx;
  136. width: 100%;
  137. .btn {
  138. display: flex;
  139. align-items: center;
  140. justify-content: center;
  141. width: 100%;
  142. height: 100rpx;
  143. font-size: 32rpx;
  144. color: #fff;
  145. border-radius: 8rpx;
  146. background-color: #0061ff;
  147. }
  148. .mt20 {
  149. margin-top: 20rpx;
  150. }
  151. .jump {
  152. background-color: #c34747;
  153. }
  154. }
  155. .pop_web {
  156. position: relative;
  157. box-sizing: border-box;
  158. padding: 80rpx 20rpx 50rpx;
  159. width: 90vw;
  160. height: 90vh;
  161. border-radius: 15rpx;
  162. background: linear-gradient(180deg, #ebf2ff 0%, #ffffff 100%);
  163. .pop_close {
  164. position: absolute;
  165. top: 19rpx;
  166. right: 29rpx;
  167. }
  168. .web {
  169. height: calc(90vh - 90rpx);
  170. .iframe {
  171. width: 100%;
  172. height: 100%;
  173. }
  174. }
  175. }
  176. }
  177. </style>