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
56dfddfc
Commit
56dfddfc
authored
Nov 28, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
68c98580
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
57 deletions
+79
-57
index.vue
pages/index/index.vue
+54
-40
order.vue
pages/order/order.vue
+10
-6
index.vue
pages/payRecord/index.vue
+1
-1
index.vue
pages/useCoupon/index.vue
+14
-10
No files found.
pages/index/index.vue
View file @
56dfddfc
...
...
@@ -77,11 +77,27 @@
</view>
</view>
<view
class=
"facilitie-box"
>
<view
v-for=
"(val,i) in item.facilities"
:key=
"i"
class=
'cu-tag radius bg-brown'
>
<view
v-for=
"(val,i) in item.facilities"
:key=
"i"
v-if=
"i
<7
"
class=
'cu-tag radius bg-brown'
>
<text>
{{
facilitieList
[
val
]
}}
</text>
</view>
</view>
<view
class=
"item-Go"
>
<view
class=
"flex-row room-type"
>
<view
class=
"flex-col"
>
<view
v-for=
"(val,i) in item.packList"
:key=
"i"
v-if=
"i
<2
"
class=
"item"
>
<view
class=
"part-1"
>
<text>
惠
</text>
</view>
<view
class=
"part-2"
>
<text>
{{
val
.
duration
}}
小时套餐:
</text>
<text
class=
"text-red text-bold text-lg"
>
¥
{{
val
.
price
}}
/场
</text>
</view>
</view>
</view>
</view>
</view>
<view
class=
"flex-between confirm-box"
>
<view
class=
"flex-priceBox"
>
<text
style=
"color: #e70486;margin-left: -6rpx;"
>
¥
</text><text
class=
"text-pink"
>
{{
item
.
price
}}
</text><text>
/小时
</text>
...
...
@@ -93,8 +109,8 @@
</view>
</view>
</view>
<
view
class=
"item-line"
></view
>
<view
class=
"item-Go"
>
<
!--
<view
class=
"item-line"
></view>
--
>
<!--
<view
class=
"item-Go"
>
<view
class=
"flex-row room-type"
>
<view
class=
"flex-wrap"
>
<view
v-for=
"(val,i) in item.packList"
:key=
"i"
class=
"item"
>
...
...
@@ -104,16 +120,13 @@
<view
class=
"part-2"
>
<text>
{{
val
.
duration
}}
小时套餐
{{
val
.
price
}}
元
</text>
</view>
<!--
<view
class=
"part-3"
>
<text>
{{
(
val
.
price
/
val
.
duration
).
toFixed
(
2
)
}}
/小时
</text>
</view>
-->
</view>
</view>
<view
class=
""
>
</view>
</view>
</view>
</view>
-->
</view>
</view>
</view>
...
...
@@ -800,16 +813,6 @@
}
}
}
.facilitie-box
{
display
:
flex
;
flex
:
1
;
flex-wrap
:
wrap
;
padding
:
12
rpx
0
12
rpx
20
rpx
;
.cu-tag{
}
}
.location-box
{
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -871,12 +874,12 @@
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
2
0
0
rpx
;
height
:
280
upx
;
width
:
2
4
0
rpx
;
//
height
:
280
upx
;
overflow
:
hidden
;
.room-img{
width
:
inherit
;
height
:
9
4
%
;
height
:
9
6
%
;
border-radius
:
12
rpx
!important
;
}
}
...
...
@@ -902,11 +905,17 @@
}
//
标签
.facilitie-box
{
padding
:
8
rpx
0
;
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
0
;
align-items
:
center
;
min-height
:
88
upx
;
.bg-brown{
color
:
#c98d35
;
background-color
:
#f8eddd
;
margin
:
8
upx
;
margin
:
4
upx
;
padding
:
0
8
upx
;
height
:
36
upx
;
}
}
//
价格
...
...
@@ -931,6 +940,7 @@
}
//
栏目下
.item-Go
{
display
:
flex
;
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
...
...
@@ -939,14 +949,15 @@
display
:
flex
;
flex
:
1
;
align-items
:
center
;
text
{
color
:
#9e9e9e
;
font-size
:
28
rpx
;
}
//
text
{
//
color
:
#9e9e9e
;
//
font-size
:
28
rpx
;
//
}
.flex-wrap
{
display
:
flex
;
flex
:
1
;
flex-wrap
:
wrap
;
//
flex-wrap
:
wrap
;
flex-direction
:
column
;
}
//
.item
{
//
display
:
flex
;
...
...
@@ -969,17 +980,18 @@
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
20
upx
0
;
>.flex-col{
width
:
100%
;
}
.item
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
width
:
48%
;
height
:
44
rpx
;
background
:
#FFFFFF
;
border-radius
:
8
upx
;
border
:
2
rpx
solid
#fc3f21
;
margin
:
8
upx
1%
;
//
width
:
80%
;
//
height
:
44
rpx
;
//
background
:
#FFFFFF
;
//
border
:
2
rpx
solid
#fc3f21
;
margin
:
6
upx
1%
;
overflow
:
hidden
;
.part-1{
...
...
@@ -987,16 +999,18 @@
justify-content
:
center
;
align-items
:
center
;
height
:
100%
;
padding
:
8
upx
;
padding
:
4
upx
6
upx
;
background
:
#fc3f21
;
border-radius
:
8
upx
;
text{
font-size
:
24
upx
;
color
:
#ffffff
;
}
}
.part-2
{
display
:
flex
;
flex
:
1
;
justify-content
:
center
;
//
justify-content
:
center
;
align-items
:
center
;
height
:
100%
;
padding
:
8
upx
;
...
...
@@ -1009,10 +1023,10 @@
height
:
100%
;
padding
:
8
upx
;
}
text
{
font-size
:
25
upx
;
color
:
#fc3f21
;
}
//
text
{
//
font-size
:
25
upx
;
//
color
:
#fc3f21
;
//
}
}
}
...
...
pages/order/order.vue
View file @
56dfddfc
...
...
@@ -183,7 +183,7 @@
<text
class=
"text-black text-left"
>
优惠券
</text>
<view
class=
"flex-row"
@
tap=
"onNavToSelectCoupon"
>
<text
class=
""
:class=
"useCouponList.length?'text-pink':'text-gray'"
>
{{
useCouponList
.
length
?
useCouponList
[
selectCouponIndex
].
name
:
'暂无可用'
}}
</text>
{{
selectCouponIndex
===
-
1
?
'请选择'
:
useCouponList
.
length
&&
selectCouponIndex
>=
0
?
useCouponList
[
selectCouponIndex
].
name
:
'暂无可用'
}}
</text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
</view>
</view>
...
...
@@ -722,8 +722,12 @@
url
:
"/pages/useCoupon/index"
,
events
:
{
getSelectData
(
data
)
{
that
.
selectCouponIndex
=
that
.
useCouponList
.
findIndex
(
item
=>
item
.
id
===
data
.
couponId
)
if
(
data
.
couponId
){
that
.
selectCouponIndex
=
that
.
useCouponList
.
findIndex
(
item
=>
item
.
id
===
data
.
couponId
)
}
else
{
that
.
selectCouponIndex
=
-
1
}
}
},
success
(
res
)
{
...
...
@@ -733,7 +737,7 @@
orderMode
:
that
.
orderTypeList
[
that
.
index
].
type
,
preStartDate
:
dateObj
.
startDate
,
preEndDate
:
dateObj
.
endDate
,
selectId
:
that
.
useCouponList
[
that
.
selectCouponIndex
].
id
selectId
:
that
.
selectCouponIndex
>=
0
?
that
.
useCouponList
[
that
.
selectCouponIndex
].
id
:
''
})
}
})
...
...
@@ -749,7 +753,7 @@
storeId
:
this
.
roomInfo
.
storeId
,
roomId
:
this
.
roomInfo
.
id
,
buyType
:
this
.
orderTypeList
[
this
.
index
].
type
,
couponId
:
this
.
useCouponList
.
length
?
this
.
useCouponList
[
this
.
selectCouponIndex
].
id
:
''
,
couponId
:
this
.
useCouponList
.
length
&&
this
.
selectCouponIndex
>=
0
?
this
.
useCouponList
[
this
.
selectCouponIndex
].
id
:
''
,
orderType
:
this
.
orderType
,
preStartDate
:
dateObj
.
startDate
,
preEndDate
:
dateObj
.
endDate
,
...
...
@@ -911,7 +915,7 @@
orderType
:
this
.
orderType
,
buyType
:
this
.
orderTypeList
[
this
.
index
].
type
,
payType
:
1
,
couponId
:
this
.
useCouponList
.
length
?
this
.
useCouponList
[
this
.
selectCouponIndex
].
id
:
''
,
couponId
:
this
.
useCouponList
.
length
&&
this
.
selectCouponIndex
>=
0
?
this
.
useCouponList
[
this
.
selectCouponIndex
].
id
:
''
,
preStartDate
:
dateObj
.
startDate
,
preEndDate
:
dateObj
.
endDate
,
totalFee
:
Number
(
this
.
roomInfo
.
price
)
*
this
.
duration
,
...
...
pages/payRecord/index.vue
View file @
56dfddfc
...
...
@@ -14,7 +14,7 @@
</view>
<view
class=
"flex-between part-1"
>
<text>
{{
item
.
createTime
}}
</text>
<text>
{{
payTypeEnum
[
item
.
payType
||
'1'
]
}}
</text>
<text>
{{
item
.
payType
}}
</text>
</view>
</view>
</view>
...
...
pages/useCoupon/index.vue
View file @
56dfddfc
<
template
>
<view
class=
"coupon-list-box"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"coupon-item"
:class=
"
{active: current === index}"
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"coupon-item"
:class=
"
{active: selectId === item.id }"
@tap="onSelect(item,index)">
<view
class=
"part-left"
>
<image
:src=
"item.isAvailable === 0?
'../../static/coupon_icon.png':'../../static
/coupon_icon_gray.png'"
<image
:src=
"item.isAvailable === 0?
assetsPath + '/coupon_icon.png':assetsPath+'
/coupon_icon_gray.png'"
mode=
"widthFix"
></image>
</view>
<view
class=
"part-right"
>
...
...
@@ -41,12 +40,13 @@
<view
class=
"box-content"
>
<button
class=
"cu-btn round bg-gray "
@
tap=
"onCancle"
>
返回
</button>
<button
class=
"cu-btn round bg-pink "
@
tap=
"onConfirm"
>
选择
</button>
<button
class=
"cu-btn round bg-pink "
@
tap=
"onConfirm"
>
确定
</button>
</view>
</view>
</
template
>
<
script
>
import
config
from
"@/config/index.config"
import
indexConfig
from
"@/config/index.config"
;
import
FixedHeader
from
"@/components/fixedHeader/index"
;
import
{
...
...
@@ -57,8 +57,8 @@
data
()
{
return
{
scrollTop
:
0
,
current
:
undefined
,
hostUrl
:
indexConfig
.
hostUrl
,
assetsPath
:
config
.
assetsPath
,
statusBarHeight
:
this
.
statusBarHeight
,
titleBarHeight
:
this
.
titleBarHeight
,
list
:
[],
...
...
@@ -86,6 +86,7 @@
this
.
eventChannel
.
on
(
'sendData'
,
(
data
)
=>
{
this
.
selectId
=
data
.
selectId
||
''
console
.
log
(
this
.
selectId
,
909090
)
this
.
onLoading
(
data
);
})
},
...
...
@@ -95,21 +96,24 @@
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
this
.
list
=
res
.
data
.
data
.
sort
((
a
,
b
)
=>
b
.
subPrice
-
a
.
subPrice
);
this
.
current
=
this
.
selectId
?
this
.
list
.
findIndex
(
item
=>
item
.
id
===
this
.
selectId
)
:
0
}
}
})
},
onSelect
(
item
,
i
)
{
if
(
item
.
isAvailable
!==
0
||
this
.
current
===
i
)
return
this
.
current
=
i
onSelect
(
item
)
{
if
(
item
.
isAvailable
!==
0
)
return
if
(
this
.
selectId
===
item
.
id
){
this
.
selectId
=
''
}
else
{
this
.
selectId
=
item
.
id
}
},
onCancle
()
{
uni
.
navigateBack
()
},
onConfirm
()
{
this
.
eventChannel
.
emit
(
'getSelectData'
,
{
couponId
:
this
.
list
[
this
.
current
].
i
d
couponId
:
this
.
selectI
d
});
this
.
onCancle
();
}
...
...
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