57 lines
802 B
Vue
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>
|