Files
ClassContent/历届学生/fontendsix/项目练习/学生项目/计梦梦/uniapp-project/pages/info/info.vue
2024-09-27 02:06:13 +08:00

57 lines
802 B
Vue

<template>
<view>
<view v-for="(v,i) in imglist" :key='i'>
<image :src="v" mode="" @click="previewImage(v)"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: null,
title:null,
imglist:[]
};
},
onLoad(w) {
this.id = w.id;
this.title=w.title
},
created() {
this.r();
this.getinfo();
},
methods: {
r() {
uni.setNavigationBarTitle({
title: this.title,
});
},
async getinfo() {
let res = await this.$http.index.info({
id:this.id,
});
this.imglist=res.imgs
console.log(res.imgs);
},
previewImage(current){
uni.previewImage({
current:current,
urls:this.imglist
})
}
},
};
</script>
<style>
image{
width: 100%;
height: 800rpx;
}
</style>