学员端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.9 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="签署合同"></topNavbar>
  4. <!-- <view class="pad">
  5. <view class="card">
  6. <view class="h2">教学合同</view>
  7. </view>
  8. <view class="btnBg" @click="$goPage('/pages/indexEntry/enroll/payment/payment')">同意并签字确认</view>
  9. </view> -->
  10. <web-view :src="url"></web-view>
  11. </view>
  12. </template>
  13. <script>
  14. import {
  15. getContractStatus,
  16. getSignContract
  17. } from '@/config/api.js'
  18. export default {
  19. data() {
  20. return {
  21. url: '',
  22. schoolId: ''
  23. }
  24. },
  25. beforeDestroy() {
  26. clearInterval(this.timer)
  27. this.timer = null
  28. },
  29. onHide() {
  30. clearInterval(this.timer)
  31. this.timer = null
  32. },
  33. onLoad(options) {
  34. this.schoolId = options.schoolId?options.schoolId:this.vuex_userInfo.schoolId
  35. this.timer = setInterval(() => {
  36. this.getContractStatusFn()
  37. }, 3000)
  38. this.getSignContractFn()
  39. },
  40. methods: {
  41. async getSignContractFn() {
  42. uni.showLoading({
  43. title: '正在加载合同...'
  44. })
  45. let info = this.vuex_userInfo
  46. const {
  47. data: res
  48. } = await getSignContract({
  49. schoolId: this.schoolId,
  50. studentId: this.studentId
  51. })
  52. uni.hideLoading()
  53. this.url = res.url
  54. },
  55. // 查询签约状态
  56. async getContractStatusFn() {
  57. const {
  58. data: res
  59. } = await getContractStatus({
  60. studentId: this.studentId
  61. })
  62. if (res.flowStatus == 2) {
  63. clearInterval(this.timer)
  64. this.timer = null
  65. uni.navigateTo({
  66. url: '/pages/indexEntry/enroll/registInfo/registInfo'
  67. })
  68. if (res.flowStatus > 2) {
  69. clearInterval(this.timer)
  70. this.timer = null
  71. this.$u.toast('合同已撤销或过期')
  72. }
  73. }
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. .card {
  80. .h2 {
  81. min-height: 800rpx;
  82. text-align: center;
  83. padding: 40rpx 0;
  84. }
  85. }
  86. .btnBg {
  87. width: 396rpx !important;
  88. margin: 100rpx auto 100rpx auto;
  89. }
  90. </style>