Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
597706d8
Commit
597706d8
authored
May 12, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相亲模块修改
parent
c87d1744
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2681 additions
and
698 deletions
+2681
-698
pages.json
pages.json
+5
-1
editData.vue
pages/blindDate/editData.vue
+156
-188
oldeditData.vue
pages/blindDate/oldeditData.vue
+1245
-0
oldpersondetails.vue
pages/blindDate/oldpersondetails.vue
+643
-0
IDidentification.vue
pages/blindDate/personal/IDidentification.vue
+189
-0
persondetails.vue
pages/blindDate/persondetails.vue
+432
-506
my-news.vue
pages/friendcircle/my-news.vue
+11
-3
No files found.
pages.json
View file @
597706d8
...
...
@@ -594,10 +594,12 @@
},{
"path"
:
"personal/peoplescreen"
//人物筛选
},{
"path"
:
"
persondetails"
,
//
人物详情
"path"
:
"
oldpersondetails"
,
//之前的
人物详情
"style"
:
{
"navigationStyle"
:
"custom"
}
},{
"path"
:
"persondetails"
//人物详情
},{
"path"
:
"personal/editmaterial"
//资料编辑
},{
...
...
@@ -639,6 +641,8 @@
"path"
:
"editData"
//编辑资料
},{
"path"
:
"xqposter"
//相亲分享海报
},{
"path"
:
"personal/IDidentification"
//身份证验证
}]
},
//韩国馆项目
{
"root"
:
"pages/kotra"
,
"pages"
:
[{
"path"
:
"contanctus"
},{
"path"
:
"contanctDetail"
},{
"path"
:
"compInformation"
},{
...
...
pages/blindDate/editData.vue
View file @
597706d8
This diff is collapsed.
Click to expand it.
pages/blindDate/oldeditData.vue
0 → 100644
View file @
597706d8
This diff is collapsed.
Click to expand it.
pages/blindDate/oldpersondetails.vue
0 → 100644
View file @
597706d8
This diff is collapsed.
Click to expand it.
pages/blindDate/personal/IDidentification.vue
0 → 100644
View file @
597706d8
<
style
lang=
"scss"
scoped
>
.IDidentification
{
width
:
100%
;
height
:
100vh
;
.box
{
width
:
100%
;
padding
:
15px
;
}
.box-c
{
margin-top
:
20px
;
}
.box-c-item
{
width
:
100%
;
height
:
50px
;
display
:
flex
;
align-items
:
center
;
border-bottom
:
1px
solid
#e2e2e2
;
}
.box-c-item-l
{
width
:
140rpx
;
font-size
:
14px
;
color
:
#111111
;
font-weight
:
bold
;
}
.box-c-item-r
{
width
:
1px
;
flex
:
1
;
}
.btn
{
width
:
100%
;
margin-top
:
50px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.btn-box
{
width
:
400rpx
;
height
:
88rpx
;
border-radius
:
44rpx
;
color
:
#FFFFFF
;
font-size
:
16px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
</
style
>
<
template
>
<view
class=
"IDidentification"
>
<view
class=
"box"
>
<view
style=
"font-size: 18px;font-weight: bold;"
>
实名认证
</view>
<view
style=
"font-size: 12px;color: #999999;"
>
确保用户信息真实,承诺保障信息安全。
</view>
<view
class=
"box-c"
>
<view
class=
"box-c-item"
>
<view
class=
"box-c-item-l"
>
真实姓名
</view>
<view
class=
"box-c-item-r"
>
<input
type=
"text"
v-model=
"addMsg.Name"
placeholder=
"请输入真实姓名"
>
</view>
</view>
<view
class=
"box-c-item"
>
<view
class=
"box-c-item-l"
>
身份证号
</view>
<view
class=
"box-c-item-r"
>
<input
type=
"idcard"
v-model=
"addMsg.cardNo"
placeholder=
"请输入身份证号"
>
</view>
</view>
</view>
<view
class=
"btn"
>
<view
class=
"btn-box"
:style=
"
{background:mainColor}" @click="gorenzheng">
立即认证
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
(){
return
{
pageTitle
:
'身份认证'
,
mainColor
:
''
,
mall_UserInfo
:
null
,
addMsg
:{
Name
:
''
,
cardNo
:
''
,
}
}
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
mall_UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
):
null
;
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
});
},
methods
:{
gorenzheng
(){
let
regName
=
/^
[\u
4e00-
\u
9fa5
]{2,4}
$/
;
if
(
!
regName
.
test
(
this
.
addMsg
.
Name
)){
uni
.
showToast
({
title
:
'真实姓名填写有误'
,
icon
:
'none'
})
return
false
;
}
let
isIdCard
=
this
.
isIdCard
(
this
.
addMsg
.
cardNo
)
if
(
isIdCard
==
false
){
uni
.
showToast
({
title
:
'身份证号填写有误'
,
icon
:
'none'
})
}
else
{
let
birthday
=
this
.
getBirthdayFromIdCard
(
this
.
addMsg
.
cardNo
)
console
.
log
(
birthday
)
}
},
getBirthdayFromIdCard
(
idCard
)
{
var
birthday
=
""
;
if
(
idCard
!=
null
&&
idCard
!=
""
){
if
(
idCard
.
length
==
15
){
birthday
=
"19"
+
idCard
.
substr
(
6
,
6
);
}
else
if
(
idCard
.
length
==
18
){
birthday
=
idCard
.
substr
(
6
,
8
);
}
birthday
=
birthday
.
replace
(
/
(
.
{4})(
.
{2})
/
,
"$1-$2-"
);
}
return
birthday
;
},
isIdCard
(
idCard
)
{
//身份证号码的验证
// 15位和18位身份证号码的正则表达式
var
regIdCard
=
/^
(
^
[
1-9
]\d{7}((
0
\d)
|
(
1
[
0-2
]))(([
0|1|2
]\d)
|3
[
0-1
])\d{3}
$
)
|
(
^
[
1-9
]\d{5}[
1-9
]\d{3}((
0
\d)
|
(
1
[
0-2
]))(([
0|1|2
]\d)
|3
[
0-1
])((\d{4})
|
\d{3}[
Xx
])
$
)
$/
;
// 如果通过该验证,说明身份证格式正确,但准确性还需计算
if
(
regIdCard
.
test
(
idCard
))
{
if
(
idCard
.
length
==
18
)
{
var
idCardWi
=
new
Array
(
7
,
9
,
10
,
5
,
8
,
4
,
2
,
1
,
6
,
3
,
7
,
9
,
10
,
5
,
8
,
4
,
2
);
// 将前17位加权因子保存在数组里
var
idCardY
=
new
Array
(
1
,
0
,
10
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
);
// 这是除以11后,可能产生的11位余数、验证码,也保存成数组
var
idCardWiSum
=
0
;
// 用来保存前17位各自乖以加权因子后的总和
for
(
var
i
=
0
;
i
<
17
;
i
++
)
{
idCardWiSum
+=
idCard
.
substring
(
i
,
i
+
1
)
*
idCardWi
[
i
];
}
var
idCardMod
=
idCardWiSum
%
11
;
// 计算出校验码所在数组的位置
var
idCardLast
=
idCard
.
substring
(
17
);
// 得到最后一位身份证号码
// 如果等于2,则说明校验码是10,身份证号码最后一位应该是X
if
(
idCardMod
==
2
)
{
if
(
idCardLast
==
"X"
||
idCardLast
==
"x"
)
{
//alert("恭喜通过验证啦!");
return
true
;
}
else
{
//alert("身份证号码错误!");
return
false
;
}
}
else
{
// 用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
if
(
idCardLast
==
idCardY
[
idCardMod
])
{
//alert("恭喜通过验证啦!");
return
true
;
}
else
{
//alert("身份证号码错误!");
return
false
;
}
}
}
else
{
return
true
;
}
}
else
{
//alert("身份证格式不正确!");
return
false
;
}
}
}
}
</
script
>
pages/blindDate/persondetails.vue
View file @
597706d8
This diff is collapsed.
Click to expand it.
pages/friendcircle/my-news.vue
View file @
597706d8
...
...
@@ -297,7 +297,9 @@
controls
:
false
,
isAttestation
:
0
,
showtext
:
'去认证'
,
rzshow
:
false
,
rzshow
:
false
,
UserId
:
0
,
mall_User
:
0
}
},
created
()
{
...
...
@@ -325,7 +327,7 @@
});
},
onLoad
()
{
onLoad
(
options
)
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
...
...
@@ -333,7 +335,13 @@
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
}
else
{
this
.
mall_User
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
options
&&
options
.
UserId
){
this
.
UserId
=
options
.
UserId
}
else
{
this
.
UserId
=
this
.
mall_User
}
this
.
init
();
}
...
...
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