Browse Source

[优化] 首页商品列表样式

[修改] 首页下拉刷新获取数据的方式,改为全部数据重新获取
master
邓平艺 4 years ago
parent
commit
9d51f6329e
  1. 32
      pages/index/index.vue

32
pages/index/index.vue

@ -11,13 +11,17 @@
<view class="right">
<view class="lf-line-2 title">{{ item.name }}</view>
<view class="lf-flex tips">
<view class="u-line-progress" v-if="item.specs[0].sold_percent">
<u-line-progress :percent="item.specs[0].sold_percent" height="20" :striped="true" active-color="#FE9903" :show-percent="false" inactive-color="#F5F5F5"></u-line-progress>
<view class="lf-row-between lf-flex-1" v-if="item.specs[0]">
<view class="lf-flex">
<view class="u-line-progress" v-if="item.specs[0].sold_percent">
<u-line-progress :percent="item.specs[0].sold_percent" height="20" :striped="true" active-color="#FE9903" :show-percent="false" inactive-color="#F5F5F5"></u-line-progress>
</view>
<text class="progress lf-m-r-10">{{ item.specs[0].sold_percent_text }}</text>
</view>
<view>
<text class="bought">{{ item.specs[0].sold_stock_text }}</text>
</view>
</view>
<block v-if="item.specs[0]">
<text class="progress lf-m-r-10">{{ item.specs[0].sold_percent_text }}</text>
<text class="bought">{{ item.specs[0].sold_stock_text }}</text>
</block>
</view>
<view class="lf-row-between price">
<lf-price :price="item.specs[0].selling_price" v-if="item.specs[0]"></lf-price>
@ -122,12 +126,16 @@
}
},
onPullDownRefresh(){
let tab_item = this.tab_list[this.current];
tab_item.page = 1;
tab_item.isPage = true;
tab_item.loadingClass = true;
tab_item.loadingText = '正在加载中';
this.getGoodsList();
//
this.getCategoryList();
// tab
// let tab_item = this.tab_list[this.current];
// tab_item.page = 1;
// tab_item.isPage = true;
// tab_item.loadingClass = true;
// tab_item.loadingText = '';
// this.getGoodsList();
uni.stopPullDownRefresh()
},
onShareAppMessage(){

Loading…
Cancel
Save