Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
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
pseer
gxpt_wechat
Commits
ae7d46f5
Commit
ae7d46f5
authored
Mar 04, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
3174b192
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
4 deletions
+33
-4
index.vue
pages/couponList/index.vue
+33
-4
No files found.
pages/couponList/index.vue
View file @
ae7d46f5
...
...
@@ -18,6 +18,11 @@
<text
class=
"text-title text-lg text-bold"
style=
"width: 64%;"
>
{{
item
.
name
}}
</text>
<text
class=
"text-lg"
:class=
"item.useStatus==0?'text-pink':'text-gray'"
>
{{
item
.
useStatus
==
0
?
'待使用'
:
'已使用'
}}
</text>
</view>
<view
class=
"flex-row margin-top"
>
<text
class=
""
>
来源:
</text>
<text>
{{
couponSourceEnum
[
item
.
sourceType
]
}}
</text>
</view>
<view
v-if=
"item.couponType == 4"
class=
"flex-row margin-top"
>
<text
class=
""
>
使用说明:
</text>
<text>
{{
item
.
remark
||
''
}}
</text>
...
...
@@ -31,11 +36,11 @@
<text
class=
""
>
可用时段:
</text>
<text
class=
""
>
{{
item
.
couponTimeStart
}}
-
{{
item
.
couponTimeEnd
}}
</text>
</view>
<text>
{{
item
.
platformType
==
2
?
'美团核销'
:
''
}}
</text>
<text>
{{
platformEnum
[
item
.
platformType
]
}}
</text>
</view>
<view
v-else
class=
"des margin-top"
>
<text
class=
""
>
全天通用
</text>
<text>
{{
item
.
platformType
==
2
?
'美团核销'
:
''
}}
</text>
<text>
{{
platformEnum
[
item
.
platformType
]
}}
</text>
</view>
<view
class=
"coupon-name margin-top"
>
<text
class=
"text-gray"
>
有效期限:
</text>
...
...
@@ -60,9 +65,11 @@
</
template
>
<
script
>
import
{
dictList
}
from
"@/api/index.js"
;
import
indexConfig
from
"@/config/index.config"
;
import
FixedHeader
from
"@/components/fixedHeader/index"
;
import
{
getCouponList
}
from
"@/api/coupon"
import
{
getDictItem
}
from
"@/utils/tools.js"
export
default
{
data
()
{
...
...
@@ -89,6 +96,8 @@
show
:
false
,
listBlankImage
:
indexConfig
.
assetsPath
+
'/no_data_icon.png'
,
statusIndex
:
0
,
platformEnum
:{},
couponSourceEnum
:{},
statusList
:
[
{
label
:
"待使用"
,
...
...
@@ -116,9 +125,28 @@
},
onLoad
()
{
this
.
onGetDicts
();
this
.
onLoading
();
},
methods
:
{
onGetDicts
()
{
let
dicts
=
[]
let
dictStr
=
uni
.
getStorageSync
(
'dicts'
)
if
(
dictStr
)
{
let
dicts
=
JSON
.
parse
(
dictStr
)
this
.
platformEnum
=
getDictItem
(
dicts
,
"consumer_coupon_platform_type"
);
this
.
couponSourceEnum
=
getDictItem
(
dicts
,
"consumer_coupon_source_type"
);
this
.
$forceUpdate
()
}
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
platformEnum
=
getDictItem
(
dicts
,
"consumer_coupon_platform_type"
);
this
.
couponSourceEnum
=
getDictItem
(
dicts
,
"consumer_coupon_source_type"
);
this
.
$forceUpdate
()
})
},
onLoading
(){
getCouponList
(
this
.
queryParams
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
){
...
...
@@ -165,11 +193,12 @@
.coupon-item
{
display
:
flex
;
flex-direction
:
row
;
width
:
9
2
%
;
border-radius
:
2
0
upx
;
width
:
9
4
%
;
border-radius
:
2
4
upx
;
background-color
:
#ffffff
;
margin
:
12
upx
0
;
padding
:
30
upx
20
upx
;
box-shadow
:
0
0
12
upx
rgba
(
255
,
0
,
127
,
0.23
);
.part-left{
display
:
flex
;
justify-content
:
center
;
...
...
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