Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
Project
Project
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
Administrator
jd-vx-app
Commits
df61f3fb
Commit
df61f3fb
authored
May 08, 2022
by
程新智
👽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刷新
parent
cd106b58
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
239 additions
and
219 deletions
+239
-219
myOrder.vue
pagesD/pages/personal/myOrder.vue
+239
-219
No files found.
pagesD/pages/personal/myOrder.vue
View file @
df61f3fb
...
...
@@ -14,7 +14,7 @@
transform: 'scale(1)'
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;">
</u-tabs>
<scroll-list
ref=
"list"
:option=
"option"
@
load=
"load
"
>
<scroll-list
ref=
"list"
:option=
"option"
@
load=
"load"
@
refresh=
"refresh
"
>
<u-gap
bgColor=
"transparent"
height=
"15"
></u-gap>
<div
class=
"order__content"
v-for=
"(item,index) in orderList"
:key=
"index"
>
<div
class=
"order__items"
@
click=
"orderDetail(item.id)"
v-if=
"(current===0||current===1) && item.orderStatus == 10"
>
...
...
@@ -158,7 +158,7 @@
export
default
{
data
()
{
return
{
list
:
[],
list
:
[],
option
:
{
size
:
10
,
auto
:
true
...
...
@@ -191,6 +191,17 @@ export default {
})
},
methods
:
{
// 刷新刷剧
async
refresh
(
paging
)
{
// 刷新成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
await
this
.
getOrderList
()
this
.
$refs
.
list
.
refreshSuccess
({
list
:
this
.
list
,
total
:
this
.
orderList
.
length
});
// 刷新失败
// this.$refs.list.refreshFail()
},
// 加载数据
load
(
paging
)
{
//console.log(paging)
...
...
@@ -198,19 +209,21 @@ export default {
let
list
=
[];
let
order
=
{}
//订单状态:0-未支付,10-待发货,20-待收货,30-退款/售后,50-已完成
if
(
this
.
current
==
0
)
{
if
(
this
.
current
==
0
)
{
}
else
if
(
this
.
current
==
1
)
{
}
else
if
(
this
.
current
==
1
)
{
order
.
orderStatus
=
10
;
}
else
if
(
this
.
current
==
2
)
{
}
else
if
(
this
.
current
==
2
)
{
order
.
orderStatus
=
20
;
}
else
if
(
this
.
current
==
3
)
{
}
else
if
(
this
.
current
==
3
)
{
order
.
orderStatus
=
50
;
}
else
if
(
this
.
current
==
4
)
{
}
else
if
(
this
.
current
==
4
)
{
order
.
orderStatus
=
30
;
}
else
{
}
let
opts
=
{
url
:
'/app/user/order/list?pageSize='
+
paging
.
size
+
'&pageNum='
+
paging
.
page
,
method
:
'get'
};
}
else
{}
let
opts
=
{
url
:
'/app/user/order/list?pageSize='
+
paging
.
size
+
'&pageNum='
+
paging
.
page
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
order
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
list
=
res
.
data
.
data
.
rows
...
...
@@ -231,31 +244,34 @@ export default {
url
:
'/pagesD/pages/personal/pull?orderId='
+
orderId
});
},
goCarTime
(
id
)
{
goCarTime
(
id
)
{
console
.
log
(
"123"
)
console
.
log
(
id
)
uni
.
navigateTo
({
url
:
'/pagesD/pages/personal/carTime?orderId='
+
id
})
},
showDel
(
id
)
{
showDel
(
id
)
{
//
this
.
showDelModal
=
true
this
.
deleteId
=
id
},
cancelModal
()
{
cancelModal
()
{
this
.
showDelModal
=
false
},
confirmDel
()
{
confirmDel
()
{
let
opts
=
{
url
:
'/app/user/order/remove/'
+
this
.
deleteId
,
method
:
'get'
};
let
opts
=
{
url
:
'/app/user/order/remove/'
+
this
.
deleteId
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
"success"
});
}
else
{
}
else
{
uni
.
showToast
({
title
:
'删除失败'
,
icon
:
"error"
...
...
@@ -274,26 +290,28 @@ export default {
this
.
current
=
v
.
index
this
.
getOrderList
()
},
getOrderList
()
{
getOrderList
()
{
let
order
=
{}
//订单状态:0-未支付,10-待发货,20-待收货,30-退款/售后,50-已完成
if
(
this
.
current
==
0
)
{
if
(
this
.
current
==
0
)
{
}
else
if
(
this
.
current
==
1
)
{
}
else
if
(
this
.
current
==
1
)
{
order
.
orderStatus
=
10
;
}
else
if
(
this
.
current
==
2
)
{
}
else
if
(
this
.
current
==
2
)
{
order
.
orderStatus
=
20
;
}
else
if
(
this
.
current
==
3
)
{
}
else
if
(
this
.
current
==
3
)
{
order
.
orderStatus
=
50
;
}
else
if
(
this
.
current
==
4
)
{
}
else
if
(
this
.
current
==
4
)
{
order
.
orderStatus
=
30
;
}
else
{
}
let
opts
=
{
url
:
'/app/user/order/list'
,
method
:
'get'
};
}
else
{}
let
opts
=
{
url
:
'/app/user/order/list'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
order
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
orderList
=
res
.
data
.
data
.
rows
this
.
orderList
.
length
>
0
?
this
.
$refs
.
list
.
toggle
():
this
.
$refs
.
list
.
show
()
this
.
orderList
.
length
>
0
?
this
.
$refs
.
list
.
toggle
()
:
this
.
$refs
.
list
.
show
()
}
})
},
...
...
@@ -302,7 +320,7 @@ export default {
//this.load()
},
onLoad
(
e
)
{
if
(
e
.
current
)
{
if
(
e
.
current
)
{
this
.
current
=
parseInt
(
e
.
current
)
}
...
...
@@ -315,9 +333,11 @@ export default {
uni-view
{
background
:
#fff
;
}
.order__content
{
padding
:
0
40rpx
;
padding
:
0
40rpx
;
z-index
:
999999
;
.order__items
{
background
:
#FFFFFF
;
box-shadow
:
0rpx
0rpx
28rpx
1rpx
rgba
(
232
,
232
,
232
,
0
.2
);
...
...
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