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
e843ef29
Commit
e843ef29
authored
May 11, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
361304c6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
9 deletions
+40
-9
login.vue
components/login/login.vue
+1
-1
order.vue
pages/order/order.vue
+25
-6
orderResult.vue
pages/orderResult/orderResult.vue
+14
-2
No files found.
components/login/login.vue
View file @
e843ef29
...
...
@@ -52,8 +52,8 @@
key
:
uni
.
getStorageSync
(
'tokenHeaders'
),
data
:
res
.
data
.
data
.
token
})
that
.
$emit
(
'success'
)
that
.
onGetUserInfoToSave
()
that
.
$emit
(
'success'
)
}
else
{
uni
.
removeStorageSync
(
'tokenHeaders'
)
this
.
$refs
.
popupPhone
.
open
();
...
...
pages/order/order.vue
View file @
e843ef29
...
...
@@ -1028,7 +1028,8 @@
storeId
:
this
.
roomInfo
.
storeId
,
roomId
:
this
.
roomInfo
.
id
,
day
:
this
.
dateList
[
this
.
dateIndex
].
readDate
,
orderType
:
this
.
orderType
orderType
:
this
.
orderType
,
orderId
:
this
.
orderType
==
2
?
this
.
orderInfo
.
id
:
""
}).
then
(
res
=>
{
uni
.
hideLoading
()
this
.
dateIntervalList
=
res
.
data
.
data
.
map
((
item
,
index
)
=>
{
...
...
@@ -1493,6 +1494,10 @@
let
startStemp
=
moment
(
startDate
).
valueOf
();
let
endStemp
=
startStemp
+
stempLong
;
if
(
this
.
orderType
==
2
){
endStemp
=
endStemp
+
30
*
60
*
1000
}
let
nextStatus
=
false
;
this
.
dateIntervalList
.
forEach
((
item
,
k
)
=>
{
if
(
nextStatus
)
return
;
...
...
@@ -1512,18 +1517,26 @@
nextStatus
=
true
;
console
.
log
(
"节点2"
)
}
if
(
endStemp
>
moment
(
item
.
startHoldTime
).
valueOf
()
&&
endStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
()){
useStatus
=
true
;
nextStatus
=
true
;
console
.
log
(
"节点3"
)
}
}
else
if
(
this
.
orderType
==
2
){
if
(
m
<
60
&&
!
(
startStemp
>=
moment
(
item
.
endHoldTime
).
valueOf
()
&&
endStemp
<
end
)
){
if
(
startStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
()
&&
endStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
){
useStatus
=
true
;
nextStatus
=
true
;
console
.
log
(
"节点5"
)
}
else
{
console
.
log
(
"节点4"
)
}
}
else
if
(
this
.
orderType
==
2
){
// if( m
<=
60
&&
!
(
startStemp
>=
moment
(
item
.
endHoldTime
).
valueOf
()
&&
endStemp
<
end
)
){
// useStatus = true;
// nextStatus = true;
// console.log("节点5")
// }
if
(
startStemp
>
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()){
useStatus
=
true
;
nextStatus
=
true
;
...
...
@@ -1535,7 +1548,13 @@
nextStatus
=
true
;
console
.
log
(
"节点3"
)
}
if
(
startStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()
&&
endStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()){
useStatus
=
true
;
nextStatus
=
true
;
console
.
log
(
"节点4"
)
}
}
}
...
...
pages/orderResult/orderResult.vue
View file @
e843ef29
...
...
@@ -102,7 +102,7 @@
<button
class=
"cu-btn block round line-pink lg"
open-type=
"share"
>
分享好友
</button>
</view>
<view
v-if=
"continStatus || orderInfo.status ==1"
class=
"part"
>
<button
class=
"cu-btn block round bg-mauve lg"
@
tap=
"on
NavToOrder
"
>
房间续单
</button>
<button
class=
"cu-btn block round bg-mauve lg"
@
tap=
"on
CheckLogin
"
>
房间续单
</button>
</view>
</view>
</view>
...
...
@@ -130,6 +130,9 @@
<uni-popup
ref=
"popup"
type=
"dialog"
>
<uni-popup-dialog
mode=
"base"
content=
"请确认是否退单"
:duration=
"2000"
:before-close=
"true"
@
close=
"close"
@
confirm=
"confirm"
></uni-popup-dialog>
</uni-popup>
<LoginPop
ref=
"loginPop"
@
success=
'onNavToOrder'
/>
</view>
</
template
>
...
...
@@ -141,10 +144,12 @@
import
moment
from
"@/common/moment_zh_cn.js"
;
import
config
from
"@/config/index.config"
import
{
listSortDistance
}
from
"@/api/store.js"
;
import
LoginPop
from
"@/components/login/login"
export
default
{
components
:{
fNavbar
fNavbar
,
LoginPop
},
data
()
{
return
{
...
...
@@ -332,6 +337,13 @@
}
})
},
onCheckLogin
(){
if
(
this
.
shareOrder
){
this
.
$refs
.
loginPop
.
open
();
}
else
{
this
.
onNavToOrder
()
}
},
onNavToOrder
(){
uni
.
showLoading
({
title
:
'加载中'
...
...
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