|
|
|
@ -60,7 +60,7 @@ |
|
|
|
return { |
|
|
|
creatorInfo: {}, |
|
|
|
current: 0, |
|
|
|
typeId: 0, |
|
|
|
typeId: 1, |
|
|
|
typeIdList: [], |
|
|
|
arrList: [], |
|
|
|
imgList: [], |
|
|
|
@ -87,7 +87,8 @@ |
|
|
|
this.arrList.push(item.typeName) |
|
|
|
this.typeIdList.push(item.typeId) |
|
|
|
}) |
|
|
|
this.getTypeImgsPage() |
|
|
|
this.typeId = this.typeIdList[0] |
|
|
|
this.getTypeImgsPage(this.typeId) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -96,7 +97,7 @@ |
|
|
|
console.log(111) |
|
|
|
if (this.imgList.length > 1) { |
|
|
|
this.pageNum += 1 |
|
|
|
this.getTypeImgsPage() |
|
|
|
this.getTypeImgsPage(this.typeId) |
|
|
|
} |
|
|
|
}, |
|
|
|
onShareAppMessage(res) { |
|
|
|
@ -112,21 +113,25 @@ |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
current(n, o) { |
|
|
|
console.log('current', this.current, n, o) |
|
|
|
this.typeId = this.typeIdList[n] |
|
|
|
this.imgList = [] |
|
|
|
this.getTypeImgsPage(this.typeId) |
|
|
|
immediate: true |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 标签栏点击 |
|
|
|
onClickItem(e) { |
|
|
|
this.current = e.currentIndex |
|
|
|
this.typeId = this.typeIdList[this.current] |
|
|
|
this.imgList = [] |
|
|
|
this.getTypeImgsPage() |
|
|
|
}, |
|
|
|
// 内容滑动 |
|
|
|
changeItem(e) { |
|
|
|
this.pageNum = 1 |
|
|
|
this.current = e.detail.current |
|
|
|
this.typeId = this.typeIdList[this.current] |
|
|
|
this.imgList = [] |
|
|
|
this.getTypeImgsPage() |
|
|
|
// this.getTypeImgsPage(this.typeId) |
|
|
|
}, |
|
|
|
// 前往详情页 |
|
|
|
targetDetail(item) { |
|
|
|
@ -145,13 +150,14 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
//获取图片分页 |
|
|
|
async getTypeImgsPage() { |
|
|
|
async getTypeImgsPage(typeId) { |
|
|
|
console.log('typeId', typeId) |
|
|
|
uni.showLoading({ |
|
|
|
title: '加载中' |
|
|
|
}); |
|
|
|
const params = { |
|
|
|
scanCode: this.creatorInfo.scanCode, |
|
|
|
typeId: this.typeIdList[0], |
|
|
|
typeId: typeId, |
|
|
|
pageNum: this.pageNum, |
|
|
|
pageSize: this.pageSize, |
|
|
|
} |
|
|
|
|