Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
209725a2
提交
209725a2
authored
4月 12, 2019
作者:
sin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 添加确认订单
- 添加查看物流
上级
df021b9e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
67 行增加
和
39 行删除
+67
-39
order.js
mobile-web/src/api/order.js
+16
-4
list.vue
mobile-web/src/page/user/order/list.vue
+13
-6
logistics.vue
mobile-web/src/page/user/order/logistics.vue
+38
-29
没有找到文件。
mobile-web/src/api/order.js
浏览文件 @
209725a2
...
...
@@ -11,12 +11,12 @@ export function getOrderPage(params) {
});
}
export
function
c
ancelOrder
(
i
d
)
{
export
function
c
onfirmReceiving
(
orderI
d
)
{
return
request
({
url
:
'/
product-api/users/spu/info
'
,
method
:
'
ge
t'
,
url
:
'/
order-api/users/order/confirm_receiving
'
,
method
:
'
pos
t'
,
params
:
{
i
d
,
orderI
d
,
}
});
}
...
...
@@ -66,3 +66,15 @@ export function countCart() {
}
});
}
// 物流信息
export
function
getLogisticsInfo
(
params
)
{
return
request
({
url
:
'/order-api/users/order_logistics/logistics_info'
,
method
:
'get'
,
params
:
{
...
params
,
}
});
}
mobile-web/src/page/user/order/list.vue
浏览文件 @
209725a2
...
...
@@ -34,8 +34,10 @@
</div>
<div
slot=
"footer"
class=
"footer"
>
<span
class=
"total"
>
总价:
{{
item
.
payAmount
/
100
}}
元
</span>
<van-button
v-if=
"[3,4,5].indexOf(item.status) != -1"
size=
"small"
>
查看物流
</van-button>
<van-button
v-if=
"item.status === 3 "
size=
"small"
>
确认收货
</van-button>
<router-link
:to=
"'/user/order/logistics/'+item.orderid"
>
<van-button
v-if=
"[3,4,5].indexOf(item.status) != -1"
size=
"small"
>
查看物流
</van-button>
</router-link>
<van-button
v-if=
"item.status === 3 "
size=
"small"
v-on:click=
"clickConfirmReceiving(item)"
>
确认收货
</van-button>
<van-button
v-if=
"item.status === 1 "
size=
"small"
type=
"danger"
>
支付
</van-button>
</div>
</van-panel>
...
...
@@ -46,7 +48,7 @@
<
script
>
import
{
getOrderPage
}
from
'../../../api/order'
;
import
{
getOrderPage
,
confirmReceiving
}
from
'../../../api/order'
;
export
default
{
components
:
{},
...
...
@@ -54,12 +56,11 @@
return
{
active
:
0
,
list
:
[],
row
:
{},
}
},
methods
:
{
onTabChange
(
index
)
{
console
.
log
(
'onTabChange'
,
index
)
// status 和 tab index 对应的关系
const
statusArray
=
[
null
,
1
,
3
,
4
,
5
];
// if (index === 0) {
...
...
@@ -81,7 +82,8 @@
},
queryOrderPage
(
params
)
{
const
statusArray
=
[
''
,
'代付款'
,
'待发货'
,
'待收货'
,
'已完成'
,
'已关闭'
]
this
.
queryParams
=
params
;
const
statusArray
=
[
''
,
'待付款'
,
'待发货'
,
'待收货'
,
'已完成'
,
'已关闭'
]
getOrderPage
({
pageNo
:
0
,
pageSize
:
10
,
...
...
@@ -114,6 +116,11 @@
// console.log('list', list)
});
},
clickConfirmReceiving
({
orderid
})
{
confirmReceiving
(
orderid
).
then
(
res
=>
{
this
.
queryOrderPage
(
this
.
queryParams
)
})
},
},
mounted
()
{
this
.
queryOrderPage
()
...
...
mobile-web/src/page/user/order/logistics.vue
浏览文件 @
209725a2
<
template
>
<div
style=
"background: #f7f7f7;"
>
<headerNav
title=
"订单追踪"
/>
<van-cell-group>
<van-cell
title=
"订单编号"
value=
"18081609422771742"
/>
</van-cell-group>
<van-tabs
>
<van-tab
title=
"包裹1"
>
<div
style=
"background: #f7f7f7;"
>
<headerNav
title=
"订单追踪"
/>
<van-cell-group>
<van-cell
title=
"订单编号"
value=
"18081609422771742"
/>
</van-cell-group>
<van-tabs>
<van-tab
v-for=
"(item, index) in logistics"
:key=
"index"
:title=
"'包裹' + (index + 1)"
>
<van-cell-group>
<van-cell
title=
"快递方式"
value=
"顺丰快递"
/>
<van-cell
title=
"快递单号"
value=
"51234548875645645"
/>
<van-cell
title=
"快递方式"
:value=
"item.logistics + 'TODO 字典值'"
/>
<van-cell
title=
"快递单号"
:value=
"item.logisticsNo"
/>
</van-cell-group>
<van-steps
direction=
"vertical"
:active=
"0"
active-color=
"#f60"
style=
"margin-top: 15px;"
>
<van-step>
<h3>
【城市】物流状态1
</h3>
<p>
2016-07-12 12:40
</p>
</van-step>
<van-step>
<h3>
【城市】物流状态2
</h3>
<p>
2016-07-11 10:00
</p>
</van-step>
<van-step>
<h3>
快件已发货
</h3>
<p>
2016-07-10 09:30
</p>
</van-step>
<van-step
v-for=
"(detail, detailIndex) in item.details"
:key=
"detailIndex"
>
<h3>
{{
detail
.
logisticsInformation
}}
</h3>
<p>
{{
detail
.
logisticsTimeText
}}
</p>
</van-step>
</van-steps>
</van-tab>
<van-tab
title=
"包裹2"
>
内容 3
</van-tab>
</van-tab>
</van-tabs>
</div>
</div>
</
template
>
<
script
>
export
default
{
import
{
getLogisticsInfo
}
from
'../../../api/order'
;
}
export
default
{
data
()
{
return
{
orderId
:
''
,
orderNo
:
''
,
logistics
:
[],
}
},
mounted
()
{
const
{
id
}
=
this
.
$route
.
params
;
getLogisticsInfo
({
orderId
:
id
,
}).
then
(
res
=>
{
const
{
orderId
,
orderNo
,
logistics
}
=
res
;
this
.
orderId
=
orderId
;
this
.
orderNo
=
orderNo
;
this
.
logistics
=
logistics
;
})
},
}
</
script
>
<
style
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论