Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-customer-new-master
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
lanbaoming
jiedao-app-customer-new-master
Commits
351451c4
Commit
351451c4
authored
Aug 21, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
platform See merge request
!2
parents
975834e0
9421498c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
73 deletions
+92
-73
register.vue
src/pages/register/register.vue
+92
-73
No files found.
src/pages/register/register.vue
View file @
351451c4
<
template
>
<view
class=
"main"
>
<view
class=
"login-top"
>
<image
src=
"../../static/img/back.png"
@
click=
"$request.backGo()"
mode=
""
></image>
<image
src=
"../../static/img/back.png"
@
click=
"$request.backGo()"
mode=
""
></image>
</view>
<view
class=
"logo"
>
<image
src=
"../../static/img/logo.png"
mode=
""
></image>
...
...
@@ -15,7 +19,9 @@
<view
class=
"login-vp login-phone"
>
<view
class=
"login-area"
>
<picker
:value=
"areaIndex"
:range=
"areaName"
@
change=
"areaChange"
>
<view
class=
"uni-input"
>
{{
$request
.
checkAddIcon
(
areaData
[
areaIndex
])
}}
</view>
<view
class=
"uni-input"
>
{{
$request
.
checkAddIcon
(
areaData
[
areaIndex
])
}}
</view>
</picker>
<image
src=
"../../static/img/more.png"
mode=
""
></image>
</view>
...
...
@@ -41,7 +47,9 @@
:placeholder=
"$lang.lang.notices.code"
/>
<view
class=
"login-code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"login-code"
v-else
@
click=
"sendCode"
>
{{
$lang
.
lang
.
login
.
code
}}
</view>
<view
class=
"login-code"
v-else
@
click=
"sendCode"
>
{{
$lang
.
lang
.
login
.
code
}}
</view>
</view>
</view>
<view
class=
"login-v"
>
...
...
@@ -92,12 +100,18 @@
</view>
<view
class=
"agree"
@
click=
"agree = !agree"
>
<image
:src=
"agree ? '../../static/img/check_true.png' : '../../static/img/check_false.png'"
:src=
"
agree
? '../../static/img/check_true.png'
: '../../static/img/check_false.png'
"
mode=
""
></image>
<view
>
{{
$lang
.
lang
.
notices
.
read
}}
<text
@
click=
"showUser"
>
《
{{
$lang
.
lang
.
notices
.
service
}}
》
</text></view
}}
<text
@
click=
"showUser"
>
《
{{
$lang
.
lang
.
notices
.
service
}}
》
</text
></view
>
</view>
<user-agreement
ref=
"userment"
/>
...
...
@@ -105,168 +119,173 @@
</
template
>
<
script
>
import
userAgreement
from
'
../../components/userAgreement/index.vue
'
import
userAgreement
from
"
../../components/userAgreement/index.vue
"
;
export
default
{
components
:
{
userAgreement
userAgreement
,
},
data
()
{
return
{
areaIndex
:
0
,
mobile
:
''
,
password
:
''
,
passworded
:
''
,
code
:
''
,
mobile
:
""
,
password
:
""
,
passworded
:
""
,
code
:
""
,
agree
:
false
,
areaData
:
[],
areaName
:
[],
leftTime
:
60
,
referralCode
:
''
}
referralCode
:
""
,
}
;
},
onLoad
()
{
this
.
Country
()
this
.
Country
()
;
},
methods
:
{
showUser
()
{
this
.
$refs
.
userment
.
open
()
this
.
$refs
.
userment
.
open
()
;
},
Country
()
{
this
.
$request
.
get
(
'
/app-api/ecw/country/list-all
'
).
then
((
res
)
=>
{
this
.
$request
.
get
(
"
/app-api/ecw/country/list-all
"
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
&&
res
.
data
.
length
>
0
)
{
for
(
let
i
in
res
.
data
)
{
this
.
areaData
.
push
(
res
.
data
[
i
].
tel
)
if
(
this
.
$lang
.
locale
==
'
zh
'
)
{
this
.
areaName
.
push
(
'
+
'
+
res
.
data
[
i
].
tel
+
'
'
+
res
.
data
[
i
].
nameZh
)
this
.
areaData
.
push
(
res
.
data
[
i
].
tel
);
if
(
this
.
$lang
.
locale
==
"
zh
"
)
{
this
.
areaName
.
push
(
"
+
"
+
res
.
data
[
i
].
tel
+
"
"
+
res
.
data
[
i
].
nameZh
);
}
else
{
this
.
areaName
.
push
(
'
+
'
+
res
.
data
[
i
].
tel
+
'
'
+
res
.
data
[
i
].
nameEn
)
this
.
areaName
.
push
(
"
+
"
+
res
.
data
[
i
].
tel
+
"
"
+
res
.
data
[
i
].
nameEn
);
}
}
}
})
})
;
},
areaChange
(
e
)
{
this
.
areaIndex
=
e
.
detail
.
value
this
.
areaIndex
=
e
.
detail
.
value
;
},
ismobile
(
code
,
mobile
)
{
this
.
$request
.
get
(
'
/app-api/param/validator/mobile
'
,
{
code
:
code
,
mobile
:
mobile
})
.
get
(
"
/app-api/param/validator/mobile
"
,
{
code
:
code
,
mobile
:
mobile
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
$request
.
post
(
'
/app-api/member/send-sms-code
'
,
{
.
post
(
"
/app-api/member/send-sms-code
"
,
{
areaCode
:
this
.
areaData
[
this
.
areaIndex
],
mobile
:
this
.
mobile
,
scene
:
0
scene
:
0
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
countDown
()
this
.
countDown
()
;
}
else
{
uni
.
showToast
({
title
:
res
.
msg
||
'
error
'
,
icon
:
'
none
'
})
title
:
res
.
msg
||
"
error
"
,
icon
:
"
none
"
,
})
;
}
})
})
;
}
else
{
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
nophone
,
icon
:
'
error
'
})
icon
:
"
error
"
,
})
;
}
})
})
;
},
sendCode
()
{
if
(
this
.
mobile
==
''
)
{
if
(
this
.
mobile
==
""
)
{
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
icon
:
'
error
'
})
icon
:
"
error
"
,
})
;
}
if
(
this
.
leftTime
<
60
)
{
return
false
return
false
;
}
this
.
ismobile
(
this
.
areaData
[
this
.
areaIndex
],
this
.
mobile
)
this
.
ismobile
(
this
.
areaData
[
this
.
areaIndex
],
this
.
mobile
)
;
},
countDown
()
{
this
.
leftTime
--
this
.
leftTime
--
;
if
(
this
.
leftTime
>
0
)
{
setTimeout
(
this
.
countDown
,
1000
)
setTimeout
(
this
.
countDown
,
1000
)
;
}
else
{
this
.
leftTime
=
60
this
.
leftTime
=
60
;
}
},
register
()
{
let
params
=
{
areaCode
:
this
.
areaData
[
this
.
areaIndex
],
code
:
this
.
code
,
englishName
:
''
,
englishName
:
""
,
mobile
:
this
.
mobile
,
password
:
this
.
password
,
referralCode
:
this
.
referralCode
}
if
(
this
.
mobile
==
''
)
{
referralCode
:
this
.
referralCode
,
registerPlatform
:
"
2
"
,
};
if
(
this
.
mobile
==
""
)
{
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
icon
:
'
error
'
})
icon
:
"
error
"
,
})
;
}
if
(
this
.
code
==
''
)
{
if
(
this
.
code
==
""
)
{
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
code
,
icon
:
'
error
'
})
icon
:
"
error
"
,
})
;
}
if
(
this
.
password
==
''
)
{
if
(
this
.
password
==
""
)
{
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
password
,
icon
:
'
error
'
})
icon
:
"
error
"
,
})
;
}
if
(
this
.
passworded
==
''
)
{
if
(
this
.
passworded
==
""
)
{
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
nextPsd
,
icon
:
'
error
'
})
icon
:
"
error
"
,
})
;
}
else
{
var
reg1
=
new
RegExp
(
'
^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,32})$
'
)
var
reg1
=
new
RegExp
(
"
^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,32})$
"
);
if
(
!
reg1
.
test
(
this
.
passworded
))
{
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
numPsd
,
icon
:
'
error
'
})
icon
:
"
error
"
,
})
;
}
}
if
(
this
.
password
!=
this
.
passworded
)
{
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
different
,
icon
:
'
none
'
})
icon
:
"
none
"
,
})
;
}
if
(
!
this
.
agree
)
{
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
chooseService
,
icon
:
'
none
'
})
icon
:
"
none
"
,
})
;
}
this
.
$request
.
post
(
'
/app-api/member/reg
'
,
params
).
then
((
res
)
=>
{
this
.
$request
.
post
(
"
/app-api/member/reg
"
,
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
&&
res
.
data
)
{
uni
.
setStorageSync
(
'
Authorization
'
,
res
.
data
.
token
)
uni
.
setStorageSync
(
"
Authorization
"
,
res
.
data
.
token
);
uni
.
reLaunch
({
url
:
'
/pages/my_info/my_info?type=first
'
})
url
:
"
/pages/my_info/my_info?type=first
"
,
})
;
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'
none
'
})
icon
:
"
none
"
,
})
;
}
})
}
}
}
})
;
}
,
}
,
}
;
</
script
>
<
style
>
@import
url(../../static/css/register.css)
;
...
...
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