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
1fa9916b
Commit
1fa9916b
authored
Jan 03, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能优化
parent
616a7ffc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
104 additions
and
58 deletions
+104
-58
index.vue
pages/cleanRecord/index.vue
+1
-1
index.vue
pages/index/index.vue
+77
-17
order.vue
pages/order/order.vue
+5
-24
orderResult.vue
pages/orderResult/orderResult.vue
+21
-16
No files found.
pages/cleanRecord/index.vue
View file @
1fa9916b
...
...
@@ -35,7 +35,7 @@
</view>
<view
class=
"flex-row part-1"
>
<text>
备注:
</text>
<text>
{{
item
.
remark
}}
</text>
<text>
{{
item
.
remark
||
'无'
}}
</text>
</view>
</view>
</view>
...
...
pages/index/index.vue
View file @
1fa9916b
...
...
@@ -48,7 +48,7 @@
<view
class=
"title titleStyle"
>
<text
class=
"text-title"
>
房间预览
</text>
</view>
<view
v-for=
"(item,index) in
storeInfo.
roomVoList"
:key=
"index"
class=
"list-item-box"
<view
v-for=
"(item,index) in roomVoList"
:key=
"index"
class=
"list-item-box"
@
tap=
"onNavToOrder(item)"
>
<view
class=
"itemRow listStyle"
>
<view
class=
"relative part-top"
>
...
...
@@ -92,9 +92,17 @@
</view>
</view>
</view>
</view>
</view>
<view
class=
"flex-row list-point-box"
>
<view
v-for=
"(val,k) in list"
:key=
"k"
class=
"flex-1 flex-col"
>
<view
class=
"box"
:class=
"objListDate.length&&objListDate[index][k].status==1?'bg-pink':'bg-gray'"
>
</view>
<text
class=
"text-gray text-sm"
>
{{
val
>=
24
?
val
-
24
:
val
}}
</text>
</view>
</view>
</view>
<u-empty
v-if=
"!
storeInfo.roomVoList || storeInfo.
roomVoList.lenght
<
=
0
"
text=
"门店暂无可使用房间"
textColor=
'#C1C1C1'
></u-empty>
<u-empty
v-if=
"!
roomVoList ||
roomVoList.lenght
<
=
0
"
text=
"门店暂无可使用房间"
textColor=
'#C1C1C1'
></u-empty>
</view>
</view>
</scroll-view>
...
...
@@ -130,13 +138,15 @@
systemConfig
}
from
"@/api/index.js"
;
import
{
getListStore
getListStore
,
listSortDistance
}
from
"@/api/store"
;
import
config
from
"@/config/index.config"
import
ToolBox
from
"@/components/toolBox/toolBox"
import
{
getDictItem
}
from
"@/utils/tools.js"
import
moment
from
'@/common/moment'
;
export
default
{
components
:
{
...
...
@@ -146,6 +156,11 @@
LoginPop
},
data
()
{
let
h
=
new
Date
().
getHours
();
let
list
=
[]
for
(
let
i
=
0
;
i
<
24
;
i
++
){
list
.
push
(
h
+
i
)
}
return
{
scrollTop
:
0
,
storeId
:
''
,
...
...
@@ -197,7 +212,10 @@
roomTypeEnum
:{},
roomStatusEnum
:{},
show
:
true
,
timer
:
null
timer
:
null
,
roomVoList
:[],
list
,
objListDate
:[]
}
},
onShow
()
{
...
...
@@ -236,7 +254,6 @@
this
.
facilitieList
=
getDictItem
(
dicts
,
"indoor_facilities"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
roomStatusEnum
=
getDictItem
(
dicts
,
"store_room_status"
);
this
.
onGetListStore
();
})
},
onLoading
()
{
...
...
@@ -251,11 +268,11 @@
this
.
longitude
=
res
.
longitude
;
uni
.
setStorageSync
(
"latitude"
,
res
.
latitude
)
uni
.
setStorageSync
(
"longitude"
,
res
.
longitude
)
this
.
onGetListStore
()
}
else
{
this
.
$refs
.
popup
.
open
()
uni
.
hideLoading
()
}
this
.
onGetListStore
()
}
})
},
...
...
@@ -277,19 +294,46 @@
}
that
.
storeInfo
=
{
...
obj
,
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
):
0
,
roomVoList
:
obj
.
roomVoList
&&
obj
.
roomVoList
.
length
?
obj
.
roomVoList
.
map
(
item
=>
{
return
{
...
item
,
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
}):[]
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
):
0
}
if
(
obj
.
roomVoList
&&
obj
.
roomVoList
.
length
){
that
.
roomVoList
=
obj
.
roomVoList
.
map
(
item
=>
{
return
{
...
item
,
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
})
console
.
log
(
that
.
roomVoList
,
"that.roomVoList"
)
that
.
onGetSortDistance
(
0
);
}
}
})
},
onGetSortDistance
(
i
=
0
){
listSortDistance
({
storeId
:
this
.
storeInfo
.
id
,
roomId
:
this
.
roomVoList
[
i
].
id
,
day
:
moment
().
format
(
"YYYY-MM-DD"
),
orderType
:
1
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
i
<=
this
.
roomVoList
.
length
-
1
){
this
.
objListDate
[
i
]
=
res
.
data
.
data
;
i
+=
1
if
(
i
>=
this
.
roomVoList
.
length
){
this
.
objListDate
=
this
.
objListDate
.
map
(
item
=>
{
return
this
.
list
.
map
(
val
=>
item
[
val
])
})
console
.
log
(
this
.
objListDate
,
"this.objListDate"
)
}
else
{
this
.
onGetSortDistance
(
i
)
}
}
})
},
onNavToChangeStore
()
{
uni
.
navigateTo
({
url
:
"/pages/storeList/storeList"
...
...
@@ -765,7 +809,7 @@
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
padding
:
20
upx
0
;
padding
:
20
upx
0
16
upx
;
//
容器
.part-top{
display
:
flex
;
...
...
@@ -952,4 +996,19 @@
margin-right
:
4
upx
;
}
}
.list-point-box
{
width
:
100%
;
margin-bottom
:
20
upx
;
.flex-col{
text-align
:
center
;
}
.box
{
margin
:
0
4
upx
6
upx
;
height
:
20
upx
;
border-radius
:
8
upx
;
}
.text-sm
{
font-size
:
20
upx
;
}
}
</
style
>
\ No newline at end of file
pages/order/order.vue
View file @
1fa9916b
...
...
@@ -51,19 +51,7 @@
<view
v-show=
"index==1"
class=
"flex-col package-mode"
>
<view
class=
"part-1"
>
<text
class=
"text-title text-lg text-bold"
>
套餐选择:
</text>
</view>
<!--
<view
class=
"flex-1 package-box"
>
<view
v-for=
"(item,index) in packageMode"
v-if=
"index
<
=
3
"
:key=
"index"
class=
"flex-col item"
:class=
"
{active: modeIndex===index,'item-3':packageMode.length
<3
,'
item-n
'
:packageMode
.
length
>
=3}"
@tap="onChangeMode(index)">
<text
class=
"text-title"
>
{{
item
.
duration
}}
小时套餐
</text>
<view
class=
"flex-row"
style=
"margin-top: 12upx;"
>
<text
style=
"margin-bottom: 4upx;"
>
¥
</text>
<text
class=
"text-title text-bold text-xl"
>
{{
item
.
price
}}
</text>
</view>
</view>
</view>
-->
</view>
<scroll-view
scroll-x=
"true"
class=
"scroll-view"
>
<view
class=
"flex-row package-box"
>
<view
v-for=
"(item,index) in packageMode"
:key=
"index"
class=
"flex-col item"
...
...
@@ -99,7 +87,7 @@
</view>
</view>
<view
v-if=
"orderType ===2"
class=
"flex-col distance-mode"
style=
"margin: 40upx 20upx 40upx;"
>
<view
v-if=
"orderType ===2
&& index == 0
"
class=
"flex-col distance-mode"
style=
"margin: 40upx 20upx 40upx;"
>
<view
class=
"distance-title"
>
<text
class=
"text-title text-lg text-bold"
>
时长选择:
</text>
</view>
...
...
@@ -152,7 +140,7 @@
<view
class=
"flex-1 flex-row"
>
<view
class=
"round-box pink"
>
</view>
<text>
已选
时段
</text>
<text>
当前选择
时段
</text>
</view>
<view
class=
"flex-1 flex-row"
>
<view
class=
"round-box blank"
>
...
...
@@ -214,13 +202,6 @@
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
couponFee
}}
</text>
</view>
</view>
<!--
<view
class=
"flex-between price"
>
<text
class=
"text-title text-lg"
>
账户余额
</text>
<view
class=
"flex-row text-pink"
>
<text
class=
"text-title text-lg"
>
¥0.00
</text>
<button
class=
"recharge-btn cu-btn round bg-pink sm"
@
tap=
"onNavRecharge"
>
去充值
</button>
</view>
</view>
-->
</view>
<view
class=
"pay-content-box"
>
<view
class=
"flex-row"
>
...
...
@@ -231,7 +212,7 @@
</view>
</view>
<view
class=
"btn-box"
>
<button
v-if=
"orderType===1"
class=
"cu-btn cu-btn-1 margin-right"
<button
class=
"cu-btn cu-btn-1 margin-right"
@
tap=
"onNavToCheckedCoupon"
>
团购验券
</button>
<button
class=
"cu-btn cu-btn-2 "
@
tap=
"onOrderConfirm"
>
{{
orderType
===
1
?
'预约'
:
'续单'
}}
</button>
</view>
...
...
@@ -527,7 +508,7 @@
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
// 判断房间有没有绑定套餐
if
(
this
.
orderType
===
1
&&
this
.
roomInfo
.
packList
&&
this
.
roomInfo
.
packList
.
length
)
{
if
(
this
.
roomInfo
.
packList
&&
this
.
roomInfo
.
packList
.
length
)
{
this
.
packageMode
=
this
.
roomInfo
.
packList
this
.
index
=
1
;
this
.
modeIndex
=
0
;
...
...
pages/orderResult/orderResult.vue
View file @
1fa9916b
...
...
@@ -31,7 +31,7 @@
</view>
<view
class=
"flex-row"
>
<view
class=
"part-img"
>
<image
:src=
"hostUrl+orderInfo.roomImages[0]"
mode=
"
heightFix
"
></image>
<image
:src=
"hostUrl+orderInfo.roomImages[0]"
mode=
"
aspectFill
"
></image>
</view>
<view
class=
"flex-1 flex-col"
>
<view
class=
"info"
>
...
...
@@ -52,14 +52,14 @@
</view>
</view>
</view>
<view
v-if=
"orderInfo.packName"
class=
"flex-between"
>
<text
class=
"text-gray "
>
套餐名称
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
packName
||
'-'
}}
</text>
</view>
<view
class=
"flex-between"
>
<text
class=
"text-gray "
>
订单编号
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
orderNo
||
'-'
}}
</text>
</view>
<view
v-if=
"orderInfo.packName"
class=
"flex-between"
>
<text
class=
"text-gray "
>
购买套餐
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
packName
||
'-'
}}
</text>
</view>
<view
class=
"flex-between"
>
<text
class=
"text-gray"
>
支付方式
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
payType
==
1
?
'微信支付'
:
'其他支付'
}}
</text>
...
...
@@ -68,10 +68,7 @@
<text
class=
"text-gray"
>
优惠券抵扣
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
couponName
}}
</text>
</view>
<view
class=
"flex-between"
>
<text
class=
"text-gray"
>
支付时间
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
payTime
||
'-'
}}
</text>
</view>
<view
class=
"flex-between"
>
<text
class=
"text-gray"
>
实付金额
</text>
<view
class=
"flex-row"
style=
"align-items: center;"
>
...
...
@@ -79,6 +76,10 @@
<text
style=
"margin-left: 4upx;"
>
元
</text>
</view>
</view>
<view
class=
"flex-between"
>
<text
class=
"text-gray"
>
支付时间
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
payTime
||
'-'
}}
</text>
</view>
<view
v-if=
"orderInfo.refundReasonTime"
class=
"flex-between"
>
<text
class=
"text-gray"
>
取消时间
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
refundReasonTime
}}
</text>
...
...
@@ -97,7 +98,7 @@
<button
class=
"cu-btn block round bg-pink lg"
:class=
"openDoorStatus?'bg-gray':'bg-pink'"
@
tap=
"onOpenDoor"
>
进店开门
</button>
</view>
<view
class=
"part"
>
<button
class=
"cu-btn block round line-pink lg"
@
tap=
"onNavToS
hare"
>
分享好友
</button>
<button
class=
"cu-btn block round line-pink lg"
open-type=
"s
hare"
>
分享好友
</button>
</view>
<view
v-if=
"orderInfo.status === 1"
class=
"part"
>
<button
class=
"cu-btn block round bg-mauve lg"
@
tap=
"onNavToOrder"
>
房间续单
</button>
...
...
@@ -167,7 +168,7 @@
},
onShareAppMessage
()
{
return
{
title
:
`
${
this
.
orderInfo
.
storeName
}
-
${
this
.
orderInfo
.
roomName
}
【
${
roomTypeName
}
】`
,
title
:
`
${
this
.
orderInfo
.
storeName
}
-
${
this
.
orderInfo
.
roomName
}
【
${
this
.
orderInfo
.
roomTypeName
}
】`
,
path
:
`/pages/orderResult/orderResult?orderNo=
${
this
.
orderNo
}
`
}
},
...
...
@@ -203,8 +204,12 @@
})
},
onNavToShare
(){
uni
.
navigateTo
({
url
:
"/pages/share/share?orderNo="
+
this
.
orderNo
// uni.navigateTo({
// url:"/pages/share/share?orderNo="+this.orderNo
// })
wx
.
showShareMenu
({
withShareTicket
:
true
,
menus
:
[
'shareAppMessage'
,
'shareTimeline'
]
})
},
onOpenDoor
(){
...
...
@@ -362,9 +367,9 @@
}
.part-img
{
display
:
flex
;
margin
:
20
upx
20
upx
2
0
upx
0
;
width
:
18
0
upx
;
height
:
2
2
0
upx
;
margin
:
10
upx
12
upx
1
0
upx
0
;
width
:
20
0
upx
;
height
:
2
0
0
upx
;
border-radius
:
12
upx
;
overflow
:
hidden
;
>image{
...
...
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