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
718b8cb1
Commit
718b8cb1
authored
Nov 18, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
fa7436f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1028 additions
and
701 deletions
+1028
-701
index.config.js
config/index.config.js
+8
-8
order.vue
pages/order/order.vue
+1020
-693
No files found.
config/index.config.js
View file @
718b8cb1
...
@@ -2,8 +2,8 @@ const CONFIG = {
...
@@ -2,8 +2,8 @@ const CONFIG = {
// 开发环境配置
// 开发环境配置
development
:
{
development
:
{
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
//
assetsPath: 'http://coujiao.pseer.com:8888/wechat_static', // 静态资源路径
assetsPath
:
'http://coujiao.pseer.com:8888/wechat_static'
,
// 静态资源路径
assetsPath
:
'http://10.24.5.63:8211/static'
,
// 静态资源路径
//
assetsPath: 'http://10.24.5.63:8211/static', // 静态资源路径
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
baseUrl
:
'https://coujiao.pseer.com/front-api'
,
// 后台接口请求地址
baseUrl
:
'https://coujiao.pseer.com/front-api'
,
// 后台接口请求地址
hostUrl
:
'http://coujiao.pseer.com:8888/prod-api'
,
// H5地址(前端运行地址)
hostUrl
:
'http://coujiao.pseer.com:8888/prod-api'
,
// H5地址(前端运行地址)
...
@@ -15,12 +15,12 @@ const CONFIG = {
...
@@ -15,12 +15,12 @@ const CONFIG = {
},
},
// 生产环境配置
// 生产环境配置
production
:
{
production
:
{
//
assetsPath: 'http://coujiao.pseer.com:8888/wechat_static', // 静态资源路径
assetsPath
:
'http://coujiao.pseer.com:8888/wechat_static'
,
// 静态资源路径
assetsPath
:
'https://www.coujio.com/wechat_static'
,
// 静态资源路径
//
assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
//
baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
baseUrl
:
'https://coujiao.pseer.com/front-api'
,
// 后台接口请求地址
baseUrl
:
'https://www.coujio.com/front-api'
,
// 后台接口请求地址
//
baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
//
hostUrl: 'https://coujiao.pseer.com/prod-api', // H5地址(前端运行地址)
hostUrl
:
'https://coujiao.pseer.com/prod-api'
,
// H5地址(前端运行地址)
hostUrl
:
'https://www.coujio.com/prod-api'
,
// H5地址(前端运行地址)
//
hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
websocketUrl
:
''
,
// websocket服务端地址
weixinAppId
:
''
,
// 微信公众号appid
weixinAppId
:
''
,
// 微信公众号appid
codeHeadUrl
:
""
,
codeHeadUrl
:
""
,
...
...
pages/order/order.vue
View file @
718b8cb1
...
@@ -61,20 +61,21 @@
...
@@ -61,20 +61,21 @@
</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)">
<view
class=
"relative"
>
<view
class=
"relative"
>
<text
class=
"text-title text-bold text-first "
>
{{
k
===
0
&&
item
.
readDate
===
toDayDate
?
'今天'
:
item
.
weekday
}}
</text>
<text
class=
"text-title text-bold text-first "
>
{{
k
===
0
&&
item
.
readDate
===
toDayDate
?
'今天'
:
item
.
weekday
}}
</text>
<view
v-if=
"dateIndex !== k && activityDate[item.readDate]"
class=
"absolute-right"
>
<view
v-if=
"dateIndex !== k && activityDate[item.readDate]"
class=
"absolute-right"
>
<image
:src=
"assetsPath+'/xx2.png'"
mode=
"widthFix"
></image>
<image
:src=
"assetsPath+'/xx2.png'"
mode=
"widthFix"
></image>
</view>
</view>
</view>
</view>
<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
v-if=
"dateIndex === k && activityDate[item.readDate]"
class=
"absolute-right"
>
<view
v-if=
"dateIndex === k && activityDate[item.readDate]"
class=
"absolute-right"
>
<image
:src=
"assetsPath+'/xx2.png'"
mode=
"widthFix"
></image>
<image
:src=
"assetsPath+'/xx2.png'"
mode=
"widthFix"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -87,26 +88,32 @@
...
@@ -87,26 +88,32 @@
<view
class=
"flex-row package-box"
>
<view
class=
"flex-row package-box"
>
<view
v-if=
"roomLabelList.length"
class=
"room-label-list"
>
<view
v-if=
"roomLabelList.length"
class=
"room-label-list"
>
<view
v-for=
"(item,index) in roomLabelList"
:key=
"index"
class=
"room-label-box"
<view
v-for=
"(item,index) in roomLabelList"
:key=
"index"
class=
"room-label-box"
@
tap=
"onChangePackage(index)"
>
@
tap=
"onChangePackage(index)"
>
<view
class=
"item"
:class=
"allDayUseStatus? 'gray': modeIndex===index?'active':''"
>
<view
class=
"item"
:class=
"allDayUseStatus? 'gray': modeIndex===index?'active':''"
>
<text>
{{
item
.
labelName
}}
</text>
<text>
{{
item
.
labelName
}}
</text>
</view>
</view>
<view
v-if=
"item.openPack==1 || (activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId))"
class=
"pre-icon"
>
<view
<image
:src=
"
v-if=
"item.openPack==1 || (activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId))"
class=
"pre-icon"
>
<image
:src=
"
(item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId) && activityDate[dateList[dateIndex].readDate].packIds.includes(item.packId)) ||
(item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId) && activityDate[dateList[dateIndex].readDate].packIds.includes(item.packId)) ||
(item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].packIds.includes(item.packId)) ||
(item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].packIds.includes(item.packId)) ||
(!item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId)) ? assetsPath+'/pre_icon_2.png': assetsPath+'/pre_icon.png'"
mode=
"widthFix"
></image>
(!item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId)) ? assetsPath+'/pre_icon_2.png': assetsPath+'/pre_icon.png'"
mode=
"widthFix"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view
v-if=
"packageMode.length"
class=
"flex-col package-list"
>
<view
v-if=
"packageMode.length"
class=
"flex-col package-list"
>
<view
v-for=
"(item,index) in packageMode"
:key=
"index"
class=
"package-list-box"
<view
v-for=
"(item,index) in packageMode"
:key=
"index"
class=
"package-list-box"
@
tap=
"onChangePackage2(index,item)"
>
@
tap=
"onChangePackage2(index,item)"
>
<view
class=
"item"
:class=
" !item.show? 'gray': modeIndex2===index?'active':''"
>
<view
class=
"item"
:class=
" !item.show? 'gray': modeIndex2===index?'active':''"
>
<text>
{{
item
.
name
}}
</text>
<text>
{{
item
.
name
}}
</text>
</view>
</view>
<view
class=
"pre-icon"
>
<view
class=
"pre-icon"
>
<image
:src=
" activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].packIds.includes(item.id)? assetsPath+'/pre_icon_2.png' : assetsPath+'/pre_icon.png'"
mode=
"widthFix"
></image>
<image
:src=
" activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].packIds.includes(item.id)? assetsPath+'/pre_icon_2.png' : assetsPath+'/pre_icon.png'"
mode=
"widthFix"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -169,22 +176,22 @@
...
@@ -169,22 +176,22 @@
:class=
" item.status==2?'checked': item.tagStatus === 0 ?'free':item.tagStatus===1?'used':'error'"
>
:class=
" item.status==2?'checked': item.tagStatus === 0 ?'free':item.tagStatus===1?'used':'error'"
>
</view>
</view>
<text
class=
"text-gray"
>
{{
item
.
hour
>=
24
?
item
.
hour
-
24
:
item
.
hour
}}
</text>
<text
class=
"text-gray"
>
{{
item
.
hour
>=
24
?
item
.
hour
-
24
:
item
.
hour
}}
</text>
<view
v-if=
"item.hour == 24"
class=
"absolute"
>
<view
v-if=
"item.hour == 24"
class=
"absolute"
>
<view
class=
"flex-col"
>
<view
class=
"flex-col"
>
<view
class=
"saojiao"
>
<view
class=
"saojiao"
>
</view>
</view>
<view
class=
"line"
>
<view
class=
"line"
>
</view>
</view>
<view
class=
"text-sm"
>
<view
class=
"text-sm"
>
<text>
次日
</text>
<text>
次日
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -213,8 +220,38 @@
...
@@ -213,8 +220,38 @@
<text>
/小时
</text>
<text>
/小时
</text>
</view>
</view>
</view>
</view>
<view
v-if=
"computePriceInfo.totalFeeNow"
class=
"flex-between price"
>
<view
v-if=
"userInfo && (secondaryCardList.length || monthlyCardList.length)"
class=
"flex-col card-use"
>
<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>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
totalFeeNow
||
0
}}
</text>
</view>
</view>
<view
v-if=
"computePriceInfo.remainingBalance"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
支付策略
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
优先使用钱包余额
</text>
</view>
</view>
<view
v-if=
"computePriceInfo.discount > 0 && computePriceInfo.discount
<
100
"
class=
"flex-between price"
>
<view
class=
"flex-row-center"
>
<text
class=
"text-black text-left"
>
会员折扣
</text>
<view
class=
"vip-tag-box"
>
<image
:src=
"assetsPath+'/huiyuan.png'"
mode=
"widthFix"
></image>
<text>
会员日
{{
computePriceInfo
.
discountText
||
computePriceInfo
.
discount
}}
折
</text>
</view>
</view>
<view
class=
"flex-row-center"
>
<text
class=
"text-pink text-xl text-bold"
style=
"margin-right: 6upx;"
>
-
</text>
<text
class=
"text-pink text-bold"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
(
computePriceInfo
.
memberDiscount
).
toFixed
(
2
)
}}
</text>
</view>
</view>
<view
class=
"flex-col card-use"
>
<view
class=
"flex-between"
@
tap=
"onShowMorePayWay"
>
<view
class=
"flex-between"
@
tap=
"onShowMorePayWay"
>
<text
class=
"text-black text-left"
>
钱包支付
</text>
<text
class=
"text-black text-left"
>
钱包支付
</text>
<view
class=
"flex-row-center"
>
<view
class=
"flex-row-center"
>
...
@@ -222,128 +259,106 @@
...
@@ -222,128 +259,106 @@
</view>
</view>
</view>
</view>
<view
class=
"radio-group-box"
:class=
"showMorePayWay? 'radio-group-box-height':''"
>
<view
class=
"radio-group-box"
:class=
"showMorePayWay? 'radio-group-box-height':''"
>
<radio-group
class=
"radio-group"
>
<radio-group
class=
"radio-group"
>
<label
v-if=
"monthlyCardList.length"
class=
"flex-between"
@
tap=
"onRadioChange('monthlyCard')"
>
<!--
<label
v-if=
"Number(computePriceInfo.availableBalance)"
class=
"flex-between"
@
tap=
"onRadioChange('availableBalance')"
>
<view
class=
"flex-row-center"
>
<view
class=
"flex-1 flex-between"
>
<text>
{{
monthlyCardList
[
0
].
confName
}}
:
</text>
<view
class=
"flex-row-center"
>
<text
class=
"text-pink text-bold"
>
{{
monthlyCardList
[
0
].
freeDuration
}}
</text>
<text>
余额:
<text
class=
"text-pink text-bold"
>
¥
{{
computePriceInfo
.
availableBalance
}}
</text>
可用
</text>
<text>
小时可用
</text>
</view>
</view>
<view
class=
"flex-row-center margin-right-sm"
>
<view
class=
"flex-row-center"
>
<text>
{{
userInfo
.
memberConfig
.
levelName
}}
:
<text
class=
"text-pink text-bold"
>
{{
userInfo
.
memberConfig
.
discountRatio
}}
</text>
折
</text>
<radio
class=
'pink radio'
:class=
"radioChecked=='monthlyCard'?'checked':''"
</view>
value=
"monthlyCard"
:checked=
"radioChecked == 'monthlyCard'?true:false"
</view>
style=
"transform:scale(0.7)"
/>
<view
class=
"flex-row-center"
>
</view>
<radio
class=
'pink radio'
:class=
"radioChecked=='availableBalance'?'checked':''"
value=
"availableBalance"
:checked=
"radioChecked == 'availableBalance'?true:false"
style=
"transform:scale(0.7)"
/>
</label>
</view>
<label
v-if=
"secondaryCardList.length"
class=
"flex-between"
@
tap=
"onRadioChange('secondaryCard')"
>
</label
>
-->
<view
class=
"flex-row-center"
>
<text>
{{
secondaryCard
.
name
}}
:剩
<text
<label
v-if=
"monthlyCardList.length"
class=
"flex-between"
@
tap=
"onRadioChange('monthlyCard')"
>
class=
"text-pink text-bold"
>
{{
secondaryCard
.
number
}}
</text>
次可用
</text>
</view>
<view
class=
"flex-row-center"
>
<radio
class=
'pink radio'
:class=
"radioChecked=='secondaryCard'?'checked':''"
value=
"secondaryCard"
:checked=
"radioChecked=='secondaryCard'?true:false"
style=
"transform:scale(0.7)"
/>
</view>
</label>
<label
class=
"flex-between"
>
<view
class=
"flex-1 flex-between"
>
<view
class=
"flex-row-center"
>
<view
class=
"flex-row-center"
>
<text>
{{
monthlyCardList
[
0
].
confName
}}
:
</text>
<text>
可用余额:
</text>
<text
class=
"text-pink text-bold"
>
{{
monthlyCardList
[
0
].
freeDuration
}}
</text>
<text
class=
"text-pink text-bold"
>
¥
{{
computePriceInfo
.
availableBalance
}}
</text>
<text>
小时可用
</text>
</view>
</view>
<view
class=
"flex-row-center"
>
<view
class=
"flex-row-center margin-right-sm"
>
<!--
<text>
请选择
</text>
-->
<!--
<text>
{{
userInfo
.
memberConfig
.
levelName
}}
:
<textclass
="
text-pink
text-bold
"
>
{{
userInfo
.
memberConfig
.
discountRatio
}}
</text>
折
</text>
-->
<radio
class=
'pink radio'
:class=
"radioChecked=='monthlyCard'?'checked':''"
value=
"monthlyCard"
:checked=
"radioChecked == 'monthlyCard'?true:false"
style=
"transform:scale(0.7)"
/>
</view>
</view>
</label
>
</view>
<label
v-if=
"secondaryCardList.length"
class=
"flex-between"
@
tap=
"onRadioChange('secondaryCard')"
>
<view
class=
"flex-row-center"
>
<text
v-if=
"computePriceInfo.availableBalance"
class=
"text-pink text-lg text-bold margin-right-sm"
>
{{
computePriceInfo
.
balance
||
0
}}
</text>
<button
v-else
class=
"cu-btn bg-pink sm"
@
tap=
"onNavToRecharge"
>
充值
</button>
</view>
</label>
<label
v-if=
"computePriceInfo && computePriceInfo.availableDuration"
class=
"flex-between"
>
<view
class=
"flex-1 flex-between"
>
<view
class=
"flex-row-center"
>
<view
class=
"flex-row-center"
>
<text>
{{
secondaryCard
.
name
}}
:剩
<text
class=
"text-pink text-bold"
>
{{
secondaryCard
.
number
}}
</text>
次可用
</text>
<text>
可用时长:
</text>
</view>
<text
class=
"text-pink text-bold"
>
{{
Number
(
computePriceInfo
.
availableDuration
).
toFixed
(
1
)
}}
小时
</text>
<view
class=
"flex-row-center"
>
<!--
<text>
请选择
</text>
-->
<radio
class=
'pink radio'
:class=
"radioChecked=='secondaryCard'?'checked':''"
value=
"secondaryCard"
:checked=
"radioChecked=='secondaryCard'?true:false"
style=
"transform:scale(0.7)"
/>
</view>
</view>
</label
>
</view>
<view
class=
"flex-row-center"
>
<text
class=
"text-pink text-bold margin-right-sm"
>
{{
Number
(
computePriceInfo
.
duration
)?
'-'
+
Number
(
computePriceInfo
.
duration
).
toFixed
(
1
)
:
0
}}
</text>
<!--
<label
v-if=
"computePriceInfo && computePriceInfo.availableDuration"
class=
"flex-between"
@
tap=
"onRadioChange('availableDuration')"
>
</view>
<view
class=
"flex-1 flex-between"
>
</label>
<view
class=
"flex-row-center"
>
<text>
时长:
<text
class=
"text-pink text-bold"
>
{{
Number
(
computePriceInfo
.
availableDuration
).
toFixed
(
1
)
}}
</text>
小时可用
</text>
</radio-group>
</view>
</view>
<view
class=
"flex-row-center"
>
<radio
class=
'pink radio'
:class=
"radioChecked=='availableDuration'?'checked':''"
value=
"availableDuration"
:checked=
"radioChecked == 'availableDuration'?true:false"
style=
"transform:scale(0.7)"
/>
</view>
</label
>
-->
</radio-group>
</view>
</view>
</view>
</view>
<view
class=
"flex-between price use-coupon-box"
>
<view
class=
"flex-between price use-coupon-box"
>
<view
class=
"flex-row-center"
>
<view
class=
"flex-row-center"
>
<text
class=
"text-black text-left"
>
{{
useCouponList
[
selectCouponIndex
].
couponType
==
2
?
'团购券'
:
'优惠券'
}}
</text>
<text
class=
"text-black text-left"
>
{{
useCouponList
[
selectCouponIndex
].
couponType
==
2
?
'团购券'
:
'优惠券'
}}
</text>
<text
v-if=
"couponExpireTip && selectCouponIndex
<
0
"
class=
"text-red"
>
(有即将过期券待使用)
</text>
<text
v-if=
"couponExpireTip && selectCouponIndex
<
0
"
class=
"text-red"
>
(有即将过期券待使用)
</text>
</view>
</view>
<view
class=
"flex-1 flex-row"
@
tap=
"onNavToSelectCoupon"
>
<view
class=
"flex-1 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
:
useCouponList
.
length
?
'请选择'
:
'暂无可用'
}}
</text>
{{
useCouponList
.
length
&&
selectCouponIndex
>=
0
?
useCouponList
[
selectCouponIndex
].
name
:
useCouponList
.
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>
<view
v-if=
"userInfo && computePriceInfo.availableDuration"
class=
"flex-between price"
>
<
!--
<
view
v-if=
"userInfo && computePriceInfo.availableDuration"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
可用时长
</text>
<text
class=
"text-black text-left"
>
可用时长
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
&&
computePriceInfo
.
availableDuration
?
Number
(
computePriceInfo
.
availableDuration
).
toFixed
(
1
)
:
0
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
&&
computePriceInfo
.
availableDuration
?
Number
(
computePriceInfo
.
availableDuration
).
toFixed
(
1
)
:
0
}}
</text>
<text
class=
"text-pink"
>
小时
</text>
<text
class=
"text-pink"
>
小时
</text>
</view>
</view>
</view>
</view>
-->
<view
v-if=
"userInfo && computePriceInfo.duration"
class=
"flex-between price"
>
<
!--
<
view
v-if=
"userInfo && computePriceInfo.duration"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
时长抵扣
</text>
<text
class=
"text-black text-left"
>
时长抵扣
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"text-pink text-lg text-bold"
>
{{
Number
(
computePriceInfo
.
duration
).
toFixed
(
1
)
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
Number
(
computePriceInfo
.
duration
).
toFixed
(
1
)
}}
</text>
<text>
小时
</text>
<text>
小时
</text>
</view>
</view>
</view>
</view>
-->
<view
v-if=
"computePriceInfo.remainingBalance"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
支付策略
</text>
<!--
<view
v-if=
"computePriceInfo.availableBalance"
class=
"flex-between price"
>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
优先使用钱包余额
</text>
</view>
</view>
<!--
<view
v-if=
"computePriceInfo.availableBalance"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
可用余额
</text>
<text
class=
"text-black text-left"
>
可用余额
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
availableBalance
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
availableBalance
}}
</text>
</view>
</view>
</view>
-->
</view>
-->
<view
v-if=
"computePriceInfo.balance"
class=
"flex-between price"
>
<
!--
<
view
v-if=
"computePriceInfo.balance"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
余额抵扣
</text>
<text
class=
"text-black text-left"
>
余额抵扣
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
balance
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
balance
}}
</text>
</view>
</view>
</view>
</view>
-->
<view
v-if=
"computePriceInfo.discount > 0 && computePriceInfo.discount
<
100
"
class=
"flex-between price"
>
<view
class=
"flex-row-center"
>
<text
class=
"text-black text-left"
>
会员折扣
</text>
<view
class=
"vip-tag-box"
>
<image
:src=
"assetsPath+'/huiyuan.png'"
mode=
"widthFix"
></image>
<text>
会员日
{{
computePriceInfo
.
discountText
||
computePriceInfo
.
discount
}}
折
</text>
</view>
</view>
<view
class=
"flex-row-center"
>
<text
class=
"text-pink text-xl text-bold"
style=
"margin-right: 6upx;"
>
-
</text>
<text
class=
"text-pink text-bold"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
(
computePriceInfo
.
memberDiscount
).
toFixed
(
2
)
}}
</text>
</view>
</view>
<view
v-if=
"computePriceInfo.totalFeeNow"
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>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
totalFeeNow
||
0
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"pay-content-box"
>
<view
class=
"pay-content-box"
>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
...
@@ -401,8 +416,8 @@
...
@@ -401,8 +416,8 @@
</view>
</view>
</view>
</view>
</uni-popup>
</uni-popup>
<uni-popup
ref=
"popupActivite"
type=
"center"
isMaskClick=
"false"
>
<uni-popup
ref=
"popupActivite"
type=
"center"
:
isMaskClick=
"false"
>
<view
class=
"flex-col"
>
<view
class=
"flex-col"
>
<view
class=
"activite-box"
>
<view
class=
"activite-box"
>
<image
:src=
"assetsPath+'/activite_1.jpg'"
mode=
"widthFix"
></image>
<image
:src=
"assetsPath+'/activite_1.jpg'"
mode=
"widthFix"
></image>
...
@@ -412,6 +427,40 @@
...
@@ -412,6 +427,40 @@
</view>
</view>
</view>
</view>
</uni-popup>
</uni-popup>
<uni-popup
ref=
"popupRecharge"
type=
"center"
:isMaskClick=
"false"
>
<view
class=
"popup-recharge"
>
<view
class=
"recharge-content"
>
<view
class=
"close-btn"
@
click=
"onNavToCreateOrder"
>
<text
class=
"cuIcon-close text-gray text-bold"
>
</text>
</view>
<view
class=
"header-part"
>
<text
class=
"text-title text-black margin-top text-xl"
>
充值会员
</text>
<text
class=
"text-gray"
>
享受每次订房最低打95折,最高打88折
</text>
</view>
<view
class=
"content-part"
>
<view
v-for=
"(item,k) in rechargeConfList"
:key=
"k"
class=
"flex-row-center list-item"
>
<image
class=
"recharge-icon"
:src=
"assetsPath+'/recharge_icon.png'"
mode=
"widthFix"
></image>
<text
class=
"text-title"
>
{{
item
.
rechargeAmount
}}
元送
</text>
<text
class=
"text-pink"
>
{{
item
.
giveAmount
}}
</text>
<text
class=
"text-title"
>
元余额=
{{
Number
(
item
.
rechargeAmount
)
+
Number
(
item
.
giveAmount
)
}}
元
</text>
</view>
<view
class=
"text-des-box"
>
<text
class=
"text-des"
>
充值会员后,每一次消费的积分可自动 累计,用于升级订房折扣,最高打88折
</text>
</view>
<button
class=
"cu-btn"
@
tap=
"onNavToRecharge"
>
立即充值
</button>
</view>
</view>
</view>
</uni-popup>
<uni-popup
ref=
"confirmPop"
type=
"bottom"
:isMaskClick=
"false"
>
<uni-popup
ref=
"confirmPop"
type=
"bottom"
:isMaskClick=
"false"
>
<view
class=
"confirm-pop"
>
<view
class=
"confirm-pop"
>
...
@@ -424,7 +473,7 @@
...
@@ -424,7 +473,7 @@
<view
class=
"info-store"
>
<view
class=
"info-store"
>
<text
class=
"text-title"
>
凑角
{{
roomInfo
.
storeName
||
''
}}
</text>
<text
class=
"text-title"
>
凑角
{{
roomInfo
.
storeName
||
''
}}
</text>
</view>
</view>
<view
class=
"flex-row time-box"
>
<view
class=
"flex-row time-box"
>
<view
class=
"part-1"
>
<view
class=
"part-1"
>
<!--
<image
:src=
"assetsPath+'/time_bg_icon.png'"
mode=
"widthFix"
></image>
-->
<!--
<image
:src=
"assetsPath+'/time_bg_icon.png'"
mode=
"widthFix"
></image>
-->
...
@@ -440,38 +489,40 @@
...
@@ -440,38 +489,40 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"info flex-row-center"
>
<view
class=
"info flex-row-center"
>
<text
class=
"text-black text-bold text-lg"
>
房间:
</text>
<text
class=
"text-black text-bold text-lg"
>
房间:
</text>
<text
class=
" margin-left text-lg "
>
{{
roomInfo
.
name
}}
(
{{
roomTypeEnum
[
roomInfo
.
roomType
]
}}
)
</text>
<text
class=
" margin-left text-lg "
>
{{
roomInfo
.
name
}}
(
{{
roomTypeEnum
[
roomInfo
.
roomType
]
}}
)
</text>
</view>
</view>
<view
v-if=
"Number(computePriceInfo.balance) > 0"
class=
"info flex-row-center"
>
<view
v-if=
"Number(computePriceInfo.balance) > 0"
class=
"info flex-row-center"
>
<text
class=
"text-black text-bold text-lg"
>
余额抵扣:
</text>
<text
class=
"text-black text-bold text-lg"
>
余额抵扣:
</text>
<text
class=
"margin-left text-lg"
>
¥
</text>
<text
class=
"margin-left text-lg"
>
¥
</text>
<text
class=
" text-xl"
>
{{
Number
(
computePriceInfo
.
balance
).
toFixed
(
2
)
}}
</text>
<text
class=
" text-xl"
>
{{
Number
(
computePriceInfo
.
balance
).
toFixed
(
2
)
}}
</text>
<text
class=
"text-lg margin-left-sm"
>
(余额账户: ¥
{{
Number
(
userInfo
.
consumerWallet
.
balance
).
toFixed
(
2
)
}}
)
</text>
<text
class=
"text-lg margin-left-sm"
>
(余额账户:
¥
{{
Number
(
userInfo
.
consumerWallet
.
balance
).
toFixed
(
2
)
}}
)
</text>
</view>
</view>
<view
class=
"info flex-row-center"
>
<view
class=
"info flex-row-center"
>
<text
class=
"text-black text-bold text-lg"
>
待支付:
</text>
<text
class=
"text-black text-bold text-lg"
>
待支付:
</text>
<text
class=
"margin-left text-lg"
>
¥
</text>
<text
class=
"margin-left text-lg"
>
¥
</text>
<text
class=
" text-xl "
>
{{
Number
(
computePriceInfo
.
payFee
).
toFixed
(
2
)
}}
</text>
<text
class=
" text-xl "
>
{{
Number
(
computePriceInfo
.
payFee
).
toFixed
(
2
)
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"footer-btn-box"
>
<view
class=
"footer-btn-box"
>
<button
class=
"cu-btn block btn-close"
@
tap=
"onCancle"
>
关闭
</button>
<button
class=
"cu-btn block btn-close"
@
tap=
"onCancle"
>
关闭
</button>
<button
class=
"cu-btn block btn-confirm"
@
tap=
"onOrder"
>
确定
</button>
<button
class=
"cu-btn block btn-confirm"
@
tap=
"onOrder"
>
确定
</button>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -480,11 +531,14 @@
...
@@ -480,11 +531,14 @@
<uni-popup
ref=
"popupMessage"
type=
"dialog"
>
<uni-popup
ref=
"popupMessage"
type=
"dialog"
>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
:showClose=
"false"
:content=
"tipErrMsg|| tipContent"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onCancleTip"
></uni-popup-dialog>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
:showClose=
"false"
:content=
"tipErrMsg|| tipContent"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onCancleTip"
></uni-popup-dialog>
</uni-popup>
</uni-popup>
<uni-popup
ref=
"popupDialog"
type=
"dialog"
>
<uni-popup
ref=
"popupDialog"
type=
"dialog"
>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
:content=
" warnTip || packageMode[tempPackageIndex].name + '时长不足,是否接受预定?'"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onPackageCheck"
></uni-popup-dialog>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
:content=
" warnTip || packageMode[tempPackageIndex].name + '时长不足,是否接受预定?'"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onPackageCheck"
></uni-popup-dialog>
</uni-popup>
</uni-popup>
</view>
</view>
</
template
>
</
template
>
...
@@ -497,7 +551,8 @@
...
@@ -497,7 +551,8 @@
dictList
dictList
}
from
"@/api/index.js"
;
}
from
"@/api/index.js"
;
import
{
import
{
getDictItem
,
getSysConfigValue
getDictItem
,
getSysConfigValue
}
from
"@/utils/tools.js"
}
from
"@/utils/tools.js"
import
{
import
{
getStoreActivity
,
getStoreActivity
,
...
@@ -514,7 +569,10 @@
...
@@ -514,7 +569,10 @@
orderCancelPay
,
orderCancelPay
,
queryCardUse
queryCardUse
}
from
"@/api/order"
}
from
"@/api/order"
import
{
rechargeConf
}
from
"@/api/recharge.js"
;
export
default
{
export
default
{
components
:
{
components
:
{
LoginPop
LoginPop
...
@@ -530,7 +588,7 @@
...
@@ -530,7 +588,7 @@
images
:
[],
images
:
[],
status
:
0
status
:
0
},
},
userInfo
:
uni
.
getStorageSync
(
"userInfo"
)
||
''
,
userInfo
:
uni
.
getStorageSync
(
"userInfo"
)
||
''
,
startTime
:
moment
().
format
(
"HH:mm"
),
startTime
:
moment
().
format
(
"HH:mm"
),
endTime
:
''
,
endTime
:
''
,
dateIndex
:
0
,
dateIndex
:
0
,
...
@@ -591,7 +649,7 @@
...
@@ -591,7 +649,7 @@
],
],
durationIndex2
:
[
0
],
durationIndex2
:
[
0
],
hourList2
:
[
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
],
hourList2
:
[
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
],
minuteList
:
[
'00'
,
"05"
,
"10"
,
"15"
,
"20"
,
"25"
,
'30'
,
"35"
,
"40"
,
"45"
,
"50"
,
"55"
],
minuteList
:
[
'00'
,
"05"
,
"10"
,
"15"
,
"20"
,
"25"
,
'30'
,
"35"
,
"40"
,
"45"
,
"50"
,
"55"
],
orderTypeEnum
:
{
orderTypeEnum
:
{
1
:
"预定"
,
1
:
"预定"
,
2
:
"续费"
,
2
:
"续费"
,
...
@@ -628,41 +686,43 @@
...
@@ -628,41 +686,43 @@
0
:
"待保洁"
,
0
:
"待保洁"
,
1
:
"保洁中"
1
:
"保洁中"
},
},
formatAllData
:{
formatAllData
:
{
list
:[]
list
:
[]
},
},
orderInfo
:{},
orderInfo
:
{},
tempPackageIndex
:
0
,
tempPackageIndex
:
0
,
// 临时存放开始时间 结束时间 时长
// 临时存放开始时间 结束时间 时长
tempDateObj
:{},
tempDateObj
:
{},
orderDateDes
:
""
,
orderDateDes
:
""
,
orderWeekDes
:
""
,
orderWeekDes
:
""
,
orderWeeEnum
:{
orderWeeEnum
:
{
1
:
"周一"
,
1
:
"周一"
,
2
:
"周二"
,
2
:
"周二"
,
3
:
"周三"
,
3
:
"周三"
,
4
:
"周四"
,
4
:
"周四"
,
5
:
"周五"
,
5
:
"周五"
,
6
:
"周六"
,
6
:
"周六"
,
0
:
"周日"
,
0
:
"周日"
,
},
},
allDayUseStatus
:
false
,
// 当日无可预约时段,true 无法预约,false 可预约
allDayUseStatus
:
false
,
// 当日无可预约时段,true 无法预约,false 可预约
tipContent
:
"当前条件下无可预约的时段,请手动选择合适的空闲时段"
,
tipContent
:
"当前条件下无可预约的时段,请手动选择合适的空闲时段"
,
tipErrMsg
:
''
,
tipErrMsg
:
''
,
warnTip
:
''
,
warnTip
:
''
,
activityDate
:{},
activityDate
:
{},
storeCleanDuration
:
getSysConfigValue
(
'StoreCleanDuration'
)?
Number
(
getSysConfigValue
(
'StoreCleanDuration'
)):
30
,
storeCleanDuration
:
getSysConfigValue
(
'StoreCleanDuration'
)
?
Number
(
getSysConfigValue
(
radioChecked
:
''
,
'StoreCleanDuration'
))
:
30
,
monthlyCardList
:[],
radioChecked
:
''
,
secondaryCardList
:[],
monthlyCardList
:
[],
secondaryCard
:{
secondaryCardList
:
[],
secondaryCard
:
{
status
:
0
,
status
:
0
,
number
:
0
,
number
:
0
,
name
:
'次卡'
name
:
'次卡'
},
},
submitBtnStatus
:
false
,
submitBtnStatus
:
false
,
showMorePayWay
:
true
,
showMorePayWay
:
true
,
couponExpireTip
:
false
,
//是否进行优惠券过期提醒
couponExpireTip
:
false
,
//是否进行优惠券过期提醒
rechargeConfList
:
[],
};
};
},
},
filters
:
{
filters
:
{
...
@@ -685,7 +745,7 @@
...
@@ -685,7 +745,7 @@
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
if
(
!
uni
.
getStorageSync
(
'activite'
))
{
if
(
!
uni
.
getStorageSync
(
'activite'
))
{
this
.
$refs
.
popupActivite
.
open
()
this
.
$refs
.
popupActivite
.
open
()
}
}
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -696,7 +756,7 @@
...
@@ -696,7 +756,7 @@
this
.
onGetDicts
();
this
.
onGetDicts
();
this
.
id
=
option
.
roomId
;
this
.
id
=
option
.
roomId
;
if
(
option
.
orderNo
)
{
if
(
option
.
orderNo
)
{
if
(
option
.
modeIndex
)
{
if
(
option
.
modeIndex
)
{
this
.
modeIndex
=
Number
(
option
.
modeIndex
);
this
.
modeIndex
=
Number
(
option
.
modeIndex
);
}
}
this
.
orderType
=
2
;
this
.
orderType
=
2
;
...
@@ -710,22 +770,43 @@
...
@@ -710,22 +770,43 @@
this
.
onLoading
()
this
.
onLoading
()
this
.
distanceIndex
=
0
this
.
distanceIndex
=
0
}
}
this
.
onGetRechargeConf
();
},
onShow
()
{
if
(
this
.
rechargeConfList
.
length
){
this
.
userInfo
=
uni
.
getStorageSync
(
"userInfo"
)
||
''
;
this
.
onComputePrice
();
}
},
},
methods
:
{
methods
:
{
onShowMorePayWay
(){
onGetRechargeConf
()
{
rechargeConf
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
rows
)
{
this
.
rechargeConfList
=
res
.
data
.
rows
}
})
},
onNavToRecharge
(){
uni
.
switchTab
({
url
:
'/pages/vipCreate/vipCreate'
})
},
onShowMorePayWay
()
{
this
.
showMorePayWay
=
!
this
.
showMorePayWay
this
.
showMorePayWay
=
!
this
.
showMorePayWay
},
},
onActiviteClose
(){
onActiviteClose
()
{
this
.
$refs
.
popupActivite
.
close
();
this
.
$refs
.
popupActivite
.
close
();
uni
.
setStorageSync
(
'activite'
,
true
)
uni
.
setStorageSync
(
'activite'
,
true
)
},
},
onRadioChange
(
e
){
onRadioChange
(
e
)
{
if
(
this
.
radioChecked
===
e
)
{
if
(
this
.
radioChecked
===
e
)
{
this
.
radioChecked
=
''
this
.
radioChecked
=
''
if
(
this
.
useCouponList
&&
this
.
useCouponList
.
length
)
{
if
(
this
.
useCouponList
&&
this
.
useCouponList
.
length
)
{
this
.
selectCouponIndex
=
0
;
this
.
selectCouponIndex
=
0
;
}
}
}
else
{
}
else
{
this
.
radioChecked
=
e
this
.
radioChecked
=
e
this
.
selectCouponIndex
=
-
1
;
this
.
selectCouponIndex
=
-
1
;
}
}
...
@@ -733,9 +814,9 @@
...
@@ -733,9 +814,9 @@
},
},
// 日期切换
// 日期切换
onDateChange
(
k
)
{
onDateChange
(
k
)
{
if
(
this
.
dateIndex
===
k
||
this
.
orderType
==
2
)
return
;
if
(
this
.
dateIndex
===
k
||
this
.
orderType
==
2
)
return
;
this
.
dateIndex
=
k
;
this
.
dateIndex
=
k
;
if
(
this
.
modeIndex
<
0
)
{
if
(
this
.
modeIndex
<
0
)
{
this
.
modeIndex
=
0
;
this
.
modeIndex
=
0
;
this
.
modeIndex2
=
-
1
;
this
.
modeIndex2
=
-
1
;
}
}
...
@@ -743,17 +824,17 @@
...
@@ -743,17 +824,17 @@
this
.
onGetSortDistance
()
this
.
onGetSortDistance
()
},
},
// 小时标签切换
// 小时标签切换
onChangePackage
(
index
){
onChangePackage
(
index
)
{
if
(
this
.
modeIndex
==
index
||
this
.
allDayUseStatus
)
return
;
if
(
this
.
modeIndex
==
index
||
this
.
allDayUseStatus
)
return
;
let
startDateTime
=
''
let
startDateTime
=
''
if
(
this
.
orderType
==
2
)
{
if
(
this
.
orderType
==
2
)
{
startDateTime
=
this
.
orderInfo
.
endDate
startDateTime
=
this
.
orderInfo
.
endDate
if
(
this
.
orderInfo
.
status
==
2
)
{
if
(
this
.
orderInfo
.
status
==
2
)
{
startDateTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)
startDateTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)
}
}
}
}
this
.
modeIndex
=
index
this
.
modeIndex
=
index
this
.
modeIndex2
=
-
1
this
.
modeIndex2
=
-
1
this
.
formatAllData
=
this
.
onTransiteForDate
({
this
.
formatAllData
=
this
.
onTransiteForDate
({
...
@@ -762,93 +843,101 @@
...
@@ -762,93 +843,101 @@
duration
:
this
.
roomLabelList
[
this
.
modeIndex
].
labelDuration
,
duration
:
this
.
roomLabelList
[
this
.
modeIndex
].
labelDuration
,
});
});
},
},
onPackageCheck
(){
onPackageCheck
()
{
this
.
onCancleTip
();
this
.
onCancleTip
();
this
.
modeIndex
=
-
1
this
.
modeIndex
=
-
1
this
.
modeIndex2
=
this
.
tempPackageIndex
this
.
modeIndex2
=
this
.
tempPackageIndex
this
.
formatAllData
=
this
.
onTransiteForDate
({
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
this
.
tempDateObj
.
startDate
,
startDateTime
:
this
.
tempDateObj
.
startDate
,
duration
:
this
.
tempDateObj
.
duration
,
duration
:
this
.
tempDateObj
.
duration
,
durationType
:
this
.
tempDateObj
.
durationType
durationType
:
this
.
tempDateObj
.
durationType
});
});
},
},
// 套餐校验,检查当前套餐是否可用
// 套餐校验,检查当前套餐是否可用
onCheckPackageUse
(
valData
){
onCheckPackageUse
(
valData
)
{
let
useStatus
=
true
;
let
useStatus
=
true
;
let
startStr
=
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
Number
(
valData
.
packaStartPeriod
)
>=
10
?
valData
.
packaStartPeriod
:
'0'
+
valData
.
packaStartPeriod
}
:00:00`
let
startStr
=
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
Number
(
valData
.
packaStartPeriod
)
>=
10
?
valData
.
packaStartPeriod
:
'0'
+
valData
.
packaStartPeriod
}
:00:00`
let
startDate
=
moment
(
moment
().
format
(
startStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
let
startDate
=
moment
(
moment
().
format
(
startStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
let
endStr
=
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
Number
(
valData
.
packaEndPeriod
)
>=
10
?
valData
.
packaEndPeriod
:
'0'
+
valData
.
packaEndPeriod
}
:00:00`
let
endStr
=
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
Number
(
valData
.
packaEndPeriod
)
>=
10
?
valData
.
packaEndPeriod
:
'0'
+
valData
.
packaEndPeriod
}
:00:00`
let
endDate
=
moment
(
moment
().
format
(
endStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
let
endDate
=
moment
(
moment
().
format
(
endStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
// 如果此套餐的结束时间在11点前,则为通宵套餐,会在当天及明天进行找合适的时间段,否则则没有合适的套餐时段
// 如果此套餐的结束时间在11点前,则为通宵套餐,会在当天及明天进行找合适的时间段,否则则没有合适的套餐时段
let
pointDateForm
=
moment
(
this
.
dateList
[
this
.
dateIndex
].
readDate
).
format
(
"YYYY-MM-DD 11:00:00"
);
let
pointDateForm
=
moment
(
this
.
dateList
[
this
.
dateIndex
].
readDate
).
format
(
"YYYY-MM-DD 11:00:00"
);
let
dateTimeObj
=
{};
let
dateTimeObj
=
{};
if
(
moment
(
endDate
).
valueOf
()
<
moment
(
pointDateForm
).
valueOf
())
{
if
(
moment
(
endDate
).
valueOf
()
<
moment
(
pointDateForm
).
valueOf
())
{
if
(
this
.
orderType
==
2
)
{
if
(
this
.
orderType
==
2
)
{
// 1.确定续套餐的结束时间
// 1.确定续套餐的结束时间
let
orderEndDate
=
''
let
orderEndDate
=
''
if
(
this
.
orderInfo
.
status
==
1
)
{
if
(
this
.
orderInfo
.
status
==
1
)
{
orderEndDate
=
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
orderEndDate
=
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
}
else
{
}
else
{
orderEndDate
=
moment
().
valueOf
()
orderEndDate
=
moment
().
valueOf
()
}
}
startDate
=
moment
(
orderEndDate
).
format
(
`YYYY-MM-DD 0
${
valData
.
packaStartPeriod
}
:00:00`
);
startDate
=
moment
(
orderEndDate
).
format
(
`YYYY-MM-DD 0
${
valData
.
packaStartPeriod
}
:00:00`
);
endDate
=
moment
(
orderEndDate
).
format
(
`YYYY-MM-DD 0
${
valData
.
packaEndPeriod
}
:00:00`
);
endDate
=
moment
(
orderEndDate
).
format
(
`YYYY-MM-DD 0
${
valData
.
packaEndPeriod
}
:00:00`
);
// 续夜宵套餐时的开始时间必须在设定的开始和结束时间内
// 续夜宵套餐时的开始时间必须在设定的开始和结束时间内
let
b1
=
orderEndDate
>=
moment
(
startDate
).
valueOf
()
&&
orderEndDate
<=
moment
(
endDate
).
valueOf
();
let
b1
=
orderEndDate
>=
moment
(
startDate
).
valueOf
()
&&
orderEndDate
<=
moment
(
endDate
).
valueOf
();
// 续夜宵套餐的开始时间必须在设定的开始时间和开始时间四个小时内
// 续夜宵套餐的开始时间必须在设定的开始时间和开始时间四个小时内
let
b2
=
orderEndDate
>=
moment
(
startDate
).
valueOf
()
&&
orderEndDate
<=
moment
(
startDate
).
valueOf
()
+
4
*
60
*
60
*
1000
;
let
b2
=
orderEndDate
>=
moment
(
startDate
).
valueOf
()
&&
orderEndDate
<=
moment
(
startDate
)
.
valueOf
()
+
4
*
60
*
60
*
1000
;
if
(
!
(
b1
&&
b2
)
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
))
{
if
(
!
(
b1
&&
b2
)
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
))
{
useStatus
=
false
;
useStatus
=
false
;
}
}
}
else
{
}
else
{
//通宵套餐
//通宵套餐
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
// 实际时长小于原时长的60%则选择明天的时间
// 实际时长小于原时长的60%则选择明天的时间
// 原时间
// 原时间
let
originTime
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
()
let
originTime
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
()
// 实际时间
// 实际时间
let
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
()
let
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
)
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
)){
.
valueOf
()
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
))
{
// 实际时长小于原时长的60%则选择明天的时间
// 实际时长小于原时长的60%则选择明天的时间
// 加一天时间重新计算
// 加一天时间重新计算
if
(
this
.
dateIndex
!=
0
)
{
if
(
this
.
dateIndex
!=
0
)
{
useStatus
=
false
;
useStatus
=
false
;
return
return
}
}
startDate
=
moment
(
startDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
);
startDate
=
moment
(
startDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
);
endDate
=
moment
(
endDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
)
endDate
=
moment
(
endDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
)
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
// 实际时间
// 实际时间
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
()
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
)
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
)){
.
valueOf
()
useStatus
=
false
;
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
))
{
useStatus
=
false
;
return
return
}
}
}
}
}
}
}
else
{
}
else
{
if
(
this
.
orderType
==
2
){
if
(
this
.
orderType
==
2
)
{
if
(
!
(
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
>=
moment
(
startDate
).
valueOf
()
&&
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
<=
moment
(
endDate
).
valueOf
())){
if
(
!
(
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
>=
moment
(
startDate
).
valueOf
()
&&
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
<=
moment
(
endDate
).
valueOf
()))
{
useStatus
=
false
;
useStatus
=
false
;
}
}
return
return
}
}
// 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐
// 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐
// 闲时套餐
// 闲时套餐
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
// 原时间
// 原时间
let
originTime
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
()
let
originTime
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
()
// 实际时间
// 实际时间
let
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
()
let
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
)
if
(
actualTime
<
originTime
*
0.6
||
this
.
onCheckPackUse
(
startDate
,
endDate
)){
.
valueOf
()
if
(
actualTime
<
originTime
*
0.6
||
this
.
onCheckPackUse
(
startDate
,
endDate
))
{
useStatus
=
false
;
useStatus
=
false
;
return
return
}
}
...
@@ -856,219 +945,241 @@
...
@@ -856,219 +945,241 @@
return
useStatus
return
useStatus
},
},
// 套餐切换
// 套餐切换
onChangePackage2
(
index
,
val
)
{
onChangePackage2
(
index
,
val
)
{
if
(
this
.
modeIndex2
==
index
||
!
val
.
show
)
return
;
if
(
this
.
modeIndex2
==
index
||
!
val
.
show
)
return
;
this
.
tempPackageIndex
=
index
;
this
.
tempPackageIndex
=
index
;
let
hStartStr
=
this
.
packageMode
[
this
.
tempPackageIndex
].
packaStartPeriod
let
hStartStr
=
this
.
packageMode
[
this
.
tempPackageIndex
].
packaStartPeriod
let
startStr
=
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
Number
(
hStartStr
)
>=
10
?
hStartStr
:
'0'
+
hStartStr
}
:00:00`
let
startStr
=
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
Number
(
hStartStr
)
>=
10
?
hStartStr
:
'0'
+
hStartStr
}
:00:00`
let
startDate
=
moment
(
moment
().
format
(
startStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
let
startDate
=
moment
(
moment
().
format
(
startStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
let
hEndtStr
=
this
.
packageMode
[
this
.
tempPackageIndex
].
packaEndPeriod
let
hEndtStr
=
this
.
packageMode
[
this
.
tempPackageIndex
].
packaEndPeriod
let
endStr
=
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
Number
(
hEndtStr
)
>=
10
?
hEndtStr
:
'0'
+
hEndtStr
}
:00:00`
let
endStr
=
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
Number
(
hEndtStr
)
>=
10
?
hEndtStr
:
'0'
+
hEndtStr
}
:00:00`
let
endDate
=
moment
(
moment
().
format
(
endStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
let
endDate
=
moment
(
moment
().
format
(
endStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
// 如果此套餐的结束时间在11点前,则为通宵套餐,会在当天及明天进行找合适的时间段,否则则没有合适的套餐时段
// 如果此套餐的结束时间在11点前,则为通宵套餐,会在当天及明天进行找合适的时间段,否则则没有合适的套餐时段
let
pointDateForm
=
moment
(
this
.
dateList
[
this
.
dateIndex
].
readDate
).
format
(
"YYYY-MM-DD 11:00:00"
);
let
pointDateForm
=
moment
(
this
.
dateList
[
this
.
dateIndex
].
readDate
).
format
(
"YYYY-MM-DD 11:00:00"
);
let
dateTimeObj
=
{};
let
dateTimeObj
=
{};
if
(
moment
(
endDate
).
valueOf
()
<
moment
(
pointDateForm
).
valueOf
())
{
if
(
moment
(
endDate
).
valueOf
()
<
moment
(
pointDateForm
).
valueOf
())
{
// 如果是续单
// 如果是续单
if
(
this
.
orderType
==
2
)
{
if
(
this
.
orderType
==
2
)
{
let
orderEndDate
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
)
let
orderEndDate
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
)
if
(
this
.
orderInfo
.
status
==
1
)
{
if
(
this
.
orderInfo
.
status
==
1
)
{
orderEndDate
=
this
.
orderInfo
.
endDate
orderEndDate
=
this
.
orderInfo
.
endDate
}
}
startDate
=
moment
(
orderEndDate
).
format
(
`YYYY-MM-DD 0
${
this
.
packageMode
[
this
.
tempPackageIndex
].
packaStartPeriod
}
:00:00`
);
startDate
=
moment
(
orderEndDate
).
format
(
endDate
=
moment
(
orderEndDate
).
format
(
`YYYY-MM-DD 0
${
this
.
packageMode
[
this
.
tempPackageIndex
].
packaEndPeriod
}
:00:00`
);
`YYYY-MM-DD 0
${
this
.
packageMode
[
this
.
tempPackageIndex
].
packaStartPeriod
}
:00:00`
);
endDate
=
moment
(
orderEndDate
).
format
(
`YYYY-MM-DD 0
${
this
.
packageMode
[
this
.
tempPackageIndex
].
packaEndPeriod
}
:00:00`
);
// 续夜宵套餐时的开始时间必须在设定的开始和结束时间内
// 续夜宵套餐时的开始时间必须在设定的开始和结束时间内
let
b1
=
moment
(
orderEndDate
).
valueOf
()
>=
moment
(
startDate
).
valueOf
()
&&
moment
(
orderEndDate
).
valueOf
()
<=
moment
(
endDate
).
valueOf
();
let
b1
=
moment
(
orderEndDate
).
valueOf
()
>=
moment
(
startDate
).
valueOf
()
&&
moment
(
orderEndDate
)
.
valueOf
()
<=
moment
(
endDate
).
valueOf
();
if
(
b1
){
if
(
b1
)
{
if
(
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
()
>=
3
*
60
*
60
*
1000
&&
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
()
<
4
*
60
*
60
*
1000
){
if
(
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
()
>=
3
*
60
*
60
*
1000
&&
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
()
<
4
*
60
*
60
*
1000
)
{
this
.
tempDateObj
=
{
this
.
tempDateObj
=
{
startDate
:
orderEndDate
,
startDate
:
orderEndDate
,
endDate
:
endDate
,
endDate
:
endDate
,
duration
:
(
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
())
/
60000
,
duration
:
(
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
())
/
60000
,
durationType
:
2
durationType
:
2
}
}
this
.
warnTip
=
'通宵套餐,不足4小时,是否预定?'
this
.
warnTip
=
'通宵套餐,不足4小时,是否预定?'
this
.
$refs
.
popupDialog
.
open
();
this
.
$refs
.
popupDialog
.
open
();
return
return
}
else
if
(
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
()
>
4
*
60
*
60
*
1000
)
{
}
else
if
(
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
()
>
4
*
60
*
60
*
1000
)
{
this
.
modeIndex
=
-
1
this
.
modeIndex
=
-
1
this
.
modeIndex2
=
index
this
.
modeIndex2
=
index
let
duration
=
(
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
())
/
1000
/
60
;
let
duration
=
(
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
())
/
1000
/
60
;
this
.
formatAllData
=
this
.
onTransiteForDate
({
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
orderEndDate
,
startDateTime
:
orderEndDate
,
endDateTime
:
endDate
,
endDateTime
:
endDate
,
duration
:
(
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
())
/
60000
,
duration
:
(
moment
(
endDate
).
valueOf
()
-
moment
(
orderEndDate
).
valueOf
())
/
60000
,
durationType
:
2
durationType
:
2
});
});
}
else
{
}
else
{
}
}
}
}
}
else
{
}
else
{
//否则是订单
//否则是订单
// 通宵套餐
// 通宵套餐
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
// 原时间
// 原时间
let
originTime
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
()
let
originTime
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
()
// 实际时间
// 实际时间
let
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
()
let
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
)
// 原时长是9个小时,减去4个小时, 低于5个小时,则时长不足
.
valueOf
()
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
)){
// 原时长是9个小时,减去4个小时, 低于5个小时,则时长不足
// 实际时长小于原时长的60%则选择明天的时间
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
))
{
// 加一天时间重新计算
// 实际时长小于原时长的60%则选择明天的时间
if
(
this
.
dateIndex
!=
0
){
// 加一天时间重新计算
uni
.
showToast
({
if
(
this
.
dateIndex
!=
0
)
{
icon
:
"none"
,
uni
.
showToast
({
title
:
'可使用时长不足,请选择其他日期'
icon
:
"none"
,
})
title
:
'可使用时长不足,请选择其他日期'
}
else
{
})
startDate
=
moment
(
startDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
);
}
else
{
endDate
=
moment
(
endDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
);
startDate
=
moment
(
startDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
);
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
endDate
=
moment
(
endDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
);
// 实际时间
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
()
// 实际时间
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
)
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
)){
.
valueOf
()
uni
.
showToast
({
icon
:
"none"
,
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
title
:
'可使用时长不足,请选择其他日期'
4
))
{
})
uni
.
showToast
({
return
icon
:
"none"
,
}
else
if
(
actualTime
<
originTime
-
3
*
60
*
60
*
1000
&&
actualTime
>=
originTime
-
4
*
60
*
60
*
1000
){
title
:
'可使用时长不足,请选择其他日期'
})
this
.
tempDateObj
=
{
return
startDate
:
dateTimeObj
.
tempStartDate
,
}
else
if
(
actualTime
<
originTime
-
3
*
60
*
60
*
1000
&&
actualTime
>=
originTime
-
4
*
endDate
:
dateTimeObj
.
tempEndDate
,
60
*
60
*
1000
)
{
duration
:
actualTime
/
60000
,
durationType
:
2
this
.
tempDateObj
=
{
startDate
:
dateTimeObj
.
tempStartDate
,
endDate
:
dateTimeObj
.
tempEndDate
,
duration
:
actualTime
/
60000
,
durationType
:
2
}
this
.
warnTip
=
'通宵套餐,不足4小时,是否预定?'
this
.
$refs
.
popupDialog
.
open
();
return
}
else
{
this
.
modeIndex
=
-
1
this
.
modeIndex2
=
index
let
duration
=
(
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
())
/
1000
/
60
;
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
dateTimeObj
.
tempStartDate
,
endDateTime
:
dateTimeObj
.
tempEndDate
,
duration
,
durationType
:
2
});
}
}
this
.
warnTip
=
'通宵套餐,不足4小时,是否预定?'
this
.
$refs
.
popupDialog
.
open
();
return
}
else
{
this
.
modeIndex
=
-
1
this
.
modeIndex2
=
index
let
duration
=
(
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
())
/
1000
/
60
;
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
dateTimeObj
.
tempStartDate
,
endDateTime
:
dateTimeObj
.
tempEndDate
,
duration
,
durationType
:
2
});
}
}
}
else
if
(
actualTime
<
originTime
-
3
*
60
*
60
*
1000
&&
actualTime
>=
originTime
-
4
*
60
*
60
*
1000
)
{
this
.
tempDateObj
=
{
startDate
:
dateTimeObj
.
tempStartDate
,
endDate
:
dateTimeObj
.
tempEndDate
,
duration
:
actualTime
/
60000
,
durationType
:
2
}
this
.
warnTip
=
'通宵套餐,不足4小时,是否预定?'
this
.
$refs
.
popupDialog
.
open
();
return
}
else
{
this
.
modeIndex
=
-
1
this
.
modeIndex2
=
index
let
duration
=
(
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
)
.
valueOf
())
/
1000
/
60
;
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
dateTimeObj
.
tempStartDate
,
endDateTime
:
dateTimeObj
.
tempEndDate
,
duration
,
durationType
:
2
});
}
}
}
else
if
(
actualTime
<
originTime
-
3
*
60
*
60
*
1000
&&
actualTime
>=
originTime
-
4
*
60
*
60
*
1000
){
this
.
tempDateObj
=
{
startDate
:
dateTimeObj
.
tempStartDate
,
endDate
:
dateTimeObj
.
tempEndDate
,
duration
:
actualTime
/
60000
,
durationType
:
2
}
this
.
warnTip
=
'通宵套餐,不足4小时,是否预定?'
this
.
$refs
.
popupDialog
.
open
();
return
}
else
{
this
.
modeIndex
=
-
1
this
.
modeIndex2
=
index
let
duration
=
(
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
())
/
1000
/
60
;
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
dateTimeObj
.
tempStartDate
,
endDateTime
:
dateTimeObj
.
tempEndDate
,
duration
,
durationType
:
2
});
}
}
}
}
else
{
}
else
{
// 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐
// 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
// 原时间
// 原时间
let
originTime
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
()
let
originTime
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
()
// 实际时间
// 实际时间
let
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
()
let
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
)
if
(
actualTime
<
originTime
*
0.6
||
this
.
onCheckPackUse
(
startDate
,
endDate
)){
.
valueOf
()
if
(
actualTime
<
originTime
*
0.6
||
this
.
onCheckPackUse
(
startDate
,
endDate
))
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
title
:
'可使用时长不足,请选择其他日期'
title
:
'可使用时长不足,请选择其他日期'
})
})
return
return
}
else
if
(
actualTime
<
originTime
*
0.8
&&
actualTime
>=
originTime
*
0.6
)
{
}
else
if
(
actualTime
<
originTime
*
0.8
&&
actualTime
>=
originTime
*
0.6
)
{
this
.
tempDateObj
=
{
this
.
tempDateObj
=
{
startDate
:
dateTimeObj
.
tempStartDate
,
startDate
:
dateTimeObj
.
tempStartDate
,
endDate
:
dateTimeObj
.
tempEndDate
,
endDate
:
dateTimeObj
.
tempEndDate
,
duration
:
actualTime
/
60000
,
duration
:
actualTime
/
60000
,
durationType
:
2
durationType
:
2
}
}
this
.
warnTip
=
'闲时套餐,不足4小时,是否预定?'
this
.
warnTip
=
'闲时套餐,不足4小时,是否预定?'
this
.
$refs
.
popupDialog
.
open
();
this
.
$refs
.
popupDialog
.
open
();
return
return
}
else
{
}
else
{
this
.
modeIndex
=
-
1
this
.
modeIndex
=
-
1
this
.
modeIndex2
=
index
this
.
modeIndex2
=
index
let
duration
=
(
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
())
/
1000
/
60
;
let
duration
=
(
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
)
.
valueOf
())
/
1000
/
60
;
this
.
formatAllData
=
this
.
onTransiteForDate
({
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
dateTimeObj
.
tempStartDate
,
startDateTime
:
dateTimeObj
.
tempStartDate
,
endDateTime
:
dateTimeObj
.
tempEndDate
,
endDateTime
:
dateTimeObj
.
tempEndDate
,
duration
,
duration
,
durationType
:
2
durationType
:
2
});
});
}
}
}
}
},
},
// 通过指定时间在当前时间段内查询合适的时间段
// 通过指定时间在当前时间段内查询合适的时间段
onComputeStartDateAndEndDate
(
startDate
,
endDate
)
{
onComputeStartDateAndEndDate
(
startDate
,
endDate
)
{
//重新设置开始时间和结束时间
//重新设置开始时间和结束时间
let
tempStartDate
=
''
;
let
tempStartDate
=
''
;
let
tempEndDate
=
''
;
let
tempEndDate
=
''
;
let
startNeedChange
=
true
;
let
startNeedChange
=
true
;
let
endNeedChange
=
true
;
let
endNeedChange
=
true
;
this
.
dateIntervalList
.
forEach
(
item
=>
{
this
.
dateIntervalList
.
forEach
(
item
=>
{
// 检查时段在开始时间和结束时间内
// 检查时段在开始时间和结束时间内
let
start
=
moment
(
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)).
valueOf
()
let
start
=
moment
(
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)).
valueOf
()
let
end
=
moment
(
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:59:59"
)).
valueOf
()
let
end
=
moment
(
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:59:59"
)).
valueOf
()
if
(
start
<
moment
(
endDate
).
valueOf
()
&&
start
>=
moment
(
startDate
).
valueOf
())
{
if
(
start
<
moment
(
endDate
).
valueOf
()
&&
start
>=
moment
(
startDate
).
valueOf
())
{
if
(
tempStartDate
&&
!
startNeedChange
)
{
if
(
tempStartDate
&&
!
startNeedChange
)
{
if
(
item
.
status
==
0
&&
endNeedChange
)
{
if
(
item
.
status
==
0
&&
endNeedChange
)
{
endNeedChange
=
true
;
endNeedChange
=
true
;
tempEndDate
=
moment
(
item
.
timeHour
+
':59:00'
).
add
(
1
,
"m"
).
format
(
"YYYY-MM-DD HH:mm:00"
)
tempEndDate
=
moment
(
item
.
timeHour
+
':59:00'
).
add
(
1
,
"m"
).
format
(
}
else
if
(
item
.
status
==
1
&&
endNeedChange
){
"YYYY-MM-DD HH:mm:00"
)
}
else
if
(
item
.
status
==
1
&&
endNeedChange
)
{
endNeedChange
=
false
;
endNeedChange
=
false
;
tempEndDate
=
moment
(
item
.
startHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)
tempEndDate
=
moment
(
item
.
startHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)
}
}
}
else
{
}
else
{
if
(
item
.
status
==
0
&&
startNeedChange
)
{
if
(
item
.
status
==
0
&&
startNeedChange
)
{
tempStartDate
=
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)
tempStartDate
=
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)
startNeedChange
=
false
;
startNeedChange
=
false
;
}
else
if
(
item
.
status
==
1
&&
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)
&&
startNeedChange
){
}
else
if
(
item
.
status
==
1
&&
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)
&&
startNeedChange
)
{
startNeedChange
=
true
;
startNeedChange
=
true
;
tempStartDate
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)).
format
(
"YYYY-MM-DD HH:mm:00"
)
tempStartDate
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
))
tempEndDate
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
.
format
(
"YYYY-MM-DD HH:mm:00"
)
}
else
if
(
item
.
status
==
1
&&
!
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)
&&
startNeedChange
){
tempEndDate
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
}
else
if
(
item
.
status
==
1
&&
!
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)
&&
startNeedChange
)
{
startNeedChange
=
false
;
startNeedChange
=
false
;
let
tempStart
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)).
format
(
"YYYY-MM-DD HH:mm:00"
)
let
tempStart
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
))
tempStartDate
=
this
.
orderType
==
1
?
moment
(
tempStart
).
add
(
1
,
'm'
)
:
tempStart
.
format
(
"YYYY-MM-DD HH:mm:00"
)
tempStartDate
=
this
.
orderType
==
1
?
moment
(
tempStart
).
add
(
1
,
'm'
)
:
tempStart
}
}
}
}
}
}
...
@@ -1080,80 +1191,84 @@
...
@@ -1080,80 +1191,84 @@
}
}
},
},
// 通过指定时长在当前时间段内查询合适的时间段
// 通过指定时长在当前时间段内查询合适的时间段
onComputeByDuration
(
duration
,
durationType
=
1
)
{
onComputeByDuration
(
duration
,
durationType
=
1
)
{
//重新设置开始时间和结束时间
//重新设置开始时间和结束时间
let
m
=
Number
(
duration
)
*
60
;
let
m
=
Number
(
duration
)
*
60
;
if
(
durationType
===
2
)
{
if
(
durationType
===
2
)
{
m
=
Number
(
duration
)
m
=
Number
(
duration
)
}
}
// 把时长计算成毫秒数
// 把时长计算成毫秒数
let
timeStampLong
=
m
*
60
*
1000
;
let
timeStampLong
=
m
*
60
*
1000
;
let
tempStartDate
=
''
;
let
tempStartDate
=
''
;
let
tempEndDate
=
''
;
let
tempEndDate
=
''
;
let
startNeedChange
=
true
;
let
startNeedChange
=
true
;
let
endNeedChange
=
true
;
let
endNeedChange
=
true
;
this
.
dateIntervalList
.
forEach
((
item
,
k
)
=>
{
this
.
dateIntervalList
.
forEach
((
item
,
k
)
=>
{
if
(
k
<
24
){
if
(
k
<
24
)
{
if
(
item
.
status
==
1
&&
startNeedChange
&&
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)){
if
(
item
.
status
==
1
&&
startNeedChange
&&
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
tempStartDate
=
moment
(
item
.
endHoldTime
).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
.
endHoldTime
))
{
tempStartDate
=
moment
(
item
.
endHoldTime
).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
startNeedChange
=
true
startNeedChange
=
true
endNeedChange
=
true
;
endNeedChange
=
true
;
}
}
if
(
item
.
status
==
1
&&
startNeedChange
&&
!
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)){
if
(
item
.
status
==
1
&&
startNeedChange
&&
!
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
tempStartDate
=
moment
(
item
.
endHoldTime
).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
.
endHoldTime
))
{
tempStartDate
=
moment
(
item
.
endHoldTime
).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
startNeedChange
=
false
startNeedChange
=
false
endNeedChange
=
true
;
endNeedChange
=
true
;
}
}
if
(
item
.
status
==
0
&&
startNeedChange
)
{
if
(
item
.
status
==
0
&&
startNeedChange
)
{
tempStartDate
=
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)
tempStartDate
=
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)
startNeedChange
=
false
startNeedChange
=
false
endNeedChange
=
true
;
endNeedChange
=
true
;
}
}
}
}
if
(
item
.
status
==
1
&&
endNeedChange
&&
tempStartDate
){
if
(
item
.
status
==
1
&&
endNeedChange
&&
tempStartDate
)
{
let
endDate
=
moment
(
item
.
startHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)
let
endDate
=
moment
(
item
.
startHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)
if
(
moment
(
endDate
).
valueOf
()
>=
moment
(
tempStartDate
).
valueOf
()){
if
(
moment
(
endDate
).
valueOf
()
>=
moment
(
tempStartDate
).
valueOf
())
{
tempEndDate
=
endDate
tempEndDate
=
endDate
if
(
moment
(
tempEndDate
).
valueOf
()
-
moment
(
tempStartDate
).
valueOf
()
>=
timeStampLong
){
if
(
moment
(
tempEndDate
).
valueOf
()
-
moment
(
tempStartDate
).
valueOf
()
>=
timeStampLong
)
{
startNeedChange
=
false
;
endNeedChange
=
false
;
}
else
{
if
(
k
<
24
)
{
tempStartDate
=
moment
(
item
.
endHoldTime
).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
startNeedChange
=
true
;
}
else
{
startNeedChange
=
false
;
startNeedChange
=
false
;
endNeedChange
=
false
;
}
else
{
if
(
k
<
24
){
tempStartDate
=
moment
(
item
.
endHoldTime
).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
startNeedChange
=
true
;
}
else
{
startNeedChange
=
false
;
}
endNeedChange
=
false
;
}
}
endNeedChange
=
false
;
}
}
}
}
else
if
(
item
.
status
==
0
&&
endNeedChange
&&
tempStartDate
){
}
else
if
(
item
.
status
==
0
&&
endNeedChange
&&
tempStartDate
)
{
let
endDate
=
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:59:00"
)
let
endDate
=
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:59:00"
)
if
(
moment
(
endDate
).
valueOf
()
-
moment
(
tempStartDate
).
valueOf
()
>=
timeStampLong
){
if
(
moment
(
endDate
).
valueOf
()
-
moment
(
tempStartDate
).
valueOf
()
>=
timeStampLong
)
{
endNeedChange
=
false
;
endNeedChange
=
false
;
tempEndDate
=
moment
(
moment
(
tempStartDate
).
valueOf
()
+
timeStampLong
).
format
(
"YYYY-MM-DD HH:mm:00"
)
tempEndDate
=
moment
(
moment
(
tempStartDate
).
valueOf
()
+
timeStampLong
).
format
(
}
else
{
"YYYY-MM-DD HH:mm:00"
)
}
else
{
endNeedChange
=
true
;
endNeedChange
=
true
;
}
}
}
}
})
})
let
params
=
{
let
params
=
{
startDateTime
:
tempStartDate
,
startDateTime
:
tempStartDate
,
endDateTime
:
tempEndDate
,
endDateTime
:
tempEndDate
,
useStatus
:
moment
(
tempEndDate
).
valueOf
()
-
moment
(
tempStartDate
).
valueOf
()
<
timeStampLong
useStatus
:
moment
(
tempEndDate
).
valueOf
()
-
moment
(
tempStartDate
).
valueOf
()
<
timeStampLong
}
}
if
(
this
.
modeIndex
==
0
&&
params
.
useStatus
)
{
if
(
this
.
modeIndex
==
0
&&
params
.
useStatus
)
{
// 当前日期,全天可用状态 true 不可用,false 还有可用时段;
// 当前日期,全天可用状态 true 不可用,false 还有可用时段;
this
.
allDayUseStatus
=
true
;
this
.
allDayUseStatus
=
true
;
this
.
tipErrMsg
=
"当前日期,空闲时间不足,请选择其他日期"
this
.
tipErrMsg
=
"当前日期,空闲时间不足,请选择其他日期"
...
@@ -1219,30 +1334,30 @@
...
@@ -1219,30 +1334,30 @@
onGetOrderInfo
()
{
onGetOrderInfo
()
{
getOrderInfoByNo
(
this
.
preOrderNo
).
then
(
res
=>
{
getOrderInfoByNo
(
this
.
preOrderNo
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
orderInfo
=
res
.
data
.
data
;
this
.
orderInfo
=
res
.
data
.
data
;
this
.
id
=
this
.
orderInfo
.
roomId
;
this
.
id
=
this
.
orderInfo
.
roomId
;
this
.
onLoading
();
this
.
onLoading
();
}
}
})
})
},
},
onGetStoreActivity
(){
onGetStoreActivity
()
{
getStoreActivity
({
getStoreActivity
({
storeId
:
this
.
id
storeId
:
this
.
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
let
obj
=
res
.
data
.
data
||
{}
let
obj
=
res
.
data
.
data
||
{}
for
(
let
key
in
obj
)
{
for
(
let
key
in
obj
)
{
let
key2
=
moment
(
key
).
format
(
"YYYY-MM-DD"
)
let
key2
=
moment
(
key
).
format
(
"YYYY-MM-DD"
)
if
(
obj
[
key
]
&&
obj
[
key
].
length
)
{
if
(
obj
[
key
]
&&
obj
[
key
].
length
)
{
this
.
activityDate
[
key2
]
=
{
this
.
activityDate
[
key2
]
=
{
labelIds
:
obj
[
key
].
filter
(
item
=>
item
.
labelId
).
map
(
val
=>
val
.
labelId
),
labelIds
:
obj
[
key
].
filter
(
item
=>
item
.
labelId
).
map
(
val
=>
val
.
labelId
),
packIds
:
obj
[
key
].
filter
(
item
=>
item
.
packId
).
map
(
val
=>
val
.
packId
),
packIds
:
obj
[
key
].
filter
(
item
=>
item
.
packId
).
map
(
val
=>
val
.
packId
),
}
}
}
else
{
}
else
{
this
.
activityDate
[
key2
]
=
false
this
.
activityDate
[
key2
]
=
false
}
}
}
}
}
}
})
})
...
@@ -1268,7 +1383,7 @@
...
@@ -1268,7 +1383,7 @@
this
.
packageMode
=
[];
this
.
packageMode
=
[];
this
.
packList
=
this
.
roomInfo
.
packList
;
this
.
packList
=
this
.
roomInfo
.
packList
;
// this.modeIndex = 0;
// this.modeIndex = 0;
}
}
if
(
this
.
roomInfo
.
roomLabelList
&&
this
.
roomInfo
.
roomLabelList
.
length
)
{
if
(
this
.
roomInfo
.
roomLabelList
&&
this
.
roomInfo
.
roomLabelList
.
length
)
{
this
.
roomLabelList
=
this
.
roomInfo
.
roomLabelList
this
.
roomLabelList
=
this
.
roomInfo
.
roomLabelList
}
}
...
@@ -1285,13 +1400,13 @@
...
@@ -1285,13 +1400,13 @@
roomId
:
this
.
roomInfo
.
id
,
roomId
:
this
.
roomInfo
.
id
,
day
:
this
.
dateList
[
this
.
dateIndex
].
readDate
,
day
:
this
.
dateList
[
this
.
dateIndex
].
readDate
,
orderType
:
this
.
orderType
,
orderType
:
this
.
orderType
,
orderId
:
this
.
orderType
==
2
?
this
.
orderInfo
.
id
:
""
orderId
:
this
.
orderType
==
2
?
this
.
orderInfo
.
id
:
""
}).
then
(
res
=>
{
}).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
this
.
dateIntervalList
=
res
.
data
.
data
.
map
((
item
,
index
)
=>
{
this
.
dateIntervalList
=
res
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
status
=
item
.
status
;
let
status
=
item
.
status
;
if
(
status
==
1
)
{
if
(
status
==
1
)
{
if
(
!
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
))
{
if
(
!
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
))
{
status
=
0
status
=
0
}
}
}
}
...
@@ -1301,18 +1416,18 @@
...
@@ -1301,18 +1416,18 @@
hour
:
index
hour
:
index
}
}
})
})
this
.
packageMode
=
this
.
packList
.
map
(
item
=>
{
this
.
packageMode
=
this
.
packList
.
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
show
:
this
.
onCheckPackageUse
(
item
)
show
:
this
.
onCheckPackageUse
(
item
)
}
}
})
})
let
startDateTime
=
''
let
startDateTime
=
''
if
(
this
.
orderType
==
2
)
{
if
(
this
.
orderType
==
2
)
{
startDateTime
=
this
.
orderInfo
.
endDate
startDateTime
=
this
.
orderInfo
.
endDate
if
(
this
.
orderInfo
.
status
==
2
)
{
if
(
this
.
orderInfo
.
status
==
2
)
{
startDateTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)
startDateTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)
}
}
}
}
...
@@ -1331,26 +1446,30 @@
...
@@ -1331,26 +1446,30 @@
preStartDate
:
p
!=
null
?
p
.
startDateTime
:
this
.
formatAllData
.
startDateTime
,
preStartDate
:
p
!=
null
?
p
.
startDateTime
:
this
.
formatAllData
.
startDateTime
,
preEndDate
:
p
!=
null
?
p
.
endDateTime
:
this
.
formatAllData
.
endDateTime
,
preEndDate
:
p
!=
null
?
p
.
endDateTime
:
this
.
formatAllData
.
endDateTime
,
orderType
:
this
.
orderType
,
orderType
:
this
.
orderType
,
orderMode
:
this
.
modeIndex2
>=
0
||
(
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
)?
1
:
0
,
orderMode
:
this
.
modeIndex2
>=
0
||
(
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
packageId
:
this
.
modeIndex2
>=
0
?
this
.
packageMode
[
this
.
modeIndex2
].
id
:
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
?
this
.
roomLabelList
[
this
.
modeIndex
].
packId
:
''
,
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
)
?
1
:
0
,
packageId
:
this
.
modeIndex2
>=
0
?
this
.
packageMode
[
this
.
modeIndex2
].
id
:
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
?
this
.
roomLabelList
[
this
.
modeIndex
].
packId
:
''
,
roomLabelId
:
this
.
modeIndex
>=
0
?
this
.
roomLabelList
[
this
.
modeIndex
].
id
:
''
roomLabelId
:
this
.
modeIndex
>=
0
?
this
.
roomLabelList
[
this
.
modeIndex
].
id
:
''
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
couponExpireTip
=
false
;
this
.
couponExpireTip
=
false
;
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
;
this
.
useCouponList
=
res
.
data
.
data
;
let
i
=
this
.
useCouponList
.
findIndex
(
item
=>
{
let
i
=
this
.
useCouponList
.
findIndex
(
item
=>
{
if
(
item
.
isAvailable
===
0
){
if
(
item
.
isAvailable
===
0
)
{
if
(
moment
(
item
.
endDate
).
valueOf
()
-
moment
().
valueOf
()
<
7
*
24
*
3600
*
1000
){
if
(
moment
(
item
.
endDate
).
valueOf
()
-
moment
().
valueOf
()
<
7
*
24
*
3600
*
1000
)
{
this
.
couponExpireTip
=
true
this
.
couponExpireTip
=
true
}
}
}
}
return
item
.
isAvailable
===
0
return
item
.
isAvailable
===
0
})
})
this
.
selectCouponIndex
=
i
>=
0
?
i
:
-
1
;
this
.
selectCouponIndex
=
i
>=
0
?
i
:
-
1
;
}
else
{
}
else
{
this
.
selectCouponIndex
=
-
1
;
this
.
selectCouponIndex
=
-
1
;
}
}
this
.
onQueryCardUse
();
this
.
onQueryCardUse
();
...
@@ -1367,7 +1486,8 @@
...
@@ -1367,7 +1486,8 @@
events
:
{
events
:
{
getSelectData
(
data
)
{
getSelectData
(
data
)
{
if
(
data
.
couponId
&&
that
.
useCouponList
.
length
)
{
if
(
data
.
couponId
&&
that
.
useCouponList
.
length
)
{
that
.
selectCouponIndex
=
that
.
useCouponList
.
findIndex
(
item
=>
item
.
id
===
data
.
couponId
);
that
.
selectCouponIndex
=
that
.
useCouponList
.
findIndex
(
item
=>
item
.
id
===
data
.
couponId
);
that
.
radioChecked
=
''
that
.
radioChecked
=
''
}
else
{
}
else
{
that
.
selectCouponIndex
=
-
1
that
.
selectCouponIndex
=
-
1
...
@@ -1380,104 +1500,122 @@
...
@@ -1380,104 +1500,122 @@
orderType
:
that
.
orderType
,
orderType
:
that
.
orderType
,
storeId
:
that
.
roomInfo
.
storeId
,
storeId
:
that
.
roomInfo
.
storeId
,
roomId
:
that
.
roomInfo
.
id
,
roomId
:
that
.
roomInfo
.
id
,
orderMode
:
that
.
modeIndex2
>=
0
||
(
that
.
modeIndex
>=
0
&&
that
.
roomLabelList
.
length
&&
that
.
roomLabelList
[
that
.
modeIndex
].
openPack
==
1
)?
1
:
0
,
orderMode
:
that
.
modeIndex2
>=
0
||
(
that
.
modeIndex
>=
0
&&
that
.
roomLabelList
.
length
&&
that
.
roomLabelList
[
that
.
modeIndex
]
.
openPack
==
1
)
?
1
:
0
,
preStartDate
:
that
.
formatAllData
.
startDateTime
,
preStartDate
:
that
.
formatAllData
.
startDateTime
,
preEndDate
:
that
.
formatAllData
.
endDateTime
,
preEndDate
:
that
.
formatAllData
.
endDateTime
,
packageId
:
that
.
modeIndex2
>=
0
?
that
.
packageMode
[
that
.
modeIndex2
].
id
:
that
.
modeIndex
>=
0
&&
that
.
roomLabelList
.
length
&&
that
.
roomLabelList
[
that
.
modeIndex
].
openPack
==
1
?
that
.
roomLabelList
[
that
.
modeIndex
].
packId
:
''
,
packageId
:
that
.
modeIndex2
>=
0
?
that
.
packageMode
[
that
.
modeIndex2
].
id
:
roomLabelId
:
that
.
modeIndex
>=
0
?
that
.
roomLabelList
[
that
.
modeIndex
].
id
:
''
,
that
.
modeIndex
>=
0
&&
that
.
roomLabelList
.
length
&&
that
.
roomLabelList
[
selectId
:
that
.
selectCouponIndex
>=
0
&&
that
.
useCouponList
.
length
?
that
.
useCouponList
[
that
.
selectCouponIndex
].
id
:
''
that
.
modeIndex
].
openPack
==
1
?
that
.
roomLabelList
[
that
.
modeIndex
]
.
packId
:
''
,
roomLabelId
:
that
.
modeIndex
>=
0
?
that
.
roomLabelList
[
that
.
modeIndex
].
id
:
''
,
selectId
:
that
.
selectCouponIndex
>=
0
&&
that
.
useCouponList
.
length
?
that
.
useCouponList
[
that
.
selectCouponIndex
].
id
:
''
})
})
}
}
})
})
}
}
},
},
onQueryCardUse
(){
onQueryCardUse
()
{
if
(
this
.
userInfo
&&
(
this
.
userInfo
.
monthlyCardList
||
this
.
userInfo
.
secondaryCardList
))
{
if
(
this
.
userInfo
&&
(
this
.
userInfo
.
monthlyCardList
||
this
.
userInfo
.
secondaryCardList
))
{
let
params
=
{
let
params
=
{
storeId
:
this
.
roomInfo
.
storeId
,
storeId
:
this
.
roomInfo
.
storeId
,
roomId
:
this
.
roomInfo
.
id
,
roomId
:
this
.
roomInfo
.
id
,
orderType
:
this
.
orderType
,
orderType
:
this
.
orderType
,
preStartDate
:
this
.
formatAllData
.
startDateTime
,
preStartDate
:
this
.
formatAllData
.
startDateTime
,
preEndDate
:
this
.
formatAllData
.
endDateTime
,
preEndDate
:
this
.
formatAllData
.
endDateTime
,
orderMode
:
this
.
modeIndex2
>=
0
||
(
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
)?
1
:
0
,
orderMode
:
this
.
modeIndex2
>=
0
||
(
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
packId
:
this
.
modeIndex2
>=
0
?
this
.
packageMode
[
this
.
modeIndex2
].
id
:
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
?
this
.
roomLabelList
[
this
.
modeIndex
].
packId
:
''
,
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
)
?
1
:
0
,
roomLabelId
:
this
.
modeIndex
>=
0
?
this
.
roomLabelList
[
this
.
modeIndex
].
id
:
''
,
packId
:
this
.
modeIndex2
>=
0
?
this
.
packageMode
[
this
.
modeIndex2
].
id
:
this
.
modeIndex
>=
0
&&
}
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
?
this
.
roomLabelList
[
this
.
modeIndex
].
packId
:
''
,
roomLabelId
:
this
.
modeIndex
>=
0
?
this
.
roomLabelList
[
this
.
modeIndex
].
id
:
''
,
}
queryCardUse
(
params
).
then
(
res
=>
{
queryCardUse
(
params
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
consumerMonthlyCard
&&
res
.
data
.
data
.
consumerMonthlyCard
.
length
){
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
consumerMonthlyCard
&&
res
.
data
.
data
.
consumerMonthlyCard
.
length
)
{
this
.
radioChecked
=
"monthlyCard"
;
this
.
radioChecked
=
"monthlyCard"
;
this
.
selectCouponIndex
=
-
1
;
this
.
selectCouponIndex
=
-
1
;
}
else
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
consumerSecondaryCard
&&
res
.
data
.
data
.
consumerSecondaryCard
.
length
){
}
else
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
consumerSecondaryCard
&&
res
.
data
.
data
.
consumerSecondaryCard
.
length
)
{
this
.
radioChecked
=
"secondaryCard"
;
this
.
radioChecked
=
"secondaryCard"
;
this
.
selectCouponIndex
=
-
1
;
this
.
selectCouponIndex
=
-
1
;
}
else
{
}
else
{
this
.
radioChecked
=
""
this
.
radioChecked
=
""
}
}
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
consumerMonthlyCard
&&
res
.
data
.
data
.
consumerMonthlyCard
.
length
){
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
consumerMonthlyCard
&&
res
.
data
.
data
.
consumerMonthlyCard
.
length
)
{
this
.
monthlyCardList
=
res
.
data
.
data
.
consumerMonthlyCard
this
.
monthlyCardList
=
res
.
data
.
data
.
consumerMonthlyCard
}
else
{
}
else
{
this
.
monthlyCardList
=
[];
this
.
monthlyCardList
=
[];
}
}
if
(
this
.
userInfo
.
secondaryCardList
&&
res
.
data
.
data
&&
res
.
data
.
data
.
consumerSecondaryCard
&&
res
.
data
.
data
.
consumerSecondaryCard
.
length
){
if
(
this
.
userInfo
.
secondaryCardList
&&
res
.
data
.
data
&&
res
.
data
.
data
.
consumerSecondaryCard
&&
res
.
data
.
data
.
consumerSecondaryCard
.
length
)
{
this
.
secondaryCardList
=
res
.
data
.
data
.
consumerSecondaryCard
this
.
secondaryCardList
=
res
.
data
.
data
.
consumerSecondaryCard
if
(
this
.
secondaryCardList
&&
this
.
secondaryCardList
.
length
)
{
if
(
this
.
secondaryCardList
&&
this
.
secondaryCardList
.
length
)
{
this
.
secondaryCard
.
status
=
1
;
this
.
secondaryCard
.
status
=
1
;
let
num
=
0
;
let
num
=
0
;
this
.
secondaryCardList
.
forEach
(
val
=>
{
this
.
secondaryCardList
.
forEach
(
val
=>
{
num
+=
val
.
number
;
num
+=
val
.
number
;
this
.
secondaryCard
.
name
=
val
.
confName
;
this
.
secondaryCard
.
name
=
val
.
confName
;
})
})
this
.
secondaryCard
.
number
=
num
;
this
.
secondaryCard
.
number
=
num
;
}
}
}
else
{
}
else
{
this
.
secondaryCardList
=
[];
this
.
secondaryCardList
=
[];
}
}
this
.
onComputePrice
();
this
.
onComputePrice
();
}
}
})
})
}
else
{
}
else
{
this
.
onComputePrice
();
this
.
onComputePrice
();
}
}
},
},
//计算支付金额
//计算支付金额
onComputePrice
()
{
onComputePrice
()
{
let
params
=
{
let
params
=
{
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
.
selectCouponIndex
>=
0
&&
!
this
.
radioChecked
?
this
.
useCouponList
[
this
.
selectCouponIndex
].
id
:
''
,
couponId
:
this
.
useCouponList
.
length
&&
this
.
selectCouponIndex
>=
0
&&
!
this
.
radioChecked
?
this
orderType
:
this
.
orderType
,
.
useCouponList
[
this
.
selectCouponIndex
].
id
:
''
,
preStartDate
:
this
.
formatAllData
.
startDateTime
,
orderType
:
this
.
orderType
,
preEndDate
:
this
.
formatAllData
.
endDateTime
,
preStartDate
:
this
.
formatAllData
.
startDateTime
,
orderMode
:
this
.
modeIndex2
>=
0
||
(
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
)?
1
:
0
,
preEndDate
:
this
.
formatAllData
.
endDateTime
,
packId
:
this
.
modeIndex2
>=
0
?
this
.
packageMode
[
this
.
modeIndex2
].
id
:
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
?
this
.
roomLabelList
[
this
.
modeIndex
].
packId
:
''
,
orderMode
:
this
.
modeIndex2
>=
0
||
(
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
roomLabelId
:
this
.
modeIndex
>=
0
?
this
.
roomLabelList
[
this
.
modeIndex
].
id
:
''
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
)
?
1
:
0
,
}
packId
:
this
.
modeIndex2
>=
0
?
this
.
packageMode
[
this
.
modeIndex2
].
id
:
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
?
this
.
roomLabelList
[
if
(
this
.
radioChecked
==
"secondaryCard"
&&
this
.
secondaryCardList
.
length
){
this
.
modeIndex
].
packId
:
''
,
roomLabelId
:
this
.
modeIndex
>=
0
?
this
.
roomLabelList
[
this
.
modeIndex
].
id
:
''
}
if
(
this
.
radioChecked
==
"secondaryCard"
&&
this
.
secondaryCardList
.
length
)
{
params
.
secondaryCardId
=
this
.
secondaryCardList
[
0
].
id
params
.
secondaryCardId
=
this
.
secondaryCardList
[
0
].
id
}
else
if
(
this
.
radioChecked
==
"monthlyCard"
&&
this
.
monthlyCardList
.
length
)
{
}
else
if
(
this
.
radioChecked
==
"monthlyCard"
&&
this
.
monthlyCardList
.
length
)
{
params
.
monthlyCardId
=
this
.
monthlyCardList
[
0
].
id
params
.
monthlyCardId
=
this
.
monthlyCardList
[
0
].
id
}
}
computePrice
(
params
).
then
(
res
=>
{
computePrice
(
params
).
then
(
res
=>
{
// uni.hideLoading()
// uni.hideLoading()
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
let
obj
=
res
.
data
.
data
let
obj
=
res
.
data
.
data
let
discountText
=
obj
.
discount
;
let
discountText
=
obj
.
discount
;
if
(
obj
.
discount
>
0
&&
obj
.
discount
<
100
)
{
if
(
obj
.
discount
>
0
&&
obj
.
discount
<
100
)
{
discountText
=
Number
(
obj
.
discount
.
toString
().
split
(
''
).
reverse
().
join
(
''
)).
toString
();
discountText
=
Number
(
obj
.
discount
.
toString
().
split
(
''
).
reverse
().
join
(
''
)).
toString
();
if
(
discountText
.
length
==
2
)
{
if
(
discountText
.
length
==
2
)
{
discountText
=
obj
.
discount
;
discountText
=
obj
.
discount
;
}
}
}
}
...
@@ -1506,50 +1644,50 @@
...
@@ -1506,50 +1644,50 @@
},
},
// 开始选择时间
// 开始选择时间
onSelectDate
()
{
onSelectDate
()
{
if
(
this
.
orderType
==
1
&&
this
.
modeIndex
>=
0
&&
!
this
.
allDayUseStatus
)
{
if
(
this
.
orderType
==
1
&&
this
.
modeIndex
>=
0
&&
!
this
.
allDayUseStatus
)
{
this
.
hourList
=
[
this
.
hourList
=
[
"00"
,
"00"
,
"01"
,
"01"
,
"02"
,
"02"
,
"03"
,
"03"
,
"04"
,
"04"
,
"05"
,
"05"
,
"06"
,
"06"
,
"07"
,
"07"
,
"08"
,
"08"
,
"09"
,
"09"
,
"10"
,
"10"
,
"11"
,
"11"
,
"12"
,
"12"
,
"13"
,
"13"
,
"14"
,
"14"
,
"15"
,
"15"
,
"16"
,
"16"
,
"17"
,
"17"
,
"18"
,
"18"
,
"19"
,
"19"
,
"20"
,
"20"
,
"21"
,
"21"
,
"22"
,
"22"
,
"23"
"23"
];
];
if
(
this
.
dateIndex
===
0
)
{
if
(
this
.
dateIndex
===
0
)
{
let
h
=
Number
(
moment
().
format
(
"HH"
))
let
h
=
Number
(
moment
().
format
(
"HH"
))
this
.
hourList
=
this
.
hourList
.
filter
(
item
=>
Number
(
item
)
>=
Number
(
h
));
this
.
hourList
=
this
.
hourList
.
filter
(
item
=>
Number
(
item
)
>=
Number
(
h
));
}
}
this
.
checkedDateList
=
this
.
formatAllData
.
startTime
.
split
(
":"
).
map
((
item
,
index
)
=>
{
this
.
checkedDateList
=
this
.
formatAllData
.
startTime
.
split
(
":"
).
map
((
item
,
index
)
=>
{
let
n
=
0
let
n
=
0
if
(
index
==
0
)
{
if
(
index
==
0
)
{
n
=
this
.
hourList
.
findIndex
(
val
=>
Number
(
val
)
==
Number
(
item
))
n
=
this
.
hourList
.
findIndex
(
val
=>
Number
(
val
)
==
Number
(
item
))
}
else
if
(
index
==
1
&&
Number
(
item
)
%
5
==
0
)
{
}
else
if
(
index
==
1
&&
Number
(
item
)
%
5
==
0
)
{
n
=
this
.
minuteList
.
findIndex
(
val
=>
Number
(
val
)
==
Number
(
item
))
n
=
this
.
minuteList
.
findIndex
(
val
=>
Number
(
val
)
==
Number
(
item
))
}
}
return
n
return
n
})
})
this
.
$refs
.
popup
.
open
();
this
.
$refs
.
popup
.
open
();
}
}
},
},
// 切换时间
// 切换时间
...
@@ -1564,8 +1702,8 @@
...
@@ -1564,8 +1702,8 @@
this
.
formatAllData
=
this
.
onTransiteForDate
({
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
startTime
}
:00`
,
startDateTime
:
`
${
this
.
dateList
[
this
.
dateIndex
].
readDate
}
${
startTime
}
:00`
,
duration
:
this
.
roomLabelList
[
this
.
modeIndex
].
labelDuration
duration
:
this
.
roomLabelList
[
this
.
modeIndex
].
labelDuration
},
false
);
},
false
);
this
.
$forceUpdate
();
this
.
$forceUpdate
();
this
.
onHideModal
();
this
.
onHideModal
();
},
},
...
@@ -1598,18 +1736,24 @@
...
@@ -1598,18 +1736,24 @@
this
.
submitBtnStatus
=
false
this
.
submitBtnStatus
=
false
},
},
onOrderConfirmBefore
()
{
onOrderConfirmBefore
()
{
if
(
this
.
formatAllData
.
useStatus
)
{
if
(
this
.
formatAllData
.
useStatus
)
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
title
:
"所选时段有被占用,请选择其他空闲时段"
title
:
"所选时段有被占用,请选择其他空闲时段"
})
})
return
;
return
;
}
}
if
(
this
.
submitBtnStatus
)
return
if
(
this
.
submitBtnStatus
)
return
this
.
submitBtnStatus
=
true
;
this
.
submitBtnStatus
=
true
;
if
(
this
.
orderType
===
1
&&
!
uni
.
getStorageSync
(
'rechargeTip'
))
{
this
.
$refs
.
popupRecharge
.
open
();
return
}
wx
.
requestSubscribeMessage
({
wx
.
requestSubscribeMessage
({
tmplIds
:
[
tmplIds
:
[
'UkvsRnZkZB_w3MqXPbRhi4jEk8ML4N9PWT3rnd3Bhxg'
,
'UkvsRnZkZB_w3MqXPbRhi4jEk8ML4N9PWT3rnd3Bhxg'
,
...
@@ -1622,6 +1766,21 @@
...
@@ -1622,6 +1766,21 @@
}
}
})
})
},
},
onNavToCreateOrder
(){
this
.
$refs
.
popupRecharge
.
close
();
uni
.
setStorageSync
(
'rechargeTip'
,
true
)
wx
.
requestSubscribeMessage
({
tmplIds
:
[
'UkvsRnZkZB_w3MqXPbRhi4jEk8ML4N9PWT3rnd3Bhxg'
,
],
success
:
(
res
)
=>
{
},
complete
:
(
res
)
=>
{
this
.
onOrderConfirm
();
}
})
},
onOrderConfirm
()
{
onOrderConfirm
()
{
if
(
this
.
roomInfo
.
roomStat
>=
3
)
{
if
(
this
.
roomInfo
.
roomStat
>=
3
)
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -1641,7 +1800,7 @@
...
@@ -1641,7 +1800,7 @@
let
nowDate
=
moment
().
valueOf
();
let
nowDate
=
moment
().
valueOf
();
let
setDate
=
moment
(
this
.
formatAllData
.
startDateTime
).
valueOf
();
let
setDate
=
moment
(
this
.
formatAllData
.
startDateTime
).
valueOf
();
// 如果当前时间大于开始时间,则不允许下单
// 如果当前时间大于开始时间,则不允许下单
if
(
this
.
orderType
==
1
&&
nowDate
>
setDate
)
{
if
(
this
.
orderType
==
1
&&
nowDate
>
setDate
)
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
title
:
"当前时间晚于预约开始时间,请重新选择预约时间"
title
:
"当前时间晚于预约开始时间,请重新选择预约时间"
...
@@ -1658,7 +1817,7 @@
...
@@ -1658,7 +1817,7 @@
this
.
submitBtnStatus
=
false
;
this
.
submitBtnStatus
=
false
;
return
return
}
}
this
.
orderDateDes
=
moment
(
this
.
formatAllData
.
startDateTime
).
format
(
"YYYY年MM月DD日"
)
this
.
orderDateDes
=
moment
(
this
.
formatAllData
.
startDateTime
).
format
(
"YYYY年MM月DD日"
)
this
.
orderWeekDes
=
moment
(
this
.
formatAllData
.
startDateTime
).
days
();
this
.
orderWeekDes
=
moment
(
this
.
formatAllData
.
startDateTime
).
days
();
this
.
$refs
.
confirmPop
.
open
();
this
.
$refs
.
confirmPop
.
open
();
...
@@ -1690,18 +1849,23 @@
...
@@ -1690,18 +1849,23 @@
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
.
selectCouponIndex
>=
0
?
this
.
useCouponList
[
this
.
selectCouponIndex
].
id
:
''
,
couponId
:
this
.
useCouponList
.
length
&&
this
.
selectCouponIndex
>=
0
?
this
.
useCouponList
[
this
.
selectCouponIndex
].
id
:
''
,
preStartDate
:
this
.
formatAllData
.
startDateTime
,
preStartDate
:
this
.
formatAllData
.
startDateTime
,
preEndDate
:
this
.
formatAllData
.
endDateTime
,
preEndDate
:
this
.
formatAllData
.
endDateTime
,
totalFee
:
this
.
computePriceInfo
.
totalFee
||
0
,
totalFee
:
this
.
computePriceInfo
.
totalFee
||
0
,
payFee
:
this
.
computePriceInfo
.
payFee
||
0
,
payFee
:
this
.
computePriceInfo
.
payFee
||
0
,
packId
:
this
.
modeIndex2
>=
0
?
this
.
packageMode
[
this
.
modeIndex2
].
id
:
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
?
this
.
roomLabelList
[
this
.
modeIndex
].
packId
:
''
,
packId
:
this
.
modeIndex2
>=
0
?
this
.
packageMode
[
this
.
modeIndex2
].
id
:
this
.
modeIndex
>=
0
&&
this
.
roomLabelList
.
length
&&
this
.
roomLabelList
[
this
.
modeIndex
].
openPack
==
1
?
this
.
roomLabelList
[
this
.
modeIndex
].
packId
:
''
,
roomLabelId
:
this
.
modeIndex
>=
0
?
this
.
roomLabelList
[
this
.
modeIndex
].
id
:
''
,
roomLabelId
:
this
.
modeIndex
>=
0
?
this
.
roomLabelList
[
this
.
modeIndex
].
id
:
''
,
discountRatio
:
this
.
computePriceInfo
.
discountRatio
,
discountRatio
:
this
.
computePriceInfo
.
discountRatio
,
balance
:
this
.
computePriceInfo
.
balance
,
balance
:
this
.
computePriceInfo
.
balance
,
duration
:
this
.
computePriceInfo
.
duration
,
duration
:
this
.
computePriceInfo
.
duration
,
secondaryCardId
:
this
.
userInfo
&&
this
.
userInfo
.
secondaryCardList
&&
this
.
secondaryCardList
.
length
&&
this
.
radioChecked
===
'secondaryCard'
?
this
.
secondaryCardList
[
0
].
id
:
''
,
secondaryCardId
:
this
.
userInfo
&&
this
.
userInfo
.
secondaryCardList
&&
this
.
secondaryCardList
monthlyCardId
:
this
.
userInfo
&&
this
.
userInfo
.
monthlyCardList
&&
this
.
monthlyCardList
.
length
&&
this
.
radioChecked
===
'monthlyCard'
?
this
.
monthlyCardList
[
0
].
id
:
''
.
length
&&
this
.
radioChecked
===
'secondaryCard'
?
this
.
secondaryCardList
[
0
].
id
:
''
,
monthlyCardId
:
this
.
userInfo
&&
this
.
userInfo
.
monthlyCardList
&&
this
.
monthlyCardList
.
length
&&
this
.
radioChecked
===
'monthlyCard'
?
this
.
monthlyCardList
[
0
].
id
:
''
}
}
if
(
this
.
orderType
===
2
&&
this
.
preOrderNo
)
{
if
(
this
.
orderType
===
2
&&
this
.
preOrderNo
)
{
params
.
preOrderNo
=
this
.
preOrderNo
params
.
preOrderNo
=
this
.
preOrderNo
...
@@ -1801,7 +1965,7 @@
...
@@ -1801,7 +1965,7 @@
})
})
},
},
onSelectDatePoint
(
val
,
i
)
{
onSelectDatePoint
(
val
,
i
)
{
if
(
this
.
orderType
==
2
||
this
.
modeIndex2
>=
0
||
this
.
allDayUseStatus
)
return
;
if
(
this
.
orderType
==
2
||
this
.
modeIndex2
>=
0
||
this
.
allDayUseStatus
)
return
;
if
(
i
>=
24
)
{
if
(
i
>=
24
)
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
...
@@ -1810,10 +1974,10 @@
...
@@ -1810,10 +1974,10 @@
return
return
}
}
let
startDate
=
""
;
let
startDate
=
""
;
if
(
val
.
endHoldTime
&&
this
.
onCheckHourUse
(
val
.
startHoldTime
,
val
.
endHoldTime
))
{
if
(
val
.
endHoldTime
&&
this
.
onCheckHourUse
(
val
.
startHoldTime
,
val
.
endHoldTime
))
{
startDate
=
moment
(
val
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)
startDate
=
moment
(
val
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)
}
else
if
(
val
.
endHoldTime
&&
!
this
.
onCheckHourUse
(
val
.
startHoldTime
,
val
.
endHoldTime
))
{
}
else
if
(
val
.
endHoldTime
&&
!
this
.
onCheckHourUse
(
val
.
startHoldTime
,
val
.
endHoldTime
))
{
startDate
=
moment
(
val
.
endHoldTime
).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
startDate
=
moment
(
val
.
endHoldTime
).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
}
else
{
}
else
{
startDate
=
moment
(
val
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)
startDate
=
moment
(
val
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)
}
}
...
@@ -1821,63 +1985,69 @@
...
@@ -1821,63 +1985,69 @@
this
.
formatAllData
=
this
.
onTransiteForDate
({
this
.
formatAllData
=
this
.
onTransiteForDate
({
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
list
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
)),
startDateTime
:
startDate
,
startDateTime
:
startDate
,
duration
:
this
.
formatAllData
.
duration
,
duration
:
this
.
formatAllData
.
duration
,
durationType
:
2
durationType
:
2
},
false
);
},
false
);
this
.
$forceUpdate
();
this
.
$forceUpdate
();
},
},
// 通过开始时间和时长计算时段有无占用
// 通过开始时间和时长计算时段有无占用
onUseByStartAndDuration
(
startDate
,
duration
,
durationType
=
1
)
{
onUseByStartAndDuration
(
startDate
,
duration
,
durationType
=
1
)
{
let
useStatus
=
false
;
let
useStatus
=
false
;
let
m
=
Number
(
duration
)
*
60
;
let
m
=
Number
(
duration
)
*
60
;
if
(
durationType
===
2
)
{
if
(
durationType
===
2
)
{
m
=
Number
(
duration
)
m
=
Number
(
duration
)
}
}
let
stempLong
=
m
*
60000
;
let
stempLong
=
m
*
60000
;
let
startStemp
=
moment
(
startDate
).
valueOf
();
let
startStemp
=
moment
(
startDate
).
valueOf
();
let
endStemp
=
startStemp
+
stempLong
;
let
endStemp
=
startStemp
+
stempLong
;
if
(
this
.
orderType
==
2
)
{
if
(
this
.
orderType
==
2
)
{
endStemp
=
endStemp
+
this
.
storeCleanDuration
*
60
*
1000
endStemp
=
endStemp
+
this
.
storeCleanDuration
*
60
*
1000
}
}
let
nextStatus
=
false
;
let
nextStatus
=
false
;
this
.
dateIntervalList
.
forEach
((
item
,
k
)
=>
{
this
.
dateIntervalList
.
forEach
((
item
,
k
)
=>
{
if
(
nextStatus
)
return
;
if
(
nextStatus
)
return
;
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
if
(
end
>
startStemp
&&
start
<
endStemp
)
{
if
(
end
>
startStemp
&&
start
<
endStemp
)
{
if
(
item
.
status
==
1
)
{
if
(
item
.
status
==
1
)
{
if
(
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
))
{
if
(
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
))
{
useStatus
=
true
;
useStatus
=
true
;
nextStatus
=
true
;
nextStatus
=
true
;
}
else
{
}
else
{
if
(
this
.
orderType
==
1
){
if
(
this
.
orderType
==
1
)
{
if
(
startStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()){
if
(
startStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startStemp
<
moment
(
item
.
endHoldTime
).
valueOf
())
{
useStatus
=
true
;
useStatus
=
true
;
nextStatus
=
true
;
nextStatus
=
true
;
}
else
if
(
endStemp
>
moment
(
item
.
startHoldTime
).
valueOf
()
&&
endStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
()){
}
else
if
(
endStemp
>
moment
(
item
.
startHoldTime
).
valueOf
()
&&
endStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
())
{
useStatus
=
true
;
useStatus
=
true
;
nextStatus
=
true
;
nextStatus
=
true
;
}
else
if
(
startStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
()
&&
endStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()){
}
else
if
(
startStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
()
&&
endStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
())
{
useStatus
=
true
;
useStatus
=
true
;
nextStatus
=
true
;
nextStatus
=
true
;
}
}
}
else
if
(
this
.
orderType
==
2
){
}
else
if
(
this
.
orderType
==
2
)
{
if
(
startStemp
>
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()){
if
(
startStemp
>
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startStemp
<
moment
(
useStatus
=
true
;
item
.
endHoldTime
).
valueOf
())
{
nextStatus
=
true
;
useStatus
=
true
;
}
else
if
(
startStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()
&&
endStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()){
nextStatus
=
true
;
useStatus
=
true
;
}
else
if
(
startStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()
&&
endStemp
>=
nextStatus
=
true
;
moment
(
item
.
startHoldTime
).
valueOf
())
{
}
else
if
(
endStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
&&
endStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
()){
useStatus
=
true
;
useStatus
=
true
;
nextStatus
=
true
;
nextStatus
=
true
;
}
else
if
(
endStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
&&
endStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
())
{
}
useStatus
=
true
;
nextStatus
=
true
;
}
}
}
}
}
...
@@ -1899,112 +2069,112 @@
...
@@ -1899,112 +2069,112 @@
//startTime(HH:mm): 开始时间,显示使用
//startTime(HH:mm): 开始时间,显示使用
//endTime(HH:mm): 结束时间,显示使用
//endTime(HH:mm): 结束时间,显示使用
//duration(Number): 时长,仅分钟
//duration(Number): 时长,仅分钟
onTransiteForDate
(
params
,
dayChange
=
true
)
{
onTransiteForDate
(
params
,
dayChange
=
true
)
{
// 计算出时长,使用分钟计算
// 计算出时长,使用分钟计算
if
(
!
params
.
duration
)
{
if
(
!
params
.
duration
)
{
return
{
return
{
errMsg
:
"选择时长错误"
errMsg
:
"选择时长错误"
}
}
}
}
let
m
=
Number
(
params
.
duration
)
*
60
;
let
m
=
Number
(
params
.
duration
)
*
60
;
if
(
params
.
durationType
===
2
)
{
if
(
params
.
durationType
===
2
)
{
m
=
Number
(
params
.
duration
)
m
=
Number
(
params
.
duration
)
}
}
let
startStamp
=
moment
().
valueOf
();
let
startStamp
=
moment
().
valueOf
();
let
endStamp
=
moment
().
valueOf
()
+
m
*
60000
;
let
endStamp
=
moment
().
valueOf
()
+
m
*
60000
;
let
dateObj
=
{
let
dateObj
=
{
useStatus
:
false
useStatus
:
false
};
};
this
.
tipErrMsg
=
""
;
this
.
tipErrMsg
=
""
;
if
(
params
.
startDateTime
)
{
if
(
params
.
startDateTime
)
{
// 开始和结束时间的毫秒数
// 开始和结束时间的毫秒数
startStamp
=
moment
(
params
.
startDateTime
).
valueOf
();
startStamp
=
moment
(
params
.
startDateTime
).
valueOf
();
endStamp
=
startStamp
+
m
*
60000
;
endStamp
=
startStamp
+
m
*
60000
;
dateObj
.
useStatus
=
this
.
onUseByStartAndDuration
(
params
.
startDateTime
,
m
,
2
)
dateObj
.
useStatus
=
this
.
onUseByStartAndDuration
(
params
.
startDateTime
,
m
,
2
)
}
else
if
(
params
.
duration
)
{
}
else
if
(
params
.
duration
)
{
dateObj
=
this
.
onComputeByDuration
(
m
,
2
);
dateObj
=
this
.
onComputeByDuration
(
m
,
2
);
startStamp
=
moment
(
dateObj
.
startDateTime
).
valueOf
();
startStamp
=
moment
(
dateObj
.
startDateTime
).
valueOf
();
endStamp
=
moment
(
dateObj
.
endDateTime
).
valueOf
();
endStamp
=
moment
(
dateObj
.
endDateTime
).
valueOf
();
}
}
// 获取开始时间的当前小时
// 获取开始时间的当前小时
let
list
=
params
.
list
.
map
((
item
,
index
)
=>
{
let
list
=
params
.
list
.
map
((
item
,
index
)
=>
{
let
startH
=
moment
(
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)).
valueOf
();
let
startH
=
moment
(
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:00:00"
)).
valueOf
();
let
endH
=
moment
(
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:59:59"
)).
valueOf
();
let
endH
=
moment
(
moment
(
item
.
timeHour
).
format
(
"YYYY-MM-DD HH:59:59"
)).
valueOf
();
if
(
endH
>=
startStamp
&&
endH
<
endStamp
)
{
if
(
endH
>=
startStamp
&&
endH
<
endStamp
)
{
item
.
status
=
2
item
.
status
=
2
}
}
if
(
this
.
orderType
==
2
&&
startStamp
>=
startH
&&
endStamp
<=
endH
)
{
if
(
this
.
orderType
==
2
&&
startStamp
>=
startH
&&
endStamp
<=
endH
)
{
item
.
status
=
2
item
.
status
=
2
}
}
return
item
return
item
})
})
if
(
dateObj
.
useStatus
)
{
if
(
dateObj
.
useStatus
)
{
this
.
$refs
.
popupMessage
.
open
();
this
.
$refs
.
popupMessage
.
open
();
}
}
let
paramsData
=
{
let
paramsData
=
{
list
:
dateObj
.
useStatus
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
))
:
list
,
list
:
dateObj
.
useStatus
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateIntervalList
))
:
list
,
startDateTime
:
moment
(
startStamp
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
startDateTime
:
moment
(
startStamp
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
startTime
:
moment
(
startStamp
).
format
(
"HH:mm"
),
startTime
:
moment
(
startStamp
).
format
(
"HH:mm"
),
endDateTime
:
moment
(
endStamp
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
endDateTime
:
moment
(
endStamp
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
endTime
:
moment
(
endStamp
).
format
(
"HH:mm"
),
endTime
:
moment
(
endStamp
).
format
(
"HH:mm"
),
duration
:
m
,
duration
:
m
,
useStatus
:
dateObj
.
useStatus
,
useStatus
:
dateObj
.
useStatus
,
durationType
:
2
,
durationType
:
2
,
}
}
if
(
dayChange
)
{
if
(
dayChange
)
{
// 获取用户可用优化券
// 获取用户可用优化券
this
.
onGetUseCoupon
(
paramsData
)
this
.
onGetUseCoupon
(
paramsData
)
}
}
return
paramsData
return
paramsData
},
},
onCancleTip
(){
onCancleTip
()
{
this
.
$refs
.
popupMessage
.
close
();
this
.
$refs
.
popupMessage
.
close
();
this
.
$refs
.
popupDialog
.
close
();
this
.
$refs
.
popupDialog
.
close
();
},
},
// 检查当前小时段是否被全部占用 true 完全占用 false 部分占用
// 检查当前小时段是否被全部占用 true 完全占用 false 部分占用
onCheckHourUse
(
startDate
,
endDate
)
{
onCheckHourUse
(
startDate
,
endDate
)
{
let
timeStamp
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
();
let
timeStamp
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
();
return
timeStamp
>=
3599000
return
timeStamp
>=
3599000
},
},
//检查套餐后半段60%的时间内是否有被占用,有被占用,则无法预定,d为小时
//检查套餐后半段60%的时间内是否有被占用,有被占用,则无法预定,d为小时
onCheckPackUse
(
startDate
,
endDate
,
d
=
0
)
{
onCheckPackUse
(
startDate
,
endDate
,
d
=
0
)
{
let
useStatus
=
false
;
let
useStatus
=
false
;
let
startStemp
=
moment
(
startDate
).
valueOf
();
let
startStemp
=
moment
(
startDate
).
valueOf
();
let
endStemp
=
moment
(
endDate
).
valueOf
();
let
endStemp
=
moment
(
endDate
).
valueOf
();
let
timeStamp
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
();
let
timeStamp
=
moment
(
endDate
).
valueOf
()
-
moment
(
startDate
).
valueOf
();
if
(
d
)
{
if
(
d
)
{
startStemp
=
startStemp
+
d
*
3600
*
1000
;
startStemp
=
startStemp
+
d
*
3600
*
1000
;
}
else
{
}
else
{
startStemp
=
startStemp
+
timeStamp
*
0.4
;
startStemp
=
startStemp
+
timeStamp
*
0.4
;
}
}
this
.
dateIntervalList
.
forEach
(
item
=>
{
this
.
dateIntervalList
.
forEach
(
item
=>
{
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
if
(
end
>
startStemp
&&
start
<
endStemp
)
{
if
(
end
>
startStemp
&&
start
<
endStemp
)
{
if
(
item
.
status
==
1
)
{
if
(
item
.
status
==
1
)
{
useStatus
=
true
;
useStatus
=
true
;
}
}
}
}
})
})
return
useStatus
return
useStatus
}
}
}
}
...
@@ -2197,22 +2367,26 @@
...
@@ -2197,22 +2367,26 @@
.text-first
{
.text-first
{
letter-spacing
:
4
upx
;
letter-spacing
:
4
upx
;
}
}
.relative
{
.absolute-right{
.relative
{
.absolute-right
{
position
:
absolute
;
position
:
absolute
;
top
:
-12
upx
;
top
:
-12
upx
;
right
:
-16
upx
;
right
:
-16
upx
;
image{
image
{
width
:
32
upx
;
width
:
32
upx
;
max-height
:
30
upx
;
max-height
:
30
upx
;
}
}
}
}
}
}
.absolute-right
{
.absolute-right
{
position
:
absolute
;
position
:
absolute
;
top
:
-8
upx
;
top
:
-8
upx
;
right
:
-4
upx
;
right
:
-4
upx
;
image{
image
{
width
:
38
upx
;
width
:
38
upx
;
max-height
:
34
upx
;
max-height
:
34
upx
;
}
}
...
@@ -2254,9 +2428,9 @@
...
@@ -2254,9 +2428,9 @@
margin
:
30
upx
;
margin
:
30
upx
;
}
}
.package-box
{
.package-box
{
.room-label-list{
.room-label-list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
width
:
60%
;
width
:
60%
;
...
@@ -2264,35 +2438,41 @@
...
@@ -2264,35 +2438,41 @@
margin-left
:
20
upx
;
margin-left
:
20
upx
;
border-radius
:
12
upx
;
border-radius
:
12
upx
;
padding
:
10
upx
6
upx
;
padding
:
10
upx
6
upx
;
.room-label-box{
.room-label-box
{
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
width
:
33.33%
;
width
:
33.33%
;
padding
:
10
upx
6
upx
;
padding
:
10
upx
6
upx
;
.item
{
.item
{
padding
:
8
upx
20
upx
;
padding
:
8
upx
20
upx
;
}
}
.gray
{
.gray
{
background
:
#c3c3c3
;
background
:
#c3c3c3
;
color
:
#f5f5f5
;
color
:
#f5f5f5
;
}
}
.pre-icon
{
.pre-icon
{
position
:
absolute
;
position
:
absolute
;
top
:
-8
upx
;
top
:
-8
upx
;
right
:
-10
upx
;
right
:
-10
upx
;
display
:
flex
;
display
:
flex
;
width
:
64
upx
;
width
:
64
upx
;
z-index
:
6
;
z-index
:
6
;
image{
image
{
width
:
100%
;
width
:
100%
;
max-height
:
64
upx
;
max-height
:
64
upx
;
}
}
}
}
}
}
}
}
.package-list
{
.package-list
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
height
:
100%
;
height
:
100%
;
...
@@ -2300,30 +2480,36 @@
...
@@ -2300,30 +2480,36 @@
border-radius
:
12
upx
;
border-radius
:
12
upx
;
margin-left
:
20
upx
;
margin-left
:
20
upx
;
padding
:
10
upx
6
upx
;
padding
:
10
upx
6
upx
;
.package-list-box{
.package-list-box
{
position
:
relative
;
position
:
relative
;
padding
:
10
upx
6
upx
;
padding
:
10
upx
6
upx
;
.item{
.item
{
padding
:
8
rpx
20
rpx
;
padding
:
8
rpx
20
rpx
;
}
}
.gray
{
.gray
{
background
:
#c3c3c3
;
background
:
#c3c3c3
;
color
:
#f5f5f5
;
color
:
#f5f5f5
;
}
}
.pre-icon
{
.pre-icon
{
position
:
absolute
;
position
:
absolute
;
top
:
-8
upx
;
top
:
-8
upx
;
right
:
-10
upx
;
right
:
-10
upx
;
display
:
flex
;
display
:
flex
;
width
:
64
upx
;
width
:
64
upx
;
z-index
:
6
;
z-index
:
6
;
image{
image
{
width
:
100%
;
width
:
100%
;
max-height
:
64
upx
;
max-height
:
64
upx
;
}
}
}
}
}
}
}
}
.item
{
.item
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -2333,10 +2519,11 @@
...
@@ -2333,10 +2519,11 @@
border-radius
:
12
upx
;
border-radius
:
12
upx
;
border
:
1px
solid
#CCD1DB
;
border
:
1px
solid
#CCD1DB
;
}
}
.active
{
.active
{
border
:
1px
solid
#e1419b
;
border
:
1px
solid
#e1419b
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
background
:
linear-gradient
(
to
right
,
#e03997
,
#ff375d
);
background
:
linear-gradient
(
to
right
,
#e03997
,
#ff375d
);
box-shadow
:
0
0
8
upx
#ffffff
inset
;
box-shadow
:
0
0
8
upx
#ffffff
inset
;
}
}
}
}
...
@@ -2405,13 +2592,16 @@
...
@@ -2405,13 +2592,16 @@
.line-black
::after
{
.line-black
::after
{
border-color
:
transparent
;
border-color
:
transparent
;
}
}
.line-gray
{
.line-gray
{
border
:
2px
solid
#c5c5c5
;
border
:
2px
solid
#c5c5c5
;
color
:
#c5c5c5
;
color
:
#c5c5c5
;
}
}
.line-gray
::after
{
.line-gray
::after
{
border-color
:
transparent
;
border-color
:
transparent
;
}
}
.line-pink
{
.line-pink
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -2505,21 +2695,25 @@
...
@@ -2505,21 +2695,25 @@
text-align
:
center
;
text-align
:
center
;
}
}
}
}
.relative
{
.relative
{
position
:
relative
;
position
:
relative
;
.absolute{
.absolute
{
position
:
absolute
;
position
:
absolute
;
top
:
-1
upx
;
top
:
-1
upx
;
left
:
0
upx
;
left
:
0
upx
;
height
:
100%
;
height
:
100%
;
.flex-col{
.flex-col
{
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
bottom
:
0
;
bottom
:
0
;
height
:
150%
;
height
:
150%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
.saojiao{
.saojiao
{
position
:
absolute
;
position
:
absolute
;
top
:
-10px
;
top
:
-10px
;
left
:
-15
upx
;
left
:
-15
upx
;
...
@@ -2532,7 +2726,8 @@
...
@@ -2532,7 +2726,8 @@
border-left-color
:
transparent
;
border-left-color
:
transparent
;
border-right-color
:
transparent
;
border-right-color
:
transparent
;
}
}
.line
{
.line
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
...
@@ -2540,12 +2735,14 @@
...
@@ -2540,12 +2735,14 @@
height
:
100%
;
height
:
100%
;
background
:
linear-gradient
(
180deg
,
#EFD12C
,
#DDC01E
);
background
:
linear-gradient
(
180deg
,
#EFD12C
,
#DDC01E
);
}
}
.text-sm
{
.text-sm
{
position
:
absolute
;
position
:
absolute
;
top
:
-4px
;
top
:
-4px
;
left
:
10px
;
left
:
10px
;
width
:
46
upx
;
width
:
46
upx
;
text{
text
{
font-size
:
20
upx
;
font-size
:
20
upx
;
color
:
#DFC224
;
color
:
#DFC224
;
}
}
...
@@ -2566,7 +2763,8 @@
...
@@ -2566,7 +2763,8 @@
padding
:
0
0
15
upx
;
padding
:
0
0
15
upx
;
overflow
:
hidden
;
overflow
:
hidden
;
align-items
:
center
;
align-items
:
center
;
.logo-box{
.logo-box
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
...
@@ -2576,15 +2774,18 @@
...
@@ -2576,15 +2774,18 @@
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
z-index
:
0
;
z-index
:
0
;
image{
image
{
width
:
402
upx
;
width
:
402
upx
;
height
:
322
upx
;
height
:
322
upx
;
}
}
}
}
.flex-between
{
.flex-between
{
position
:
relative
;
position
:
relative
;
z-index
:
3
;
z-index
:
3
;
}
}
.text-left
{
.text-left
{
width
:
120
upx
;
width
:
120
upx
;
text-align-last
:
justify
;
text-align-last
:
justify
;
...
@@ -2611,18 +2812,20 @@
...
@@ -2611,18 +2812,20 @@
.flex-row
{
.flex-row
{
align-items
:
center
;
align-items
:
center
;
}
}
.vip-tag-box
{
.vip-tag-box
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
background
:
linear-gradient
(
to
right
,
rgba
(
255
,
255
,
255
,
0.2
),
rgba
(
157
,
18
,
196
,
0.3
));
background
:
linear-gradient
(
to
right
,
rgba
(
255
,
255
,
255
,
0.2
),
rgba
(
157
,
18
,
196
,
0.3
));
color
:
#9D1260
;
color
:
#9D1260
;
font-size
:
16
upx
;
font-size
:
16
upx
;
height
:
34
upx
;
height
:
34
upx
;
border-radius
:
18
upx
;
border-radius
:
18
upx
;
padding
:
0
12
upx
;
padding
:
0
12
upx
;
margin-left
:
6
upx
;
margin-left
:
6
upx
;
image{
image
{
width
:
22
upx
;
width
:
22
upx
;
max-height
:
22
upx
;
max-height
:
22
upx
;
margin-right
:
4
upx
;
margin-right
:
4
upx
;
...
@@ -2671,7 +2874,8 @@
...
@@ -2671,7 +2874,8 @@
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
color
:
#000000
;
color
:
#000000
;
.amount{
.amount
{
color
:
#e03997
;
color
:
#e03997
;
}
}
}
}
...
@@ -2706,13 +2910,15 @@
...
@@ -2706,13 +2910,15 @@
}
}
}
}
.select-datetime-box
{
.select-datetime-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
.bg-white{
border-bottom
:
1px
solid
#e5e5e5
;
.bg-white
{
border-bottom
:
1px
solid
#e5e5e5
;
}
}
}
}
.select-box
{
.select-box
{
height
:
420
upx
;
height
:
420
upx
;
background-color
:
#f1f1f1
;
background-color
:
#f1f1f1
;
...
@@ -2735,13 +2941,14 @@
...
@@ -2735,13 +2941,14 @@
.confirm-pop
{
.confirm-pop
{
width
:
100vw
;
width
:
100vw
;
.pop-content-box
{
.pop-content-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
width
:
100%
;
width
:
100%
;
//
height
:
700
upx
;
//
height
:
700
upx
;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
box-shadow
:
0
2
upx
38
upx
0
rgba
(
0
,
0
,
0
,
0.27
);
box-shadow
:
0
2
upx
38
upx
0
rgba
(
0
,
0
,
0
,
0.27
);
border-radius
:
16
upx
16
upx
0
rpx
0
rpx
;
border-radius
:
16
upx
16
upx
0
rpx
0
rpx
;
.info-box
{
.info-box
{
...
@@ -2755,7 +2962,8 @@
...
@@ -2755,7 +2962,8 @@
background
:
#FFFFFF
;
background
:
#FFFFFF
;
border-radius
:
16
rpx
;
border-radius
:
16
rpx
;
border
:
2px
solid
#8C8C8C
;
border
:
2px
solid
#8C8C8C
;
.info-store{
.info-store
{
margin-top
:
-30
upx
;
margin-top
:
-30
upx
;
width
:
308
upx
;
width
:
308
upx
;
height
:
60
upx
;
height
:
60
upx
;
...
@@ -2764,33 +2972,38 @@
...
@@ -2764,33 +2972,38 @@
align-items
:
center
;
align-items
:
center
;
z-index
:
44
;
z-index
:
44
;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
.text-title{
.text-title
{
font-weight
:
600
;
font-weight
:
600
;
font-size
:
36
rpx
;
font-size
:
36
rpx
;
//
color
:
#E03997
;
//
color
:
#E03997
;
color
:
#333333
;
color
:
#333333
;
}
}
}
}
.time-box
{
.time-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
center
;
justify-content
:
center
;
width
:
100%
;
width
:
100%
;
align-items
:
center
;
align-items
:
center
;
margin
:
30
upx
0
;
margin
:
30
upx
0
;
.part-1{
.part-1
{
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
flex
:
1
;
flex
:
1
;
margin
:
0
24
upx
;
margin
:
0
24
upx
;
height
:
90
upx
;
height
:
90
upx
;
image{
image
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
}
.absolute
{
.absolute
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
@@ -2799,7 +3012,8 @@
...
@@ -2799,7 +3012,8 @@
align-items
:
center
;
align-items
:
center
;
border
:
6
upx
solid
#E03997
;
border
:
6
upx
solid
#E03997
;
border-radius
:
47
upx
;
border-radius
:
47
upx
;
text{
text
{
font-weight
:
600
;
font-weight
:
600
;
font-size
:
60
upx
;
font-size
:
60
upx
;
//
color
:
#333333
;
//
color
:
#333333
;
...
@@ -2807,17 +3021,20 @@
...
@@ -2807,17 +3021,20 @@
}
}
}
}
}
}
text
{
text
{
font-weight
:
600
;
font-weight
:
600
;
font-size
:
30
rpx
;
font-size
:
30
rpx
;
color
:
#333333
;
color
:
#333333
;
}
}
}
}
.info
{
.info
{
width
:
100%
;
width
:
100%
;
padding
:
12
upx
30
upx
;
padding
:
12
upx
30
upx
;
font-size
:
20
upx
;
font-size
:
20
upx
;
text{
text
{
//
font-weight
:
600
;
//
font-weight
:
600
;
//
font-size
:
32
rpx
;
//
font-size
:
32
rpx
;
//
color
:
#333333
;
//
color
:
#333333
;
...
@@ -2831,12 +3048,13 @@
...
@@ -2831,12 +3048,13 @@
align-items
:
center
;
align-items
:
center
;
width
:
100%
;
width
:
100%
;
padding
:
32
upx
28
upx
;
padding
:
32
upx
28
upx
;
text{
text
{
font-weight
:
600
;
font-weight
:
600
;
font-size
:
36
upx
;
font-size
:
36
upx
;
color
:
#333333
;
color
:
#333333
;
}
}
}
}
.flex-1
{
.flex-1
{
...
@@ -2867,25 +3085,27 @@
...
@@ -2867,25 +3085,27 @@
width
:
100%
;
width
:
100%
;
padding
:
0
5%
;
padding
:
0
5%
;
margin
:
40
upx
0
;
margin
:
40
upx
0
;
.btn-close{
.btn-close
{
width
:
240
upx
;
width
:
240
upx
;
height
:
64
upx
;
height
:
64
upx
;
border
:
2
upx
solid
;
border
:
2
upx
solid
;
background
:
#F5F5F5
;
background
:
#F5F5F5
;
box-shadow
:
0
5
upx
9
upx
0
rgba
(
54
,
4
,
9
,
0.42
);
box-shadow
:
0
5
upx
9
upx
0
rgba
(
54
,
4
,
9
,
0.42
);
border-image
:
linear-gradient
(
0deg
,
#9D9C9C
,
#DEDCDC
)
2
2
;
border-image
:
linear-gradient
(
0deg
,
#9D9C9C
,
#DEDCDC
)
2
2
;
margin
:
0
12
upx
;
margin
:
0
12
upx
;
font-weight
:
600
;
font-weight
:
600
;
font-size
:
32
upx
;
font-size
:
32
upx
;
color
:
#333333
;
color
:
#333333
;
border-radius
:
6
upx
;
border-radius
:
6
upx
;
opacity
:
0.95
;
opacity
:
0.95
;
}
}
.btn-confirm
{
.btn-confirm
{
width
:
240
upx
;
width
:
240
upx
;
height
:
64
upx
;
height
:
64
upx
;
background
:
linear-gradient
(
97deg
,
#E5268B
,
#FD5661
);
background
:
linear-gradient
(
97deg
,
#E5268B
,
#FD5661
);
box-shadow
:
0
5
upx
9
upx
0
rgba
(
54
,
4
,
9
,
0.42
);
box-shadow
:
0
5
upx
9
upx
0
rgba
(
54
,
4
,
9
,
0.42
);
border-radius
:
6
upx
;
border-radius
:
6
upx
;
opacity
:
0.95
;
opacity
:
0.95
;
margin
:
0
12
upx
;
margin
:
0
12
upx
;
...
@@ -2893,7 +3113,7 @@
...
@@ -2893,7 +3113,7 @@
font-size
:
32
rpx
;
font-size
:
32
rpx
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
}
}
}
}
}
}
...
@@ -2947,56 +3167,162 @@
...
@@ -2947,56 +3167,162 @@
}
}
}
}
}
}
.card-use
{
.card-use
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
width
:
100%
;
width
:
100%
;
padding
:
15
upx
30
upx
;
padding
:
15
upx
30
upx
;
.radio-group-box{
.radio-group-box
{
width
:
100%
;
width
:
100%
;
height
:
0
;
height
:
0
;
margin-top
:
15
upx
;
margin-top
:
15
upx
;
border-radius
:
4
upx
;
border-radius
:
4
upx
;
padding
:
0
24
upx
;
padding
:
0
24
upx
;
border
:
1
upx
solid
transparent
;
border
:
1
upx
solid
transparent
;
box-shadow
:
0
0
12
upx
transparent
inset
;
box-shadow
:
0
0
12
upx
transparent
inset
;
transition
:
all
0.5s
;
transition
:
all
0.5s
;
overflow
:
hidden
;
overflow
:
hidden
;
.radio-group{
.radio-group
{
width
:
100%
;
width
:
100%
;
margin
:
20
upx
0
;
margin
:
20
upx
0
;
label{
height
:
32px
;
}
.margin-right-sm
{
margin-right
:
14
upx
;
}
}
}
}
}
.radio-group-box-height
{
.radio-group-box-height
{
height
:
auto
;
height
:
auto
;
border-color
:
rgba
(
255
,
170
,
255
,
0.8
)
;
border-color
:
rgba
(
255
,
170
,
255
,
0.8
);
box-shadow
:
0
0
12
upx
rgba
(
255
,
170
,
255
,
0.8
)
inset
;
box-shadow
:
0
0
12
upx
rgba
(
255
,
170
,
255
,
0.8
)
inset
;
}
}
.cuIcon-right
{
.cuIcon-right
{
transition
:
all
0.5s
;
transition
:
all
0.5s
;
}
}
}
}
.activite-box
{
.activite-box
{
width
:
92vw
;
width
:
92vw
;
border-radius
:
20
upx
;
border-radius
:
20
upx
;
overflow
:
hidden
;
overflow
:
hidden
;
image{
image
{
display
:
block
;
display
:
block
;
width
:
100%
;
width
:
100%
;
min-height
:
960
upx
;
min-height
:
960
upx
;
}
}
}
}
.close-btn
{
.close-btn
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
margin-top
:
24
upx
;
margin-top
:
24
upx
;
.text-pink{
.text-pink
{
font-size
:
80
upx
;
font-size
:
80
upx
;
}
}
}
}
.show-more-pay-way
{
.show-more-pay-way
{
transform-origin
:
center
center
;
transform-origin
:
center
center
;
transform
:
rotate
(
90deg
);
transform
:
rotate
(
90deg
);
}
}
.popup-recharge
{
width
:
540
upx
;
//
height
:
700
upx
;
background-color
:
#ffffff
;
border-radius
:
36
upx
;
overflow
:
hidden
;
.recharge-content{
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
width
:
100%
;
//
height
:
100%
;
background
:
linear-gradient
(
0deg
,
rgba
(
255
,
255
,
255
,
0.65
),
rgba
(
255
,
214
,
241
,
0.43
));
.close-btn{
position
:
absolute
;
top
:
0
;
right
:
0
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
42px
;
height
:
42px
;
z-index
:
10
;
margin
:
0
;
.cuIcon-close{
font-size
:
36
upx
;
}
}
.header-part
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
padding-bottom
:
32
upx
;
width
:
470
upx
;
border-bottom
:
1px
dashed
#C9CACA
;
.text-title{
margin-top
:
50
upx
;
font-size
:
40
upx
;
}
.text-gray
{
margin-top
:
16
upx
;
font-size
:
24
upx
;
}
}
.content-part
{
display
:
flex
;
flex-direction
:
column
;
padding
:
30
upx
0
0
;
width
:
470
upx
;
.list-item{
margin
:
14
upx
0
14
upx
18
upx
;
.recharge-icon{
display
:
block
;
width
:
44
upx
;
max-height
:
46
upx
;
margin-right
:
12
upx
;
}
.text-title
{
color
:
#000000
;
font-size
:
30
upx
;
}
.text-pink
{
color
:
#E40583
;
font-size
:
30
upx
;
}
}
.text-des-box
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
423
rpx
;
font-size
:
26
upx
;
color
:
#666666
;
margin
:
52
upx
auto
52
upx
;
}
.cu-btn
{
width
:
470
upx
;
height
:
88
upx
;
background
:
#E40583
;
border-radius
:
44
upx
;
font-size
:
38
upx
;
color
:
#FFFFFF
;
font-weight
:
bold
;
margin-bottom
:
36
upx
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
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