Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
epidemic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
史锦峰
epidemic
Commits
261003ad
Commit
261003ad
authored
Feb 18, 2020
by
sjf1256754123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
7c3028c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
11 deletions
+52
-11
index.vue
pages/index/index.vue
+2
-1
leader.vue
pages/leader/leader.vue
+50
-10
No files found.
pages/index/index.vue
View file @
261003ad
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
// 允许从相机和相册扫码
// 允许从相机和相册扫码
wx
.
scanCode
({
wx
.
scanCode
({
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
)
_this
.
userId
=
res
.
result
;
_this
.
userId
=
res
.
result
;
if
(
_this
.
securityFlag
&&
_this
.
userId
){
if
(
_this
.
securityFlag
&&
_this
.
userId
){
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -181,7 +182,7 @@
...
@@ -181,7 +182,7 @@
background-size
:
cover
;
background-size
:
cover
;
background-image
:
url('http://139.9.163.126/gastric/static/background.jpg')
;
background-image
:
url('http://139.9.163.126/gastric/static/background.jpg')
;
.btnList
{
.btnList
{
padding-top
:
3
9
5upx
;
padding-top
:
3
6
5upx
;
text-align
:
center
;
text-align
:
center
;
.btnSecurity
{
.btnSecurity
{
background-color
:
#92d0f1
;
background-color
:
#92d0f1
;
...
...
pages/leader/leader.vue
View file @
261003ad
<
template
>
<
template
>
<view>
<view
class=
"leader"
>
<form
@
submit=
"formSubmit"
@
reset=
"formReset"
>
<form
@
submit=
"formSubmit"
@
reset=
"formReset"
>
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
><span
style=
"color:red;display: inline-block; vertical-align:inherit;margin-right:4upx"
>
*
</span>
1、
姓名
</view>
<view
class=
"title"
><span
style=
"color:red;display: inline-block; vertical-align:inherit;margin-right:4upx"
>
*
</span>
姓名
</view>
<input
class=
"text-right"
placeholder=
"请输入姓名"
:value=
"form.name"
name=
"input"
@
input=
"updateInputVal($event,'name')"
></input>
<input
class=
"text-right"
placeholder=
"请输入姓名"
:value=
"form.name"
name=
"input"
@
input=
"updateInputVal($event,'name')"
></input>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
手机号码
</view>
<input
class=
"text-right"
placeholder=
"请输入手机号码"
type=
"number"
:value=
"form.phone"
name=
"input"
@
input=
"updateInputVal($event,'phone')"
></input>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<span
style=
"color:red;display: inline-block; vertical-align:inherit;margin-right:4upx"
>
*
</span>
3、手机号码
</view>
<view
class=
"title"
>
身份证
</view>
<input
class=
"text-right"
placeholder=
"请输入手机号码"
type=
"number"
:value=
"form.cellphone"
name=
"input"
@
input=
"updateInputVal($event,'cellphone
')"
></input>
<input
class=
"text-right"
type=
"idcard"
placeholder=
"请输入身份证号码"
:value=
"form.idCard"
name=
"input"
@
input=
"updateInputVal($event,'idCard
')"
></input>
</view>
</view>
<view
class=
"padding"
>
<view
class=
"padding"
>
<button
form-type=
"submit"
class=
"cu-btn block bg-blue margin-tb-sm lg"
>
下一步
</button>
<button
form-type=
"submit"
class=
"cu-btn block bg-blue margin-tb-sm lg"
>
提交
</button>
</view>
</view>
</form>
</form>
</view>
</view>
...
@@ -20,20 +24,56 @@
...
@@ -20,20 +24,56 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
form
:{
name
:
''
,
phone
:
''
,
idCard
:
''
}
}
}
},
},
methods
:
{
methods
:
{
// 更新输入框绑定的表单内容
// 更新输入框绑定的表单内容
updateInputVal
(
event
,
props
)
{
updateInputVal
(
event
,
props
)
{
this
.
form
[
props
]
=
event
.
target
.
value
this
.
form
[
props
]
=
event
.
target
.
value
},
},
formSubmit
(){
if
(
!
this
.
form
.
name
){
uni
.
showToast
({
icon
:
'
none
'
,
title
:
'
姓名必填
'
})
}
else
if
(
!
this
.
form
.
phone
&&
!
this
.
form
.
idCard
){
uni
.
showToast
({
icon
:
'
none
'
,
title
:
'
手机号码或者身份证必填其中一项
'
})
}
else
{
this
.
$http
.
post
(
`/sict-ncov/user/vip/register?name=
${
this
.
form
.
name
}
&phone=
${
this
.
form
.
phone
}
&idCard=
${
this
.
form
.
idCard
}
`
).
then
(
res
=>
{
const
d
=
res
.
data
if
(
d
.
code
==
1
){
uni
.
showToast
({
icon
:
'
success
'
,
title
:
'
注册成功!
'
})
uni
.
reLaunch
({
url
:
'
/pages/index/index
'
,
});
}
else
{
uni
.
showToast
({
icon
:
'
none
'
,
title
:
d
.
message
})
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
>
.leader
{
}
</
style
>
</
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