连云港陪玩陪聊
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chunwan/pages/peiwan/xiangce.vue

50 lines
777 B

3 months ago
<template>
<view class="xiangce">
2 months ago
<image v-for="(a,i) in list" :key="i" :src="a" @click="previewImage(i)"></image>
3 months ago
</view>
</template>
<script>
export default {
data() {
return {
2 months ago
list: [],
3 months ago
};
2 months ago
},
onLoad(o) {
this.id = o.id;
this.getList();
},
methods: {
async getList() {
const { code, data, msg } = await this.$api.myAlbums({
userId: this.id
})
if(code == 200){
this.list = data.split(",")
}
},
previewImage(id) {
uni.previewImage({
urls: this.list,
count: id
})
}
3 months ago
}
}
</script>
<style scoped lang="scss">
.xiangce{
padding: 0 25rpx 0 5rpx;
overflow: hidden;
image{
width: 220rpx;
height: 220rpx;
border-radius: 10rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
}
</style>