|
|
@@ -1,314 +1,348 @@
|
|
1
|
1
|
<script setup lang="ts">
|
|
2
|
|
-import {CDN_URL} from "~/config/app";
|
|
3
|
|
-import {UPLOAD_URL} from "~/utils/http";
|
|
4
|
|
-import {getToken} from "~/utils/auth";
|
|
5
|
|
-import {uploadImageOne} from "~/utils/upload";
|
|
6
|
|
-import {backdropFilterBase} from "unocss-preset-weapp/rules";
|
|
7
|
|
-import {getCertificationInfo, submitCertification} from "~/apis/user";
|
|
8
|
|
-import AuthenticationSuccess from "~/pages/real-name-authentication/components/authentication-success.vue";
|
|
9
|
|
-import type {CertificationRequest} from "~/apis/model/certification.model";
|
|
10
|
|
-
|
|
11
|
|
-const front_220714Image = CDN_URL + '/static/assets/front_220714.png'
|
|
12
|
|
-const verso_220714Image = CDN_URL + '/static/assets/verso_220714.png'
|
|
13
|
|
-
|
|
14
|
|
-const userStore = useUserStore()
|
|
15
|
|
-
|
|
16
|
|
-const formData = reactive({
|
|
17
|
|
- user_name: '',
|
|
18
|
|
- user_card: '',
|
|
19
|
|
- mobile: '',
|
|
20
|
|
- card_positive: '',
|
|
21
|
|
- card_reverse: '',
|
|
22
|
|
-})
|
|
23
|
|
-
|
|
24
|
|
-const state = reactive({
|
|
25
|
|
- isLoading: false,
|
|
26
|
|
- isFormValidate: false,
|
|
27
|
|
- // 审核中
|
|
28
|
|
- isReview: false,
|
|
29
|
|
- // 已认证
|
|
30
|
|
- isCertified: false,
|
|
31
|
|
- isNoCertified: true,
|
|
32
|
|
- // 审核失败
|
|
33
|
|
- isFail: false
|
|
34
|
|
-
|
|
35
|
|
-})
|
|
36
|
|
-onLoad(async () => {
|
|
37
|
|
- await userStore.getUserInfo()
|
|
38
|
|
- console.log(userStore.userInfo)
|
|
39
|
|
- console.log(userStore.userInfo.is_ertification)
|
|
40
|
|
- if (userStore.userInfo.is_ertification === -1) {
|
|
41
|
|
- state.isNoCertified = true
|
|
42
|
|
- }
|
|
43
|
|
-
|
|
44
|
|
- getCertificationInfo(1).then(res => {
|
|
45
|
|
-
|
|
46
|
|
- // console.log(res)
|
|
47
|
|
- if (res.uid && res.status === '1') {
|
|
48
|
|
- state.isCertified = true
|
|
49
|
|
-
|
|
50
|
|
- formData.user_card = res.user_card.replace(/^(\d{4})\d+(\d{4})$/, '$1********$2')
|
|
51
|
|
- formData.user_name = formatName(res.user_name)
|
|
52
|
|
- formData.card_positive = res.card_positive
|
|
53
|
|
- formData.card_reverse = res.card_reverse
|
|
54
|
|
-
|
|
55
|
|
- }
|
|
56
|
|
- }).catch(error => {
|
|
57
|
|
- uni.showToast({
|
|
58
|
|
- title: error,
|
|
59
|
|
- icon: 'none'
|
|
60
|
|
- })
|
|
61
|
|
- uni.hideLoading()
|
|
62
|
|
-
|
|
63
|
|
- })
|
|
64
|
|
-})
|
|
65
|
|
-
|
|
66
|
|
-const certificationStatus = computed(() => {
|
|
67
|
|
- let statusMsg = ''
|
|
68
|
|
- switch (userStore.userInfo.is_ertification) {
|
|
69
|
|
- case 0: {
|
|
70
|
|
- statusMsg = '审核中'
|
|
71
|
|
- break;
|
|
72
|
|
- }
|
|
73
|
|
- case 1: {
|
|
74
|
|
- statusMsg = '已认证'
|
|
75
|
|
- break;
|
|
76
|
|
- }
|
|
77
|
|
- case 2: {
|
|
78
|
|
- statusMsg = '已拒绝,重新提交'
|
|
79
|
|
- break;
|
|
80
|
|
- }
|
|
81
|
|
- default: {
|
|
82
|
|
- statusMsg = '立即认证'
|
|
83
|
|
- break;
|
|
84
|
|
- }
|
|
85
|
|
- }
|
|
86
|
|
- return statusMsg
|
|
87
|
|
-})
|
|
88
|
|
-
|
|
89
|
|
-const headers = {
|
|
90
|
|
- // #ifdef MP
|
|
91
|
|
- "Content-Type": "multipart/form-data",
|
|
92
|
|
- // #endif
|
|
93
|
|
- "X-Token": 'Bearer ' + getToken()
|
|
94
|
|
-}
|
|
95
|
|
-
|
|
96
|
|
-
|
|
97
|
|
-function handleUploadImg(type: 'positive' | 'reverse') {
|
|
98
|
|
- if (state.isCertified) {
|
|
99
|
|
- return
|
|
100
|
|
- }
|
|
101
|
|
- uploadImageOne('upload/image', (res) => {
|
|
102
|
|
- if (type === 'positive') {
|
|
103
|
|
- formData.card_positive = res.data.path
|
|
104
|
|
- console.log(formData.card_positive)
|
|
105
|
|
- }
|
|
106
|
|
- if (type === 'reverse') {
|
|
107
|
|
- formData.card_reverse = res.data.path
|
|
108
|
|
- console.log(formData.card_reverse)
|
|
109
|
|
- }
|
|
110
|
|
- })
|
|
111
|
|
-}
|
|
112
|
|
-function validateForm() {
|
|
113
|
|
-
|
|
114
|
|
- if (formData.user_name === '') {
|
|
115
|
|
- uni.showToast({
|
|
116
|
|
- title: '请填写姓名',
|
|
117
|
|
- icon: 'none'
|
|
118
|
|
- })
|
|
119
|
|
- // return isValidate
|
|
120
|
|
- return state.isFormValidate = false
|
|
121
|
|
- }
|
|
122
|
|
- if (!(/^[\u4e00-\u9fa5]{2,4}$/.test(formData.user_name))) {
|
|
123
|
|
- uni.showToast({
|
|
124
|
|
- title: '请正确输入您的姓名',
|
|
125
|
|
- icon: 'none'
|
|
126
|
|
- })
|
|
127
|
|
- return state.isFormValidate = false
|
|
128
|
|
- }
|
|
129
|
|
-
|
|
130
|
|
- // if (formData.mobile === '') {
|
|
131
|
|
- // uni.showToast({
|
|
132
|
|
- // title: '请填写手机号',
|
|
133
|
|
- // icon: 'none'
|
|
134
|
|
- // })
|
|
135
|
|
- // return state.isFormValidate = false
|
|
136
|
|
- // }
|
|
137
|
|
-
|
|
138
|
|
- // if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(formData.mobile)) {
|
|
139
|
|
- // uni.showToast({
|
|
140
|
|
- // title: '请填写正确的手机号',
|
|
141
|
|
- // icon: 'none'
|
|
142
|
|
- // })
|
|
143
|
|
- // return state.isFormValidate = false
|
|
144
|
|
- //
|
|
145
|
|
- // }
|
|
146
|
|
-
|
|
147
|
|
- if (formData.user_card === '') {
|
|
148
|
|
- uni.showToast({
|
|
149
|
|
- title: '请填写身份证号',
|
|
150
|
|
- icon: 'none'
|
|
151
|
|
- })
|
|
152
|
|
- return state.isFormValidate = false
|
|
153
|
|
-
|
|
154
|
|
- }
|
|
155
|
|
-
|
|
156
|
|
- if (!/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/.test(formData.user_card)) {
|
|
157
|
|
- uni.showToast({
|
|
158
|
|
- title: "请填写正确身份证号",
|
|
159
|
|
- icon: "none"
|
|
160
|
|
- });
|
|
161
|
|
- return state.isFormValidate = false
|
|
162
|
|
-
|
|
163
|
|
- }
|
|
164
|
|
-
|
|
165
|
|
- if (formData.card_positive === '') {
|
|
166
|
|
- uni.showToast({
|
|
167
|
|
- title: '请上传身份证人像面图',
|
|
168
|
|
- icon: 'none'
|
|
169
|
|
- })
|
|
170
|
|
- return state.isFormValidate = false
|
|
171
|
|
-
|
|
172
|
|
- }
|
|
173
|
|
- if (formData.card_reverse === '') {
|
|
174
|
|
- uni.showToast({
|
|
175
|
|
- title: '请上传身份证国徽面图'
|
|
176
|
|
- })
|
|
177
|
|
- return state.isFormValidate = false
|
|
178
|
|
-
|
|
179
|
|
- }
|
|
180
|
|
-
|
|
181
|
|
- return state.isFormValidate = true
|
|
182
|
|
-}
|
|
183
|
|
-function handleSubmit () {
|
|
184
|
|
-
|
|
185
|
|
- if (validateForm()) {
|
|
186
|
|
- state.isLoading = true
|
|
187
|
|
- uni.showLoading({
|
|
188
|
|
- title: '认证提交中'
|
|
189
|
|
- })
|
|
190
|
|
- const certificationRequest: CertificationRequest = {
|
|
191
|
|
- user_name: formData.user_name,
|
|
192
|
|
- user_card: formData.user_card,
|
|
193
|
|
- mobile: userStore.userInfo.phone,
|
|
194
|
|
- card_positive: formData.card_positive,
|
|
195
|
|
- card_reverse: formData.card_reverse
|
|
196
|
|
- }
|
|
197
|
|
- console.log("===certificationRequest",certificationRequest);
|
|
198
|
|
- submitCertification(certificationRequest).then(res => {
|
|
199
|
|
- // state.isLoading = false
|
|
200
|
|
- uni.hideLoading()
|
|
201
|
|
- // formData = {}
|
|
202
|
|
- if (res && res.user_card && res.user_name) {
|
|
203
|
|
- formData.user_card = res.user_card
|
|
204
|
|
- formData.user_name = res.user_name
|
|
|
2
|
+ import { CDN_URL } from "~/config/app";
|
|
|
3
|
+ import { UPLOAD_URL } from "~/utils/http";
|
|
|
4
|
+ import { getToken } from "~/utils/auth";
|
|
|
5
|
+ import { uploadImageOne } from "~/utils/upload";
|
|
|
6
|
+ import { backdropFilterBase } from "unocss-preset-weapp/rules";
|
|
|
7
|
+ import { getCertificationInfo, submitCertification } from "~/apis/user";
|
|
|
8
|
+ import AuthenticationSuccess from "~/pages/real-name-authentication/components/authentication-success.vue";
|
|
|
9
|
+ import type { CertificationRequest } from "~/apis/model/certification.model";
|
|
|
10
|
+
|
|
|
11
|
+ const front_220714Image = CDN_URL + '/static/assets/front_220714.png'
|
|
|
12
|
+ const verso_220714Image = CDN_URL + '/static/assets/verso_220714.png'
|
|
|
13
|
+
|
|
|
14
|
+ const userStore = useUserStore()
|
|
|
15
|
+ const userInfoX =ref({})
|
|
|
16
|
+
|
|
|
17
|
+ const formData = reactive({
|
|
|
18
|
+ user_name: '',
|
|
|
19
|
+ user_card: '',
|
|
|
20
|
+ mobile: '',
|
|
|
21
|
+ card_positive: '',
|
|
|
22
|
+ card_reverse: '',
|
|
|
23
|
+ })
|
|
|
24
|
+
|
|
|
25
|
+ const state = reactive({
|
|
|
26
|
+ isLoading: false,
|
|
|
27
|
+ isFormValidate: false,
|
|
|
28
|
+ // 审核中
|
|
|
29
|
+ isReview: false,
|
|
|
30
|
+ // 已认证
|
|
|
31
|
+ isCertified: false,
|
|
|
32
|
+ isNoCertified: true,
|
|
|
33
|
+ // 审核失败
|
|
|
34
|
+ isFail: false
|
|
|
35
|
+
|
|
|
36
|
+ })
|
|
|
37
|
+ onLoad(async () => {
|
|
|
38
|
+ await userStore.getUserInfo()
|
|
|
39
|
+ console.log(userStore.userInfo)
|
|
|
40
|
+ console.log(userStore.userInfo.is_ertification)
|
|
|
41
|
+ if (userStore.userInfo.is_ertification == -1) {
|
|
|
42
|
+ state.isNoCertified = true
|
|
|
43
|
+ }
|
|
|
44
|
+
|
|
|
45
|
+ getCertificationInfo(1).then(res => {
|
|
|
46
|
+
|
|
|
47
|
+ if (res.uid && res.status == '1') {
|
|
|
48
|
+ state.isCertified = true
|
|
|
49
|
+ formData.user_card = res.user_card.replace(/^(\d{4})\d+(\d{4})$/, '$1********$2')
|
|
|
50
|
+ formData.user_name = formatName(res.user_name)
|
|
|
51
|
+ formData.card_positive = res.card_positive
|
|
|
52
|
+ formData.card_reverse = res.card_reverse
|
|
|
53
|
+ userInfoX.value = res
|
|
|
54
|
+ }
|
|
|
55
|
+ userInfoX.value = res
|
|
|
56
|
+ }).catch(error => {
|
|
|
57
|
+ uni.showToast({
|
|
|
58
|
+ title: error,
|
|
|
59
|
+ icon: 'none'
|
|
|
60
|
+ })
|
|
|
61
|
+ uni.hideLoading()
|
|
|
62
|
+
|
|
|
63
|
+ })
|
|
|
64
|
+ })
|
|
|
65
|
+
|
|
|
66
|
+ const certificationStatus = computed(() => {
|
|
|
67
|
+ let statusMsg = ''
|
|
|
68
|
+ switch (userStore.userInfo.is_ertification) {
|
|
|
69
|
+ case 0: {
|
|
|
70
|
+ statusMsg = '审核中'
|
|
|
71
|
+ break;
|
|
|
72
|
+ }
|
|
|
73
|
+ case 1: {
|
|
|
74
|
+ statusMsg = '已认证'
|
|
|
75
|
+ break;
|
|
|
76
|
+ }
|
|
|
77
|
+ case 2: {
|
|
|
78
|
+ statusMsg = '已拒绝,重新提交'
|
|
|
79
|
+ break;
|
|
|
80
|
+ }
|
|
|
81
|
+ default: {
|
|
|
82
|
+ statusMsg = '立即认证'
|
|
|
83
|
+ break;
|
|
|
84
|
+ }
|
|
|
85
|
+ }
|
|
|
86
|
+ return statusMsg
|
|
|
87
|
+ })
|
|
|
88
|
+
|
|
|
89
|
+ const headers = {
|
|
|
90
|
+ // #ifdef MP
|
|
|
91
|
+ "Content-Type": "multipart/form-data",
|
|
|
92
|
+ // #endif
|
|
|
93
|
+ "X-Token": 'Bearer ' + getToken()
|
|
|
94
|
+ }
|
|
|
95
|
+
|
|
|
96
|
+
|
|
|
97
|
+ function handleUploadImg(type : 'positive' | 'reverse') {
|
|
|
98
|
+ if (state.isCertified) {
|
|
|
99
|
+ return
|
|
|
100
|
+ }
|
|
|
101
|
+ uploadImageOne('upload/image', (res) => {
|
|
|
102
|
+ if (type === 'positive') {
|
|
|
103
|
+ formData.card_positive = res.data.path
|
|
|
104
|
+ console.log(formData.card_positive)
|
|
|
105
|
+ }
|
|
|
106
|
+ if (type === 'reverse') {
|
|
|
107
|
+ formData.card_reverse = res.data.path
|
|
|
108
|
+ console.log(formData.card_reverse)
|
|
|
109
|
+ }
|
|
|
110
|
+ })
|
|
|
111
|
+ }
|
|
|
112
|
+ function validateForm() {
|
|
|
113
|
+
|
|
|
114
|
+ if (formData.user_name === '') {
|
|
|
115
|
+ uni.showToast({
|
|
|
116
|
+ title: '请填写姓名',
|
|
|
117
|
+ icon: 'none'
|
|
|
118
|
+ })
|
|
|
119
|
+ // return isValidate
|
|
|
120
|
+ return state.isFormValidate = false
|
|
|
121
|
+ }
|
|
|
122
|
+ if (!(/^[\u4e00-\u9fa5]{2,4}$/.test(formData.user_name))) {
|
|
|
123
|
+ uni.showToast({
|
|
|
124
|
+ title: '请正确输入您的姓名',
|
|
|
125
|
+ icon: 'none'
|
|
|
126
|
+ })
|
|
|
127
|
+ return state.isFormValidate = false
|
|
|
128
|
+ }
|
|
|
129
|
+
|
|
|
130
|
+
|
|
|
131
|
+
|
|
|
132
|
+ if (formData.user_card === '') {
|
|
|
133
|
+ uni.showToast({
|
|
|
134
|
+ title: '请填写身份证号',
|
|
|
135
|
+ icon: 'none'
|
|
|
136
|
+ })
|
|
|
137
|
+ return state.isFormValidate = false
|
|
|
138
|
+
|
|
|
139
|
+ }
|
|
|
140
|
+
|
|
|
141
|
+ if (!/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/.test(formData.user_card)) {
|
|
|
142
|
+ uni.showToast({
|
|
|
143
|
+ title: "请填写正确身份证号",
|
|
|
144
|
+ icon: "none"
|
|
|
145
|
+ });
|
|
|
146
|
+ return state.isFormValidate = false
|
|
|
147
|
+
|
|
|
148
|
+ }
|
|
|
149
|
+
|
|
|
150
|
+ if (formData.card_positive === '') {
|
|
|
151
|
+ uni.showToast({
|
|
|
152
|
+ title: '请上传身份证人像面图',
|
|
|
153
|
+ icon: 'none'
|
|
|
154
|
+ })
|
|
|
155
|
+ return state.isFormValidate = false
|
|
|
156
|
+
|
|
|
157
|
+ }
|
|
|
158
|
+ if (formData.card_reverse === '') {
|
|
|
159
|
+ uni.showToast({
|
|
|
160
|
+ title: '请上传身份证国徽面图'
|
|
|
161
|
+ })
|
|
|
162
|
+ return state.isFormValidate = false
|
|
|
163
|
+
|
|
|
164
|
+ }
|
|
|
165
|
+
|
|
|
166
|
+ return state.isFormValidate = true
|
|
|
167
|
+ }
|
|
|
168
|
+ function handleSubmit() {
|
|
|
169
|
+
|
|
|
170
|
+ if (validateForm()) {
|
|
|
171
|
+ state.isLoading = true
|
|
|
172
|
+ uni.showLoading({
|
|
|
173
|
+ title: '认证提交中'
|
|
|
174
|
+ })
|
|
|
175
|
+ const certificationRequest : CertificationRequest = {
|
|
|
176
|
+ user_name: formData.user_name,
|
|
|
177
|
+ user_card: formData.user_card,
|
|
|
178
|
+ mobile: userStore.userInfo.phone,
|
|
|
179
|
+ card_positive: formData.card_positive,
|
|
|
180
|
+ card_reverse: formData.card_reverse
|
|
|
181
|
+ }
|
|
|
182
|
+ console.log("===certificationRequest", certificationRequest);
|
|
|
183
|
+ submitCertification(certificationRequest).then(res => {
|
|
|
184
|
+ // state.isLoading = false
|
|
|
185
|
+ uni.hideLoading()
|
|
|
186
|
+ // formData = {}
|
|
|
187
|
+ if (res && res.user_card && res.user_name) {
|
|
|
188
|
+ formData.user_card = res.user_card
|
|
|
189
|
+ formData.user_name = res.user_name
|
|
|
190
|
+ formData.card_positive = formData.card_positive
|
|
|
191
|
+ formData.card_reverse = formData.card_reverse
|
|
|
192
|
+ }
|
|
|
193
|
+ state.isLoading = false
|
|
|
194
|
+ state.isCertified = true
|
|
|
195
|
+
|
|
|
196
|
+ userStore.getUserInfo()
|
|
|
197
|
+
|
|
|
198
|
+
|
|
|
199
|
+ }).catch(error => {
|
|
|
200
|
+ uni.showToast({
|
|
|
201
|
+ title: error,
|
|
|
202
|
+ icon: 'none'
|
|
|
203
|
+ })
|
|
|
204
|
+ state.isLoading = false
|
|
|
205
|
+ })
|
|
|
206
|
+ } else {
|
|
|
207
|
+ return false
|
|
|
208
|
+ }
|
|
|
209
|
+ }
|
|
|
210
|
+ function formatName(str) {
|
|
|
211
|
+ return new Array(str.length).join('*') + str.substr(-1);
|
|
|
212
|
+
|
|
|
213
|
+ }
|
|
|
214
|
+
|
|
|
215
|
+ function onBackClick() {
|
|
|
216
|
+ uni.navigateBack()
|
|
|
217
|
+ }
|
|
|
218
|
+
|
|
|
219
|
+ function onReSetClick() {
|
|
|
220
|
+ state.isCertified = false
|
|
|
221
|
+ formData.user_card =userInfoX.value.user_card
|
|
|
222
|
+ formData.user_name = userInfoX.value.user_name
|
|
205
|
223
|
formData.card_positive = formData.card_positive
|
|
206
|
224
|
formData.card_reverse = formData.card_reverse
|
|
207
|
|
- }
|
|
208
|
|
- state.isLoading = false
|
|
209
|
|
- state.isCertified = true
|
|
210
|
|
-
|
|
211
|
|
- userStore.getUserInfo()
|
|
212
|
|
-
|
|
213
|
|
-
|
|
214
|
|
- }).catch(error => {
|
|
215
|
|
- uni.showToast({
|
|
216
|
|
- title: error,
|
|
217
|
|
- icon: 'none'
|
|
218
|
|
- })
|
|
219
|
|
- state.isLoading = false
|
|
220
|
|
- })
|
|
221
|
|
- } else {
|
|
222
|
|
- return false
|
|
223
|
|
- }
|
|
224
|
|
-}
|
|
225
|
|
-function formatName (str) {
|
|
226
|
|
- return new Array(str.length).join('*') + str.substr(-1);
|
|
227
|
|
-
|
|
228
|
|
-}
|
|
|
225
|
+ }
|
|
229
|
226
|
</script>
|
|
230
|
227
|
|
|
231
|
228
|
<template>
|
|
232
|
|
- <AuthenticationSuccess v-if="state.isCertified"/>
|
|
233
|
|
-
|
|
234
|
|
- <div v-if="!state.isCertified" class="flex flex-col pt-3 gap-3 pb-safe text-sm">
|
|
235
|
|
- <div class="bg-white flex flex-col px-3">
|
|
236
|
|
- <div class="f-hairline-bottom py-3 flex">
|
|
237
|
|
- <div>真实姓名:</div>
|
|
238
|
|
- <input v-model="formData.user_name"
|
|
239
|
|
- :disabled="state.isCertified"
|
|
240
|
|
- placeholder="请输入真实姓名"
|
|
241
|
|
- class="text-sm"
|
|
242
|
|
- :class="state.isCertified && 'text-gray'"
|
|
243
|
|
- />
|
|
244
|
|
- </div>
|
|
245
|
|
-
|
|
246
|
|
- <div class="f-hairline-bottom py-3 flex">
|
|
247
|
|
- <div>证件号码:</div>
|
|
248
|
|
- <input v-model="formData.user_card"
|
|
249
|
|
- :disabled="state.isCertified"
|
|
250
|
|
- placeholder="请输入证件号码" class="text-sm"
|
|
251
|
|
- :class="state.isCertified && 'text-gray'"
|
|
252
|
|
- />
|
|
253
|
|
- </div>
|
|
254
|
|
-
|
|
255
|
|
- </div>
|
|
256
|
|
-
|
|
257
|
|
- <div class="bg-white flex flex-col p-3 gap-3">
|
|
258
|
|
- <div class="flex flex-col gap-3 ">
|
|
259
|
|
- <div>身份证人像面图:</div>
|
|
260
|
|
- <div class="flex justify-center items-center">
|
|
261
|
|
-
|
|
262
|
|
- <image v-if="formData.card_positive && !state.isCertified"
|
|
263
|
|
- :src="formData.card_positive"
|
|
264
|
|
- @tap="handleUploadImg('positive')"
|
|
265
|
|
- mode="scaleToFill" class="w-60 h-40"></image>
|
|
266
|
|
- <image v-else
|
|
267
|
|
- :src="front_220714Image"
|
|
268
|
|
- @tap="handleUploadImg('positive')"
|
|
269
|
|
- mode="aspectFit" class="w-60 h-40"></image>
|
|
270
|
|
- </div>
|
|
271
|
|
- </div>
|
|
272
|
|
-
|
|
273
|
|
- <div class="flex flex-col gap-3 ">
|
|
274
|
|
- <div>身份证国徽面图:</div>
|
|
275
|
|
- <div class="flex justify-center items-center">
|
|
276
|
|
-<!-- <image :src="verso_220714Image" mode="widthFix" class="w-60"></image>-->
|
|
277
|
|
-
|
|
278
|
|
- <image v-if="formData.card_reverse && !state.isCertified"
|
|
279
|
|
- :src="formData.card_reverse"
|
|
280
|
|
- @tap="handleUploadImg('reverse')"
|
|
281
|
|
- mode="scaleToFill" class="w-60 h-40 "></image>
|
|
282
|
|
- <image v-else
|
|
283
|
|
- :src="verso_220714Image"
|
|
284
|
|
- @tap="handleUploadImg('reverse')"
|
|
285
|
|
- mode="widthFix" class="w-60"></image>
|
|
286
|
|
- </div>
|
|
287
|
|
- </div>
|
|
288
|
|
- </div>
|
|
289
|
|
-
|
|
290
|
|
- </div>
|
|
291
|
|
- <div class="fixed bottom-0 p-safe bg-white w-full" v-if="!state.isCertified">
|
|
292
|
|
- <div class=" px-3">
|
|
293
|
|
- <nut-button
|
|
294
|
|
- @tap="handleSubmit"
|
|
295
|
|
- :loading="state.isLoading"
|
|
296
|
|
- type="primary" block>确认提交</nut-button>
|
|
297
|
|
- </div>
|
|
298
|
|
- </div>
|
|
|
229
|
+
|
|
|
230
|
+ <view class="user-info-content">
|
|
|
231
|
+ <AuthenticationSuccess v-if="state.isCertified" :formData='formData' />
|
|
|
232
|
+
|
|
|
233
|
+ <div class="flex flex-col pt-3 gap-3 text-sm">
|
|
|
234
|
+ <div class="bg-white flex flex-col px-3">
|
|
|
235
|
+ <div class="f-hairline-bottom py-3 flex">
|
|
|
236
|
+ <div>真实姓名:</div>
|
|
|
237
|
+ <input v-model="formData.user_name" :disabled="state.isCertified" placeholder="请输入真实姓名" class="text-sm"
|
|
|
238
|
+ :class="state.isCertified && 'text-gray'" />
|
|
|
239
|
+ </div>
|
|
|
240
|
+
|
|
|
241
|
+ <div class="f-hairline-bottom py-3 flex">
|
|
|
242
|
+ <div>证件号码:</div>
|
|
|
243
|
+ <input v-model="formData.user_card" :disabled="state.isCertified" placeholder="请输入证件号码" class="text-sm"
|
|
|
244
|
+ :class="state.isCertified && 'text-gray'" />
|
|
|
245
|
+ </div>
|
|
|
246
|
+
|
|
|
247
|
+ </div>
|
|
|
248
|
+
|
|
|
249
|
+ <div class="bg-white flex flex-col p-3 gap-3" v-if="!state.isCertified">
|
|
|
250
|
+ <div class="flex flex-col gap-3 ">
|
|
|
251
|
+ <div>身份证人像面图:</div>
|
|
|
252
|
+ <div class="flex justify-center items-center">
|
|
|
253
|
+
|
|
|
254
|
+ <image v-if="formData.card_positive" :src="formData.card_positive"
|
|
|
255
|
+ @tap="handleUploadImg('positive')" mode="scaleToFill" class="w-60 h-40"></image>
|
|
|
256
|
+ <image v-else :src="front_220714Image" @tap="handleUploadImg('positive')" mode="aspectFit"
|
|
|
257
|
+ class="w-60 h-40"></image>
|
|
|
258
|
+ </div>
|
|
|
259
|
+ </div>
|
|
|
260
|
+
|
|
|
261
|
+ <div class="flex flex-col gap-3 ">
|
|
|
262
|
+ <div>身份证国徽面图:</div>
|
|
|
263
|
+ <div class="flex justify-center items-center">
|
|
|
264
|
+ <image v-if="formData.card_reverse" :src="formData.card_reverse" @tap="handleUploadImg('reverse')"
|
|
|
265
|
+ mode="scaleToFill" class="w-60 h-40 "></image>
|
|
|
266
|
+ <image v-else :src="verso_220714Image" @tap="handleUploadImg('reverse')" mode="widthFix"
|
|
|
267
|
+ class="w-60"></image>
|
|
|
268
|
+ </div>
|
|
|
269
|
+ </div>
|
|
|
270
|
+ </div>
|
|
|
271
|
+
|
|
|
272
|
+ </div>
|
|
|
273
|
+ <div class="fixed bottom-0 p-safe bg-white w-full" v-if="!state.isCertified">
|
|
|
274
|
+ <div class=" px-3">
|
|
|
275
|
+ <nut-button @tap="handleSubmit" :loading="state.isLoading" type="primary" block>确认提交</nut-button>
|
|
|
276
|
+ </div>
|
|
|
277
|
+ </div>
|
|
|
278
|
+
|
|
|
279
|
+ <view v-else class="bottom-btn-content ">
|
|
|
280
|
+ <view class="left-btn" @click="onReSetClick">修改实名信息</view>
|
|
|
281
|
+ <view class="right-btn" @click="onBackClick">返回</view>
|
|
|
282
|
+ </view>
|
|
|
283
|
+ </view>
|
|
|
284
|
+
|
|
|
285
|
+
|
|
|
286
|
+
|
|
299
|
287
|
</template>
|
|
300
|
288
|
|
|
301
|
289
|
<style>
|
|
302
|
|
-page {
|
|
303
|
|
- background: #f8f8f8;
|
|
304
|
|
- overflow: hidden;
|
|
305
|
|
-}
|
|
306
|
|
-
|
|
307
|
|
-.wx-radio-input {
|
|
308
|
|
- height: 16px !important;
|
|
309
|
|
- width: 16px !important;
|
|
310
|
|
-}
|
|
|
290
|
+
|
|
|
291
|
+ .wx-radio-input {
|
|
|
292
|
+ height: 16px !important;
|
|
|
293
|
+ width: 16px !important;
|
|
|
294
|
+ }
|
|
311
|
295
|
</style>
|
|
|
296
|
+
|
|
|
297
|
+<style scoped lang="scss">
|
|
|
298
|
+ .user-info-content{
|
|
|
299
|
+ display: flex;
|
|
|
300
|
+ background: #f8f8f8;
|
|
|
301
|
+ min-height: 100vh;
|
|
|
302
|
+ flex-direction: column;
|
|
|
303
|
+ }
|
|
|
304
|
+ .bottom-btn-content {
|
|
|
305
|
+ display: flex;
|
|
|
306
|
+ flex-direction: row;
|
|
|
307
|
+ align-items: center;
|
|
|
308
|
+ margin-top: 30rpx;
|
|
|
309
|
+ padding-left: 20rpx;
|
|
|
310
|
+ padding-right: 20rpx;
|
|
|
311
|
+
|
|
|
312
|
+ .left-btn {
|
|
|
313
|
+ display: flex;
|
|
|
314
|
+ flex-direction: row;
|
|
|
315
|
+ justify-content: center;
|
|
|
316
|
+ align-items: center;
|
|
|
317
|
+ background-color: #fff;
|
|
|
318
|
+ flex: 1;
|
|
|
319
|
+ border: #333 1rpx solid;
|
|
|
320
|
+ border-radius: 80rpx;
|
|
|
321
|
+ height: 80rpx;
|
|
|
322
|
+ font-size: 28rpx;
|
|
|
323
|
+ margin-left: 20rpx;
|
|
|
324
|
+ margin-left: 20rpx;
|
|
|
325
|
+ color: #333;
|
|
|
326
|
+ }
|
|
|
327
|
+
|
|
|
328
|
+ .right-btn {
|
|
|
329
|
+ margin-left: 20rpx;
|
|
|
330
|
+ margin-left: 20rpx;
|
|
|
331
|
+ display: flex;
|
|
|
332
|
+ justify-content: center;
|
|
|
333
|
+ flex-direction: row;
|
|
|
334
|
+ align-items: center;
|
|
|
335
|
+ flex: 1;
|
|
|
336
|
+ border-radius: 80rpx;
|
|
|
337
|
+ height: 80rpx;
|
|
|
338
|
+ background-color: #ff0000;
|
|
|
339
|
+ color: #fff;
|
|
|
340
|
+ font-size: 28rpx;
|
|
|
341
|
+
|
|
|
342
|
+ }
|
|
|
343
|
+ }
|
|
|
344
|
+</style>
|
|
|
345
|
+
|
|
312
|
346
|
<route lang="yaml">
|
|
313
|
347
|
style:
|
|
314
|
348
|
navigationBarTitleText: 实名认证
|