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
e2808e07
Commit
e2808e07
authored
Nov 20, 2024
by
honghy
Committed by
wux
Dec 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信功能实作
parent
aab62bbe
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
199 additions
and
118 deletions
+199
-118
changeTel.vue
src/pages/changeTel/changeTel.vue
+37
-25
forget.vue
src/pages/forget/forget.vue
+18
-4
login.vue
src/pages/login/login.vue
+18
-8
order.vue
src/pages/order/order.vue
+29
-13
order_mail.vue
src/pages/order_mail/order_mail.vue
+19
-9
register.vue
src/pages/register/register.vue
+41
-34
telcode.vue
src/pages/telcode/telcode.vue
+37
-25
No files found.
src/pages/changeTel/changeTel.vue
View file @
e2808e07
...
@@ -36,7 +36,9 @@
...
@@ -36,7 +36,9 @@
<view
class=
"login-vp"
>
<view
class=
"login-vp"
>
<input
class=
"vp-input"
v-model=
"code"
type=
"number"
:placeholder=
"$lang.lang.notices.code"
>
<input
class=
"vp-input"
v-model=
"code"
type=
"number"
:placeholder=
"$lang.lang.notices.code"
>
<view
class=
"login-code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"login-code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"login-code"
v-else
@
click=
"sendCode"
>
{{
$lang
.
lang
.
editEmail
.
getCode
}}
</view>
<picker
class=
"login-code"
:range=
"smsName"
@
change=
"sendCode"
v-else
>
<view
class=
"uni-input"
>
{{
$lang
.
lang
.
editEmail
.
getCode
}}
</view>
</picker>
</view>
</view>
</view>
</view>
<view
class=
"login-vp login-v"
>
<view
class=
"login-vp login-v"
>
...
@@ -78,7 +80,10 @@
...
@@ -78,7 +80,10 @@
areaName
:
[],
areaName
:
[],
leftTime
:
60
,
leftTime
:
60
,
oldMobile
:
''
,
oldMobile
:
''
,
userInfo
:{}
userInfo
:{},
smsName
:
[
'
SMS
'
,
'
WhatsApp
'
],
smsData
:
[
1
,
2
],
smsIndex
:
0
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -95,27 +100,6 @@
...
@@ -95,27 +100,6 @@
})
})
},
},
ismobile
(
code
,
mobile
){
this
.
$request
.
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
'
,
{
areaCode
:
this
.
areaData
[
this
.
areaIndexs
],
mobile
:
this
.
mobile
,
scene
:
2
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
countDown
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'
none
'
,
})
}
})
}
else
{
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
nophone
,
icon
:
'
error
'
,
})
}
})
},
Country
()
{
Country
()
{
let
that
=
this
let
that
=
this
that
.
$request
.
get
(
'
/app-api/ecw/country/list-all
'
).
then
(
res
=>
{
that
.
$request
.
get
(
'
/app-api/ecw/country/list-all
'
).
then
(
res
=>
{
...
@@ -131,7 +115,7 @@
...
@@ -131,7 +115,7 @@
}
}
})
})
},
},
sendCode
()
{
sendCode
(
e
)
{
if
(
this
.
mobile
==
''
){
if
(
this
.
mobile
==
''
){
return
uni
.
showToast
({
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
...
@@ -141,7 +125,35 @@
...
@@ -141,7 +125,35 @@
if
(
this
.
leftTime
<
60
)
{
if
(
this
.
leftTime
<
60
)
{
return
false
return
false
}
}
this
.
ismobile
(
this
.
areaData
[
this
.
areaIndexs
],
this
.
mobile
)
var
data
=
{
mobile
:
this
.
mobile
,
nodeValue
:
'
user-sms-update-mobile
'
,
areaCode
:
this
.
areaData
[
this
.
areaIndexs
],
code
:
this
.
areaData
[
this
.
areaIndexs
],
isTransport
:
0
,
transportId
:
0
,
isOrders
:
0
,
messageType
:
this
.
smsData
[
e
.
detail
.
value
]
}
this
.
$request
.
get
(
'
/app-api/param/validator/mobile
'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
$request
.
post
(
'
/app-api/member/send-sms-code
'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
countDown
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'
none
'
,
})
}
})
}
else
{
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
nophone
,
icon
:
'
error
'
,
})
}
})
},
},
countDown
()
{
countDown
()
{
this
.
leftTime
--
this
.
leftTime
--
...
...
src/pages/forget/forget.vue
View file @
e2808e07
...
@@ -20,7 +20,9 @@
...
@@ -20,7 +20,9 @@
<view
class=
"items-vw"
>
<view
class=
"items-vw"
>
<input
type=
"number"
v-model=
"FormData.code"
:placeholder=
"$lang.lang.notices.code"
>
<input
type=
"number"
v-model=
"FormData.code"
:placeholder=
"$lang.lang.notices.code"
>
<text
class=
"code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</text>
<text
class=
"code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</text>
<text
class=
"code"
@
click=
"sendCode"
v-else
>
{{
$lang
.
lang
.
forget
.
code
}}
</text>
<picker
class=
"code"
:range=
"smsName"
@
change=
"sendCode"
v-else
>
<view
class=
"uni-input"
>
{{
$lang
.
lang
.
forget
.
code
}}
</view>
</picker>
</view>
</view>
</view>
</view>
<view
class=
"item"
>
<view
class=
"item"
>
...
@@ -67,7 +69,10 @@
...
@@ -67,7 +69,10 @@
code
:
this
.
$lang
.
lang
.
notices
.
code
,
code
:
this
.
$lang
.
lang
.
notices
.
code
,
password
:
this
.
$lang
.
lang
.
notices
.
newPsd
,
password
:
this
.
$lang
.
lang
.
notices
.
newPsd
,
passworded
:
this
.
$lang
.
lang
.
notices
.
nextPsd
,
passworded
:
this
.
$lang
.
lang
.
notices
.
nextPsd
,
}
},
smsName
:
[
'
SMS
'
,
'
WhatsApp
'
],
smsData
:
[
1
,
2
],
smsIndex
:
0
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -122,7 +127,7 @@
...
@@ -122,7 +127,7 @@
}
}
})
})
},
},
sendCode
()
{
sendCode
(
e
)
{
if
(
this
.
FormData
.
mobile
==
''
){
if
(
this
.
FormData
.
mobile
==
''
){
return
uni
.
showToast
({
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
...
@@ -132,7 +137,16 @@
...
@@ -132,7 +137,16 @@
if
(
this
.
leftTime
<
60
)
{
if
(
this
.
leftTime
<
60
)
{
return
false
return
false
}
}
this
.
$request
.
post
(
'
/app-api/member/send-sms-code
'
,
{
areaCode
:
this
.
areaData
[
this
.
areaIndex
],
mobile
:
this
.
FormData
.
mobile
,
scene
:
3
}).
then
(
res
=>
{
var
data
=
{
mobile
:
this
.
FormData
.
mobile
,
nodeValue
:
'
user-sms-reset-password
'
,
areaCode
:
this
.
areaData
[
this
.
areaIndex
],
isTransport
:
0
,
transportId
:
0
,
isOrders
:
0
,
messageType
:
this
.
smsData
[
e
.
detail
.
value
]
}
this
.
$request
.
post
(
'
/app-api/member/send-sms-code
'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
this
.
countDown
()
this
.
countDown
()
}
else
{
}
else
{
...
...
src/pages/login/login.vue
View file @
e2808e07
...
@@ -88,7 +88,9 @@
...
@@ -88,7 +88,9 @@
:placeholder=
"$lang.lang.notices.code"
:placeholder=
"$lang.lang.notices.code"
/>
/>
<text
class=
"code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</text>
<text
class=
"code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</text>
<text
class=
"code"
@
click=
"sendCode"
v-else
>
{{
$lang
.
lang
.
login
.
code
}}
</text>
<picker
class=
"code"
:range=
"smsName"
@
change=
"sendCode"
v-else
>
<view
class=
"uni-input"
>
{{
$lang
.
lang
.
login
.
code
}}
</view>
</picker>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -174,7 +176,10 @@ export default {
...
@@ -174,7 +176,10 @@ export default {
forceUpdate
:
0
,
forceUpdate
:
0
,
showdownLine
:
false
,
showdownLine
:
false
,
downloadNum
:
0
,
//下载百分比
downloadNum
:
0
,
//下载百分比
totalSize
:
0
//下载总量
totalSize
:
0
,
//下载总量
smsName
:
[
'
SMS
'
,
'
WhatsApp
'
],
smsData
:
[
1
,
2
],
smsIndex
:
0
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -275,7 +280,7 @@ export default {
...
@@ -275,7 +280,7 @@ export default {
}
}
})
})
},
},
sendCode
()
{
sendCode
(
e
)
{
if
(
this
.
mobile
==
''
)
{
if
(
this
.
mobile
==
''
)
{
return
uni
.
showToast
({
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
...
@@ -285,12 +290,17 @@ export default {
...
@@ -285,12 +290,17 @@ export default {
if
(
this
.
leftTime
<
60
)
{
if
(
this
.
leftTime
<
60
)
{
return
false
return
false
}
}
var
data
=
{
mobile
:
this
.
mobile
,
nodeValue
:
'
user-sms-login
'
,
areaCode
:
this
.
areaData
[
this
.
areaIndex
],
isTransport
:
0
,
transportId
:
0
,
isOrders
:
0
,
messageType
:
this
.
smsData
[
e
.
detail
.
value
]
}
this
.
$request
this
.
$request
.
post
(
'
/app-api/member/send-sms-code
'
,
{
.
post
(
'
/app-api/member/send-sms-code
'
,
data
)
areaCode
:
this
.
areaData
[
this
.
areaIndex
],
mobile
:
this
.
mobile
,
scene
:
1
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
countDown
()
this
.
countDown
()
...
...
src/pages/order/order.vue
View file @
e2808e07
...
@@ -308,7 +308,9 @@
...
@@ -308,7 +308,9 @@
<view
class=
"corder-tab1-item"
v-if=
"controlType==1"
>
<view
class=
"corder-tab1-item"
v-if=
"controlType==1"
>
<input
class=
"vp-input"
autocomplete=
"off"
v-model=
"lendingFrom.code"
type=
"code"
:placeholder=
"$lang.lang.notices.code"
>
<input
class=
"vp-input"
autocomplete=
"off"
v-model=
"lendingFrom.code"
type=
"code"
:placeholder=
"$lang.lang.notices.code"
>
<view
class=
"code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"code"
@
click=
"sendCode"
v-else
>
{{
$lang
.
lang
.
order
.
getCode
}}
</view>
<picker
class=
"code"
:range=
"smsName"
@
change=
"sendCode"
v-else
>
<view
class=
"uni-input"
>
{{
$lang
.
lang
.
order
.
getCode
}}
</view>
</picker>
</view>
</view>
<view
class=
"corder-tab1-item"
v-if=
"controlType==2"
>
<view
class=
"corder-tab1-item"
v-if=
"controlType==2"
>
<text>
{{
$lang
.
lang
.
site
.
controlPsd
}}
<span
class=
"redcolor"
>
*
</span></text>
<text>
{{
$lang
.
lang
.
site
.
controlPsd
}}
<span
class=
"redcolor"
>
*
</span></text>
...
@@ -389,7 +391,9 @@
...
@@ -389,7 +391,9 @@
<view
class=
"corder-tab1-item"
v-if=
"controlType==1"
>
<view
class=
"corder-tab1-item"
v-if=
"controlType==1"
>
<input
class=
"vp-input"
autocomplete=
"off"
v-model=
"transferFrom.code"
type=
"code"
:placeholder=
"$lang.lang.notices.code"
>
<input
class=
"vp-input"
autocomplete=
"off"
v-model=
"transferFrom.code"
type=
"code"
:placeholder=
"$lang.lang.notices.code"
>
<view
class=
"code"
v-if=
"leftTimes
<
60
"
>
{{
leftTimes
}}
S
</view>
<view
class=
"code"
v-if=
"leftTimes
<
60
"
>
{{
leftTimes
}}
S
</view>
<view
class=
"code"
@
click=
"sendTransCode"
v-else
>
{{
$lang
.
lang
.
order
.
getCode
}}
</view>
<picker
class=
"code"
:range=
"smsName"
@
change=
"sendTransCode"
v-else
>
<view
class=
"uni-input"
>
{{
$lang
.
lang
.
order
.
getCode
}}
</view>
</picker>
</view>
</view>
<view
class=
"corder-tab1-item"
v-if=
"controlType==2"
>
<view
class=
"corder-tab1-item"
v-if=
"controlType==2"
>
<text>
{{
$lang
.
lang
.
site
.
controlPsd
}}
<span
class=
"redcolor"
>
*
</span></text>
<text>
{{
$lang
.
lang
.
site
.
controlPsd
}}
<span
class=
"redcolor"
>
*
</span></text>
...
@@ -543,7 +547,10 @@
...
@@ -543,7 +547,10 @@
controlLogData
:[],
controlLogData
:[],
controlType
:
1
,
//放货方式
controlType
:
1
,
//放货方式
transType
:[],
transType
:[],
loading
:
false
loading
:
false
,
smsName
:
[
'
SMS
'
,
'
WhatsApp
'
],
smsData
:
[
1
,
2
],
smsIndex
:
0
}
}
},
},
computed
:{
computed
:{
...
@@ -834,15 +841,19 @@
...
@@ -834,15 +841,19 @@
}
}
})
})
},
},
sendTransCode
(){
sendTransCode
(
e
){
if
(
this
.
leftTimes
<
60
)
{
if
(
this
.
leftTimes
<
60
)
{
return
false
return
false
}
}
var
params
=
{
var
data
=
{
orderId
:
this
.
selectOrder
.
orderId
,
nodeValue
:
'
transfer-control-goods
'
,
scene
:
4
orderId
:
this
.
selectOrder
.
orderId
,
isTransport
:
0
,
transportId
:
0
,
isOrders
:
0
,
messageType
:
this
.
smsData
[
e
.
detail
.
value
]
}
}
this
.
$request
.
post
(
'
/app-api/order/order-cargo-control/send-sms-code
'
,
params
).
then
(
res
=>
{
this
.
$request
.
post
(
'
/app-api/order/order-cargo-control/send-sms-code
'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
this
.
countDowns
()
this
.
countDowns
()
}
else
{
}
else
{
...
@@ -861,15 +872,20 @@
...
@@ -861,15 +872,20 @@
this
.
leftTimes
=
60
this
.
leftTimes
=
60
}
}
},
},
sendCode
()
{
sendCode
(
e
)
{
if
(
this
.
leftTime
<
60
)
{
if
(
this
.
leftTime
<
60
)
{
return
false
return
false
}
}
var
params
=
{
orderId
:
this
.
selectOrder
.
orderId
,
var
data
=
{
scene
:
5
nodeValue
:
'
delivery-verification-sms
'
,
orderId
:
this
.
selectOrder
.
orderId
,
isTransport
:
0
,
transportId
:
0
,
isOrders
:
0
,
messageType
:
this
.
smsData
[
e
.
detail
.
value
]
}
}
this
.
$request
.
post
(
'
/app-api/order/order-cargo-control/send-sms-code
'
,
params
).
then
(
res
=>
{
this
.
$request
.
post
(
'
/app-api/order/order-cargo-control/send-sms-code
'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
this
.
countDown
()
this
.
countDown
()
}
else
{
}
else
{
...
...
src/pages/order_mail/order_mail.vue
View file @
e2808e07
...
@@ -80,9 +80,11 @@
...
@@ -80,9 +80,11 @@
<
view
class
=
"
main-footer
"
>
<
view
class
=
"
main-footer
"
>
<
view
class
=
"
mobile
"
>
{{
mobile
}}
<
/view
>
<
view
class
=
"
mobile
"
>
{{
mobile
}}
<
/view
>
<
input
class
=
"
inp
"
:
placeholder
=
"
integral.codePlaceloader
"
v
-
model
=
"
code
"
/>
<
input
class
=
"
inp
"
:
placeholder
=
"
integral.codePlaceloader
"
v
-
model
=
"
code
"
/>
<
view
class
=
"
btn
"
@
click
=
"
handleCode
"
>
{{
codeTime
==
0
?
integral
.
code
:
integral
.
codeTimeText
(
codeTime
)
<
text
class
=
"
code
"
v
-
if
=
"
codeTime >0
"
>
{{
integral
.
codeTimeText
(
codeTime
)
}}
<
/text
>
}}
<
/view
>
<
picker
class
=
"
code
"
:
range
=
"
smsName
"
@
change
=
"
handleCode
"
v
-
else
>
<
view
class
=
"
uni-input
"
>
{{
integral
.
code
}}
<
/view
>
<
/picker
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
...
@@ -210,7 +212,9 @@ export default {
...
@@ -210,7 +212,9 @@ export default {
code
:
''
,
code
:
''
,
// 验证码倒计时
// 验证码倒计时
codeTime
:
0
,
codeTime
:
0
,
mobile
:
''
mobile
:
''
,
smsName
:
[
'
SMS
'
,
'
WhatsApp
'
],
smsData
:
[
1
,
2
],
}
}
}
,
}
,
onLoad
(
route
)
{
onLoad
(
route
)
{
...
@@ -274,7 +278,7 @@ export default {
...
@@ -274,7 +278,7 @@ export default {
}
}
}
,
}
,
// 获取验证码
// 获取验证码
async
handleCode
()
{
async
handleCode
(
e
)
{
if
(
this
.
codeTime
>
0
)
return
if
(
this
.
codeTime
>
0
)
return
this
.
codeTime
=
60
this
.
codeTime
=
60
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
...
@@ -284,10 +288,16 @@ export default {
...
@@ -284,10 +288,16 @@ export default {
}
}
}
,
1000
)
}
,
1000
)
try
{
try
{
const
memberId
=
this
.
$store
.
getters
.
id
var
data
=
{
await
this
.
$request
.
post
(
'
/app-api/reward/redeem/send-sms-code
'
,
{
memberId
:
this
.
$store
.
getters
.
id
,
memberId
nodeValue
:
'
user-sms-redeem-reward
'
,
}
)
isTransport
:
0
,
transportId
:
0
,
isOrders
:
0
,
messageType
:
this
.
smsData
[
e
.
detail
.
value
]
}
await
this
.
$request
.
post
(
'
/app-api/reward/redeem/send-sms-code
'
,
data
)
}
catch
(
error
)
{
}
}
catch
(
error
)
{
}
}
,
}
,
// 打开弹出层
// 打开弹出层
...
...
src/pages/register/register.vue
View file @
e2808e07
...
@@ -57,9 +57,9 @@
...
@@ -57,9 +57,9 @@
:placeholder=
"$lang.lang.notices.code"
:placeholder=
"$lang.lang.notices.code"
/>
/>
<view
class=
"login-code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"login-code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"login-code"
v-else
@
click=
"sendCode"
>
{{
<picker
class=
"login-code"
:range=
"smsName"
@
change=
"sendCode"
v-else
>
$lang
.
lang
.
login
.
code
<view
class=
"uni-input"
>
{{
$lang
.
lang
.
login
.
code
}}
</view>
}}
</view
>
</picker
>
</view>
</view>
</view>
</view>
<view
class=
"login-v"
>
<view
class=
"login-v"
>
...
@@ -147,6 +147,9 @@ export default {
...
@@ -147,6 +147,9 @@ export default {
areaName
:
[],
areaName
:
[],
leftTime
:
60
,
leftTime
:
60
,
referralCode
:
""
,
referralCode
:
""
,
smsName
:
[
'
SMS
'
,
'
WhatsApp
'
],
smsData
:
[
1
,
2
],
smsIndex
:
0
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -187,36 +190,7 @@ export default {
...
@@ -187,36 +190,7 @@ export default {
areaChange
(
e
)
{
areaChange
(
e
)
{
this
.
areaIndex
=
e
.
detail
.
value
;
this
.
areaIndex
=
e
.
detail
.
value
;
},
},
ismobile
(
code
,
mobile
)
{
sendCode
(
e
)
{
this
.
$request
.
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
"
,
{
areaCode
:
this
.
areaData
[
this
.
areaIndex
],
mobile
:
this
.
mobile
,
scene
:
0
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
countDown
();
}
else
{
uni
.
showToast
({
title
:
res
.
msg
||
"
error
"
,
icon
:
"
none
"
,
});
}
});
}
else
{
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
nophone
,
icon
:
"
error
"
,
});
}
});
},
sendCode
()
{
if
(
this
.
mobile
==
""
)
{
if
(
this
.
mobile
==
""
)
{
return
uni
.
showToast
({
return
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
title
:
this
.
$lang
.
lang
.
notices
.
phone
,
...
@@ -226,7 +200,40 @@ export default {
...
@@ -226,7 +200,40 @@ export default {
if
(
this
.
leftTime
<
60
)
{
if
(
this
.
leftTime
<
60
)
{
return
false
;
return
false
;
}
}
this
.
ismobile
(
this
.
areaData
[
this
.
areaIndex
],
this
.
mobile
);
var
data
=
{
mobile
:
this
.
mobile
,
nodeValue
:
'
user-sms-reg
'
,
areaCode
:
this
.
areaData
[
this
.
areaIndex
],
code
:
this
.
areaData
[
this
.
areaIndex
],
isTransport
:
0
,
transportId
:
0
,
isOrders
:
0
,
messageType
:
this
.
smsData
[
e
.
detail
.
value
]
}
this
.
$request
.
get
(
"
/app-api/param/validator/mobile
"
,
data
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
$request
.
post
(
"
/app-api/member/send-sms-code
"
,
data
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
countDown
();
}
else
{
uni
.
showToast
({
title
:
res
.
msg
||
"
error
"
,
icon
:
"
none
"
,
});
}
});
}
else
{
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
nophone
,
icon
:
"
error
"
,
});
}
});
},
},
countDown
()
{
countDown
()
{
this
.
leftTime
--
;
this
.
leftTime
--
;
...
...
src/pages/telcode/telcode.vue
View file @
e2808e07
...
@@ -19,7 +19,9 @@
...
@@ -19,7 +19,9 @@
<view
class=
"login-vp"
>
<view
class=
"login-vp"
>
<input
class=
"vp-input"
autocomplete=
"off"
v-model=
"code"
type=
"number"
:placeholder=
"$lang.lang.notices.code"
>
<input
class=
"vp-input"
autocomplete=
"off"
v-model=
"code"
type=
"number"
:placeholder=
"$lang.lang.notices.code"
>
<view
class=
"login-code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"login-code"
v-if=
"leftTime
<
60
"
>
{{
leftTime
}}
S
</view>
<view
class=
"login-code"
v-else
@
click=
"sendCode"
>
{{
$lang
.
lang
.
editEmail
.
getCode
}}
</view>
<picker
class=
"login-code"
:range=
"smsName"
@
change=
"sendCode"
v-else
>
<view
class=
"uni-input"
>
{{
$lang
.
lang
.
editEmail
.
code
}}
</view>
</picker>
</view>
</view>
</view>
</view>
<view
class=
"login-vp login-v"
>
<view
class=
"login-vp login-v"
>
...
@@ -55,7 +57,10 @@
...
@@ -55,7 +57,10 @@
leftTime
:
60
,
leftTime
:
60
,
password
:
''
,
password
:
''
,
password2
:
''
,
password2
:
''
,
userInfo
:
''
userInfo
:
''
,
smsName
:
[
'
SMS
'
,
'
WhatsApp
'
],
smsData
:
[
1
,
2
],
smsIndex
:
0
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -70,27 +75,6 @@
...
@@ -70,27 +75,6 @@
}
}
})
})
},
},
ismobile
(
mobile
){
this
.
$request
.
get
(
'
/app-api/param/validator/mobile
'
,{
code
:
this
.
userInfo
.
areaCode
,
mobile
:
this
.
userInfo
.
mobile
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
$request
.
post
(
'
/app-api/member/send-sms-code
'
,
{
areaCode
:
this
.
userInfo
.
areaCode
,
mobile
:
this
.
userInfo
.
mobile
,
scene
:
3
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
countDown
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'
none
'
,
})
}
})
}
else
{
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
nophone
,
icon
:
'
error
'
,
})
}
})
},
Country
()
{
Country
()
{
let
that
=
this
let
that
=
this
that
.
$request
.
get
(
'
/app-api/ecw/country/list-all
'
).
then
(
res
=>
{
that
.
$request
.
get
(
'
/app-api/ecw/country/list-all
'
).
then
(
res
=>
{
...
@@ -106,11 +90,39 @@
...
@@ -106,11 +90,39 @@
}
}
})
})
},
},
sendCode
()
{
sendCode
(
e
)
{
if
(
this
.
leftTime
<
60
)
{
if
(
this
.
leftTime
<
60
)
{
return
false
return
false
}
}
this
.
ismobile
(
this
.
userInfo
.
mobile
)
var
data
=
{
mobile
:
this
.
userInfo
.
mobile
,
nodeValue
:
'
user-sms-reset-password
'
,
areaCode
:
this
.
userInfo
.
areaCode
,
code
:
this
.
userInfo
.
areaCode
,
isTransport
:
0
,
transportId
:
0
,
isOrders
:
0
,
messageType
:
this
.
smsData
[
e
.
detail
.
value
]
}
this
.
$request
.
get
(
'
/app-api/param/validator/mobile
'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
$request
.
post
(
'
/app-api/member/send-sms-code
'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
countDown
()
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'
none
'
,
})
}
})
}
else
{
uni
.
showToast
({
title
:
this
.
$lang
.
lang
.
notices
.
nophone
,
icon
:
'
error
'
,
})
}
})
},
},
countDown
()
{
countDown
()
{
this
.
leftTime
--
this
.
leftTime
--
...
...
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