|
|
@@ -10,7 +10,7 @@
|
|
|
:ellipsis="false"
|
|
|
line-width="16"
|
|
|
line-height="2"
|
|
|
- @change="getData(true)"
|
|
|
+ @click-tab="getData(true)"
|
|
|
:class="{ trans: source == 'TRANSFER' }"
|
|
|
>
|
|
|
<van-tab
|
|
|
@@ -63,6 +63,7 @@ export default {
|
|
|
return {
|
|
|
list: [],
|
|
|
empty: false,
|
|
|
+ beforeSort: '',
|
|
|
sort: 'id,desc',
|
|
|
type: '',
|
|
|
source: '',
|
|
|
@@ -141,13 +142,18 @@ export default {
|
|
|
activated() {
|
|
|
this.$nextTick(() => {
|
|
|
this.changeScroll(this.scrollTop);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.sort = this.beforeSort;
|
|
|
+ }, 1000);
|
|
|
});
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
- if (!to.meta.menuPage) {
|
|
|
+ if (to.path === '/productDetail') {
|
|
|
+ this.beforeSort = this.sort;
|
|
|
this.scrollTop = this.scrollWrapper.value.scrollTop;
|
|
|
this.setKeeps(['productList']);
|
|
|
} else {
|
|
|
+ this.beforeSort = '';
|
|
|
this.scrollTop = 0;
|
|
|
this.setKeeps(['productList'], false);
|
|
|
}
|