Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
上
上药订单生命周期升级
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
sph
上药订单生命周期升级
Commits
cb7d4094
Commit
cb7d4094
authored
Mar 26, 2021
by
琉璃丶c
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.去除 订单详情的 keepAlive
2.修复物流信息为空时不提示的问题 3.修复 nav-bar 警告问题
parent
47be9b1e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
37 deletions
+53
-37
src/App.vue
src/App.vue
+10
-2
src/router/myOrder/index.js
src/router/myOrder/index.js
+1
-2
src/views/myOrder/detail/logisticsDetail.vue
src/views/myOrder/detail/logisticsDetail.vue
+14
-10
src/views/myOrder/detail/orderDetail.vue
src/views/myOrder/detail/orderDetail.vue
+28
-23
No files found.
src/App.vue
View file @
cb7d4094
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
id=
"nav-bar"
id=
"nav-bar"
v-if=
"navBar.show"
v-if=
"navBar.show"
:left-arrow=
"navBar.leftArrow"
:left-arrow=
"navBar.leftArrow"
@
click-left=
"
navBar.
leftClick"
@
click-left=
"leftClick"
:right-text=
"navBar.rightText"
:right-text=
"navBar.rightText"
:left-text=
"navBar.leftText"
:left-text=
"navBar.leftText"
@
click-right=
"
navBar.
rightClick"
@
click-right=
"rightClick"
:fixed=
"navBar.fixed"
:fixed=
"navBar.fixed"
:title=
"navBar.title"
>
:title=
"navBar.title"
>
<template
#right
>
<template
#right
>
...
@@ -37,6 +37,14 @@ export default {
...
@@ -37,6 +37,14 @@ export default {
this
.
$router
.
back
()
this
.
$router
.
back
()
}
}
})
})
},
methods
:
{
leftClick
()
{
this
.
navBar
.
leftClick
()
},
rightClick
()
{
this
.
navBar
.
rightClick
()
}
}
}
}
}
</
script
>
</
script
>
...
...
src/router/myOrder/index.js
View file @
cb7d4094
...
@@ -14,8 +14,7 @@ const myOrder = [
...
@@ -14,8 +14,7 @@ const myOrder = [
name
:
'
orderDetail
'
,
name
:
'
orderDetail
'
,
meta
:
{
meta
:
{
title
:
'
订单详情
'
,
title
:
'
订单详情
'
,
auth
:
false
,
auth
:
false
keepAlive
:
true
},
},
component
:
resolve
=>
require
([
'
@/views/myOrder/detail/orderDetail
'
],
resolve
)
component
:
resolve
=>
require
([
'
@/views/myOrder/detail/orderDetail
'
],
resolve
)
},
},
...
...
src/views/myOrder/detail/logisticsDetail.vue
View file @
cb7d4094
<
template
>
<
template
>
<div
class=
"logistics-content"
>
<div
class=
"logistics-content"
>
<van-empty
description=
"暂无数据"
<van-empty
description=
"暂无数据"
v-if=
"!shippingInfo&&!shippingInfo.shippingNo&&
v-if=
"!((mapPointList&&mapPointList.length > 0)||(shippingInfo&&shippingInfo.shippingNo)||(stepList&&stepList.length > 0))"
/>
(!stepList|| stepList.length
<0
)&&(!
mapPointList
||
mapPointList
.
length
<
0
)"
/>
<!-- 高德地图 -->
<a-map-view
:transport=
"sendType"
:point-list=
"mapPointList"
:drive-point=
"driveLine"
v-if=
"mapPointList&&mapPointList.length > 0"
/>
<a-map-view
:transport=
"sendType"
:point-list=
"mapPointList"
:drive-point=
"driveLine"
v-if=
"mapPointList&&mapPointList.length > 0"
/>
<!-- 物流主信息 -->
<div
class=
"logistics-header"
v-if=
"shippingInfo&&shippingInfo.shippingNo"
>
<div
class=
"logistics-header"
v-if=
"shippingInfo&&shippingInfo.shippingNo"
>
<div
class=
"header-title"
>
<div
class=
"header-title"
>
<van-icon
class=
"logistic-logo"
:name=
"icons.logo"
/>
<van-icon
class=
"logistic-logo"
:name=
"icons.logo"
/>
...
@@ -26,10 +28,11 @@
...
@@ -26,10 +28,11 @@
<span
class=
"logistic-values"
>
{{
shippingInfo
.
estimatedArrivalTime
}}
</span>
<span
class=
"logistic-values"
>
{{
shippingInfo
.
estimatedArrivalTime
}}
</span>
</div>
</div>
</span>
</span>
<span
class=
"logistic-type"
>
{{
shippingInfo
.
roadType
===
'
D
'
?
'
市内
'
:
'
市外
'
}}
</span>
<span
class=
"logistic-type"
>
{{
shippingInfo
.
roadType
===
'
D
'
?
'
市内
'
:
'
市外
'
}}
</span>
</div>
</div>
</div>
</div>
<div
id=
"stepLine"
:class=
"stepList.length>2?'logistics-step-line':'logistics-step-line_show'"
v-if=
"stepList"
>
<!-- 物流追踪信息 -->
<div
id=
"stepLine"
:class=
"stepList.length>2?'logistics-step-line':'logistics-step-line_show'"
v-if=
"stepList&&stepList.length > 0"
>
<logistics-step>
<logistics-step>
<step-item
v-for=
"(item, index) in stepList"
:stepInfo=
item
:key=
"index"
/>
<step-item
v-for=
"(item, index) in stepList"
:stepInfo=
item
:key=
"index"
/>
</logistics-step>
</logistics-step>
...
@@ -200,7 +203,7 @@ export default {
...
@@ -200,7 +203,7 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.logistics-content
{
.logistics-content
{
background-color
:
#f2f3f5
;
background-color
:
#f2f3f5
;
height
:
calc
(
100vh
-
46px
);
height
:
calc
(
100vh
-
46px
);
overflow
:
scroll
;
overflow
:
scroll
;
...
@@ -261,8 +264,8 @@ export default {
...
@@ -261,8 +264,8 @@ export default {
height
:
150px
;
height
:
150px
;
overflow
:
hidden
;
overflow
:
hidden
;
position
:
relative
;
position
:
relative
;
background-color
:
#fff
;
background-color
:
#fff
;
padding
:
1px
;
padding
:
1px
;
.show-more
{
.show-more
{
display
:
block
;
display
:
block
;
...
@@ -278,8 +281,9 @@ export default {
...
@@ -278,8 +281,9 @@ export default {
}
}
.logistics-step-line_show
{
.logistics-step-line_show
{
background-color
:
#fff
;
background-color
:
#fff
;
padding
:
1px
1px
10px
1px
;
padding
:
1px
1px
10px
1px
;
.show-more
{
.show-more
{
display
:
none
;
display
:
none
;
}
}
...
...
src/views/myOrder/detail/orderDetail.vue
View file @
cb7d4094
...
@@ -145,7 +145,22 @@ export default {
...
@@ -145,7 +145,22 @@ export default {
}
}
}
}
},
},
activated
()
{
// activated() {
// this.initPager()
// },
// deactivated() {
// // 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
// window.removeEventListener('popstate', this.onBrowserBack, false)
// },
mounted
()
{
this
.
initPager
()
},
destroyed
()
{
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window
.
removeEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
methods
:
{
initPager
()
{
// 设置标题栏关闭返回按钮
// 设置标题栏关闭返回按钮
this
.
$store
.
commit
(
'
setNavBar
'
,
{
this
.
$store
.
commit
(
'
setNavBar
'
,
{
show
:
true
,
show
:
true
,
...
@@ -163,16 +178,6 @@ export default {
...
@@ -163,16 +178,6 @@ export default {
this
.
getInvoiceDetail
()
this
.
getInvoiceDetail
()
this
.
getTrackInfoDetail
()
this
.
getTrackInfoDetail
()
},
},
deactivated
()
{
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window
.
removeEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
mounted
()
{
},
destroyed
()
{
},
methods
:
{
onBrowserBack
()
{
onBrowserBack
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
},
},
...
...
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