teacher_authentication.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view>
  3. <view class="requires2">
  4. <uni-row >
  5. <uni-col offset="1">
  6. <text>通过认证,即可查看收费规则!</text>
  7. </uni-col>
  8. </uni-row>
  9. </view>
  10. <view v-show="isShow">
  11. <view class="requires" @click="requireDetail(item)">
  12. <uni-row >
  13. <uni-col offset="1":span="12">
  14. <text>ID</text>
  15. <text class="fontStyle">{{item.uid}}</text>
  16. </uni-col>
  17. <uni-col :span="10">
  18. <text>全名</text>
  19. <text class="fontStyle">{{item.name}}</text>
  20. </uni-col>
  21. </uni-row>
  22. <uni-row >
  23. <uni-col offset="1">
  24. <text>高校</text>
  25. <text class="fontStyle">{{item.school}}</text>
  26. </uni-col>
  27. </uni-row>
  28. <uni-row>
  29. <uni-col offset="1" :span="12">
  30. <text>学历</text>
  31. <text class="fontStyle">{{item.education}}</text>
  32. </uni-col>
  33. <uni-col :span="10">
  34. <text>手机</text>
  35. <text class="fontStyle">{{item.phone}}</text>
  36. </uni-col>
  37. </uni-row>
  38. <uni-row >
  39. <uni-col offset="1" :span="17">
  40. <text>微信</text>
  41. <text class="fontStyle">{{item.weixinId}}</text>
  42. </uni-col>
  43. <uni-col :span="5">
  44. <text class="fontStyle" style="color: red;">{{authentication}}</text>
  45. </uni-col>
  46. </uni-row>
  47. </view>
  48. </view>
  49. <view class="apply-btn-wrapper" v-if="isShowApplyBtn">
  50. <button class="apply-btn" @click="applyButton">教员认证</button>
  51. </view>
  52. <view class="feeRule-btn-wrapper" v-if="isShowFeeRuleBtn">
  53. <button class="feeRule-btn" @click="feeRuleButton">收费规则</button>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. import { mapState, mapMutations } from 'vuex';
  59. export default {
  60. computed: {
  61. ...mapState('m_user', ['authentication'])
  62. },
  63. data() {
  64. return {
  65. item: {},
  66. isShow: false,
  67. isShowApplyBtn: false,
  68. isShowFeeRuleBtn: false
  69. };
  70. },
  71. onShow() {
  72. this.getPersonAuthorize()
  73. },
  74. methods: {
  75. ...mapMutations('m_user', ['updateAuthentication']),
  76. // 获取认证信息
  77. async getPersonAuthorize() {
  78. const { data: result } = await uni.$http.get('/education/teacher-certifications/findInfosByUid')
  79. this.item = result.data.one
  80. if (this.item == null) {
  81. this.updateAuthentication('未申请认证')
  82. this.isShowApplyBtn = true
  83. } else {
  84. this.isShow = true
  85. //this.item.graduateMonth = '2022-02'//后端接口写好后,这里不用了
  86. if (this.item.verifyRefuseReason == null) {
  87. this.item.verifyRefuseReason = '无'
  88. }
  89. this.updateAuthentication(result.data.one.verifyStatus)
  90. if (result.data.one.verifyStatus == "已通过"){
  91. this.isShowFeeRuleBtn = true
  92. }
  93. }
  94. },
  95. applyButton() {
  96. this.isShowApplyBtn = false
  97. uni.navigateTo({
  98. url:'/subpkg/teacher/authentication/teacher_authentication_add'
  99. })
  100. },
  101. feeRuleButton() {
  102. uni.navigateTo({
  103. url:'/subpkg/my/fee/feeRule_teacher'
  104. })
  105. },
  106. requireDetail(item) {
  107. uni.navigateTo({
  108. url: '/subpkg/teacher/authentication/teacher_authentication_detail?item=' + encodeURIComponent(JSON.stringify(this.item))
  109. })
  110. }
  111. }
  112. }
  113. </script>
  114. <!-- 设置页面背景 -->
  115. <style lang="scss">
  116. page{
  117. height: 100%;
  118. // background-color: #FFF;
  119. }
  120. </style>
  121. <style lang="scss" scoped>
  122. .requires {
  123. background-color: #FFF;
  124. margin: 20rpx 20rpx;
  125. border-radius: 30rpx;
  126. font-size: 30rpx;
  127. padding: 20rpx 20rpx;
  128. //font-weight: bold;
  129. .fontStyle {
  130. font-weight: bold;
  131. margin-left: 10rpx;
  132. }
  133. .authorize {
  134. color: red;
  135. }
  136. }
  137. .requires2 {
  138. background-color: #FFF;
  139. margin: 20rpx 20rpx;
  140. border-radius: 50rpx;
  141. font-size: 30rpx;
  142. padding: 20rpx 20rpx;
  143. //font-weight: bold;
  144. color: gray;
  145. display: flex;
  146. align-items: center;
  147. justify-content: center;
  148. }
  149. // 底部按钮
  150. .feeRule-btn-wrapper,
  151. .apply-btn-wrapper{
  152. margin-top: 60rpx;
  153. height: 140rpx;
  154. align-items: center;
  155. }
  156. .feeRule-btn,
  157. .apply-btn{
  158. width: 300rpx;
  159. border-radius: 50rpx;
  160. // margin-bottom: 40rpx;
  161. background-color: #35b882;
  162. font-size: 35rpx;
  163. color:#fff;
  164. }
  165. </style>