|
|
@ -40,11 +40,10 @@ |
|
|
</view> |
|
|
</view> |
|
|
<swiper class="swiper" :circular="false" :current="current" :indicator-dots="false" :autoplay="false" |
|
|
<swiper class="swiper" :circular="false" :current="current" :indicator-dots="false" :autoplay="false" |
|
|
@change="changeItem" :duration="500"> |
|
|
@change="changeItem" :duration="500"> |
|
|
<swiper-item v-for="(item,index) in creatorInfo.typeList" :key="item.typeId" |
|
|
<swiper-item v-for="(item,index) in imgList" :key="item" |
|
|
:current-item-id="item.typeId" > |
|
|
:current-item-id="item"> |
|
|
<view class="swiper-item bottom"> |
|
|
<view class="swiper-item bottom"> |
|
|
<image :src="val.imgUrl" mode="" v-for="(val,i) in item.imgList" :key="i" |
|
|
<image :src="item.imgUrl" mode="":style="'width:'+imgWidth+';height:'+imgHeight" @click="targetDetail(item)"></image> |
|
|
:style="'width:'+imgWidth+';height:'+imgHeight" @click="targetDetail(val)"></image> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</swiper-item> |
|
|
</swiper-item> |
|
|
</swiper> |
|
|
</swiper> |
|
|
@ -62,7 +61,10 @@ |
|
|
return { |
|
|
return { |
|
|
creatorInfo: {}, |
|
|
creatorInfo: {}, |
|
|
current: 0, |
|
|
current: 0, |
|
|
|
|
|
typeId: 0, |
|
|
|
|
|
typeIdList:[], |
|
|
arrList: [], |
|
|
arrList: [], |
|
|
|
|
|
imgList:[], |
|
|
imgWidth: 0, // 图片宽 |
|
|
imgWidth: 0, // 图片宽 |
|
|
imgHeight: 0, // 图片高 |
|
|
imgHeight: 0, // 图片高 |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
@ -84,11 +86,16 @@ |
|
|
console.log('getStorage', this.creatorInfo) |
|
|
console.log('getStorage', this.creatorInfo) |
|
|
this.creatorInfo.typeList.forEach(item => { |
|
|
this.creatorInfo.typeList.forEach(item => { |
|
|
this.arrList.push(item.typeName) |
|
|
this.arrList.push(item.typeName) |
|
|
|
|
|
this.typeIdList.push(item.typeId) |
|
|
}) |
|
|
}) |
|
|
console.log('arrList', this.arrList) |
|
|
console.log('arrList', this.arrList) |
|
|
|
|
|
console.log('this.typeIdList', this.typeIdList) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
onLoad(){ |
|
|
|
|
|
this.getTypeImgsPage() |
|
|
|
|
|
}, |
|
|
onShareAppMessage(res) { |
|
|
onShareAppMessage(res) { |
|
|
if (res.from === 'button') { // 来自页面内分享按钮 |
|
|
if (res.from === 'button') { // 来自页面内分享按钮 |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
@ -105,26 +112,26 @@ |
|
|
methods: { |
|
|
methods: { |
|
|
// 标签栏点击 |
|
|
// 标签栏点击 |
|
|
onClickItem(e) { |
|
|
onClickItem(e) { |
|
|
console.log('点击', e) |
|
|
|
|
|
this.current = e.currentIndex |
|
|
this.current = e.currentIndex |
|
|
|
|
|
this.typeId = this.typeIdList[e.currentIndex] |
|
|
|
|
|
|
|
|
const params = { |
|
|
const params = { |
|
|
scanCode: this.creatorInfo.scanCode, |
|
|
scanCode: this.creatorInfo.scanCode, |
|
|
typeId: this.current, |
|
|
typeId: this.typeId, |
|
|
pageNum: this.pageNum, |
|
|
pageNum: this.pageNum, |
|
|
pageSize: this.pageSize, |
|
|
pageSize: this.pageSize, |
|
|
} |
|
|
} |
|
|
console.log('params',params) |
|
|
|
|
|
getTypeImgsPage(params).then(response => { |
|
|
getTypeImgsPage(params).then(response => { |
|
|
if(response.data.code === 200){ |
|
|
if(response.data.code === 200){ |
|
|
console.log('response',response) |
|
|
this.imgList = response.data.rows |
|
|
//TODO 待取出圖片列表 |
|
|
console.log('this.imgList',this.imgList) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
// 内容滑动 |
|
|
// 内容滑动 |
|
|
changeItem(e) { |
|
|
changeItem(e) { |
|
|
console.log('点击', e.detail) |
|
|
// console.log('点击', e.detail) |
|
|
this.current = e.detail.current |
|
|
// this.current = e.detail.current |
|
|
}, |
|
|
}, |
|
|
// 前往详情页 |
|
|
// 前往详情页 |
|
|
targetDetail(item) { |
|
|
targetDetail(item) { |
|
|
@ -140,7 +147,32 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//获取图片分页 |
|
|
|
|
|
getTypeImgsPage() { |
|
|
|
|
|
const params = { |
|
|
|
|
|
scanCode: this.creatorInfo.scanCode, |
|
|
|
|
|
typeId: this.typeIdList[0], |
|
|
|
|
|
pageNum: this.pageNum, |
|
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
|
} |
|
|
|
|
|
console.log('params',params) |
|
|
|
|
|
getTypeImgsPage(params).then(response =>{ |
|
|
|
|
|
console.log('response',response) |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// if (res.data.code === 200) { |
|
|
|
|
|
// this.imgList = response.data.rows |
|
|
|
|
|
// console.log('this.imgList',this.imgList) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// uni.showModal({ |
|
|
|
|
|
// content: '图片列表加载失败!', |
|
|
|
|
|
// showCancel: false |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|