Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
million
Commits
d7d2ccbb
Commit
d7d2ccbb
authored
Jul 06, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
7834c847
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
150 additions
and
61 deletions
+150
-61
register.vue
src/pages/usercenter/register.vue
+150
-61
No files found.
src/pages/usercenter/register.vue
View file @
d7d2ccbb
<
style
>
.regist_Box
{
max-width
:
420px
;
padding
:
50px
40px
;
margin
:
40px
auto
;
background-color
:
#fff
;
border-radius
:
5px
;
background-clip
:
padding-box
;
box-shadow
:
0
2px
4px
0
rgba
(
10
,
8
,
8
,
.5
);
}
.registLogo
{
height
:
45px
;
width
:
auto
;
margin
:
0
auto
20px
;
display
:
block
;
}
.regist_inner
{
margin
:
0
-15px
0
-15px
;
}
.registform-group
{
position
:
relative
;
margin-bottom
:
15px
;
}
.regist_Box
.q-field__control
{
height
:
46px
;
}
.regisTiptext
{
font-size
:
16px
;
margin-bottom
:
15px
;
color
:
#999
;
text-align
:
center
;
}
.regisTiptext
a
{
color
:
#00afff
;
cursor
:
pointer
;
}
.regist_Box
.q-field__control
{
min-height
:
46px
!important
;
}
.regist_Box
.q-field__native
{
min-height
:
46px
;
}
.regist_Box
.q-field__marginal
{
height
:
46px
;
}
.regisStar
{
color
:
red
;
}
</
style
>
<
template
>
<q-page>
<div
class=
"account"
>
<table>
<tr>
<td>
<img
:src=
"logo"
style=
"height:45px; cursor:pointer;"
class=
"q-mr-lg"
@
click=
"CommonJump('/index',
{})" />
</td>
</tr>
<tr>
<td>
已經有帳號了?
<a
@
click=
"CommonJump('/login',
{})">立即登入
</a>
</td>
</tr>
<tr>
<td>
*姓名
<q-input
filled
name=
"Name"
v-model=
"registerMsg.Name"
class=
"bg-grey-1"
label=
"姓名"
/>
</td>
</tr>
<tr>
<td>
*電子郵件
<q-input
filled
name=
"Account"
v-model=
"registerMsg.Account"
class=
"bg-grey-1"
label=
"電子郵件"
/>
</td>
</tr>
<tr>
<td>
*設定密碼
<q-input
filled
name=
"Password"
v-model=
"registerMsg.Password"
class=
"bg-grey-1"
label=
"設定密碼"
/>
</td>
</tr>
<tr>
<td>
*再輸入一次密碼
<q-input
filled
name=
"SurePwd"
v-model=
"registerMsg.SurePwd"
class=
"bg-grey-1"
label=
"再輸入一次密碼"
/>
</td>
</tr>
<tr>
<td>
*性別
<!--
<q-select
filled
v-model=
"registerMsg.Sex"
:options=
"sexArray"
option-label=
"Name"
option-value=
"Id"
label=
"性別"
>
</q-select>
-->
</td>
</tr>
<tr>
<td>
*聯絡電話
<q-input
filled
name=
"Mobile"
v-model=
"registerMsg.Mobile"
class=
"bg-grey-1"
label=
"聯絡電話"
/>
</td>
</tr>
<tr>
<td>
<q-btn
type=
"a"
@
click=
"doRegister"
label=
"免費註冊"
/>
</td>
</tr>
</table>
<div
class=
"regist_Box"
>
<img
:src=
"logo"
class=
"q-mr-lg registLogo"
@
click=
"CommonJump('/index',
{})" />
<div
class=
"regist_inner"
>
<p
class=
"regisTiptext"
>
已經有帳號了?
<a
@
click=
"CommonJump('/login',
{})">立即登入
</a></p>
</div>
<div
class=
"registform-group"
>
<div
class=
"login_labelName"
><span
class=
"regisStar"
>
*
</span>
姓名
</div>
<q-input
outlined
v-model=
"registerMsg.Name"
class=
"bg-grey-1"
/>
</div>
<div
class=
"registform-group"
>
<div
class=
"login_labelName"
><span
class=
"regisStar"
>
*
</span>
電子郵件
</div>
<q-input
outlined
v-model=
"registerMsg.Account"
class=
"bg-grey-1"
/>
</div>
<div
class=
"registform-group"
>
<div
class=
"login_labelName"
><span
class=
"regisStar"
>
*
</span>
設定密碼
</div>
<q-input
outlined
v-model=
"registerMsg.Password"
class=
"bg-grey-1"
/>
</div>
<div
class=
"registform-group"
>
<div
class=
"login_labelName"
><span
class=
"regisStar"
>
*
</span>
再輸入一次密碼
</div>
<q-input
outlined
v-model=
"registerMsg.SurePwd"
class=
"bg-grey-1"
/>
</div>
<div
class=
"registform-group"
>
<div
class=
"login_labelName"
>
性別
</div>
<q-select
filled
v-model=
"registerMsg.Sex"
:options=
"sexArray"
emit-value
map-options
>
</q-select>
</div>
<div
class=
"registform-group"
>
<div
class=
"login_labelName"
>
生日
</div>
<q-input
filled
v-model=
"registerMsg.Birthday"
mask=
"date"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
mask=
"YYYY-MM-DD"
v-model=
"registerMsg.Birthday"
@
input=
"() => $refs.qDateProxy.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
<div
class=
"registform-group"
>
<div
class=
"login_labelName"
>
聯絡電話
</div>
<q-input
outlined
v-model=
"registerMsg.Mobile"
class=
"bg-grey-1"
/>
</div>
<div
class=
"registform-group"
>
<q-btn
color=
"primary"
style=
"width:100%;height:50px;margin-top:20px;"
@
click=
"doRegister"
label=
"免費註冊"
/>
</div>
</div>
</div>
</q-page>
</template>
...
...
@@ -68,7 +112,7 @@
AccountId
:
0
,
//账号编号
Name
:
""
,
//姓名
Account
:
""
,
//账号
Sex
:
"1"
,
//性别(1-男,2-女)
Sex
:
1
,
//性别(1-男,2-女)
Birthday
:
""
,
//生日
Password
:
""
,
//密码
SurePwd
:
""
,
//确认密码
...
...
@@ -76,12 +120,12 @@
},
logo
:
""
,
//Logo地址
sexArray
:
[{
Id
:
1
,
Name
:
"男"
value
:
1
,
label
:
"男"
},
{
Id
:
2
,
Name
:
"女"
value
:
2
,
label
:
"女"
},
]
};
...
...
@@ -101,10 +145,55 @@
},
methods
:
{
doRegister
()
{
if
(
this
.
registerMsg
.
Name
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'请输入姓名'
,
position
:
'top'
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
})
return
;
}
if
(
this
.
registerMsg
.
Account
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'请输入账号'
,
position
:
'top'
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
})
return
;
}
if
(
this
.
registerMsg
.
Password
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'请输入密码'
,
position
:
'top'
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
})
return
;
}
if
(
this
.
registerMsg
.
SurePwd
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'请输入确认密码'
,
position
:
'top'
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
})
return
;
}
if
(
this
.
registerMsg
.
SurePwd
!=
this
.
registerMsg
.
Password
){
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'两次输入密码不一致'
,
position
:
'top'
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
})
return
;
}
this
.
apipost
(
"b2b_post_SetCustomerAccountService"
,
this
.
registerMsg
,
res
=>
{
console
.
log
(
"res"
,
res
.
data
);
if
(
res
.
data
.
resultCode
==
1
)
{
var
jsonData
=
JSON
.
stringify
(
res
.
data
.
data
);
window
.
localStorage
.
setItem
(
"b2bUser"
,
jsonData
);
...
...
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