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
bc8802cb
Commit
bc8802cb
authored
Aug 25, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 订单列表接口调试
parent
d9778aff
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
147 additions
and
78 deletions
+147
-78
eusingList.vue
src/components/order/eusingList.vue
+52
-0
index.vue
src/pages/index/index.vue
+14
-25
order.vue
src/pages/index/order.vue
+9
-7
index.vue
src/pages/mine/order/index.vue
+57
-17
list.vue
src/pages/mine/order/list.vue
+15
-29
No files found.
src/components/order/eusingList.vue
0 → 100644
View file @
bc8802cb
<
template
>
<view
class=
"eusing-view"
>
<view
class=
"fixed-button"
>
<ApplyButton
:type
.
sync=
"buttonType"
icon=
"dingdan-button.png"
text=
"最近查看"
clickedType=
"hidden"
:show
.
sync=
"showApplyButton"
@
click=
"visible = true"
/>
</view>
<FiveOrders
:visible
.
sync=
"visible"
@
close=
"showApplyButton = true"
></FiveOrders>
</view>
</
template
>
<
script
>
import
ApplyButton
from
'@/components/parts/applyButton.vue'
import
FiveOrders
from
'@/components/order/fiveOrders.vue'
export
default
{
components
:
{
ApplyButton
,
FiveOrders
,
},
props
:
{
type
:
{
// 按钮宽'collapse': '80rpx', 'expand': '220rpx'
type
:
String
,
default
:
'expand'
,
},
},
data
()
{
return
{
buttonType
:
this
.
type
||
'expand'
,
// 申请按钮宽 collapse': '80rpx', 'expand': '220rpx''
showApplyButton
:
true
,
visible
:
false
,
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.eusing-view
{
.fixed-button
{
position
:
fixed
;
right
:
10rpx
;
bottom
:
64rpx
;
}
}
</
style
>
src/pages/index/index.vue
View file @
bc8802cb
...
@@ -84,14 +84,18 @@
...
@@ -84,14 +84,18 @@
>
>
</OrderCell>
</OrderCell>
</view>
</view>
<u-loadmore
<view
class=
"load-more-view"
v-show=
"
v-show=
"
(search.pageNumber == 1 && loadedOrder) ||
(search.pageNumber == 1 && loadedOrder) ||
search.pageNumber > 1
search.pageNumber > 1
"
"
:status=
"currentLoadStatus"
>
bgColor=
"#F4F5F7"
<u-loadmore
></u-loadmore>
:status=
"currentLoadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -102,20 +106,7 @@
...
@@ -102,20 +106,7 @@
<view
class=
"bottom-line-view"
></view>
<view
class=
"bottom-line-view"
></view>
</view>
</view>
</scroll-view>
</scroll-view>
<view
class=
"fixed-button"
>
<EusingList
/>
<ApplyButton
:type
.
sync=
"buttonType"
icon=
"dingdan-button.png"
text=
"最近查看"
clickedType=
"hidden"
:show
.
sync=
"showApplyButton"
@
click=
"visible = true"
/>
</view>
<FiveOrders
:visible
.
sync=
"visible"
@
close=
"showApplyButton = true"
></FiveOrders>
</view>
</view>
</TabBarPage>
</TabBarPage>
</template>
</template>
...
@@ -125,16 +116,14 @@ import TabBarPage from '@/components/tabBarList/index.vue'
...
@@ -125,16 +116,14 @@ import TabBarPage from '@/components/tabBarList/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
const
app
=
getApp
()
const
app
=
getApp
()
import
OrderCell
from
'@/components/order/index.vue'
import
OrderCell
from
'@/components/order/index.vue'
import
ApplyButton
from
'@/components/parts/applyButton.vue'
import
EusingList
from
'@/components/order/eusingList.vue'
import
FiveOrders
from
'@/components/order/fiveOrders.vue'
export
default
{
export
default
{
components
:
{
components
:
{
OrderCell
,
OrderCell
,
TabBarPage
,
TabBarPage
,
NoOrder
,
NoOrder
,
ApplyButton
,
EusingList
,
FiveOrders
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -160,9 +149,6 @@ export default {
...
@@ -160,9 +149,6 @@ export default {
old
:
{
old
:
{
scrollTop
:
0
,
scrollTop
:
0
,
},
},
buttonType
:
'expand'
,
// 申请按钮宽 collapse': '80rpx', 'expand': '220rpx''
showApplyButton
:
true
,
visible
:
false
,
}
}
},
},
watch
:
{
watch
:
{
...
@@ -593,6 +579,9 @@ export default {
...
@@ -593,6 +579,9 @@ export default {
background-color
:
#f4f5f7
;
background-color
:
#f4f5f7
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
.load-more-view
{
padding-bottom
:
44rpx
;
}
}
}
}
}
}
}
...
...
src/pages/index/order.vue
View file @
bc8802cb
...
@@ -79,12 +79,11 @@
...
@@ -79,12 +79,11 @@
>
>
</OrderCell>
</OrderCell>
</view>
</view>
<view
class=
"load-more-view"
>
<view
<u-loadmore
class=
"load-more-view"
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
:status=
"loadStatus"
>
bgColor=
"#F4F5F7"
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
></u-loadmore>
</view>
</view>
</
template
>
</
template
>
<view
class=
"loading-view"
v-if=
"!loaded && !_freshing"
>
<view
class=
"loading-view"
v-if=
"!loaded && !_freshing"
>
...
@@ -92,6 +91,7 @@
...
@@ -92,6 +91,7 @@
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
<EusingList
type=
"collapse"
/>
</TabBarPage>
</TabBarPage>
</template>
</template>
...
@@ -99,12 +99,14 @@
...
@@ -99,12 +99,14 @@
import
TabBarPage
from
'@/components/tabBarList/index.vue'
import
TabBarPage
from
'@/components/tabBarList/index.vue'
import
OrderCell
from
'@/components/order/index.vue'
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
EusingList
from
'@/components/order/eusingList.vue'
export
default
{
export
default
{
components
:
{
components
:
{
TabBarPage
,
TabBarPage
,
OrderCell
,
OrderCell
,
NoOrder
,
NoOrder
,
EusingList
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -494,7 +496,7 @@ export default {
...
@@ -494,7 +496,7 @@ export default {
overflow
:
auto
;
overflow
:
auto
;
// padding-bottom: 20rpx;
// padding-bottom: 20rpx;
.load-more-view
{
.load-more-view
{
margin-bottom
:
20
rpx
;
padding-bottom
:
44
rpx
;
}
}
.loading-view
{
.loading-view
{
width
:
100%
;
width
:
100%
;
...
...
src/pages/mine/order/index.vue
View file @
bc8802cb
...
@@ -36,7 +36,11 @@
...
@@ -36,7 +36,11 @@
:key=
"index"
:key=
"index"
class=
"item-view"
class=
"item-view"
>
>
<view
class=
"left-view"
@
click=
"handleClick(item.type)"
hover-class=
"u-hover-class"
>
<view
class=
"left-view"
@
click=
"handleClick(index)"
hover-class=
"u-hover-class"
>
<view
:class=
"['count-view',
{ active: item.type == 'finish' }]">
{{
<view
:class=
"['count-view',
{ active: item.type == 'finish' }]">
{{
info
[
item
.
key
]
||
0
info
[
item
.
key
]
||
0
}}
</view>
}}
</view>
...
@@ -44,6 +48,9 @@
...
@@ -44,6 +48,9 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -60,10 +67,10 @@ export default {
...
@@ -60,10 +67,10 @@ export default {
computed
:
{
computed
:
{
timeTypeTexts
()
{
timeTypeTexts
()
{
return
[
return
[
{
name
:
'今日'
,
key
:
'today'
},
{
name
:
'今日'
},
{
name
:
'昨日'
,
key
:
'yesterday'
},
{
name
:
'昨日'
},
{
name
:
'本周'
,
key
:
'week'
},
{
name
:
'本周'
},
{
name
:
'本月'
,
key
:
'month'
},
{
name
:
'本月'
},
]
]
// return { today: '今日', yesterday: '昨日', week: '本周', month: '本月' }
// return { today: '今日', yesterday: '昨日', week: '本周', month: '本月' }
},
},
...
@@ -71,11 +78,35 @@ export default {
...
@@ -71,11 +78,35 @@ export default {
return
[
return
[
{
label
:
'已接单'
,
type
:
'waitCheckIn'
,
key
:
'acceptedCount'
},
{
label
:
'已接单'
,
type
:
'waitCheckIn'
,
key
:
'acceptedCount'
},
{
label
:
'已签到'
,
type
:
'waitFinish'
,
key
:
'toFinishCount'
},
{
label
:
'已签到'
,
type
:
'waitFinish'
,
key
:
'toFinishCount'
},
{
label
:
'
已完工'
,
type
:
'finish'
,
key
:
'finished
Count'
},
{
label
:
'
审核中'
,
type
:
'audit'
,
key
:
'reviewing
Count'
},
]
]
},
},
currentKey
()
{
nextTitle
()
{
return
this
.
timeTypeTexts
[
this
.
current
].
key
return
(
this
.
timeTypeTexts
[
this
.
current
].
name
+
'-'
+
this
.
detailLabels
[
this
.
current
].
label
)
},
params
()
{
var
date
=
new
Date
()
var
timestamp
=
date
.
getTime
()
var
today
=
this
.
$u
.
timeFormat
(
timestamp
,
'yyyy-mm-dd'
)
var
yesterday
=
this
.
$u
.
timeFormat
(
date
.
setDate
(
date
.
getDate
()
-
1
))
var
weekDays
=
[
6
,
0
,
1
,
2
,
3
,
4
,
5
]
var
week
=
this
.
$u
.
timeFormat
(
date
.
setDate
(
date
.
getDate
()
-
weekDays
[
date
.
getDay
()])
)
var
month
=
this
.
$u
.
timeFormat
(
date
.
setDate
(
1
))
return
[
{
start
:
today
,
end
:
today
},
{
start
:
yesterday
,
end
:
yesterday
},
{
start
:
week
,
end
:
today
},
{
start
:
month
,
end
:
today
},
]
},
currentParam
()
{
return
this
.
params
[
this
.
current
]
},
},
},
},
onLoad
()
{
onLoad
()
{
...
@@ -84,7 +115,7 @@ export default {
...
@@ -84,7 +115,7 @@ export default {
methods
:
{
methods
:
{
// 获取订单数量
// 获取订单数量
getOrderCount
()
{
getOrderCount
()
{
this
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
this
.
$u
.
api
.
listOrderCount
(
this
.
currentParam
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
info
=
res
.
data
||
{}
this
.
info
=
res
.
data
||
{}
...
@@ -102,14 +133,23 @@ export default {
...
@@ -102,14 +133,23 @@ export default {
this
.
currentTime
=
key
this
.
currentTime
=
key
this
.
getOrderCount
()
this
.
getOrderCount
()
},
},
handleClick
(
key
)
{
handleClick
(
index
)
{
this
.
$u
.
route
({
var
item
=
this
.
detailLabels
[
index
]
url
:
'pages/mine/order/list'
,
if
(
this
.
info
[
item
.
key
]
>
0
)
{
params
:
{
this
.
$u
.
route
({
orderType
:
key
,
url
:
'pages/mine/order/list'
,
timeType
:
this
.
currentTime
,
params
:
{
},
orderType
:
item
.
type
,
})
title
:
this
.
nextTitle
,
...
this
.
currentParam
,
},
})
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
'暂无数据'
,
type
:
'warning'
,
})
}
},
},
},
},
}
}
...
...
src/pages/mine/order/list.vue
View file @
bc8802cb
...
@@ -41,12 +41,11 @@
...
@@ -41,12 +41,11 @@
>
>
</OrderCell>
</OrderCell>
</view>
</view>
<view
class=
"load-more-view"
>
<view
<u-loadmore
class=
"load-more-view"
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
:status=
"loadStatus"
>
bgColor=
"#F4F5F7"
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
></u-loadmore>
</view>
</view>
</
template
>
</
template
>
</scroll-view>
</scroll-view>
...
@@ -73,31 +72,14 @@ export default {
...
@@ -73,31 +72,14 @@ export default {
loaded
:
false
,
loaded
:
false
,
triggered
:
true
,
triggered
:
true
,
_freshing
:
false
,
_freshing
:
false
,
title
:
''
,
orderType
:
''
,
orderType
:
''
,
time
Type
:
''
,
time
Param
:
{}
,
}
}
},
},
computed
:
{
computed
:
{
title
()
{
return
(
this
.
timeTypeTexts
[
this
.
timeType
]
+
'-'
+
this
.
orderTypeTexts
[
this
.
orderType
]
)
},
orderTypeTexts
()
{
return
{
waitAppointment
:
'已接单'
,
waitCheckIn
:
'已接单'
,
waitFinish
:
'已签到'
,
finish
:
'已完工'
,
}
},
timeTypeTexts
()
{
return
{
today
:
'今日'
,
yesterday
:
'昨日'
,
week
:
'本周'
,
month
:
'本月'
}
},
cellType
()
{
cellType
()
{
return
this
.
orderType
==
'
waitLianxi
'
?
''
:
this
.
orderType
return
this
.
orderType
==
'
yijiedan
'
?
''
:
this
.
orderType
},
},
noMore
()
{
noMore
()
{
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
...
@@ -109,11 +91,14 @@ export default {
...
@@ -109,11 +91,14 @@ export default {
onLoad
(
e
)
{
onLoad
(
e
)
{
getApp
().
trackPage
(
'订单首页'
)
getApp
().
trackPage
(
'订单首页'
)
this
.
_freshing
=
false
this
.
_freshing
=
false
if
(
e
&&
e
.
title
)
{
this
.
title
=
decodeURIComponent
(
e
.
title
)
}
if
(
e
&&
e
.
orderType
)
{
if
(
e
&&
e
.
orderType
)
{
this
.
orderType
=
e
.
orderType
this
.
orderType
=
e
.
orderType
}
}
if
(
e
&&
e
.
timeType
)
{
if
(
e
&&
e
.
start
&&
e
.
end
)
{
this
.
time
Type
=
e
.
timeType
this
.
time
Param
=
{
start
:
e
.
start
,
end
:
e
.
end
}
}
}
this
.
reloadOrderList
()
this
.
reloadOrderList
()
},
},
...
@@ -136,6 +121,7 @@ export default {
...
@@ -136,6 +121,7 @@ export default {
pageSize
:
this
.
pageSize
,
pageSize
:
this
.
pageSize
,
keyword
:
''
,
keyword
:
''
,
type
:
this
.
orderType
,
type
:
this
.
orderType
,
...
this
.
timeParam
,
}
}
var
self
=
this
var
self
=
this
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
...
@@ -235,7 +221,7 @@ export default {
...
@@ -235,7 +221,7 @@ export default {
overflow
:
auto
;
overflow
:
auto
;
padding
:
20rpx
30rpx
;
padding
:
20rpx
30rpx
;
.load-more-view
{
.load-more-view
{
margin-bottom
:
20
rpx
;
padding-bottom
:
44
rpx
;
}
}
.loading-view
{
.loading-view
{
width
:
100%
;
width
:
100%
;
...
...
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