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
3c801558
Commit
3c801558
authored
Nov 24, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化,加订阅消息提示
parent
eebca2b1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
208 additions
and
141 deletions
+208
-141
order.vue
pages/order/order.vue
+196
-129
orderRecord.vue
pages/orderRecord/orderRecord.vue
+7
-2
orderResult.vue
pages/orderResult/orderResult.vue
+5
-10
No files found.
pages/order/order.vue
View file @
3c801558
...
...
@@ -5,7 +5,8 @@
<text
class=
"tips"
><text
class=
"text-bold"
>
预定须知:
</text>
预定成功后,请按预约时间及时到店消费,若无法及时到店消费,可提前取消订单
</text>
</view>
<view
class=
"part-right"
>
<text
class=
"text-title text-xl text-bold"
>
{{
roomInfo
.
name
||
'一帆风顺'
}}{{
roomInfo
.
roomType
?
'【'
+
roomTypeEnum
[
roomInfo
.
roomType
]
+
'】'
:
''
}}
</text>
<text
class=
"text-title text-xl text-bold"
>
{{
roomInfo
.
name
||
'一帆风顺'
}}{{
roomInfo
.
roomType
?
'【'
+
roomTypeEnum
[
roomInfo
.
roomType
]
+
'】'
:
''
}}
</text>
<view
class=
"status-icon-box"
>
<view
class=
"status-box"
:class=
"'status-box-'+roomInfo.status"
>
<text>
{{
roomStatusEnum
[
roomInfo
.
status
]
}}
</text>
...
...
@@ -53,7 +54,8 @@
</view>
<view
class=
"flex-1 package-box"
>
<view
v-for=
"(item,index) in packageMode"
:key=
"index"
class=
"flex-col item"
:class=
"
{active: modeIndex===index,'item-3':packageMode.length
<3
,'
item-n
'
:packageMode
.
length
>
=3}" @tap="onChangeMode(index)">
:class=
"
{active: modeIndex===index,'item-3':packageMode.length
<3
,'
item-n
'
:packageMode
.
length
>
=3}"
@tap="onChangeMode(index)">
<text
class=
"text-title"
>
{{
item
.
name
}}
</text>
<view
class=
"flex-row"
style=
"margin-top: 12upx;"
>
<text
style=
"margin-bottom: 4upx;"
>
¥
</text>
...
...
@@ -68,8 +70,8 @@
<text
class=
"text-title text-lg text-bold"
>
时长选择:
</text>
</view>
<view
class=
"flex-1 distance-box"
>
<view
v-for=
"(item,index) in distanceMode"
:key=
"index"
class=
"flex-col"
style=
"margin: 0 12upx;
"
@
tap=
"onDurationChange(index)"
>
<view
v-for=
"(item,index) in distanceMode"
:key=
"index"
class=
"flex-col
"
style=
"margin: 0 12upx;"
@
tap=
"onDurationChange(index)"
>
<view
class=
"cu-tag radius"
:class=
"index===distanceIndex? 'line-black':'line-gray'"
>
<text>
{{
index
>=
distanceMode
.
length
-
1
&&
!
editDuration
.
length
?
item
.
duration
:
item
.
duration
+
'小时'
}}
</text>
<text
v-if=
"index >= distanceMode.length-1"
class=
"cuIcon-edit text-lg"
></text>
...
...
@@ -83,8 +85,8 @@
<text
class=
"text-title text-lg text-bold"
>
时长选择:
</text>
</view>
<view
class=
"flex-1 distance-box"
>
<view
v-for=
"(item,index) in distanceMode2"
:key=
"index"
class=
"flex-col"
style=
"margin: 0 6upx;
"
@
tap=
"onDurationChange2(index)"
>
<view
v-for=
"(item,index) in distanceMode2"
:key=
"index"
class=
"flex-col
"
style=
"margin: 0 6upx;"
@
tap=
"onDurationChange2(index)"
>
<view
class=
"cu-tag radius"
:class=
"index===distanceIndex? 'line-black':'line-gray'"
>
<text>
{{
item
.
duration
<
1
?
'半小时'
:
item
.
duration
+
'小时'
}}
</text>
</view>
...
...
@@ -107,7 +109,8 @@
</view>
<view
class=
"flex-row date-box"
>
<view
class=
"part-1"
>
<button
class=
"cu-btn round"
:class=
"orderType===1?'line-black':'line-gray'"
@
tap=
"onSelectDate"
>
<button
class=
"cu-btn round"
:class=
"orderType===1?'line-black':'line-gray'"
@
tap=
"onSelectDate"
>
<text>
{{
startTime
}}
</text>
<text
class=
"cuIcon-edit"
></text>
</button>
...
...
@@ -145,7 +148,8 @@
</view>
</view>
<view
class=
"date-point-box"
>
<view
v-for=
"(item,k) in intervalList"
:key=
"k"
class=
"date-point-item"
@
tap=
"onSelectDatePoint(item,k)"
>
<view
v-for=
"(item,k) in intervalList"
:key=
"k"
class=
"date-point-item"
@
tap=
"onSelectDatePoint(item,k)"
>
<view
class=
"date-point"
:class=
"item.status === 0?'free':item.status==1?'used': item.status==2?'checked':'error'"
>
</view>
...
...
@@ -186,11 +190,12 @@
<view
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
预约优惠
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
{{
computePriceInfo
.
couponFee
>
0
?
'-'
:
''
}}
¥
</text>
<text
class=
"text-pink text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
{{
computePriceInfo
.
couponFee
>
0
?
'-'
:
''
}}
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
couponFee
}}
</text>
</view>
</view>
<!--
<view
class=
"flex-between price"
>
<!--
<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>
...
...
@@ -207,7 +212,8 @@
</view>
</view>
<view
class=
"btn-box"
>
<button
v-if=
"orderType===1"
class=
"cu-btn cu-btn-1 margin-right"
@
tap=
"onNavToCheckedCoupon"
>
团购验券
</button>
<button
v-if=
"orderType===1"
class=
"cu-btn cu-btn-1 margin-right"
@
tap=
"onNavToCheckedCoupon"
>
团购验券
</button>
<button
class=
"cu-btn cu-btn-2 "
@
tap=
"onOrderConfirm"
>
{{
orderType
===
1
?
'预约'
:
'续单'
}}
</button>
</view>
</view>
...
...
@@ -263,7 +269,8 @@
</view>
<view
class=
"info-box"
>
<view
class=
"info"
>
<text
class=
"text-black text-lg"
>
{{
orderType
==
1
?
'预约'
:
'续单'
}}
门店:
{{
roomInfo
.
storeName
||
''
}}
</text>
<text
class=
"text-black text-lg"
>
{{
orderType
==
1
?
'预约'
:
'续单'
}}
门店:
{{
roomInfo
.
storeName
||
''
}}
</text>
</view>
<view
class=
"info"
>
<text
class=
"text-black text-lg"
>
{{
orderType
==
1
?
'预约'
:
'续单'
}}
包间:
{{
roomInfo
.
name
}}
</text>
...
...
@@ -281,7 +288,7 @@
<text
class=
"text-red text-bold text-xl"
>
客户须知
</text>
</view>
<view
class=
"flex-col text-red"
>
<text
>
1.预定的订单将全时段保留,迟到不可顺延和退款。
</text>
<text>
1.预定的订单将全时段保留,迟到不可顺延和退款。
</text>
<text>
2.若订单时段前包厢无使用.可提前开始订单.但订单总时长不变。
</text>
<text>
3.订单开始前0小时内取消订单需核收xx%退单费请合理规划您的时间。
</text>
</view>
...
...
@@ -292,7 +299,8 @@
<button
class=
"cu-btn round block line-pink lg"
@
tap=
"onCancle"
>
返回修改
</button>
</view>
<view
class=
"btn-box"
>
<button
class=
"cu-btn round block bg-pink lg"
@
tap=
"onOrderCreate"
>
立即
{{
orderType
==
1
?
'预约'
:
'续单'
}}
</button>
<button
class=
"cu-btn round block bg-pink lg"
@
tap=
"onOrderCreate"
>
立即
{{
orderType
==
1
?
'预约'
:
'续单'
}}
</button>
</view>
</view>
</view>
...
...
@@ -306,8 +314,12 @@
import
LoginPop
from
"@/components/login/login"
import
config
from
"@/config/index.config"
import
moment
from
"@/common/moment_zh_cn.js"
;
import
{
dictList
}
from
"@/api/index.js"
;
import
{
getDictItem
}
from
"@/utils/tools.js"
import
{
dictList
}
from
"@/api/index.js"
;
import
{
getDictItem
}
from
"@/utils/tools.js"
import
{
listSortDistance
,
roomInfo
...
...
@@ -360,8 +372,7 @@
],
// 时长选择
distanceIndex
:
0
,
distanceMode
:
[
{
distanceMode
:
[{
duration
:
4
},
{
...
...
@@ -374,8 +385,7 @@
duration
:
'其他'
,
}
],
distanceMode2
:[
{
distanceMode2
:
[{
duration
:
0.5
},
{
...
...
@@ -437,9 +447,9 @@
totalFee
:
''
,
},
dateObj
:
{},
preOrderNo
:
''
,
roomStatusEnum
:{},
roomTypeEnum
:{}
preOrderNo
:
''
,
roomStatusEnum
:
{},
roomTypeEnum
:
{}
};
},
onLoad
(
option
)
{
...
...
@@ -448,14 +458,14 @@
})
this
.
onGetDicts
();
this
.
id
=
option
.
roomId
||
106
;
if
(
option
.
orderNo
)
{
if
(
option
.
orderNo
)
{
this
.
orderType
=
2
;
this
.
preOrderNo
=
option
.
orderNo
;
uni
.
setNavigationBarTitle
({
title
:
'房间续单'
title
:
'房间续单'
})
this
.
onGetOrderInfo
()
}
else
{
}
else
{
this
.
onLoading
()
}
...
...
@@ -489,25 +499,25 @@
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
// 判断房间有没有绑定套餐
if
(
this
.
orderType
===
1
&&
this
.
roomInfo
.
packList
&&
this
.
roomInfo
.
packList
.
length
)
{
if
(
this
.
orderType
===
1
&&
this
.
roomInfo
.
packList
&&
this
.
roomInfo
.
packList
.
length
)
{
this
.
packageMode
=
this
.
roomInfo
.
packList
this
.
index
=
1
;
this
.
modeIndex
=
0
;
}
else
{
}
else
{
this
.
index
=
0
;
this
.
orderTypeList
=
this
.
orderTypeList
.
filter
(
item
=>
item
.
type
==
1
)
this
.
orderTypeList
=
this
.
orderTypeList
.
filter
(
item
=>
item
.
type
==
1
)
}
this
.
onGetSortDistance
()
}
})
},
onGetOrderInfo
(){
getOrderInfoByNo
(
this
.
preOrderNo
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
onGetOrderInfo
()
{
getOrderInfoByNo
(
this
.
preOrderNo
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
endDate
=
res
.
data
.
data
.
endDate
||
res
.
data
.
data
.
preEndDate
;
this
.
startTime
=
moment
(
endDate
).
format
(
"HH:mm"
);
let
date
=
moment
(
endDate
).
format
(
"YYYY-MM-DD"
)
this
.
dateIndex
=
this
.
dateList
.
findIndex
(
item
=>
item
.
readDate
===
date
)
this
.
dateIndex
=
this
.
dateList
.
findIndex
(
item
=>
item
.
readDate
===
date
)
this
.
onLoading
()
}
})
...
...
@@ -550,29 +560,29 @@
}).
join
(
":"
)
}
else
{
// 小时模式
if
(
this
.
orderType
===
1
)
{
if
(
this
.
orderType
===
1
)
{
this
.
duration
=
Number
(
this
.
distanceMode
[
this
.
distanceIndex
].
duration
);
}
else
if
(
this
.
orderType
===
2
)
{
}
else
if
(
this
.
orderType
===
2
)
{
this
.
duration
=
Number
(
this
.
distanceMode2
[
this
.
distanceIndex
].
duration
);
}
if
(
this
.
orderType
===
2
&&
this
.
duration
<
1
)
{
let
startDateArr
=
this
.
startTime
.
split
(
":"
).
map
(
item
=>
Number
(
item
))
if
(
this
.
orderType
===
2
&&
this
.
duration
<
1
)
{
let
startDateArr
=
this
.
startTime
.
split
(
":"
).
map
(
item
=>
Number
(
item
))
// 分钟
let
m
=
startDateArr
[
1
]
+
60
*
this
.
duration
if
(
m
>=
60
)
{
startDateArr
[
0
]
+=
1
if
(
startDateArr
[
0
]
>
23
)
{
startDateArr
[
0
]
=
startDateArr
[
0
]
-
23
let
m
=
startDateArr
[
1
]
+
60
*
this
.
duration
if
(
m
>=
60
)
{
startDateArr
[
0
]
+=
1
if
(
startDateArr
[
0
]
>
23
)
{
startDateArr
[
0
]
=
startDateArr
[
0
]
-
23
}
startDateArr
[
1
]
=
m
-
60
}
else
{
startDateArr
[
1
]
=
m
-
60
}
else
{
startDateArr
[
1
]
=
m
}
this
.
endTime
=
startDateArr
.
map
(
num
=>
num
>=
10
?
num
:
`0
${
num
}
`
).
join
(
':'
);
}
else
{
this
.
endTime
=
startDateArr
.
map
(
num
=>
num
>=
10
?
num
:
`0
${
num
}
`
).
join
(
':'
);
}
else
{
this
.
endTime
=
this
.
startTime
.
split
(
":"
).
map
((
item
,
k
)
=>
{
let
num
=
''
if
(
k
==
0
)
{
...
...
@@ -613,9 +623,9 @@
]
for
(
start
;
start
<=
end
;
start
++
)
{
// 在时间小时段内,在被占用的情况下,新增订单的开始分钟时间需要占用结束时间后,结束分钟时间需在时间占用开始前
if
(
this
.
dateIntervalList
[
start
].
status
===
1
&&
startM
<
moment
(
this
.
dateIntervalList
[
start
].
endHoldTime
).
format
(
"mm"
)
&&
endM
>=
moment
(
this
.
dateIntervalList
[
start
].
startHoldTime
).
format
(
"mm"
)
if
(
this
.
dateIntervalList
[
start
].
status
===
1
&&
startM
<
moment
(
this
.
dateIntervalList
[
start
].
endHoldTime
).
format
(
"mm"
)
&&
endM
>=
moment
(
this
.
dateIntervalList
[
start
].
startHoldTime
).
format
(
"mm"
)
)
{
// 表示时间点被占用,无法选择
this
.
useDateStatus
=
false
...
...
@@ -657,7 +667,7 @@
this
.
useCouponList
=
res
.
data
.
data
.
filter
(
item
=>
item
.
isAvailable
===
0
).
sort
((
a
,
b
)
=>
b
.
subPrice
-
a
.
subPrice
);
}
}
else
if
(
res
.
data
.
code
==
200
)
{
}
else
if
(
res
.
data
.
code
==
200
)
{
this
.
$refs
.
loginPop
.
open
();
}
this
.
onComputePrice
();
...
...
@@ -717,10 +727,10 @@
},
// 下单模式切换
onTypeChange
(
i
)
{
if
(
this
.
orderType
==
2
)
{
if
(
this
.
orderType
==
2
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'房间续单无法选择套餐模式'
icon
:
'none'
,
title
:
'房间续单无法选择套餐模式'
})
return
}
...
...
@@ -750,14 +760,14 @@
this
.
onSetEndTime
()
},
onDateChange
(
k
)
{
if
(
this
.
orderType
==
2
)
return
;
if
(
this
.
orderType
==
2
)
return
;
if
(
this
.
dateIndex
===
k
)
return
;
this
.
dateIndex
=
k
this
.
onGetSortDistance
()
},
// 开始选择时间
onSelectDate
()
{
if
(
this
.
orderType
===
2
)
return
;
if
(
this
.
orderType
===
2
)
return
;
if
(
!
this
.
checkedIndex
.
length
)
{
let
arr
=
this
.
startTime
.
split
(
":"
)
if
(
arr
.
length
)
{
...
...
@@ -822,7 +832,7 @@
onCancle
()
{
this
.
$refs
.
confirmPop
.
close
();
},
onOrderConfirm
(){
onOrderConfirm
()
{
if
(
!
this
.
useDateStatus
)
{
uni
.
showToast
({
icon
:
"none"
,
...
...
@@ -830,9 +840,24 @@
})
return
}
if
(
uni
.
getStorageSync
(
"orderUseMessage"
))
{
this
.
$refs
.
confirmPop
.
open
();
}
else
{
wx
.
requestSubscribeMessage
({
tmplIds
:
[
'K8fbcKVq46w9o7Ekpesn74WPjwxnbso947YZiYBQw9c'
,
'HB2_moQRQrXC2cKw6zE08NU3AQO9Ggj3aAOg0lIgecg'
,
'oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8'
],
success
:
(
res
)
=>
{
uni
.
setStorageSync
(
"orderUseMessage"
,
true
);
this
.
$refs
.
confirmPop
.
open
();
},
complete
:
(
res
)
=>
{
console
.
log
(
res
,
909090
)
}
})
}
},
onOrderCreate
()
{
this
.
onCancle
();
uni
.
showLoading
({
...
...
@@ -850,22 +875,22 @@
preEndDate
:
dateObj
.
endDate
,
totalFee
:
Number
(
this
.
roomInfo
.
price
)
*
this
.
duration
,
payFee
:
this
.
computePriceInfo
.
payFee
||
0
,
packId
:
this
.
index
>
0
?
this
.
packageMode
[
this
.
modeIndex
].
id
:
''
packId
:
this
.
index
>
0
?
this
.
packageMode
[
this
.
modeIndex
].
id
:
''
}
if
(
this
.
orderType
===
2
&&
this
.
preOrderNo
)
{
if
(
this
.
orderType
===
2
&&
this
.
preOrderNo
)
{
params
.
preOrderNo
=
this
.
preOrderNo
}
orderCreate
(
params
).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
jsConfig
)
{
if
(
res
.
data
.
data
.
jsConfig
)
{
wx
.
requestPayment
({
"timeStamp"
:
res
.
data
.
data
.
jsConfig
.
timeStamp
,
"nonceStr"
:
res
.
data
.
data
.
jsConfig
.
nonceStr
,
"package"
:
res
.
data
.
data
.
jsConfig
.
packages
,
"signType"
:
res
.
data
.
data
.
jsConfig
.
signType
,
"paySign"
:
res
.
data
.
data
.
jsConfig
.
paySign
,
"success"
:
(
resp
)
=>
{
"success"
:
(
resp
)
=>
{
// 支付成功
uni
.
showToast
({
icon
:
"success"
,
...
...
@@ -873,33 +898,31 @@
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
navigateTo
({
url
:
"/pages/orderResult/orderResult?orderNo="
+
res
.
data
.
data
.
orderNo
url
:
`/pages/orderResult/orderResult?orderNo=
${
res
.
data
.
data
.
orderNo
}
&success=true`
})
},
1500
)
}
})
},
"fail"
:
(
resp
)
=>
{
"fail"
:
(
resp
)
=>
{
// 取消支付或支付失败
uni
.
showToast
({
title
:
"取消支付或支付失败"
})
// 调用取消订单接口
},
"complete"
:
(
resp
)
=>
{
"complete"
:
(
resp
)
=>
{
// 接口调用结束的回调函数(调用成功、失败都会执行)
}
});
}
else
{
}
else
{
uni
.
showToast
({
icon
:
"success"
,
title
:
"下单成功"
,
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
navigateTo
({
url
:
"/pages/orderResult/orderResult?orderNo="
+
res
.
data
.
data
.
orderNo
url
:
`/pages/orderResult/orderResult?orderNo=
${
res
.
data
.
data
.
orderNo
}
&success=true`
})
},
1000
)
}
...
...
@@ -907,8 +930,8 @@
}
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
res
.
data
.
msg
||
"下单失败"
icon
:
"none"
,
title
:
res
.
data
.
msg
||
"下单失败"
})
}
})
...
...
@@ -935,35 +958,35 @@
title
:
"功能暂未开发"
})
},
onNavToCheckedCoupon
(){
onNavToCheckedCoupon
()
{
uni
.
navigateTo
({
url
:
"/pages/couponCheck/couponCheck?openShopUuid="
+
this
.
roomInfo
.
openShopUuid
,
url
:
"/pages/couponCheck/couponCheck?openShopUuid="
+
this
.
roomInfo
.
openShopUuid
,
events
:
{
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptData
(
data
)
{
if
(
data
.
data
)
{
acceptData
(
data
)
{
if
(
data
.
data
)
{
this
.
onGetUseCoupon
()
}
}
}
})
},
onSelectDatePoint
(
val
,
i
)
{
console
.
log
(
val
,
i
)
if
(
i
<
24
)
{
if
(
val
.
status
==
1
)
{
let
mTime
=
moment
(
val
.
endHoldTime
).
format
(
"mm"
)
console
.
log
(
mTime
,
"分钟数据"
)
if
(
mTime
>=
'59'
)
{
onSelectDatePoint
(
val
,
i
)
{
console
.
log
(
val
,
i
)
if
(
i
<
24
)
{
if
(
val
.
status
==
1
)
{
let
mTime
=
moment
(
val
.
endHoldTime
).
format
(
"mm"
)
console
.
log
(
mTime
,
"分钟数据"
)
if
(
mTime
>=
'59'
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'当前时段不可选'
icon
:
'none'
,
title
:
'当前时段不可选'
})
}
else
{
}
else
{
this
.
startTime
=
`
${
i
}
:
${
mTime
}
`
;
this
.
onSetEndTime
()
}
}
else
{
}
else
{
this
.
startTime
=
`
${
i
}
:00`
;
this
.
onSetEndTime
()
}
...
...
@@ -1010,6 +1033,7 @@
padding
:
30
upx
;
background-color
:
#ffffff
;
align-items
:
center
;
.part-2
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -1018,16 +1042,20 @@
background
:
#F8EDDD
;
border-radius
:
50
rpx
;
padding
:
0
30
upx
;
.tips{
.tips
{
line-height
:
36
upx
;
}
text
{
text
{
color
:
#C98D35
;
}
}
.part-left
{
display
:
block
;
width
:
100%
;
image
{
display
:
block
;
width
:
100%
;
...
...
@@ -1041,38 +1069,44 @@
align-items
:
center
;
width
:
100%
;
padding
:
20
upx
6
upx
;
.status-icon-box{
.status-icon-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
.status-box{
.status-box
{
background
:
#F0F9EB
;
border
:
2
upx
solid
#67C23A
;
box-shadow
:
0
rpx
5
rpx
13
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0
rpx
5
rpx
13
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.1
);
border-radius
:
6px
;
font-size
:
28
upx
;
padding
:
8
upx
30
upx
8
upx
16
upx
;
color
:
#67C23A
;
}
.status-box-0
{
.status-box-0
{
background
:
#F0F9EB
;
border
:
2
upx
solid
#67C23A
;
color
:
#67C23A
;
}
.status-box-1
{
.status-box-1
{
background
:
#FDF6EC
;
border
:
2
upx
solid
#F5DAB1
;
color
:
#F5DAB1
;
}
.status-box-3
{
.status-box-3
{
background
:
#ECF5FF
;
border
:
2
upx
solid
#B3D8FF
;
color
:
#B3D8FF
;
}
.img
{
.img
{
width
:
68
upx
;
margin-left
:
-30
upx
;
max-height
:
180
upx
;
max-height
:
180
upx
;
}
}
...
...
@@ -1093,6 +1127,7 @@
justify-content
:
center
;
width
:
100%
;
background
:
#ffffff
;
.tab-item
{
position
:
relative
;
display
:
flex
;
...
...
@@ -1100,12 +1135,14 @@
align-items
:
center
;
height
:
80
upx
;
width
:
36%
;
text
{
color
:
#000000
;
font-size
:
34
upx
;
font-weight
:
600
;
}
.line
{
.line
{
position
:
absolute
;
width
:
30%
;
height
:
2px
;
...
...
@@ -1119,40 +1156,46 @@
text
{
color
:
#DBA556
;
}
.line
{
.line
{
background
:
#DBA556
;
}
}
}
.date-content-box
{
.date-content-box
{
width
:
100%
;
background-color
:
#FFF7F5
;
}
.date-tips
{
.date-tips
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
width
:
92%
;
margin
:
30
upx
auto
12
upx
;
.text-2{
.text-2
{
color
:
#8C8C8C
;
}
}
.date-box
{
position
:
relative
;
margin
:
10
upx
30
upx
;
.date-item
{
position
:
relative
;
justify-content
:
center
;
align-items
:
center
;
padding
:
40
upx
0
12
upx
0
;
z-index
:
10
;
text
{
color
:
#6B0000
;
}
.text-first
{
.text-first
{
letter-spacing
:
4
upx
;
}
}
...
...
@@ -1170,7 +1213,8 @@
width
:
20%
;
height
:
100%
;
transition
:
left
0.3s
ease-in-out
;
.img{
.img
{
width
:
100%
;
height
:
100%
;
border-radius
:
12
upx
;
...
...
@@ -1178,16 +1222,19 @@
}
}
.data-content-box
{
.data-content-box
{
width
:
100%
;
background-color
:
#ffffff
;
}
.package-mode
{
padding
:
0
30
upx
30
upx
;
border-bottom
:
2
upx
solid
#F1F1F1
;
.part-1{
.part-1
{
margin
:
30
upx
0
;
}
.package-box
{
.item
{
margin
:
0
1.5%
;
...
...
@@ -1198,20 +1245,25 @@
padding
:
12
upx
0
;
color
:
#333333
;
background-color
:
#F7F8FA
;
.flex-row
{
align-items
:
flex-end
;
}
}
.item-3
{
.item-3
{
width
:
30%
;
}
.item-n
{
.item-n
{
flex
:
1
;
}
.active
{
background
:
#FBF6EE
;
border
:
1px
solid
#DBA556
;
text{
text
{
color
:
#B67D32
;
}
}
...
...
@@ -1221,9 +1273,10 @@
.distance-mode
{
margin
:
10
upx
30
upx
;
.distance-title
{
.distance-title
{
margin
:
20
upx
0
;
}
.distance-box
{
display
:
flex
;
flex-direction
:
row
;
...
...
@@ -1240,23 +1293,27 @@
flex-direction
:
row
;
align-items
:
center
;
width
:
100%
;
.part-1{
.part-1
{
display
:
flex
;
flex
:
1
;
justify-content
:
center
;
align-items
:
center
;
}
.part-2
{
.part-2
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
60
upx
;
}
.part-3
{
text{
.part-3
{
text
{
color
:
#8C8C8C
;
}
}
.cu-btn
{
width
:
80%
;
font-size
:
32
upx
;
...
...
@@ -1358,18 +1415,20 @@
background-color
:
#ffffff
;
margin-top
:
30
upx
;
min-height
:
300
upx
;
padding
:
0
0
15
upx
;
padding
:
0
0
15
upx
;
overflow
:
hidden
;
align-items
:
center
;
.text-left
{
.text-left
{
width
:
120
upx
;
text-align-last
:
justify
;
}
.original-price
{
width
:
100%
;
padding
:
30
upx
30
upx
15
upx
;
.flex-row{
.flex-row
{
align-items
:
flex-end
;
}
...
...
@@ -1385,11 +1444,12 @@
}
}
.use-coupon-box
{
.flex-row{
.use-coupon-box
{
.flex-row
{
max-width
:
70%
;
}
}
.line
{
width
:
94%
;
border-top
:
2
upx
solid
rgba
(
255
,
170
,
255
,
0.8
);
...
...
@@ -1407,9 +1467,10 @@
width
:
100%
;
height
:
120
rpx
;
background
:
#FFFFFF
;
box-shadow
:
0
rpx
5
rpx
25
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0
rpx
5
rpx
25
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.1
);
padding
:
0
30
upx
;
z-index
:
111
;
>.flex-row
{
display
:
flex
;
flex-direction
:
row
;
...
...
@@ -1422,12 +1483,13 @@
color
:
#e03997
;
}
}
.btn-box
{
.cu-btn-1{
.btn-box
{
.cu-btn-1
{
width
:
159
rpx
;
line-height
:
58
rpx
;
background
:
linear-gradient
(
97deg
,
#FADB4A
,
#FFA751
);
box-shadow
:
0
rpx
5
rpx
9
rpx
0
rpx
rgba
(
54
,
4
,
9
,
0.42
);
box-shadow
:
0
rpx
5
rpx
9
rpx
0
rpx
rgba
(
54
,
4
,
9
,
0.42
);
opacity
:
0.95
;
border-radius
:
29
rpx
;
font-size
:
30
upx
;
...
...
@@ -1435,11 +1497,12 @@
color
:
#ffffff
;
padding
:
0
;
}
.cu-btn-2
{
.cu-btn-2
{
width
:
159
rpx
;
line-height
:
58
rpx
;
background
:
linear-gradient
(
97deg
,
#E5268B
,
#FD5661
);
box-shadow
:
0
rpx
5
rpx
9
rpx
0
rpx
rgba
(
54
,
4
,
9
,
0.42
);
box-shadow
:
0
rpx
5
rpx
9
rpx
0
rpx
rgba
(
54
,
4
,
9
,
0.42
);
opacity
:
0.95
;
border-radius
:
29
rpx
;
text-align
:
center
;
...
...
@@ -1480,17 +1543,20 @@
min-height
:
50vh
;
background-color
:
#ffffff
;
border-radius
:
20
upx
;
.info-box
{
display
:
flex
;
flex-direction
:
column
;
width
:
92%
;
margin
:
0
auto
;
padding-top
:
12
upx
0
;
.info
{
padding
:
12
upx
0
;
font-size
:
20
upx
;
}
}
.title
{
display
:
flex
;
justify-content
:
center
;
...
...
@@ -1499,18 +1565,21 @@
padding
:
20
upx
;
border-bottom
:
1px
solid
#ffaaff
;
}
.flex-1
{
.flex-1
{
display
:
flex
;
flex
:
1
;
width
:
100%
;
justify-content
:
center
;
padding-top
:
40
upx
;
.tip-box{
.tip-box
{
padding-top
:
40
upx
;
width
:
92%
;
border-top
:
1px
dashed
#ffaaff
;
.flex-col{
text{
.flex-col
{
text
{
line-height
:
52
upx
;
}
}
...
...
@@ -1529,5 +1598,4 @@
}
}
}
</
style
>
\ No newline at end of file
pages/orderRecord/orderRecord.vue
View file @
3c801558
...
...
@@ -16,7 +16,7 @@
<text
class=
"cuIcon cuIcon-title text-pink"
></text>
<text
class=
"text-title text-bold text-xl"
>
{{
item
.
storeName
||
'门店名称'
}}
</text>
</view>
<text
:class=
"item.status==1?'text-pink':item.status==0?'text-cyan':item.status==2?'text-gray':'text-red'"
>
{{
orderStatusEnum
[
item
.
status
]
}}
</text>
<text
:class=
"item.status==1?'text-pink':item.status==0?'text-cyan':item.status==2?'text-gray':'text-red'"
>
{{
item
.
status
>=
3
?
refundStatusEnum
[
item
.
refundStatus
]:
orderStatusEnum
[
item
.
status
]
}}
</text>
</view>
<view
class=
"flex-row room-image-box"
>
...
...
@@ -162,7 +162,12 @@ import NoLogin from "@/components/noLogin/noLogin"
},
loginStatus
:
true
,
orderStatusEnum
:{},
roomTypeEnum
:{}
roomTypeEnum
:{},
refundStatusEnum
:{
1
:
'退款中'
,
2
:
'退款中'
,
3
:
'已退款'
}
};
},
onLoad
()
{
...
...
pages/orderResult/orderResult.vue
View file @
3c801558
...
...
@@ -80,7 +80,7 @@
<view
class=
"part"
>
<button
class=
"cu-btn block round line-pink lg"
@
tap=
"onNavToShare"
>
分享好友
</button>
</view>
<view
class=
"part"
>
<view
v-is=
"orderInfo.status == 1"
class=
"part"
>
<button
class=
"cu-btn block round bg-mauve lg"
@
tap=
"onNavToOrder"
>
房间续单
</button>
</view>
</view>
...
...
@@ -140,7 +140,10 @@
this
.
orderNo
=
option
.
orderNo
;
this
.
onGetDicts
()
this
.
onLoading
();
if
(
option
.
success
){
this
.
onMessagePush
()
}
},
methods
:{
onGetDicts
()
{
...
...
@@ -237,15 +240,7 @@
})
},
onMessagePush
(){
if
(
!
uni
.
getStorageSync
(
"orderUseMessage"
)){
uni
.
requestSubscribeMessage
({
tmplIds
:[
'oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8'
],
complete
:
(
res
)
=>
{
console
.
log
(
res
,
909090
)
uni
.
setStorageSync
(
"orderUseMessage"
,
true
);
}
})
}
}
}
}
...
...
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