Commit 0ba3fa26 authored by jyx's avatar jyx

代码优化

parent 7f0ea379
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<image class="mt-30" mode="widthFix" :src="maskImage1"></image> <image class="mt-30" mode="widthFix" :src="maskImage1"></image>
<image :src="maskImage2" mode="widthFix"></image> <image :src="maskImage2" mode="widthFix"></image>
</view> </view>
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList"> <z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view class="search-wrap"> <view class="search-wrap">
...@@ -107,10 +107,9 @@ ...@@ -107,10 +107,9 @@
style="font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;"> style="font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;">
推荐</view> --> 推荐</view> -->
<u-sticky></u-sticky> <!-- <u-sticky></u-sticky> -->
<view style="width: 100%;"> <view style="width: 100%;">
<!-- <u-sticky bgColor="#fff"> -->
<u-tabs :current="typeIndex" :list="typesList" @change="popHandleChange" lineWidth="30" <u-tabs :current="typeIndex" :list="typesList" @change="popHandleChange" lineWidth="30"
keyName='type' lineColor="#0faeff" :activeStyle="{ keyName='type' lineColor="#0faeff" :activeStyle="{
color: '#0faeff', color: '#0faeff',
...@@ -120,7 +119,6 @@ ...@@ -120,7 +119,6 @@
color: '#808080', color: '#808080',
transform: 'scale(1)' transform: 'scale(1)'
}"></u-tabs> }"></u-tabs>
<!-- </u-sticky> -->
</view> </view>
<view style="column-count: 2;column-gap: 20rpx;margin-top: 20rpx;"> <view style="column-count: 2;column-gap: 20rpx;margin-top: 20rpx;">
...@@ -367,6 +365,8 @@ ...@@ -367,6 +365,8 @@
if (data.list) { if (data.list) {
this.typeId = data.list[0].typeId this.typeId = data.list[0].typeId
this.typesList = data.list this.typesList = data.list
this.$refs.paging.reload();
} }
} }
}); });
...@@ -389,8 +389,6 @@ ...@@ -389,8 +389,6 @@
success: ({ success: ({
data data
}) => { }) => {
// this.$refs.paging.complete(data.list);
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} }
}); });
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
}) })
} }
}, },
onShow() { onShow() {
try { try {
// 在子组件重写show()代替onShow() // 在子组件重写show()代替onShow()
if (this.currentPage == 0) { if (this.currentPage == 0) {
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
this.currentPage = index; this.currentPage = index;
this.loadComponentData(); this.loadComponentData();
}, },
loadComponentData() { loadComponentData() {
if (this.currentPage == 0) { if (this.currentPage == 0) {
this.$refs.index.show(); this.$refs.index.show();
this.$refs.recommend.hide(); this.$refs.recommend.hide();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment