|
@@ -6,13 +6,15 @@
|
|
|
v-model="isLoading"
|
|
v-model="isLoading"
|
|
|
@refresh="onRefresh"
|
|
@refresh="onRefresh"
|
|
|
>
|
|
>
|
|
|
- <van-sticky ref="top" :offset-top="bar.value && bar.value.show ? 46 : 0">
|
|
|
|
|
- <div class="top">
|
|
|
|
|
- <img src="@assets/nav_logo.png" class="logo" alt="" />
|
|
|
|
|
-
|
|
|
|
|
- <div class="search" @click="$router.push('/productSearch')">
|
|
|
|
|
- <img src="@assets/icon-sosuo.png" alt="" />
|
|
|
|
|
- <span>搜索你要的精彩</span>
|
|
|
|
|
|
|
+ <van-sticky ref="top">
|
|
|
|
|
+ <div class="padding-safe-top">
|
|
|
|
|
+ <div class="top">
|
|
|
|
|
+ <img src="@assets/nav_logo.png" class="logo" alt="" />
|
|
|
|
|
+
|
|
|
|
|
+ <div class="search" @click="$router.push('/productSearch')">
|
|
|
|
|
+ <img src="@assets/icon-sosuo.png" alt="" />
|
|
|
|
|
+ <span>搜索你要的精彩</span>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</van-sticky>
|
|
</van-sticky>
|
|
@@ -108,7 +110,7 @@
|
|
|
</van-grid>
|
|
</van-grid>
|
|
|
|
|
|
|
|
<div class="box" ref="box">
|
|
<div class="box" ref="box">
|
|
|
- <van-sticky :offset-top="50">
|
|
|
|
|
|
|
+ <van-sticky :offset-top="tabOffSet">
|
|
|
<van-tabs
|
|
<van-tabs
|
|
|
class="box-tabs"
|
|
class="box-tabs"
|
|
|
v-model:active="sort"
|
|
v-model:active="sort"
|
|
@@ -152,12 +154,11 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import product from '../mixins/product';
|
|
import product from '../mixins/product';
|
|
|
-
|
|
|
|
|
import ProductInfo from '../components/product/productInfo.vue';
|
|
import ProductInfo from '../components/product/productInfo.vue';
|
|
|
import banner from '../mixins/banner';
|
|
import banner from '../mixins/banner';
|
|
|
import CreatorSmall from '../components/creator/CreatorSmall.vue';
|
|
import CreatorSmall from '../components/creator/CreatorSmall.vue';
|
|
|
import ShowInfo from '../components/asset/showInfo.vue';
|
|
import ShowInfo from '../components/asset/showInfo.vue';
|
|
|
-
|
|
|
|
|
|
|
+import { useCssVar } from '@vueuse/core';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'discover',
|
|
name: 'discover',
|
|
|
inject: ['bar', 'setKeeps', 'scrollWrapper', 'changeScroll', 'bodyScroll'],
|
|
inject: ['bar', 'setKeeps', 'scrollWrapper', 'changeScroll', 'bodyScroll'],
|
|
@@ -202,15 +203,20 @@ export default {
|
|
|
require('../assets/info_icon_banquanshichang.png')
|
|
require('../assets/info_icon_banquanshichang.png')
|
|
|
],
|
|
],
|
|
|
swiperRef: null,
|
|
swiperRef: null,
|
|
|
- notLike: ''
|
|
|
|
|
|
|
+ notLike: '',
|
|
|
|
|
+ safeTop: useCssVar('--safe-top', document.body)
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ tabOffSet() {
|
|
|
|
|
+ return Number((this.safeTop || '0').replace('px', '')) + 50;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.$store.dispatch('getUsedBuy');
|
|
this.$store.dispatch('getUsedBuy');
|
|
|
this.getInit();
|
|
this.getInit();
|
|
|
|
|
|
|
|
if (window.cordova && StatusBar && StatusBar.isVisible) {
|
|
if (window.cordova && StatusBar && StatusBar.isVisible) {
|
|
|
- StatusBar.backgroundColorByHexString('#272b2e');
|
|
|
|
|
StatusBar.styleLightContent();
|
|
StatusBar.styleLightContent();
|
|
|
}
|
|
}
|
|
|
this.$http
|
|
this.$http
|
|
@@ -417,7 +423,6 @@ export default {
|
|
|
this.changeScroll(this.scrollTop);
|
|
this.changeScroll(this.scrollTop);
|
|
|
});
|
|
});
|
|
|
if (window.cordova && StatusBar && StatusBar.isVisible) {
|
|
if (window.cordova && StatusBar && StatusBar.isVisible) {
|
|
|
- StatusBar.backgroundColorByHexString('#272b2e');
|
|
|
|
|
StatusBar.styleLightContent();
|
|
StatusBar.styleLightContent();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|