|
@@ -23,7 +23,7 @@
|
|
|
</view>
|
|
|
<!-- <go-search :theme="themeClass" @subMitSearch="subMitSearch"></go-search> -->
|
|
|
<view v-else class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton ? 'hidden' : 'auto'),'height':(showSkeleton? (scrollHeight-57) + 'px' : 'auto')}">
|
|
|
- <scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="toLower" scroll-y v-if="!showEmpty">
|
|
|
+ <scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="!showEmpty">
|
|
|
<view v-for="(item,index) in commodityList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.id)">
|
|
|
<image mode='widthFix' :src="item.mainImage" class="list-img" alt="list-img"></image>
|
|
|
<view class="list-details-info">
|
|
@@ -100,13 +100,7 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.$api.getStorage().then((resolve) =>{
|
|
|
- this.userID = resolve.userID
|
|
|
- })
|
|
|
- this.setScrollHeight();
|
|
|
- this.$api.loginStatus().then((resolveData) => {
|
|
|
- this.loginStatus = resolveData;
|
|
|
- });
|
|
|
+
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.initGetSerachRecord()
|
|
@@ -135,7 +129,7 @@
|
|
|
this.getListFromServer(false)
|
|
|
}
|
|
|
},
|
|
|
- toLower() {
|
|
|
+ scrolltolower() {
|
|
|
// 第一次加载排除常用商品
|
|
|
if(this.hasNextPage && this.pullFlag) {
|
|
|
this.getListFromServer(true);
|
|
@@ -255,6 +249,15 @@
|
|
|
url:`/pages/login/login?type=${searchLoginType}`
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.$api.getStorage().then((resolve) =>{
|
|
|
+ this.userID = resolve.userID
|
|
|
+ })
|
|
|
+ this.setScrollHeight();
|
|
|
+ this.$api.loginStatus().then((resolveData) => {
|
|
|
+ this.loginStatus = resolveData;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -273,7 +276,7 @@
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
background: #FFFFFF;
|
|
|
- z-index: 999;
|
|
|
+ z-index: 1001;
|
|
|
.search-input{
|
|
|
width: 448rpx;
|
|
|
height: 80rpx;
|