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