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
8605c9fe
Commit
8605c9fe
authored
Sep 05, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
7906802a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
14 deletions
+27
-14
order.vue
pages/order/order.vue
+9
-6
orderResult.vue
pages/orderResult/orderResult.vue
+5
-7
vipCreate.vue
pages/vipCreate/vipCreate.vue
+1
-1
tools.js
utils/tools.js
+12
-0
No files found.
pages/order/order.vue
View file @
8605c9fe
...
...
@@ -225,7 +225,7 @@
<view
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
可用时长
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink text-lg text-bold"
>
{{
Number
(
computePriceInfo
.
availableDuration
).
toFixed
(
1
)
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
&&
computePriceInfo
.
availableDuration
?
Number
(
computePriceInfo
.
availableDuration
).
toFixed
(
1
)
:
0
}}
</text>
<text
class=
"text-pink"
>
小时
</text>
</view>
</view>
...
...
@@ -409,7 +409,7 @@
dictList
}
from
"@/api/index.js"
;
import
{
getDictItem
getDictItem
,
getSysConfigValue
}
from
"@/utils/tools.js"
import
{
getStoreActivity
,
...
...
@@ -560,8 +560,8 @@
tipContent
:
"当前条件下无可预约的时段,请手动选择合适的空闲时段"
,
tipErrMsg
:
''
,
warnTip
:
''
,
activityDate
:{}
activityDate
:{}
,
storeCleanDuration
:
getSysConfigValue
(
'StoreCleanDuration'
)?
Number
(
getSysConfigValue
(
'StoreCleanDuration'
)):
30
};
},
filters
:
{
...
...
@@ -1175,7 +1175,11 @@
}
else
{
this
.
selectCouponIndex
=
-
1
;
}
if
(
this
.
allDayUseStatus
){
this
.
computePriceInfo
=
''
}
else
{
this
.
onComputePrice
();
}
}
else
if
(
res
.
data
.
code
==
401
)
{
this
.
$refs
.
loginPop
.
open
();
}
...
...
@@ -1590,9 +1594,8 @@
let
endStemp
=
startStemp
+
stempLong
;
if
(
this
.
orderType
==
2
){
endStemp
=
endStemp
+
30
*
60
*
1000
endStemp
=
endStemp
+
this
.
storeCleanDuration
*
60
*
1000
}
let
nextStatus
=
false
;
this
.
dateIntervalList
.
forEach
((
item
,
k
)
=>
{
if
(
nextStatus
)
return
;
...
...
pages/orderResult/orderResult.vue
View file @
8605c9fe
...
...
@@ -173,7 +173,7 @@
<
script
>
import
{
login
,
dictList
}
from
"@/api/index.js"
;
import
{
getDictItem
}
from
"@/utils/tools.js"
import
{
getDictItem
,
getSysConfigValue
}
from
"@/utils/tools.js"
import
fNavbar
from
'@/components/module/f-navbar/f-navbar'
;
import
{
getOrderInfoByNo
,
orderRefund
,
openDoor
,
noLoginOpenDoor
,
noLoginGetOrderInfo
}
from
"@/api/order.js"
import
moment
from
"@/common/moment_zh_cn.js"
;
...
...
@@ -199,7 +199,8 @@
shareOrder
:
false
,
userInfo
:{
id
:
''
}
},
storeCleanDuration
:
getSysConfigValue
(
'StoreCleanDuration'
)?
Number
(
getSysConfigValue
(
'StoreCleanDuration'
)):
30
};
},
onLoad
(
option
)
{
...
...
@@ -233,14 +234,12 @@
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
}
else
{
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
})
}
},
...
...
@@ -416,7 +415,7 @@
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
let
startDateStemp
=
this
.
orderInfo
.
status
==
2
?
moment
(
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)).
valueOf
():
moment
(
orderEndDate
).
valueOf
()
//可续单的结束时间戳
let
endDateStemp
=
startDateStemp
+
60
*
60
*
1000
;
let
endDateStemp
=
startDateStemp
+
(
60
+
this
.
storeCleanDuration
)
*
60
*
1000
;
let
continueStatus
=
true
;
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
){
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -449,9 +448,8 @@
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
&modeIndex=1`
})
}
else
{
endDateStemp
=
startDateStemp
+
30
*
60
*
1000
;
endDateStemp
=
startDateStemp
+
(
30
+
this
.
storeCleanDuration
)
*
60
*
1000
;
continueStatus
=
true
;
new
Promise
((
resolve
,
reject
)
=>
{
res
.
data
.
data
.
forEach
((
item
,
i
)
=>
{
...
...
pages/vipCreate/vipCreate.vue
View file @
8605c9fe
...
...
@@ -60,7 +60,7 @@
</view>
</view>
<view
class=
"tip-text"
>
<text>
充值送时长,多充多送
</text>
<text>
{{
item
.
remark
||
'充值送时长,多充多送'
}}
</text>
</view>
</view>
</view>
...
...
utils/tools.js
View file @
8605c9fe
...
...
@@ -159,3 +159,14 @@ export function getDictItem(dicts, dictType) {
}
return
obj
}
// 通过系统配置参数key字段获取value值;
export
function
getSysConfigValue
(
key
)
{
let
value
=
""
let
sysConfigList
=
uni
.
getStorageSync
(
'sysConfig'
);
let
obj
=
sysConfigList
.
find
(
item
=>
item
.
configKey
===
key
);
if
(
obj
){
value
=
obj
.
configValue
;
}
return
value
}
\ 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