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
4c73674e
authored
May 31, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
css
parent
94a03a0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
pages/mine/activity.vue
pages/mine/coupon.vue
pages/mine/activity.vue
View file @
4c73674e
...
...
@@ -82,6 +82,9 @@ export default {
coupon_list
:
[]
};
},
onLoad
(
options
)
{
this
.
curr
=
options
.
curr
||
0
;
},
onShow
()
{
this
.
getData
();
},
...
...
pages/mine/coupon.vue
View file @
4c73674e
...
...
@@ -2,7 +2,7 @@
<view
class=
"page-userCoupon"
>
<navElement
title=
"我的优惠券"
>
<template
slot=
"title-bar"
>
<navigator
class=
"go-coupon"
url=
"/user/activity"
hover-class=
"none"
>
去领券
</navigator>
<navigator
class=
"go-coupon"
url=
"/user/activity
?curr=1
"
hover-class=
"none"
>
去领券
</navigator>
</
template
>
</navElement>
<view
class=
"tab row avarage verCenter"
>
...
...
@@ -69,7 +69,7 @@ export default {
curr
:
0
,
text_arr
:
[
'未使用'
,
'已使用'
,
'已过期'
],
list
:
[],
count
:
[],
count
:
[
0
,
0
,
0
],
searchParams
:
{
status
:
-
1
}
...
...
@@ -90,17 +90,23 @@ export default {
}
this
.
getData
();
},
getData
()
{
/**
* 获取统计数据
*/
getCount
()
{
this
.
request
(
Api_Url
+
'/ucoupon/count'
,
'POST'
,
{},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
count
[
0
]
=
res
.
data
[
-
1
]
;
this
.
count
[
1
]
=
res
.
data
[
1
]
;
this
.
count
[
2
]
=
res
.
data
[
-
2
]
;
this
.
$set
(
this
.
count
,
0
,
res
.
data
[
-
1
])
;
this
.
$set
(
this
.
count
,
1
,
res
.
data
[
1
])
;
this
.
$set
(
this
.
count
,
2
,
res
.
data
[
-
2
])
;
}
});
},
getData
()
{
this
.
request
(
Api_Url
+
'/ucoupon/lists'
,
'POST'
,
this
.
searchParams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
list
=
res
.
data
;
this
.
getCount
();
}
else
if
(
res
.
err_code
==
11012
)
{
uni
.
navigateTo
({
url
:
'/login?referer=/user/inquery'
...
...
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