Commit e12c5d66 authored by 罗超's avatar 罗超

1

parent a31ce9c6
......@@ -42,7 +42,8 @@
dataList:[],
imgBaseUrl:"",
controls:false,//显示默认控件
videoContext:""
videoContext:"",
preImgList:[]
}
},
watch:{
......@@ -75,6 +76,11 @@
if (res.resultCode == 1) {
this.navList = res.data.AllPicList;
this.dataList=res.data.AllPicList[index]
this.dataList.TagPicList.map(i=>{
if(i.Path){
this.preImgList.push(i.Path)
}
})
this.dataList.TagPicList.forEach(item=>{
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){
item.type='image'
......@@ -91,6 +97,11 @@
changeNav(index){
this.curNavIndex=index
this.dataList=this.navList[index]
this.dataList.TagPicList.map(i=>{
if(i.Path){
this.preImgList.push(i.Path)
}
})
this.dataList.TagPicList.forEach(item=>{
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){
item.type='image'
......@@ -103,7 +114,7 @@
//预览图片
previewImage(i,url) {
uni.previewImage({
urls: [url],
urls: this.preImgList,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
......
......@@ -40,9 +40,9 @@
navList:[],
curNavIndex:0,
dataList:[],
imgBaseUrl:"",
controls:false,//显示默认控件
videoContext:""
videoContext:"",
preImgList:[]
}
},
watch:{
......@@ -61,7 +61,6 @@
this.ID = options.id
this.getDetail()
}
this.imgBaseUrl="http://192.168.20.214:8130"
},
methods: {
//获取详情
......@@ -76,6 +75,12 @@
if (res.resultCode == 1) {
this.navList = res.data.AllPicList;
this.dataList=res.data.AllPicList[index]
this.preImgList=[]
this.dataList.TagPicList.map(i=>{
if(i.Path){
this.preImgList.push(i.Path)
}
})
this.dataList.TagPicList.forEach(item=>{
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){
item.type='image'
......@@ -84,7 +89,6 @@
}
})
console.log(this.dataList)
}
}
);
......@@ -92,6 +96,12 @@
changeNav(index){
this.curNavIndex=index
this.dataList=this.navList[index]
this.preImgList=[]
this.dataList.TagPicList.map(i=>{
if(i.Path){
this.preImgList.push(i.Path)
}
})
this.dataList.TagPicList.forEach(item=>{
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){
item.type='image'
......@@ -104,7 +114,7 @@
//预览图片
previewImage(i,url) {
uni.previewImage({
urls: [url],
urls: this.preImgList,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment