Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
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
李俊赕
self-support
Commits
7abaf6b4
Commit
7abaf6b4
authored
Aug 31, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 订单管理排序
parent
40bd9692
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
21 deletions
+24
-21
order.vue
src/pages/index/order.vue
+1
-1
list.vue
src/pages/mine/order/list.vue
+23
-20
No files found.
src/pages/index/order.vue
View file @
7abaf6b4
...
...
@@ -353,7 +353,7 @@ export default {
if
(
this
.
needSort
)
{
self
.
orderList
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]].
sort
(
(
x
,
y
)
=>
{
return
x
.
currentOverTime
<
=
y
.
currentOverTime
?
1
:
-
1
return
x
.
currentOverTime
<
y
.
currentOverTime
?
1
:
-
1
}
)
}
...
...
src/pages/mine/order/list.vue
View file @
7abaf6b4
...
...
@@ -15,7 +15,7 @@
enable-back-to-top
refresher-background=
"#F4F5F7"
>
<view
class=
"loading-view"
v-if=
"!loaded
&& !_freshing
"
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<NoOrder
...
...
@@ -63,8 +63,6 @@ export default {
loadStatus
:
'loading'
,
dataValue
:
[],
loaded
:
false
,
triggered
:
true
,
_freshing
:
false
,
title
:
''
,
orderType
:
''
,
timeParam
:
{},
...
...
@@ -80,10 +78,19 @@ export default {
noOrderCustomStyle
()
{
return
'margin-top: 100rpx;background-color: #F4F5F7'
},
sortType
()
{
return
{
take
:
'acceptOrderDateTime'
,
checkin
:
'checkInDateTime'
,
finish
:
'orderFinishDatetime'
,
}
},
currentSorttype
()
{
return
this
.
sortType
[
this
.
orderType
]
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'订单首页'
)
this
.
_freshing
=
false
if
(
e
&&
e
.
title
)
{
this
.
title
=
decodeURIComponent
(
e
.
title
)
}
...
...
@@ -116,34 +123,30 @@ export default {
type
:
this
.
orderType
,
...
this
.
timeParam
,
}
var
self
=
this
self
.
$u
.
api
.
manageOrderList
(
param
).
then
((
res
)
=>
{
this
.
$u
.
api
.
manageOrderList
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
self
.
pageNumber
==
1
)
{
self
.
orderList
=
[]
if
(
this
.
pageNumber
==
1
)
{
this
.
orderList
=
[]
}
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
this
.
orderList
.
push
(...
res
.
data
.
list
)
self
.
orderList
.
sort
((
x
,
y
)
=>
{
return
x
.
currentOverTime
<=
y
.
currentOverTime
?
1
:
-
1
this
.
orderList
.
sort
((
x
,
y
)
=>
{
return
(
x
[
this
.
currentSorttype
]
||
0
)
<
(
y
[
this
.
currentSorttype
]
||
0
)
?
1
:
-
1
})
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
&&
res
.
data
.
list
.
length
==
self
.
pageSize
this
.
loadStatus
=
res
.
data
.
total
>
this
.
orderList
.
length
&&
res
.
data
.
list
.
length
==
this
.
pageSize
?
'loadmore'
:
'nomore'
}
}
else
{
console
.
log
(
res
.
message
,
'获取订单数量失败!'
)
}
self
.
$nextTick
(()
=>
{
if
(
self
.
_freshing
)
{
self
.
triggered
=
false
self
.
_freshing
=
false
}
})
this
.
loaded
=
true
})
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment