Commit e12c5d66 authored by 罗超's avatar 罗超

1

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