payInfo.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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="handlePay">在线缴费</view>
  19. <view class="btn mt20" @click="handleSelect">去选宿舍</view>
  20. <view class="btn mt20" @click="handleUp">上一步</view>
  21. </view>
  22. <!-- web弹窗区域 -->
  23. <uni-popup ref="popup_web" :is-mask-click="false">
  24. <view class="pop_web">
  25. <!-- 关闭图标 -->
  26. <uni-icons class="pop_close" type="closeempty" color="#808080" size="20" @click="handleClose_web"></uni-icons>
  27. <view class="web">
  28. <iframe class="iframe" src="https://pay.ncjti.edu.cn" frameborder="0"></iframe>
  29. </view>
  30. </view>
  31. </uni-popup>
  32. <!-- 提示缴费弹窗区域 -->
  33. <uni-popup ref="popup_tips" :is-mask-click="false">
  34. <view class="pop_tips">
  35. <image class="pop_img" src="/static/3.png" mode="aspectFill"></image>
  36. <!-- 关闭图标 -->
  37. <uni-icons class="pop_close" type="closeempty" color="#808080" size="20" @click="handleClose_tips"></uni-icons>
  38. <view class="pop_title">温馨提示</view>
  39. <view class="pop_text">
  40. {{ pop_info }}
  41. </view>
  42. <view class="pop_btn" @click="handleFinish_tips">去完成缴费</view>
  43. </view>
  44. </uni-popup>
  45. </view>
  46. </template>
  47. <script setup>
  48. import { ref } from 'vue'
  49. import { onLoad, onShow } from '@dcloudio/uni-app'
  50. import { getStudentPayInfo } from '@/api/index.js'
  51. const dataList = ref([])
  52. const isPay = ref()
  53. const popup_web = ref()
  54. const popup_tips = ref()
  55. const pop_info = ref()
  56. onShow(() => {
  57. getInfo()
  58. pop_info.value = uni.getStorageSync('settingInfo').chooseDormitory
  59. })
  60. const getInfo = async () => {
  61. const res = await getStudentPayInfo({
  62. admissNum: uni.getStorageSync('studentInfo').admissNum
  63. })
  64. // console.log(res)
  65. if (res.code == 200) {
  66. dataList.value = res.data.pays
  67. isPay.value = res.data.isPay
  68. }
  69. }
  70. // 上一步按钮回调
  71. const handleUp = () => {
  72. uni.navigateTo({
  73. url: '/pages/arrive/arrive'
  74. })
  75. }
  76. const handleClose_tips = () => {
  77. popup_tips.value.close()
  78. }
  79. const handleFinish_tips = () => {
  80. window.location.href = `https://pay.ncjti.edu.cn`
  81. }
  82. // 点击去选宿舍按钮回调
  83. const handleSelect = () => {
  84. if (isPay.value == 0) {
  85. popup_tips.value.open()
  86. } else if (isPay.value == 1) {
  87. uni.navigateTo({
  88. url: '/pages/select/select'
  89. })
  90. } else {
  91. uni.showToast({
  92. title: '查询不到付费信息',
  93. icon: 'none'
  94. })
  95. }
  96. }
  97. // 继续支付按钮
  98. const handlePay = () => {
  99. window.location.href = `https://pay.ncjti.edu.cn`
  100. }
  101. const handleClose_web = () => {
  102. popup_web.value.close()
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .container {
  107. display: flex;
  108. flex-direction: column;
  109. align-items: center;
  110. box-sizing: border-box;
  111. padding: 30rpx;
  112. min-height: 100vh;
  113. .image {
  114. width: 300rpx;
  115. height: 300rpx;
  116. }
  117. .title {
  118. margin-top: 20rpx;
  119. }
  120. .box {
  121. display: flex;
  122. align-items: center;
  123. justify-content: space-evenly;
  124. width: 100%;
  125. height: 70rpx;
  126. border-bottom: 2rpx solid #e6e6e6;
  127. .box_item {
  128. flex: 1;
  129. box-sizing: border-box;
  130. padding: 0 10rpx;
  131. text-align: center;
  132. text-overflow: ellipsis;
  133. white-space: nowrap;
  134. overflow: hidden;
  135. }
  136. }
  137. .header {
  138. margin-top: 30rpx;
  139. border: none;
  140. background-color: #f0f3f7;
  141. }
  142. .nodata {
  143. margin-top: 15rpx;
  144. }
  145. .btns {
  146. margin-top: 50rpx;
  147. width: 100%;
  148. .btn {
  149. display: flex;
  150. align-items: center;
  151. justify-content: center;
  152. width: 100%;
  153. height: 100rpx;
  154. font-size: 32rpx;
  155. color: #fff;
  156. border-radius: 8rpx;
  157. background-color: #0061ff;
  158. }
  159. .mt20 {
  160. margin-top: 20rpx;
  161. }
  162. .jump {
  163. background-color: #c34747;
  164. }
  165. }
  166. .pop_web {
  167. position: relative;
  168. box-sizing: border-box;
  169. padding: 80rpx 20rpx 50rpx;
  170. width: 90vw;
  171. height: 90vh;
  172. border-radius: 15rpx;
  173. background: linear-gradient(180deg, #ebf2ff 0%, #ffffff 100%);
  174. .pop_close {
  175. position: absolute;
  176. top: 19rpx;
  177. right: 29rpx;
  178. }
  179. .web {
  180. height: calc(90vh - 90rpx);
  181. .iframe {
  182. width: 100%;
  183. height: 100%;
  184. }
  185. }
  186. }
  187. .pop_tips {
  188. position: relative;
  189. box-sizing: border-box;
  190. padding: 150rpx 20rpx 50rpx;
  191. width: 659rpx;
  192. height: 728rpx;
  193. border-radius: 15rpx;
  194. background: linear-gradient(180deg, #ebf2ff 0%, #ffffff 100%);
  195. .pop_img {
  196. position: absolute;
  197. top: -103rpx;
  198. left: 227rpx;
  199. width: 206rpx;
  200. height: 206rpx;
  201. }
  202. .pop_close {
  203. position: absolute;
  204. top: 19rpx;
  205. right: 29rpx;
  206. }
  207. .pop_title {
  208. margin-bottom: 28rpx;
  209. font-size: 32rpx;
  210. font-weight: bold;
  211. }
  212. .pop_text {
  213. font-size: 28rpx;
  214. line-height: 50rpx;
  215. }
  216. .pop_btn {
  217. display: flex;
  218. align-items: center;
  219. justify-content: center;
  220. margin: 90rpx auto 0;
  221. width: 543rpx;
  222. height: 100rpx;
  223. color: #fff;
  224. font-size: 32rpx;
  225. border-radius: 8rpx;
  226. background-color: #0061ff;
  227. }
  228. }
  229. }
  230. </style>