Showing
1 changed file
with
14 additions
and
0 deletions
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | <status-nav class="order-status-nav" :status="status" :owner="owner" @select="onStatusChange"/> | 6 | <status-nav class="order-status-nav" :status="status" :owner="owner" @select="onStatusChange"/> |
7 | <div class="content-wrapper"> | 7 | <div class="content-wrapper"> |
8 | <LayoutScroll | 8 | <LayoutScroll |
9 | + @scroll="scrollHandler" | ||
9 | @pulling-up="fetchData" | 10 | @pulling-up="fetchData" |
10 | @pulling-down="onRefresh" | 11 | @pulling-down="onRefresh" |
11 | :loading="loadingOptions" | 12 | :loading="loadingOptions" |
@@ -87,6 +88,11 @@ export default { | @@ -87,6 +88,11 @@ export default { | ||
87 | CountDown, | 88 | CountDown, |
88 | VideoPlayer | 89 | VideoPlayer |
89 | }, | 90 | }, |
91 | + data() { | ||
92 | + return { | ||
93 | + scrollY: 0 | ||
94 | + } | ||
95 | + }, | ||
90 | props: { | 96 | props: { |
91 | owner: String, | 97 | owner: String, |
92 | status: Number | 98 | status: Number |
@@ -106,6 +112,11 @@ export default { | @@ -106,6 +112,11 @@ export default { | ||
106 | }; | 112 | }; |
107 | } | 113 | } |
108 | }, | 114 | }, |
115 | + activated() { | ||
116 | + if (this.yoho.direction === 'back') { | ||
117 | + this.scrollY && this.$refs.scroll.scrollTo(this.scrollY); | ||
118 | + } | ||
119 | + }, | ||
109 | 120 | ||
110 | // 获取订单数据 | 121 | // 获取订单数据 |
111 | asyncData({ store, router }) { | 122 | asyncData({ store, router }) { |
@@ -119,6 +130,9 @@ export default { | @@ -119,6 +130,9 @@ export default { | ||
119 | methods: { | 130 | methods: { |
120 | ...mapActions(['fetchOrderList', 'confirmReceipt']), | 131 | ...mapActions(['fetchOrderList', 'confirmReceipt']), |
121 | ...mapMutations(['resetData']), | 132 | ...mapMutations(['resetData']), |
133 | + scrollHandler({y}) { | ||
134 | + this.scrollY = -y; | ||
135 | + }, | ||
122 | fetchData() { | 136 | fetchData() { |
123 | this.fetchOrderList({ | 137 | this.fetchOrderList({ |
124 | owner: this.owner, | 138 | owner: this.owner, |
-
Please register or login to post a comment