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
c8997b96
Commit
c8997b96
authored
Jan 15, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
6f8cfb5e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
18 deletions
+42
-18
couponCheck.vue
pages/couponCheck/couponCheck.vue
+3
-2
index.vue
pages/couponList/index.vue
+6
-6
order.vue
pages/order/order.vue
+19
-7
index.vue
pages/useCoupon/index.vue
+14
-3
No files found.
pages/couponCheck/couponCheck.vue
View file @
c8997b96
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
code
:
this
.
code
.
split
(
" "
).
join
(
""
),
code
:
this
.
code
.
split
(
" "
).
join
(
""
),
openShopUuid
:
this
.
openShopUuid
openShopUuid
:
this
.
openShopUuid
}).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
res
,
909090
)
uni
.
hideLoading
(
)
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
code
===
200
){
this
.
couponInfo
=
res
.
data
.
data
this
.
couponInfo
=
res
.
data
.
data
uni
.
showToast
({
uni
.
showToast
({
...
@@ -127,7 +127,8 @@
...
@@ -127,7 +127,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
title
:
res
.
data
.
msg
title
:
res
.
data
.
msg
,
duration
:
3000
})
})
}
}
})
})
...
...
pages/couponList/index.vue
View file @
c8997b96
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
queryParams
:
{
queryParams
:
{
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
,
pageNum
:
1
,
useStatus
:
''
,
useStatus
:
'
0
'
,
},
},
eventChannel
:
null
,
eventChannel
:
null
,
tipText
:
""
,
tipText
:
""
,
...
@@ -91,17 +91,17 @@
...
@@ -91,17 +91,17 @@
statusIndex
:
0
,
statusIndex
:
0
,
statusList
:
[
statusList
:
[
{
{
label
:
"全部"
,
value
:
""
,
},
{
label
:
"待使用"
,
label
:
"待使用"
,
value
:
"0"
,
value
:
"0"
,
},
},
{
{
label
:
"已使用"
,
label
:
"已使用"
,
value
:
"1"
,
value
:
"1"
,
}
},
{
label
:
"已过期"
,
value
:
"2"
,
},
]
]
};
};
},
},
...
...
pages/order/order.vue
View file @
c8997b96
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</view>
</view>
<view
v-for=
"(item,k) in dateList"
:key=
"k"
class=
"flex-1 flex-col date-item"
<view
v-for=
"(item,k) in dateList"
:key=
"k"
class=
"flex-1 flex-col date-item"
:class=
"
{active:dateIndex === k}" @tap="onDateChange(k)">
:class=
"
{active:dateIndex === k}" @tap="onDateChange(k)">
<text
class=
"text-title text-bold text-first "
>
{{
k
>
0
?
item
.
weekday
:
'今天'
}}
</text>
<text
class=
"text-title text-bold text-first "
>
{{
k
===
0
&&
item
.
readDate
===
toDayDate
?
'今天'
:
item
.
weekday
}}
</text>
<text
class=
"text-title text-bold"
style=
"margin-top: 12upx;"
>
{{
item
.
date
}}
</text>
<text
class=
"text-title text-bold"
style=
"margin-top: 12upx;"
>
{{
item
.
date
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
<text
class=
"text-black text-left"
>
{{
useCouponList
[
selectCouponIndex
].
couponType
==
2
?
'团购券'
:
'优惠券'
}}
</text>
<text
class=
"text-black text-left"
>
{{
useCouponList
[
selectCouponIndex
].
couponType
==
2
?
'团购券'
:
'优惠券'
}}
</text>
<view
class=
"flex-row"
@
tap=
"onNavToSelectCoupon"
>
<view
class=
"flex-row"
@
tap=
"onNavToSelectCoupon"
>
<text
class=
""
:class=
"useCouponList.length?'text-pink':'text-gray'"
>
<text
class=
""
:class=
"useCouponList.length?'text-pink':'text-gray'"
>
{{
useCouponList
.
length
&&
selectCouponIndex
>=
0
?
useCouponList
[
selectCouponIndex
].
name
:
useC
ouponList
.
length
?
'请选择'
:
'暂无可用'
}}
</text>
{{
useCouponList
.
length
&&
selectCouponIndex
>=
0
?
useCouponList
[
selectCouponIndex
].
name
:
c
ouponList
.
length
?
'请选择'
:
'暂无可用'
}}
</text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
</view>
</view>
</view>
</view>
...
@@ -474,7 +474,8 @@
...
@@ -474,7 +474,8 @@
addM
:
false
,
//初始化加一分钟,之后不加
addM
:
false
,
//初始化加一分钟,之后不加
startHours
:
0
,
startHours
:
0
,
endHours
:
48
,
endHours
:
48
,
content
:
''
content
:
''
,
toDayDate
:
''
,
// 今天日期
};
};
},
},
filters
:{
filters
:{
...
@@ -519,6 +520,7 @@
...
@@ -519,6 +520,7 @@
},
},
methods
:
{
methods
:
{
onInitDateList
(){
onInitDateList
(){
this
.
toDayDate
=
moment
().
format
(
"YYYY-MM-DD"
)
let
dateList
=
[];
let
dateList
=
[];
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
obj
=
{
let
obj
=
{
...
@@ -529,6 +531,7 @@
...
@@ -529,6 +531,7 @@
dateList
.
push
(
obj
)
dateList
.
push
(
obj
)
}
}
this
.
dateList
=
dateList
;
this
.
dateList
=
dateList
;
console
.
log
(
this
.
dateList
,
909090
)
},
},
onSetSelectTime
(){
onSetSelectTime
(){
if
(
this
.
dateIndex
===
0
){
if
(
this
.
dateIndex
===
0
){
...
@@ -861,10 +864,19 @@
...
@@ -861,10 +864,19 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
this
.
useCouponList
=
res
.
data
.
data
.
filter
(
item
=>
item
.
isAvailable
===
0
).
sort
((
a
,
this
.
couponList
=
res
.
data
.
data
;
b
)
=>
b
.
subPrice
-
a
.
subPrice
);
let
list
=
res
.
data
.
data
.
filter
(
item
=>
item
.
isAvailable
===
0
).
map
(
item
=>
{
return
{
...
item
,
subPrice
:
item
.
subPrice
||
0
}
})
list
.
sort
((
a
,
b
)
=>
b
.
subPrice
-
a
.
subPrice
)
this
.
useCouponList
=
list
;
if
(
this
.
useCouponList
.
length
){
if
(
this
.
useCouponList
.
length
){
this
.
selectCouponIndex
=
0
;
let
i
=
this
.
useCouponList
.
findIndex
(
item
=>
item
.
duration
==
this
.
duration
)
this
.
selectCouponIndex
=
i
>=
0
?
i
:
0
;
}
}
}
}
}
else
if
(
res
.
data
.
code
==
401
)
{
}
else
if
(
res
.
data
.
code
==
401
)
{
...
@@ -875,7 +887,7 @@
...
@@ -875,7 +887,7 @@
},
},
onNavToSelectCoupon
()
{
onNavToSelectCoupon
()
{
let
that
=
this
;
let
that
=
this
;
if
(
this
.
useCouponList
.
length
)
{
if
(
this
.
useCouponList
.
length
||
this
.
couponList
.
length
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/useCoupon/index"
,
url
:
"/pages/useCoupon/index"
,
events
:
{
events
:
{
...
...
pages/useCoupon/index.vue
View file @
c8997b96
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
<text
class=
"text-title text-lg text-bold"
>
{{
item
.
name
}}
</text>
<text
class=
"text-title text-lg text-bold"
>
{{
item
.
name
}}
</text>
</view>
</view>
<view
v-if=
"item.couponType == 4"
class=
"flex-row margin-top"
>
<view
v-if=
"item.couponType == 4"
class=
"flex-row margin-top"
>
<text
class=
""
>
使用说明:
</text>
<text
class=
"
part-tip
"
>
使用说明:
</text>
<text>
{{
item
.
remark
||
''
}}
</text>
<text>
{{
item
.
remark
||
''
}}
</text>
</view>
</view>
<view
v-else
class=
"flex-row margin-top"
>
<view
v-else
class=
"flex-row margin-top"
>
<text
class=
""
>
使用说明:
</text>
<text
class=
"
part-tip
"
>
使用说明:
</text>
<text
class=
""
>
满
{{
item
.
minPrice
}}
元,优惠
{{
item
.
subPrice
}}
元
</text>
<text
class=
""
>
满
{{
item
.
minPrice
}}
元,优惠
{{
item
.
subPrice
}}
元
</text>
</view>
</view>
<!--
<view
class=
"flex-row margin-top"
>
<!--
<view
class=
"flex-row margin-top"
>
...
@@ -110,7 +110,15 @@
...
@@ -110,7 +110,15 @@
getUseCoupon
(
d
).
then
(
res
=>
{
getUseCoupon
(
d
).
then
(
res
=>
{
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
this
.
list
=
res
.
data
.
data
.
sort
((
a
,
b
)
=>
b
.
subPrice
-
a
.
subPrice
);
let
list
=
res
.
data
.
data
.
map
(
item
=>
{
return
{
...
item
,
subPrice
:
item
.
subPrice
||
0
}
})
list
.
sort
((
a
,
b
)
=>
b
.
subPrice
-
a
.
subPrice
);
this
.
list
=
list
;
}
}
}
}
})
})
...
@@ -163,6 +171,9 @@
...
@@ -163,6 +171,9 @@
width
:
100%
;
width
:
100%
;
padding
:
20
upx
30
upx
;
padding
:
20
upx
30
upx
;
z-index
:
99
;
z-index
:
99
;
.part-tip{
width
:
160
upx
;
}
}
}
.part-bottom
{
.part-bottom
{
display
:
flex
;
display
:
flex
;
...
...
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