【PT.SCC实名制管理系统】24.10.01 -30天,考勤打卡小程序
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.

195 lines
3.9 KiB

7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
  1. <!-- 实名认证 -->
  2. <template>
  3. <view class="autonym">
  4. <!-- 实名认证顶部背景 -->
  5. <view class="autonym-top">
  6. <image class="bg" src="https://tennis-oss.xzaiyp.top/2024-10-22/b0182213-365c-482d-9218-e532df187fdc.png" mode="widthFix"></image>
  7. </view>
  8. <!-- 实名认证表单 -->
  9. <view class="autonum-form">
  10. <view class="autonum-form-title"
  11. v-if="!userInfo.auth">
  12. 请填写真实有效的身份信息
  13. </view>
  14. <view class="autonum-form-title"
  15. v-else>
  16. 已完成认证
  17. </view>
  18. <view class="autonum-form-item">
  19. <view class="title">姓名</view>
  20. <input class="text" v-model="form.name" type="text" />
  21. </view>
  22. <view class="autonum-form-item">
  23. <view class="title">证件号码</view>
  24. <input class="text" v-model="form.cardNo" type="text" />
  25. </view>
  26. <div @click="submit" class="btn"
  27. v-if="!userInfo.auth">
  28. 立即认证
  29. </div>
  30. </view>
  31. <!-- 说明 -->
  32. <view class="autonym-info">
  33. <image class="autonum-info-icon" src="https://tennis-oss.xzaiyp.top/2024-10-22/fb858755-ada3-49c3-87c7-c28a585dcbc0.png" mode="widthFix"></image>
  34. <view class="text">实名仅用于您是否为真人用户不会对信息做任何采集与保留请放心使用</view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import { mapState } from 'vuex'
  40. export default {
  41. name: "Autonym",
  42. data() {
  43. return {
  44. form: {
  45. name: '',
  46. cardNo: ''
  47. }
  48. }
  49. },
  50. computed : {
  51. ...mapState(['userInfo']),
  52. },
  53. onShow() {
  54. this.getAuthInfo()
  55. },
  56. methods: {
  57. toCenter() {
  58. uni.navigateTo({
  59. url: "/pages/index/center"
  60. })
  61. },
  62. submit(){
  63. if (this.$utils.verificationAll(this.form, {
  64. name : '请输入姓名',
  65. cardNo : '请输入身份证号',
  66. })) {
  67. return
  68. }
  69. this.$store.commit('setAuthInfo', this.form)
  70. uni.navigateTo({
  71. url: '/pages/subPack/human/human?type=auth'
  72. })
  73. // 实名认证
  74. // this.$api('authApply', this.form, res => {
  75. // if(res.code == 200){
  76. // uni.reLaunch({
  77. // url: '/pages/index/index'
  78. // })
  79. // }
  80. // })
  81. },
  82. getAuthInfo(){
  83. this.$api('authInfo', res => {
  84. if(res.result){
  85. this.form.cardNo = res.result.cardNo
  86. this.form.name = res.result.name
  87. this.$store.commit('getUserInfo')
  88. }
  89. })
  90. },
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .autonym {
  96. // 实名认证顶部背景
  97. .autonym-top {
  98. .bg {
  99. width: 750rpx;
  100. }
  101. }
  102. // 实名认证表单
  103. .autonum-form {
  104. position: relative;
  105. width: 95%;
  106. border-radius: 40rpx;
  107. background: white;
  108. margin: -180rpx auto 0rpx auto;
  109. z-index: 100;
  110. overflow: hidden;
  111. box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, .1);
  112. .autonum-form-title {
  113. font-size: 34rpx;
  114. font-weight: bold;
  115. padding: 40rpx 0rpx;
  116. text-align: center;
  117. background-color: #E4E4E4;
  118. }
  119. .autonum-form-item {
  120. height: 90rpx;
  121. display: flex;
  122. align-items: center;
  123. margin: 50rpx auto;
  124. width: 80%;
  125. background: #E4E4E4;
  126. border-radius: 100rpx;
  127. box-sizing: border-box;
  128. padding: 0rpx 20rpx;
  129. color: #707070;
  130. &:nth-child(2){
  131. margin-top: 70rpx;
  132. }
  133. .title {
  134. font-size: 30rpx;
  135. width: 160rpx;
  136. }
  137. .text {
  138. display: block;
  139. height: 75rpx;
  140. width: calc(100% - 160rpx);
  141. }
  142. }
  143. .btn {
  144. display: flex;
  145. align-items: center;
  146. justify-content: center;
  147. width: 80%;
  148. background: $main-color;
  149. color: white;
  150. height: 100rpx;
  151. border-radius: 50rpx;
  152. margin: 90rpx auto 60rpx auto;
  153. }
  154. }
  155. // 说明
  156. .autonym-info {
  157. display: flex;
  158. align-items: center;
  159. width: 90%;
  160. margin: 30rpx auto 0rpx auto;
  161. background: #F3F3F3;
  162. .autonum-info-icon {
  163. width: 30rpx;
  164. }
  165. .text {
  166. width: calc(100% - 20rpx);
  167. font-size: 24rpx;
  168. color: #707070;
  169. box-sizing: border-box;
  170. padding-left: 10rpx;
  171. }
  172. }
  173. }
  174. </style>