Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9d273a8d
authored
May 26, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
京东卡
parent
b9a93418
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
142 additions
and
22 deletions
assets/css/mine/coupdz.scss
assets/css/mine/forget.scss
pages/mine/coupdz.vue
pages/mine/forget.vue
assets/css/mine/coupdz.scss
View file @
9d273a8d
...
@@ -127,6 +127,11 @@
...
@@ -127,6 +127,11 @@
border-radius
:
10rpx
;
border-radius
:
10rpx
;
text-indent
:
15rpx
;
text-indent
:
15rpx
;
font-size
:
26rpx
;
font-size
:
26rpx
;
border
:
1px
solid
transparent
;
&
:focus-within
{
border
:
1px
solid
#1969f9
;
background-color
:
#ffffff
;
}
}
}
.code-pic
{
.code-pic
{
width
:
160rpx
;
width
:
160rpx
;
...
@@ -139,6 +144,14 @@
...
@@ -139,6 +144,14 @@
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#1969f9
;
color
:
#1969f9
;
}
}
.code-text
{
margin-left
:
30rpx
;
font-size
:
26rpx
;
color
:
#1969f9
;
&
.disabled
{
color
:
#919399
;
}
}
}
}
}
}
...
...
assets/css/mine/forget.scss
View file @
9d273a8d
...
@@ -90,9 +90,12 @@
...
@@ -90,9 +90,12 @@
text-indent
:
23rpx
;
text-indent
:
23rpx
;
font-size
:
26rpx
;
font-size
:
26rpx
;
}
}
.code
{
.code
-text
{
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#1969f9
;
color
:
#1969f9
;
&
.disabled
{
color
:
#919399
;
}
}
}
}
}
&
.pwd
{
&
.pwd
{
...
...
pages/mine/coupdz.vue
View file @
9d273a8d
<
template
>
<
template
>
<view
class=
"page-userCoupdz"
>
<view
class=
"page-userCoupdz"
>
<navElement
title=
"京东卡"
></navElement>
<navElement
title=
"京东卡"
></navElement>
<view
class=
"list"
>
<view
class=
"list"
v-if=
"list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in
5"
:key=
"index"
:class=
"
{ curr: index == 0 }
">
<view
class=
"box"
v-for=
"(item, index) in
list"
:key=
"item.id
"
>
<view
class=
"p1 row bothSide verCenter"
>
<view
class=
"p1 row bothSide verCenter"
>
<text
class=
"t1"
>
常规新客12月奖励
</text>
<text
class=
"t1"
>
{{
item
.
name
}}
</text>
<view
class=
"row verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing"
></text>
<text
class=
"iconfont icon-juxing"
></text>
<text
class=
"t2"
@
click=
"open()"
>
查看
</text>
<text
class=
"t2"
@
click=
"open()"
>
查看
</text>
...
@@ -12,17 +12,17 @@
...
@@ -12,17 +12,17 @@
</view>
</view>
<view
class=
"p2 row verCenter"
>
<view
class=
"p2 row verCenter"
>
<text
class=
"t1"
>
卡号:
</text>
<text
class=
"t1"
>
卡号:
</text>
<text
class=
"t2"
>
jdvd210264522
</text>
<text
class=
"t2"
>
{{
item
.
card_number
}}
</text>
<text
class=
"iconfont icon-juxing3"
style=
"margin-right: 57rpx;"
></text>
<text
class=
"iconfont icon-juxing3"
style=
"margin-right: 57rpx;"
></text>
<text
class=
"t1"
>
密钥:
</text>
<text
class=
"t1"
>
密钥:
</text>
<text
class=
"t2"
>
852157
</text>
<text
class=
"t2"
>
{{
item
.
card_password
}}
</text>
<text
class=
"iconfont icon-juxing3"
></text>
<text
class=
"iconfont icon-juxing3"
></text>
</view>
</view>
<view
class=
"p3"
>
有效期:
2023.01.26-2023.06.26
</view>
<view
class=
"p3"
>
有效期:
{{
item
.
period_validity
}}
</view>
<view
class=
"p4"
>
创建时间:
2023.01.26-2023.06.26
</view>
<view
class=
"p4"
>
创建时间:
{{
item
.
allocate_time_format
}}
</view>
</view>
</view>
</view>
</view>
<view
class=
"no-data column rowCenter verCenter"
>
<view
class=
"no-data column rowCenter verCenter"
v-else
>
<image
src=
"../../static/nodate.png"
></image>
<image
src=
"../../static/nodate.png"
></image>
<text
class=
"tt"
>
暂无京东卡信息
</text>
<text
class=
"tt"
>
暂无京东卡信息
</text>
</view>
</view>
...
@@ -35,17 +35,17 @@
...
@@ -35,17 +35,17 @@
</view>
</view>
<view
class=
"show-input row verCenter"
style=
"margin-bottom: 24rpx;"
>
<view
class=
"show-input row verCenter"
style=
"margin-bottom: 24rpx;"
>
<text
class=
"t1"
>
手机号:
</text>
<text
class=
"t1"
>
手机号:
</text>
<text
class=
"t2"
>
13800138000
</text>
<text
class=
"t2"
>
{{
formParams
.
account
}}
</text>
</view>
</view>
<view
class=
"input-box row
"
style=
"margin-bottom: 16rpx;
"
>
<view
class=
"input-box row
verCenter"
style=
"margin-bottom: 16rpx;"
v-if=
"verify_flag
"
>
<text
class=
"t1"
>
图形验证码:
</text>
<text
class=
"t1"
>
图形验证码:
</text>
<input
type=
"text"
placeholder=
""
class=
"uni-input"
/>
<input
type=
"text"
placeholder=
""
class=
"uni-input"
v-model=
"formParams.verify"
/>
<image
src=
""
mode=
"aspectFill"
class=
"code-pic
"
></image>
<image
:src=
"url"
class=
"code-pic"
@
click=
"refresh()
"
></image>
</view>
</view>
<view
class=
"input-box row"
style=
"margin-bottom: 32rpx;"
>
<view
class=
"input-box row
verCenter
"
style=
"margin-bottom: 32rpx;"
>
<text
class=
"t1"
>
短信验证码:
</text>
<text
class=
"t1"
>
短信验证码:
</text>
<input
type=
"
text"
placeholder=
""
class=
"uni-input
"
/>
<input
type=
"
number"
inputmode=
"numeric"
placeholder=
""
class=
"uni-input"
v-model=
"formParams.sms_verify
"
/>
<text
class=
"
text"
>
发送验证码
</text>
<text
class=
"
code-text"
@
click=
"countdownChange()"
:class=
"
{ disabled: code_disabled }">
{{
code_text
}}
</text>
</view>
</view>
<view
class=
"btn row rowCenter verCenter"
>
提 交
</view>
<view
class=
"btn row rowCenter verCenter"
>
提 交
</view>
</view>
</view>
...
@@ -54,18 +54,122 @@
...
@@ -54,18 +54,122 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Api_Url
}
from
'@/util/api.js'
;
import
{
Api_Url
,
Code_Url
}
from
'@/util/api.js'
;
import
navElement
from
'@/components/nav.vue'
;
import
navElement
from
'@/components/nav.vue'
;
import
{
setCookie
,
delCookie
,
getCookie
,
startCountdown
}
from
'@/util/util.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
navElement
navElement
},
},
data
()
{
data
()
{
return
{};
return
{
code_text
:
'获取验证码'
,
code_disabled
:
false
,
verify_flag
:
false
,
//是否显示图形验证码
list
:
[],
url
:
Code_Url
+
'?pf=2'
,
//图形验证码地址
searchForams
:
{
page
:
1
,
limit
:
1000
},
formParams
:
{
account
:
''
,
verify
:
''
,
sms_verify
:
''
}
};
},
onShow
()
{
this
.
getData
();
},
},
onLoad
()
{},
methods
:
{
methods
:
{
getData
()
{
this
.
request
(
Api_Url
+
'/user/getUserType'
,
'POST'
,
{},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
formParams
.
account
=
res
.
data
.
user_info
.
mobile
;
}
else
if
(
res
.
err_code
===
11012
)
{
uni
.
navigateTo
({
url
:
'/login'
});
}
});
this
.
request
(
Api_Url
+
'/voucher/getVoucherList'
,
'GET'
,
this
.
searchForams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
list
=
res
.
data
.
list
;
}
});
},
/**
* 刷新验证码
*/
refresh
()
{
var
Yo4teW_gid
=
getCookie
(
'Yo4teW_gid'
);
var
Yo4teW_csrf
=
getCookie
(
'Yo4teW_csrf'
);
var
Yo4teW_uid
=
getCookie
(
'Yo4teW_uid'
);
this
.
url
=
Code_Url
+
'?time='
+
new
Date
().
getTime
()
+
'&pf=2&Yo4teW_gid='
+
Yo4teW_gid
+
'&Yo4teW_csrf='
+
Yo4teW_csrf
+
'&Yo4teW_uid='
+
Yo4teW_uid
+
'&id=2'
;
},
/**
* 手机验证码
*/
countdownChange
()
{
var
reg
=
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-35-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-35-9
])\d{8}
$/
;
if
(
!
this
.
formParams
.
account
)
{
uni
.
showToast
({
title
:
'请输入手机号'
,
icon
:
'none'
});
return
false
;
}
if
(
!
reg
.
test
(
this
.
formParams
.
account
))
{
uni
.
showToast
({
title
:
'手机格式错误'
,
icon
:
'none'
});
return
false
;
}
this
.
request
(
Api_Url
+
'/public/smsVerify'
,
'POST'
,
{
mobile
:
this
.
formParams
.
account
,
verify
:
this
.
formParams
.
verify
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
!
this
.
code_disabled
)
{
const
countdown
=
startCountdown
({
duration
:
60
,
onTick
:
remainingTime
=>
{
this
.
code_disabled
=
true
;
this
.
code_text
=
`重新发送
${
remainingTime
}
S`
;
},
onComplete
:
()
=>
{
this
.
code_disabled
=
false
;
this
.
code_text
=
`获取验证码`
;
}
});
countdown
.
start
();
}
}
else
if
(
res
.
err_code
===
10001
||
res
.
err_code
===
10002
)
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
res
.
err_msg
,
showCancel
:
false
,
success
:
res
=>
{
if
(
res
.
confirm
)
{
this
.
verify_flag
=
true
;
this
.
refresh
();
//刷新验证码
}
else
if
(
res
.
cancel
)
{
}
}
});
}
else
{
this
.
verify_flag
=
false
;
uni
.
showModal
({
itle
:
'提示'
,
content
:
res
.
err_msg
,
showCancel
:
false
});
}
});
},
open
()
{
open
()
{
this
.
$refs
.
popup
.
open
(
'center'
);
this
.
$refs
.
popup
.
open
(
'center'
);
},
},
...
...
pages/mine/forget.vue
View file @
9d273a8d
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
</view>
</view>
<view
class=
"input-box code row bothSide verCenter"
style=
"margin-bottom: 40rpx;"
>
<view
class=
"input-box code row bothSide verCenter"
style=
"margin-bottom: 40rpx;"
>
<input
type=
"number"
placeholder=
"请输入验证码"
placeholder-style=
"color:#919399;"
class=
"uni-input"
v-model=
"formParams.sms_verify"
/>
<input
type=
"number"
placeholder=
"请输入验证码"
placeholder-style=
"color:#919399;"
class=
"uni-input"
v-model=
"formParams.sms_verify"
/>
<text
class=
"code"
@
click=
"countdownChange()"
:class=
"
{ disabled: code_disabled }">
{{
code_text
}}
</text>
<text
class=
"code
-text
"
@
click=
"countdownChange()"
:class=
"
{ disabled: code_disabled }">
{{
code_text
}}
</text>
</view>
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submit(1)"
>
提交
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submit(1)"
>
提交
</view>
</
template
>
</
template
>
...
@@ -75,10 +75,10 @@ export default {
...
@@ -75,10 +75,10 @@ export default {
index
:
0
,
index
:
0
,
array
:
[
'0086'
,
'00886'
,
'00853'
,
'00852'
],
array
:
[
'0086'
,
'00886'
,
'00853'
,
'00852'
],
textArr
:
[
'身份验证'
,
'重置密码'
,
'完成'
],
textArr
:
[
'身份验证'
,
'重置密码'
,
'完成'
],
verify_flag
:
false
,
//是否显示验证码
verify_flag
:
false
,
//是否显示
图形
验证码
pwd_flag
:
true
,
pwd_flag
:
true
,
curr
:
0
,
curr
:
0
,
url
:
Code_Url
+
'?pf=2'
,
url
:
Code_Url
+
'?pf=2'
,
//图形验证码地址
formParams
:
{
formParams
:
{
password
:
''
,
password
:
''
,
sms_verify
:
''
,
sms_verify
:
''
,
...
...
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