Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
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
hooloo
mp
user
Commits
bc52288d
Commit
bc52288d
authored
Aug 18, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分bug
parent
092d9e16
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
27 deletions
+54
-27
components/Tabs/index.vue
+1
-0
components/Ticket/index.vue
+41
-23
mineSubPackage/pages/coupon/index.vue
+8
-2
orderSubPackage/pages/coupon/index.vue
+1
-1
store/modules/order.js
+3
-1
No files found.
components/Tabs/index.vue
View file @
bc52288d
...
@@ -49,6 +49,7 @@ export default {
...
@@ -49,6 +49,7 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.big
{
.big
{
background
:
#FFFFFF
;
height
:
82
rpx
;
height
:
82
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
components/Ticket/index.vue
View file @
bc52288d
<
template
>
<
template
>
<view
class=
"all"
>
<view
class=
"all"
>
<view
class=
"part"
>
<view
class=
"part"
:style=
"
{'margin-bottom':indexValue?'200rpx':'0rpx'}"
>
<view
class=
"partOne"
>
<view
class=
"partOne"
>
<view
class=
"one_left"
>
<view
class=
"one_left"
>
<view
class=
"type"
:style=
"[typeBackground]"
>
{{
info
.
typeDesc
}}
</view>
<view
class=
"type"
:style=
"[typeBackground]"
>
{{
info
.
typeDesc
}}
</view>
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
<view
v-if=
"info.status===0"
>
<view
v-if=
"info.status===0"
>
<button
class=
"gouse"
@
click=
"goMenu"
>
去使用
</button>
<button
class=
"gouse"
@
click=
"goMenu"
>
去使用
</button>
</view>
</view>
<view
v-if=
"info.status===4"
>
<button
class=
"gouse_dis"
>
去使用
</button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -64,6 +67,7 @@
...
@@ -64,6 +67,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:{
props
:{
indexValue
:[
Boolean
],
type
:{
type
:{
type
:
String
,
type
:
String
,
default
(){
default
(){
...
@@ -98,51 +102,53 @@ export default {
...
@@ -98,51 +102,53 @@ export default {
computed
:
{
computed
:
{
typeBackground
(){
typeBackground
(){
const
{
status
}
=
this
.
info
const
{
status
}
=
this
.
info
if
(
status
!==
0
){
if
(
status
===
0
||
status
===
4
){
return
{
'--type-background'
:
'linear-gradient(90deg, #666666 0%, #999999 100%)'
}
}
else
{
return
{
'--type-background'
:
'linear-gradient(90deg, #75A2FF 0%, #B6CEFF 100%)'
}
return
{
'--type-background'
:
'linear-gradient(90deg, #75A2FF 0%, #B6CEFF 100%)'
}
}
else
{
return
{
'--type-background'
:
'linear-gradient(90deg, #666666 0%, #999999 100%)'
}
}
}
},
},
priceColor
(){
priceColor
(){
const
{
status
}
=
this
.
info
const
{
status
}
=
this
.
info
if
(
status
!==
0
){
if
(
status
===
0
||
status
===
4
){
return
{
'color'
:
'#
66666
6'
}
return
{
'color'
:
'#
0050F
6'
}
}
else
{
}
else
{
return
{
'color'
:
'#
0050F6'
}
return
{
'color'
:
'#
666666'
}
}
}
},
},
priceDescColor
(){
priceDescColor
(){
const
{
status
}
=
this
.
info
const
{
status
}
=
this
.
info
if
(
status
!==
0
){
if
(
status
===
0
||
status
===
4
){
return
{
'color'
:
'#
999999
'
}
return
{
'color'
:
'#
0050F6
'
}
}
else
{
}
else
{
return
{
'color'
:
'#
0050F6'
}
return
{
'color'
:
'#
999999'
}
}
}
},
},
titleColor
(){
titleColor
(){
const
{
status
}
=
this
.
info
const
{
status
}
=
this
.
info
if
(
status
!==
0
){
if
(
status
===
0
||
status
===
4
){
return
{
'color'
:
'#
666666
'
}
return
{
'color'
:
'#
333333
'
}
}
else
{
}
else
{
return
{
'color'
:
'#
333333'
}
return
{
'color'
:
'#
666666'
}
}
}
},
},
timeColor
(){
timeColor
(){
const
{
status
}
=
this
.
info
const
{
status
}
=
this
.
info
if
(
status
!==
0
){
if
(
status
===
0
){
return
{
'color'
:
'#999999'
}
return
{
'color'
:
'#333333'
}
}
else
if
(
status
===
4
)
{
return
{
'color'
:
'#FE7373'
}
}
else
{
}
else
{
return
{
'color'
:
'#
333333
'
}
return
{
'color'
:
'#
999999
'
}
}
}
},
},
descColor
(){
descColor
(){
const
{
status
}
=
this
.
info
const
{
status
}
=
this
.
info
if
(
status
!==
0
){
if
(
status
===
0
||
status
===
4
){
return
{
'color'
:
'#999999'
}
return
{
'color'
:
'#999999'
}
}
else
{
}
else
{
return
{
'color'
:
'#
666666'
}
return
{
'color'
:
'#
999999'
}
}
}
}
}
},
},
data
(){
data
(){
...
@@ -171,6 +177,7 @@ export default {
...
@@ -171,6 +177,7 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.all
{
.all
{
background
:
#FFFFFF
;
.part
{
.part
{
width
:
100%
;
width
:
100%
;
margin-top
:
32
rpx
;
margin-top
:
32
rpx
;
...
@@ -283,6 +290,17 @@ export default {
...
@@ -283,6 +290,17 @@ export default {
color
:
#FFFFFF
;
color
:
#FFFFFF
;
line-height
:
52
rpx
;
line-height
:
52
rpx
;
}
}
.gouse_dis
{
width
:
128
rpx
;
height
:
52
rpx
;
background
:
#999999
;
border-radius
:
2
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#FFFFFF
;
line-height
:
52
rpx
;
}
.check
{
.check
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
...
...
mineSubPackage/pages/coupon/index.vue
View file @
bc52288d
...
@@ -64,9 +64,15 @@ export default {
...
@@ -64,9 +64,15 @@ export default {
if
(
item
.
useEndTime
){
if
(
item
.
useEndTime
){
timeEnd
=
item
.
useEndTime
.
slice
(
0
,
11
).
replace
(
new
RegExp
(
'-'
,
'g'
),
'.'
)
timeEnd
=
item
.
useEndTime
.
slice
(
0
,
11
).
replace
(
new
RegExp
(
'-'
,
'g'
),
'.'
)
}
}
let
status
=
item
.
state
===
0
?
0
:
item
.
state
===
1
?
2
:
3
if
(
val
)
{
if
(
timeStart
)
{
status
=
4
}
}
return
{
return
{
id
:
item
.
id
,
id
:
item
.
id
,
status
:
item
.
state
===
0
?
0
:
item
.
state
===
1
?
2
:
3
,
status
:
status
,
couponType
:
item
.
type
,
couponType
:
item
.
type
,
typeDesc
:
item
.
categoryName
,
typeDesc
:
item
.
categoryName
,
price
:
item
.
priceDiscount
===
0
?
'免单'
:
item
.
priceDiscount
,
price
:
item
.
priceDiscount
===
0
?
'免单'
:
item
.
priceDiscount
,
...
@@ -86,7 +92,7 @@ export default {
...
@@ -86,7 +92,7 @@ export default {
}
}
})
})
if
(
val
){
if
(
val
){
this
.
canuse
=
canuse
this
.
canuse
=
canuse
.
sort
((
a
,
b
)
=>
{
return
a
.
status
-
b
.
status
})
}
else
{
}
else
{
this
.
cantuse
=
canuse
this
.
cantuse
=
canuse
}
}
...
...
orderSubPackage/pages/coupon/index.vue
View file @
bc52288d
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<swiper
:current=
"current"
class=
"swiper"
@
change=
"swiperChange"
>
<swiper
:current=
"current"
class=
"swiper"
@
change=
"swiperChange"
>
<swiper-item>
<swiper-item>
<view
class=
"list"
v-if=
"canuse.length!=0"
>
<view
class=
"list"
v-if=
"canuse.length!=0"
>
<Ticket
v-for=
"(item,index) in canuse"
:key=
"index"
:info=
"item"
type=
"use"
@
updata=
"updata"
/>
<Ticket
v-for=
"(item,index) in canuse"
:key=
"index"
:info=
"item"
:indexValue=
"index+1===canuse.length"
type=
"use"
@
updata=
"updata"
/>
</view>
</view>
<view
class=
"emty"
v-else
>
<view
class=
"emty"
v-else
>
<view
class=
"text"
>
暂无可用优惠券
</view>
<view
class=
"text"
>
暂无可用优惠券
</view>
...
...
store/modules/order.js
View file @
bc52288d
...
@@ -13,7 +13,7 @@ const order = {
...
@@ -13,7 +13,7 @@ const order = {
// 设置结算页面优惠卷信息
// 设置结算页面优惠卷信息
setTickerList
(
state
,
data
)
{
setTickerList
(
state
,
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
const
canuse
=
data
.
fitable
.
map
(
item
=>
{
const
canuse
=
data
.
fitable
.
map
(
(
item
,
index
)
=>
{
let
timeStart
=
''
let
timeStart
=
''
let
timeEnd
=
''
let
timeEnd
=
''
if
(
item
.
useStartTime
){
if
(
item
.
useStartTime
){
...
@@ -23,6 +23,8 @@ const order = {
...
@@ -23,6 +23,8 @@ const order = {
timeEnd
=
item
.
useEndTime
.
slice
(
0
,
11
).
replace
(
new
RegExp
(
'-'
,
'g'
),
'.'
)
timeEnd
=
item
.
useEndTime
.
slice
(
0
,
11
).
replace
(
new
RegExp
(
'-'
,
'g'
),
'.'
)
}
}
return
{
return
{
index
:
index
+
1
,
allLength
:
data
.
fitable
.
length
,
id
:
item
.
id
,
id
:
item
.
id
,
status
:
0
,
status
:
0
,
couponType
:
item
.
type
,
couponType
:
item
.
type
,
...
...
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