|
|
|
@ -1,9 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<!-- 当设置tab-width,指定每个tab宽度时,则不使用flex布局,改用水平滑动 --> |
|
|
|
<view class="padding-lr" style="margin-bottom: 10rpx;margin-top: 20rpx;"> |
|
|
|
<me-tabs v-model="current" :tabs="tab_list" :fixed="true" @change="change"></me-tabs> |
|
|
|
<!-- <u-tabs :list="tab_list" :is-scroll="true" :show-bar="false" :current="current" @change="change"></u-tabs> --> |
|
|
|
</view> |
|
|
|
<view class="com" v-for="(tab, tabIndex) in tab_list" v-if="tabIndex == current" :key="tab.id"> |
|
|
|
<view class="flex-direction justify-around list" v-for="(item, index) in tab.list" :key="item.id" @tap="goDetails(tabIndex,index)"> |
|
|
|
@ -19,10 +17,6 @@ |
|
|
|
<text class="bought">x {{item.number}}</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between price"> |
|
|
|
<!-- <text class="lf-font-bold"> |
|
|
|
<text class="lf-font-24">¥</text> |
|
|
|
<text class="lf-font-42">{{item.selling_price}}</text> |
|
|
|
</text> --> |
|
|
|
<lf-price :price="item.selling_price" style="margin-top: 10rpx;" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -149,55 +143,21 @@ |
|
|
|
page: tab_item.page, |
|
|
|
per_page |
|
|
|
}).then(res => { |
|
|
|
if (res.code == 0) { |
|
|
|
console.log(res) |
|
|
|
if( Object.keys(res.metal_data).length != 0 ) { |
|
|
|
this.$routerGo('/pages/login/index?type=userinfo') |
|
|
|
}else { |
|
|
|
let isPage = res.data.has_more_page; |
|
|
|
tab_item.isPage = isPage; |
|
|
|
if (isPage) { |
|
|
|
tab_item.loadingClass = true; |
|
|
|
tab_item.loadingText = '正在加载中'; |
|
|
|
} else { |
|
|
|
tab_item.loadingClass = false; |
|
|
|
tab_item.loadingText = '没有更多数据啦~'; |
|
|
|
} |
|
|
|
if (tab_item.page == 1) { |
|
|
|
tab_item.list = res.data.items; |
|
|
|
} else { |
|
|
|
tab_item.list.push(...res.data.items); |
|
|
|
} |
|
|
|
} |
|
|
|
let isPage = res.data.has_more_page; |
|
|
|
tab_item.isPage = isPage; |
|
|
|
if (isPage) { |
|
|
|
tab_item.loadingClass = true; |
|
|
|
tab_item.loadingText = '正在加载中'; |
|
|
|
} else { |
|
|
|
tab_item.loadingClass = false; |
|
|
|
tab_item.loadingText = '没有更多数据啦~'; |
|
|
|
} |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
//返回 |
|
|
|
back() { |
|
|
|
if (this.assetsType === 'all2') { |
|
|
|
// #ifdef H5 |
|
|
|
window.history.go(-2) |
|
|
|
// #endif |
|
|
|
|
|
|
|
// #ifndef H5 |
|
|
|
uni.navigateBack({ |
|
|
|
delta: 2 |
|
|
|
}); |
|
|
|
// #endif |
|
|
|
} else { |
|
|
|
// #ifdef H5 |
|
|
|
window.history.go(-1) |
|
|
|
// #endif |
|
|
|
|
|
|
|
// #ifndef H5 |
|
|
|
uni.navigateBack({ |
|
|
|
delta: 1 |
|
|
|
}); |
|
|
|
// #endif |
|
|
|
} |
|
|
|
if (tab_item.page == 1) { |
|
|
|
tab_item.list = res.data.items; |
|
|
|
} else { |
|
|
|
tab_item.list.push(...res.data.items); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
|