|
|
|
@ -38,9 +38,17 @@ |
|
|
|
<uni-segmented-control :current="current" :values="arrList" @clickItem="onClickItem" styleType="text" |
|
|
|
activeColor="#11A8FD"></uni-segmented-control> |
|
|
|
</view> |
|
|
|
<view class="bottom"> |
|
|
|
<image :src="item.imgUrl" mode="" v-for="(item,index) in creatorInfo.typeImgList[index].imgList" :key="index" |
|
|
|
:style="'width:'+imgWidth+';height:'+imgHeight" @click="targetDetail(item)"></image> |
|
|
|
<swiper class="swiper" :circular="false" :current="current" :indicator-dots="false" :autoplay="false" |
|
|
|
@change="changeItem" :duration="500"> |
|
|
|
<swiper-item v-for="(item,index) in creatorInfo.typeImgList" :key="item.typeId" |
|
|
|
:current-item-id="item.typeId"> |
|
|
|
<view class="swiper-item bottom"> |
|
|
|
<image :src="val.imgUrl" mode="" v-for="(val,i) in item.imgList" :key="i" |
|
|
|
:style="'width:'+imgWidth+';height:'+imgHeight" @click="targetDetail(val)"></image> |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
@ -70,10 +78,12 @@ |
|
|
|
uni.getStorage({ |
|
|
|
key: 'creatorDetail', |
|
|
|
success: res => { |
|
|
|
console.log('getStorage', res) |
|
|
|
this.creatorInfo = res.data |
|
|
|
this.current = res.data.typeImgList[0].typeId |
|
|
|
this.arrList = res.data.typeImgList[0].typeName |
|
|
|
console.log('getStorage', this.creatorInfo) |
|
|
|
this.creatorInfo.typeImgList.forEach(item => { |
|
|
|
this.arrList.push(item.typeName) |
|
|
|
}) |
|
|
|
console.log('arrList', this.arrList) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -82,7 +92,7 @@ |
|
|
|
console.log(res) |
|
|
|
} |
|
|
|
return { |
|
|
|
title: '来看看艺术家['+this.creatorInfo.scanCode+']精心准备的图片吧~', |
|
|
|
title: `来看看艺术家${this.creatorInfo.scanCode}精心准备的图片吧~`, |
|
|
|
path: `/pages/creator/imgDetail?id=${this.creatorInfo.id}` |
|
|
|
} |
|
|
|
uni.showToast({ |
|
|
|
@ -91,12 +101,19 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 标签栏点击 |
|
|
|
onClickItem(e) { |
|
|
|
console.log('点击', e) |
|
|
|
this.current = e.currentIndex |
|
|
|
}, |
|
|
|
// 内容滑动 |
|
|
|
changeItem(e) { |
|
|
|
console.log('点击', e.detail) |
|
|
|
this.current = e.detail.current |
|
|
|
}, |
|
|
|
// 前往详情页 |
|
|
|
targetDetail(item) { |
|
|
|
console.log('item',item) |
|
|
|
console.log('item', item) |
|
|
|
if (item.id) { |
|
|
|
uni.setStorage({ |
|
|
|
key: 'detailId', |
|
|
|
@ -148,6 +165,10 @@ |
|
|
|
width: 40rpx; |
|
|
|
height: 40rpx; |
|
|
|
} |
|
|
|
|
|
|
|
button::after { |
|
|
|
border: none; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -197,6 +218,7 @@ |
|
|
|
align-items: center; |
|
|
|
flex-wrap: wrap; |
|
|
|
padding-bottom: 20px; |
|
|
|
|
|
|
|
image { |
|
|
|
margin-top: 40rpx; |
|
|
|
margin-left: 40rpx; |
|
|
|
|