|
@@ -4,7 +4,7 @@ var beautyArchiveDetailMixin = {
|
|
|
data: {
|
|
|
listLoading: false,
|
|
|
//用户信息相关
|
|
|
- permission: 5, //用户权限 0可查看,1未登录,2需升级会员机构,3需升级医美会员机构,4需要抵扣采美豆,5无权限查看
|
|
|
+ permission: 1, //用户权限 0可查看,1未登录,2需升级会员机构,3需升级医美会员机构,4需要抵扣采美豆,5无权限查看
|
|
|
//页面配置
|
|
|
archiveId: '', //资料列表id
|
|
|
currentVideoUrl: '', //正在播放的视频链接(上一个播放的的视频)
|
|
@@ -49,12 +49,9 @@ var beautyArchiveDetailMixin = {
|
|
|
methods: {
|
|
|
// 图片点击事件
|
|
|
handleShowImage: function (i, imageList) {
|
|
|
- // this.initPreviewImage()
|
|
|
- console.log(this.permission, )
|
|
|
if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
|
|
|
if (imageList && imageList.length >= 5) {
|
|
|
if (i < 2) {
|
|
|
- console.log(111)
|
|
|
this.initPreviewImage()
|
|
|
} else {
|
|
|
if (this.checkPermission() !== 0) return;
|
|
@@ -65,37 +62,6 @@ var beautyArchiveDetailMixin = {
|
|
|
} else {
|
|
|
if (this.checkPermission() !== 0) return;
|
|
|
}
|
|
|
- // CAIMEI.Popup({
|
|
|
- // content: this.TipStatus.text,
|
|
|
- // confitmBtnText: this.TipStatus.btn,
|
|
|
- // cancelBtnText: '取消',
|
|
|
- // closeIcon:true
|
|
|
- // }, function () {
|
|
|
- // // 确认 执行 下一步 链接跳转 支付支付采美豆
|
|
|
- // this.handleClickToPage(this.TipStatus.redirect);
|
|
|
- // }, function () {
|
|
|
- // });
|
|
|
- // this.initPreviewImage()
|
|
|
- // } else {
|
|
|
- // CAIMEI.Popup({
|
|
|
- // content: this.TipStatus.text,
|
|
|
- // confitmBtnText: this.TipStatus.btn,
|
|
|
- // cancelBtnText: '取消',
|
|
|
- // closeIcon:true
|
|
|
- // }, function () {
|
|
|
- // // 确认 执行 下一步 链接跳转 支付支付采美豆
|
|
|
- // this.handleClickToPage(this.TipStatus.redirect);
|
|
|
- // }, function () {
|
|
|
- // });
|
|
|
- // if (this.checkPermission() !== 0) return;
|
|
|
- // }
|
|
|
- // }else {
|
|
|
- // if (this.checkPermission() !== 0) return;
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // if (this.checkPermission() !== 0) return;
|
|
|
- // }
|
|
|
- // if (this.checkPermission() !== 0) return;
|
|
|
},
|
|
|
//初始化预览图片配置
|
|
|
initPreviewImage: function () {
|
|
@@ -111,19 +77,12 @@ var beautyArchiveDetailMixin = {
|
|
|
handleShowPlayer: function (url, dom) {
|
|
|
if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
|
|
|
let _self = this;
|
|
|
-
|
|
|
//暂停上一个正在播放的播放器
|
|
|
this.currentVideoUrl = url;
|
|
|
this.isPlayer = true;
|
|
|
this.showVideoDialog = true;
|
|
|
- console.log(url)
|
|
|
setTimeout(function(){
|
|
|
- // var video = this.$refs.videoRef;
|
|
|
_self.currentVideo = document.querySelector('#realPlayer');
|
|
|
- // _self.currentVideo.oncanplay = function () {
|
|
|
- // console.log(parseInt((_self.currentVideo.duration % 3600)/60))
|
|
|
- // }
|
|
|
- // console.log(_self.duration)
|
|
|
if(_self.permission === 2 || _self.permission === 4 || _self.permission === 1) {
|
|
|
_self.currentVideo.oncanplay = function () {
|
|
|
console.log(_self.currentVideo.duration)
|
|
@@ -148,22 +107,6 @@ var beautyArchiveDetailMixin = {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- // _self.currentVideo.addEventListener('pause', function () {
|
|
|
- // _self.isPlayer = false;
|
|
|
- // console.log('暂停播放');
|
|
|
- // });
|
|
|
- // _self.currentVideo.addEventListener('ended', function () {
|
|
|
- // _self.isPlayer = false;
|
|
|
- // console.log('播放结束');
|
|
|
- // });
|
|
|
- // _self.currentVideo.addEventListener('error', function () {
|
|
|
- // _self.isPlayer = false;
|
|
|
- // console.log('播放错误');
|
|
|
- // });
|
|
|
- // _self.currentVideo.addEventListener('play', function () {
|
|
|
- // _self.isPlayer = true;
|
|
|
- // console.log('开始播放');
|
|
|
- // })
|
|
|
})
|
|
|
} else {
|
|
|
let _self = this;
|
|
@@ -172,7 +115,6 @@ var beautyArchiveDetailMixin = {
|
|
|
this.currentVideoUrl = url;
|
|
|
this.isPlayer = true;
|
|
|
this.showVideoDialog = true;
|
|
|
- console.log(url)
|
|
|
setTimeout(function(){
|
|
|
_self.currentVideo = document.querySelector('#realPlayer');
|
|
|
_self.currentVideo.addEventListener('pause', function () {
|
|
@@ -230,6 +172,15 @@ var beautyArchiveDetailMixin = {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ //文件预览跳转页面
|
|
|
+ fileContentPreview(str) {
|
|
|
+ if (window.localStorage.getItem('filePreviewInfo')) {
|
|
|
+ window.localStorage.removeItem('filePreviewInfo')
|
|
|
+ }
|
|
|
+ window.localStorage.setItem('filePreviewInfo', JSON.stringify(str))
|
|
|
+ window.location.href = "/product/filePreview.html"
|
|
|
+ },
|
|
|
+
|
|
|
openFile: function(url){
|
|
|
var a = document.createElement('a');
|
|
|
a.href = url + '&random=' + Math.random();
|