teacher_authentication.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view>
  3. <view v-show="isShow">
  4. <view class="requires" @click="requireDetail(item)">
  5. <uni-row >
  6. <uni-col offset="1">
  7. <text class="fontStyle">用户ID:</text>{{item.uid}}
  8. </uni-col>
  9. </uni-row>
  10. <uni-row >
  11. <uni-col offset="1">
  12. <text class="fontStyle">显示名:</text> {{item.name}} <text>教员</text>
  13. </uni-col>
  14. </uni-row>
  15. <uni-row >
  16. <uni-col offset="1">
  17. <text class="fontStyle">当前高校:</text>{{item.school}}
  18. </uni-col>
  19. </uni-row>
  20. <uni-row>
  21. <uni-col offset="1" :span="11">
  22. <text class="fontStyle">当前学历:</text>{{item.education}}
  23. </uni-col>
  24. <uni-col :span="12">
  25. <text class="fontStyle">手机号:</text>{{item.phone}}
  26. </uni-col>
  27. </uni-row>
  28. <uni-row >
  29. <uni-col offset="1" :span="18">
  30. <text class="fontStyle">微信号:</text>{{item.weixinId}}
  31. </uni-col>
  32. <uni-col :span="5">
  33. <text class="authorize">{{authentication}}</text>
  34. </uni-col>
  35. </uni-row>
  36. </view>
  37. </view>
  38. <uni-fab :pattern="pattern" horizontal="left" vertical="bottom" :content="content"
  39. direction="horizontal" @trigger="trigger" />
  40. </view>
  41. </template>
  42. <script>
  43. import { mapState, mapMutations } from 'vuex';
  44. export default {
  45. computed: {
  46. ...mapState('m_user', ['authentication'])
  47. },
  48. data() {
  49. return {
  50. pattern: {
  51. color: '#7A7E83',
  52. backgroundColor: '#E2F0D9',
  53. selectedColor: '#1296db',
  54. buttonColor: '#E2F0D9',
  55. iconColor: '#000000'
  56. },
  57. content: [{
  58. iconPath: '/static/authorized.png',
  59. selectedIconPath: '/static/authorizedd.png',
  60. text: '老师认证',
  61. active: false
  62. }
  63. ],
  64. item: {},
  65. isShow: false
  66. };
  67. },
  68. onShow() {
  69. this.getPersonAuthorize()
  70. },
  71. methods: {
  72. ...mapMutations('m_user', ['updateAuthentication']),
  73. // 获取认证信息
  74. async getPersonAuthorize() {
  75. const { data: result } = await uni.$http.get('/education/teacher-certifications/findInfosByUid')
  76. this.item = result.data.one
  77. if (this.item == null) {
  78. this.updateAuthentication('未申请认证')
  79. } else {
  80. this.isShow = true
  81. if (this.item.verifyRefuseReason == null) {
  82. this.item.verifyRefuseReason = '无'
  83. }
  84. this.updateAuthentication(result.data.one.verifyStatus)
  85. }
  86. this.content[0].active = false
  87. },
  88. trigger(e) {
  89. this.content[e.index].active = true
  90. if (this.authentication === '未申请认证') {
  91. uni.navigateTo({
  92. url:'/subpkg/teacher/authentication/teacher_authentication_add'
  93. })
  94. } else if (this.authentication === '审核中') {
  95. return uni.$showMsg('正在审核中…')
  96. } else if (this.authentication === '已通过') {
  97. return uni.$showMsg('你已认证过')
  98. } else if (this.authentication === '未通过') {
  99. return uni.$showMsg('请修改认证')
  100. }
  101. },
  102. requireDetail(item) {
  103. uni.navigateTo({
  104. url: '/subpkg/teacher/authentication/teacher_authentication_detail?item=' + encodeURIComponent(JSON.stringify(this.item))
  105. })
  106. }
  107. }
  108. }
  109. </script>
  110. <!-- 设置页面背景 -->
  111. <style lang="scss">
  112. page{
  113. height: 100%;
  114. // background-color: #FFF;
  115. }
  116. </style>
  117. <style lang="scss" scoped>
  118. .requires {
  119. //background-color: #FFF2CC;
  120. margin: 0 20rpx;
  121. border-radius: 10%;
  122. .fontStyle {
  123. font-weight: 600;
  124. }
  125. .authorize {
  126. color: red;
  127. }
  128. }
  129. </style>