2023-3-15

This commit is contained in:
2023-03-15 14:17:28 +08:00
parent f473451293
commit b9e99fb100
6 changed files with 38 additions and 26 deletions

View File

@@ -34,7 +34,7 @@
<view class="t-list">
<view v-if="titem.pid === item.id" class="t-item" v-for="titem in tlist" :key="titem.id">
<image :src="titem.pic" @click="navToDetailPage(titem)"></image>
<text @click="navToDetailPage(titem)">{{titem.name}}</text>
<text @click="navToDetailPage(titem)">{{titem.name}}</text>
</view>
</view>
</view>
@@ -65,7 +65,7 @@
statusBarHeight: '',
};
},
onLoad() {
onShow() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
this.height = uni.getSystemInfoSync().windowHeight - (this.statusBarHeight + 80)
console.log("height", this.height);
@@ -74,12 +74,16 @@
methods: {
async loadData() {
let list = this.$db.get('categoryList')
if (!list) {
// let list = this.$db.get('categoryList')
let list=[]
this.flist =[]
this.tlist = []
// if (!list) {
let params = {};
list = await Api.apiCall('get', Api.goods.typeGoodsList, params);
console.log("list>>>>>", list);
this.$db.set('categoryList', list)
}
// }
if (list) {
list.forEach(item => {
@@ -245,7 +249,8 @@
width: 130upx;
height: 130upx;
}
text{
text {
padding-left: 5px;
padding-right: 5px;
overflow: hidden;