|
@@ -18,7 +18,7 @@
|
|
:src="image.url"
|
|
:src="image.url"
|
|
@click="previewImage(i, item.imageList)"
|
|
@click="previewImage(i, item.imageList)"
|
|
mode="aspectFill"
|
|
mode="aspectFill"
|
|
- v-for="(image, i) in imageFormat(item.imageList)"
|
|
|
|
|
|
+ v-for="(image, i) in imageFormat(item.imageList, index)"
|
|
:key="i"
|
|
:key="i"
|
|
:style="image.style"
|
|
:style="image.style"
|
|
></image>
|
|
></image>
|
|
@@ -168,10 +168,7 @@ export default {
|
|
timer: null,
|
|
timer: null,
|
|
tipStatus: true, // 状态
|
|
tipStatus: true, // 状态
|
|
userInfo: {}, // 用户信息
|
|
userInfo: {}, // 用户信息
|
|
- videoPermission: { // 视频播放权限
|
|
|
|
- allTime: 10, // 分
|
|
|
|
- onplay: 3 * 100 * 60 // 分钟
|
|
|
|
- }
|
|
|
|
|
|
+ num: 0,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -215,11 +212,22 @@ export default {
|
|
userId: this.userId,
|
|
userId: this.userId,
|
|
archiveId: this.archiveId
|
|
archiveId: this.archiveId
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- console.log(res, '数据是')
|
|
|
|
this.imageArchiveList = res.data.imageArchiveList
|
|
this.imageArchiveList = res.data.imageArchiveList
|
|
this.videoArchiveList = res.data.videoArchiveList
|
|
this.videoArchiveList = res.data.videoArchiveList
|
|
this.fileArchiveList = res.data.fileArchiveList
|
|
this.fileArchiveList = res.data.fileArchiveList
|
|
this.permission = res.data.permission
|
|
this.permission = res.data.permission
|
|
|
|
+ this.imageArchiveList.forEach((item, index) => {
|
|
|
|
+ if (item.imageNum !== item.imageList.length) {
|
|
|
|
+ this.num = item.imageNum - item.imageList.length
|
|
|
|
+ for (let i = 0; i < this.num; i++) {
|
|
|
|
+ item.imageList.push(this.defaultImage)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.videoArchiveList.forEach(item => {
|
|
|
|
+ item.fileUrl = decodeURIComponent(item.fileUrl)
|
|
|
|
+ })
|
|
|
|
+ // console.log(res.data.videoArchiveList)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//采美豆抵扣
|
|
//采美豆抵扣
|
|
@@ -282,13 +290,14 @@ export default {
|
|
// 监听video时长
|
|
// 监听video时长
|
|
onPlayVideo(e) {
|
|
onPlayVideo(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
- const allTime = Math.floor(e.detail.duration) / 100 / 60 // 获取分钟
|
|
|
|
|
|
+ const allTime = parseInt(((e.detail.duration)% 3600) / 60) // 获取分钟
|
|
|
|
+ const inPlay = parseInt(((e.detail.duration)% 3600) / 60)
|
|
if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
|
|
if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
|
|
- if(allTime >= this.videoPermission.allTime && this.videoPermission.onplay > e.detail.currentTime) {
|
|
|
|
|
|
+ if(allTime >= 10 && (3 < inPlay)) {
|
|
this.handleStop(e.target.id)
|
|
this.handleStop(e.target.id)
|
|
this.checkPermission()
|
|
this.checkPermission()
|
|
}
|
|
}
|
|
- if (allTime < this.videoPermission.allTime) {
|
|
|
|
|
|
+ if (allTime < 10) {
|
|
this.handleStop(e.target.id)
|
|
this.handleStop(e.target.id)
|
|
this.checkPermission()
|
|
this.checkPermission()
|
|
}
|
|
}
|
|
@@ -341,7 +350,7 @@ export default {
|
|
// }else if (this.permission === 2) {
|
|
// }else if (this.permission === 2) {
|
|
if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
|
|
if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
|
|
if(previewImageList.length >= 5) {
|
|
if(previewImageList.length >= 5) {
|
|
- if(index < 3) {
|
|
|
|
|
|
+ if(index < 2) {
|
|
uni.previewImage({
|
|
uni.previewImage({
|
|
current: index,
|
|
current: index,
|
|
indicator: 'number',
|
|
indicator: 'number',
|
|
@@ -411,7 +420,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//图片列表处理
|
|
//图片列表处理
|
|
- imageFormat(list) {
|
|
|
|
|
|
+ imageFormat(list, index) {
|
|
const imageList = []
|
|
const imageList = []
|
|
if (list.length > 2) {
|
|
if (list.length > 2) {
|
|
list.forEach((item, index) => {
|
|
list.forEach((item, index) => {
|