Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟
cust-app
Commits
3c3b8675
Commit
3c3b8675
authored
Jan 11, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实名认证相关代码
parent
00100efb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
192 additions
and
93 deletions
+192
-93
index.js
api/user/index.js
+11
-0
pages.json
pages.json
+15
-0
doubleauth.vue
pagesme/me/doubleauth.vue
+13
-24
identityauthentication.vue
pagesme/me/identityauthentication.vue
+127
-69
index.vue
webView/index.vue
+26
-0
No files found.
api/user/index.js
View file @
3c3b8675
...
@@ -21,3 +21,14 @@ export function userDetail(data){
...
@@ -21,3 +21,14 @@ export function userDetail(data){
url
:
'/app/open/memInfo/detail/'
+
data
,
url
:
'/app/open/memInfo/detail/'
+
data
,
});
});
}
}
/**
* 实名认证
*/
export
function
realAuth
(
data
){
return
request
({
method
:
"put"
,
url
:
'/memInfo/updateIdCard/'
+
data
.
businessId
,
data
:
data
,
});
}
pages.json
View file @
3c3b8675
...
@@ -49,6 +49,21 @@
...
@@ -49,6 +49,21 @@
}
}
],
],
"subPackages"
:
[
"subPackages"
:
[
{
"root"
:
"webView"
,
"pages"
:
[
{
"path"
:
"index"
,
"style"
:
{
"navigationBarTitleText"
:
"webView"
,
"backgroundColor"
:
"#F4F5F9"
,
"backgroundColorTop"
:
"#F4F5F9"
,
"navigationBarBackgroundColor"
:
"#F4F5F9"
,
"navigationStyle"
:
"custom"
}
}
]
},
{
{
"root"
:
"pagesUser"
,
"root"
:
"pagesUser"
,
"pages"
:
[
"pages"
:
[
...
...
pagesme/me/doubleauth.vue
View file @
3c3b8675
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
<view
class=
"auth-con-2"
v-if=
"userInfo.identityAuth=='REFUSE'"
>
已拒绝
</view>
<view
class=
"auth-con-2"
v-if=
"userInfo.identityAuth=='REFUSE'"
>
已拒绝
</view>
<view
class=
"auth-con-2"
v-if=
"userInfo.identityAuth==null"
>
未认证
</view>
<view
class=
"auth-con-2"
v-if=
"userInfo.identityAuth==null"
>
未认证
</view>
</view>
</view>
<view
class=
"auth-btn"
@
click=
"go
sf
()"
v-if=
"userInfo.identityAuth=='EXAMINE'"
>
修改认证
</view>
<view
class=
"auth-btn"
@
click=
"go
IdentityAuth
()"
v-if=
"userInfo.identityAuth=='EXAMINE'"
>
修改认证
</view>
<view
class=
"auth-btn"
@
click=
"go
sf
()"
v-if=
"userInfo.identityAuth=='PASS'"
>
重新认证
</view>
<view
class=
"auth-btn"
@
click=
"go
IdentityAuth
()"
v-if=
"userInfo.identityAuth=='PASS'"
>
重新认证
</view>
<view
class=
"auth-btn"
@
click=
"go
sf
()"
v-if=
"userInfo.identityAuth=='REFUSE'"
>
修改认证
</view>
<view
class=
"auth-btn"
@
click=
"go
IdentityAuth
()"
v-if=
"userInfo.identityAuth=='REFUSE'"
>
修改认证
</view>
<view
class=
"auth-btn"
@
click=
"go
sf
()"
v-if=
"userInfo.identityAuth==null"
>
立即认证
</view>
<view
class=
"auth-btn"
@
click=
"go
IdentityAuth
()"
v-if=
"userInfo.identityAuth==null"
>
立即认证
</view>
</view>
</view>
<view
class=
"auth-item"
>
<view
class=
"auth-item"
>
<image
class=
"auth-img"
:src=
"baseUrl+'/user/xlauth.png'"
></image>
<image
class=
"auth-img"
:src=
"baseUrl+'/user/xlauth.png'"
></image>
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
<view
class=
"auth-con-2"
v-if=
"userInfo.educationAuth=='REFUSE'"
>
已拒绝
</view>
<view
class=
"auth-con-2"
v-if=
"userInfo.educationAuth=='REFUSE'"
>
已拒绝
</view>
<view
class=
"auth-con-2"
v-if=
"userInfo.educationAuth==null"
>
未认证
</view>
<view
class=
"auth-con-2"
v-if=
"userInfo.educationAuth==null"
>
未认证
</view>
</view>
</view>
<view
class=
"auth-btn"
@
click=
"go
li
()"
v-if=
"userInfo.educationAuth=='EXAMINE'"
>
修改认证
</view>
<view
class=
"auth-btn"
@
click=
"go
EducationAuth
()"
v-if=
"userInfo.educationAuth=='EXAMINE'"
>
修改认证
</view>
<view
class=
"auth-btn"
@
click=
"go
li
()"
v-if=
"userInfo.educationAuth=='PASS'"
>
重新认证
</view>
<view
class=
"auth-btn"
@
click=
"go
EducationAuth
()"
v-if=
"userInfo.educationAuth=='PASS'"
>
重新认证
</view>
<view
class=
"auth-btn"
@
click=
"go
li
()"
v-if=
"userInfo.educationAuth=='REFUSE'"
>
修改认证
</view>
<view
class=
"auth-btn"
@
click=
"go
EducationAuth
()"
v-if=
"userInfo.educationAuth=='REFUSE'"
>
修改认证
</view>
<view
class=
"auth-btn"
@
click=
"go
li
()"
v-if=
"userInfo.educationAuth==null"
>
立即认证
</view>
<view
class=
"auth-btn"
@
click=
"go
EducationAuth
()"
v-if=
"userInfo.educationAuth==null"
>
立即认证
</view>
</view>
</view>
<ELM
ref=
"elm"
:msg=
"tipMsg"
:isConfirm=
"isConfirm"
@
confirm=
"confirm"
></ELM>
<ELM
ref=
"elm"
:msg=
"tipMsg"
:isConfirm=
"isConfirm"
@
confirm=
"confirm"
></ELM>
</view>
</view>
...
@@ -52,34 +52,23 @@
...
@@ -52,34 +52,23 @@
this
.
getUserIno
();
this
.
getUserIno
();
},
},
methods
:
{
methods
:
{
gosf
()
{
//身份认证
goIdentityAuth
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pagesme/me/identityauthentication"
url
:
"/pagesme/me/identityauthentication"
})
})
},
},
goli
()
{
//学历认证
goEducationAuth
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pagesme/me/educationcertification"
url
:
"/pagesme/me/educationcertification"
})
})
},
},
async
getUserIno
()
{
const
res
=
await
this
.
$myRequest
({
url
:
'/nostalgia/fruser/doubleAuth'
,
withToken
:
true
,
method
:
'GET'
,
});
if
(
res
.
data
.
code
==
200
)
{
this
.
userInfo
=
res
.
data
.
data
}
else
{
this
.
tipMsg
=
res
.
data
.
msg
;
this
.
$refs
.
elm
.
showDialog
();
}
},
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.content
{
.content
{
width
:
100%
;
width
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
...
pagesme/me/identityauthentication.vue
View file @
3c3b8675
<
template
>
<
template
>
<view>
<view>
<view
class=
"title-txt"
>
上传身份证照片
</view>
<view
class=
"title-txt"
>
请输入身份信息
</view>
<view
class=
"con-txt"
>
根据监管要求身份证照片仅用于实名认证
</view>
<view
class=
"con-txt"
>
根据监管要求身份信息仅用于实名认证
</view>
<image
class=
"zheng-image"
:src=
"baseUrl+'/user/zheng.png'"
@
click=
"chooseImg('z')"
mode=
"aspectFill"
></image>
<!--
<view
class=
"title-txt"
>
上传身份证照片
</view>
-->
<image
class=
"fan-image"
:src=
"baseUrl+'/user/fan.png'"
@
click=
"chooseImg('f')"
mode=
"aspectFill"
></image>
<!--
<view
class=
"con-txt"
>
根据监管要求身份证照片仅用于实名认证
</view>
-->
<!--
<image
class=
"zheng-image"
:src=
"baseUrl+'/user/zheng.png'"
@
click=
"chooseImg('z')"
mode=
"aspectFill"
></image>
-->
<!--
<image
class=
"fan-image"
:src=
"baseUrl+'/user/fan.png'"
@
click=
"chooseImg('f')"
mode=
"aspectFill"
></image>
-->
<view
class=
"form"
>
<u--form
labelPosition=
"left"
:model=
"form"
ref=
"form1"
labelWidth=
"80"
>
<u-form-item
label=
"真实姓名"
prop=
"userInfo.memNickName"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"form.memRealName"
border=
"none"
placeholder=
"请输入真实姓名"
></u--input>
</u-form-item>
<u-form-item
label=
"身份证号"
prop=
"userInfo.memNickName"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"form.memIdcard"
border=
"none"
placeholder=
"请输入身份证号"
></u--input>
</u-form-item>
</u--form>
</view>
<view
class=
"to-btn"
@
click=
"authadd"
>
<view
class=
"to-btn"
@
click=
"authadd"
>
提交
提交
</view>
</view>
<ELM
ref=
"elm"
:msg=
"tipMsg"
:isConfirm=
"isConfirm"
@
confirm=
"confirm"
></ELM>
<ELM
ref=
"elm"
:msg=
"tipMsg"
:isConfirm=
"isConfirm"
@
confirm=
"confirm"
></ELM>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
ELM
from
'@/components/elm-toast/index.vue'
;
import
ELM
from
'@/components/elm-toast/index.vue'
;
import
{
realAuth
}
from
"../../api/user"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
form
:{},
//图片路径
//图片路径
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
updatezImg
:
""
,
updatezImg
:
""
,
...
@@ -30,33 +66,32 @@
...
@@ -30,33 +66,32 @@
ELM
ELM
},
},
onLoad
()
{
onLoad
()
{
var
that
=
this
;
that
.
loadPage
();
},
},
methods
:
{
methods
:
{
async
loadPage
()
{
async
loadPage
()
{
var
that
=
this
;
//
var that = this;
const
res
=
await
that
.
$myRequest
({
//
const res = await that.$myRequest({
url
:
'/nostalgia/fruserauth/info'
,
//
url: '/nostalgia/fruserauth/info',
withToken
:
true
,
//
withToken: true,
method
:
'GET'
,
//
method: 'GET',
});
//
});
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
data
.
code
==
200
)
{
//
if (res.data.code == 200) {
if
(
res
.
data
.
data
.
identityImgList
!=
null
)
{
//
if (res.data.data.identityImgList != null) {
if
(
res
.
data
.
data
.
identityImgList
.
length
>
0
)
{
//
if (res.data.data.identityImgList.length > 0) {
that
.
zhengimageUrl
=
res
.
data
.
data
.
identityImgList
[
0
]
//
that.zhengimageUrl = res.data.data.identityImgList[0]
}
//
}
if
(
res
.
data
.
data
.
identityImgList
.
length
>
1
)
{
//
if (res.data.data.identityImgList.length > 1) {
that
.
fanimageUrl
=
res
.
data
.
data
.
identityImgList
[
1
]
//
that.fanimageUrl = res.data.data.identityImgList[1]
}
//
}
//
}
//
}
//
}
else
{
//
} else {
this
.
tipMsg
=
res
.
data
.
msg
;
//
this.tipMsg = res.data.msg;
this
.
$refs
.
elm
.
showDialog
();
//
this.$refs.elm.showDialog();
}
//
}
},
},
chooseImg
(
type
)
{
chooseImg
(
type
)
{
console
.
log
(
type
);
console
.
log
(
type
);
...
@@ -104,45 +139,65 @@
...
@@ -104,45 +139,65 @@
}
}
},
},
async
authadd
()
{
async
authadd
()
{
var
that
=
this
;
uni
.
navigateTo
({
var
imgList
=
[];
url
:
"/webView/index"
if
(
!
that
.
updatezImg
)
{
})
this
.
tipMsg
=
"请上传正面照片"
;
// const userInfo = uni.getStorageSync('userInfo')
this
.
$refs
.
elm
.
showDialog
();
// const params = {
return
false
;
// businessId: userInfo.businessId,
}
else
{
// memRealName: this.form.memRealName,
imgList
.
push
(
that
.
updatezImg
)
// memIdcard: this.form.memIdcard
}
// }
if
(
!
that
.
updatefImg
)
{
// realAuth(params).then(res => {
this
.
tipMsg
=
"请上传反面照片"
;
// if (res.data.code == 200){
this
.
$refs
.
elm
.
showDialog
();
// uni.navigateTo({
return
false
;
// url: "/webView/index"
}
else
{
// })
imgList
.
push
(
that
.
updatefImg
)
// }else {
}
//
var
data
=
{
// }
"authType"
:
"IdentityAuth"
,
// })
"imgList"
:
imgList
}
uni
.
showLoading
({
title
:
"提交中"
})
const
res
=
await
that
.
$myRequest
({
url
:
'/nostalgia/fruserauth/add'
,
withToken
:
true
,
data
:
data
,
method
:
'POST'
,
});
uni
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
this
.
isConfirm
=
true
;
this
.
tipMsg
=
"提交成功"
;
this
.
$refs
.
elm
.
showDialog
();
}
else
{
this
.
tipMsg
=
res
.
data
.
msg
;
// var that = this;
this
.
$refs
.
elm
.
showDialog
();
// var imgList = [];
}
// if (!that.updatezImg) {
// this.tipMsg = "请上传正面照片";
// this.$refs.elm.showDialog();
// return false;
// } else {
// imgList.push(that.updatezImg)
// }
// if (!that.updatefImg) {
// this.tipMsg = "请上传反面照片";
// this.$refs.elm.showDialog();
// return false;
// } else {
// imgList.push(that.updatefImg)
// }
// var data = {
// "authType": "IdentityAuth",
// "imgList": imgList
// }
// uni.showLoading({
// title: "提交中"
// })
// const res = await that.$myRequest({
// url: '/nostalgia/fruserauth/add',
// withToken: true,
// data: data,
// method: 'POST',
// });
// uni.hideLoading();
// if (res.data.code == 200) {
// this.isConfirm=true;
// this.tipMsg = "提交成功";
// this.$refs.elm.showDialog();
//
// } else {
// this.tipMsg = res.data.msg;
// this.$refs.elm.showDialog();
// }
},
},
confirm
()
{
confirm
()
{
this
.
isConfirm
=
false
;
this
.
isConfirm
=
false
;
...
@@ -152,9 +207,12 @@
...
@@ -152,9 +207,12 @@
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
page
{
.form
{
padding
:
20rpx
60rpx
;
}
page
{
background-color
:
#ffffff
;
background-color
:
#ffffff
;
}
}
...
...
webView/index.vue
0 → 100644
View file @
3c3b8675
<
template
>
<view>
<web-view
:src=
"'http://localhost:8080/test.html?token='+token"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
name
:
"index"
,
data
()
{
return
{
token
:
uni
.
getStorageSync
(
'token'
),
};
},
onLoad
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment