Commit 691f45bd authored by Mac's avatar Mac

1,播放的评论列表 发表 删除 点赞/取消 等一系列功能

parent 0dbb1fc3
......@@ -58,7 +58,7 @@ App(
netcallController: null,
ENVIRONMENT_CONFIG,
PAGE_CONFIG,
queryUser:{}
queryUser:{},
},
onShow: function (e) {
if (e.scene == 1007 || e.scene == 1008) {
......@@ -88,8 +88,9 @@ App(
width: systemInfo.windowWidth,
height: systemInfo.windowHeight
}
this.globalData.isPushBeCallPage = false
this.globalData.isPushBeCallPage = false
},
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9',
// 请求接口
$api: function (url, data) {
......@@ -135,6 +136,48 @@ App(
})
return promise;
},
$api_t: function (url, data) {
var promise = new Promise((resolve, reject) => {
let timestamp = (new Date()).valueOf()
let sign = md5('cmd=' + url + '&' + 'msg=' + encodeURIComponent(data).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + "" + '&' + 'key=' + '')
wx.request({
url: netUrl,
method: 'POST',
data: {
cmd: url,
msg: data,
timestamp: timestamp,
token: "",
sign: sign
},
success(res) {
wx.hideLoading()
if (res.data.resultCode === 1) {
resolve(res.data.data);
} else if (res.data.resultCode === 10000 || res.data.resultCode === 10001) {
// wx.navigateTo({
// url: '/pages/login/login'
// })
wx.showToast({
title: res.data.message,
icon: 'none',
duration: 1000
})
} else {
wx.showToast({
title: res.data.message,
icon: 'none',
duration: 1000
})
reject(res.data)
}
}
})
})
return promise;
},
}
)
)
......@@ -22,7 +22,8 @@
"pages/validateForm/yzCard/yzCard",
"pages/comments/comments",
"pages/VoucherDetails/VoucherDetails",
"pages/video/videoAuthor/videoAuthor"
"pages/video/videoAuthor/videoAuthor",
"pages/video/palyvideo/palyvideo"
],
"window": {
"backgroundTextStyle": "light",
......
const app = getApp()
var util = require('../../../utils/util.js')
Page({
/**
* 页面的初始数据
*/
data: {
videoDetail: '',
start: 0,
current: 0,
startTouch: '',
startNum: '0',
//其中的 视频url(videoUrl) 封面url(videoImageUrl) 头像url(headUrl) 的话大家自己填上就行
videoList: [], //接口返回的视频列表。
touch: false,
touchStartTime: 0, //触摸开始时间
touchEndTime: 0, // 触摸结束时间
lastTapTime: 0, // 单击事件点击后要触发的函数
lastTapTimeoutFunc: null,
switchTo: true,
sliderShow:true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this;
let objlist = decodeURIComponent(options.list)
let list = JSON.parse(objlist);
let index = options.index;
this.setData({
videoList: list,
current:index
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
this.videoContext = wx.createVideoContext('videoplayer');
this.setData({
updateState: true
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
dataList: function() { //加载数据
let that= this;
let userInfo = (wx.getStorageSync('userInfo'))
let msg = { 'RecommendNum': 6, 'GuestId': userInfo.GuestId}
app.$api('Video_get_GetLYQVideoRecommendCache', msg).then(res => {
var listTem = that.data.videoList;
var dataList = res;
//添加新任务列表
that.setData({
videoList: listTem.concat(dataList)
})
if (that.data.videoList.length>0){
this.videoWatch()
}
}).catch(err => { })
},
// 下面主要模仿滑动事件
touchstart: function(e) {
this.setData({
touchStartTime: e.timeStamp,
showGuide: false
})
let startTouch = e.changedTouches[0]
this.setData({
startTouch: startTouch,
touch: false
})
},
touchmove: function(e) {
let Y = e.changedTouches[0].pageY - this.data.startTouch.pageY;
},
touchend: function(e) {
this.setData({
touchEndTime: e.timeStamp
})
this.getDirect(this.data.startTouch, e.changedTouches[0])
},
touchcancel: function(e) {
this.getDirect(this.data.startTouch, e.changedTouches[0])
},
// 计算滑动方向
getDirect: function(start, end) {
var X = end.pageX - start.pageX,
Y = end.pageY - start.pageY;
if (Math.abs(X) > Math.abs(Y) && X > 0) {
console.log("left 2 right");
} else if (Math.abs(X) > Math.abs(Y) && X < 0) {
console.log("right 2 left");
} else if (Math.abs(Y) > Math.abs(X) && Y > 40) {
if (this.data.current > 0) {
this.setData({
touch: true,
transitionOver: false
})
this.pre()
} else {
this.setData({
current: 0
})
}
} else if (Math.abs(Y) > Math.abs(X) && Y < -40) {
if (this.data.current < this.data.videoList.length - 2) {
this.setData({
touch: true
})
this.next()
} else {
var startNum = parseInt(this.data.startNum) + 5;
this.setData({
startNum: startNum,
})
// this.dataList();
this.setData({
current: this.data.videoList.length - 1
})
}
}
},
// 播放上一个
pre: function() {
console.log()
this.setData({
current: this.data.current - 1,
play:false
})
},
// 播放下一个
next: function() {
this.setData({
current: this.data.current + 1,
play: false
})
this.videoWatch()
},
// 标记视频为已看
videoWatch:function(){
let that = this;
let userInfo = (wx.getStorageSync('userInfo'))
let VideoId = that.data.videoList[that.data.current].Id
let msg = {
'VideoId': VideoId,
'Type':1 ,
'GuestId': userInfo.GuestId
}
app.$api_t('Video_post_SetLYQVideoWatch', msg).then(res => {
}).catch(err => { })
},
//点击暂停/开始
videoTap: function() {
let that = this
//获取video
that.videoContext = wx.createVideoContext('videoplayer')
if (that.data.play) {
//开始播放
setTimeout(()=>{
that.videoContext.play() //开始播放
},0)
that.setData({
play: false
})
} else {
//当play==false 显示图片 暂停
setTimeout(() => {
that.videoContext.pause() //暂停播放
},0)
that.setData({
play: true
})
}
},
bindPlay: function () {
this.setData({ play: false })
},
// 暂停播放
bindPause: function () {
this.setData({ play: true })
},
//播放条时间改表触发
videoUpdate(e) {
if (this.data.updateState) { //判断拖拽完成后才触发更新,避免拖拽失效
let sliderValue = e.detail.currentTime / e.detail.duration * 100;
if (e.detail.duration>30){ //大于30s 显示进度条
this.setData({ sliderShow:true})
}else{
this.setData({ sliderShow: false })
}
this.setData({
sliderValue: sliderValue,
duration: e.detail.duration
})
}
},
sliderChanging(e) {
this.setData({
updateState: false //拖拽过程中,不允许更新进度条
})
},
//拖动进度条触发事件
sliderChange(e) {
if (this.data.duration) {
this.videoContext.seek(e.detail.value / 100 * this.data.duration); //完成拖动后,计算对应时间并跳转到指定位置
this.setData({
sliderValue: e.detail.value,
updateState: true //完成拖动后允许更新滚动条
})
}
},
// 喜欢和不喜欢
videoLike:function(){
let that = this;
let userInfo = (wx.getStorageSync('userInfo'))
let videoList = that.data.videoList;
let current = that.data.current;
let VideoId = videoList[current].Id;
let IsMyLike = videoList[current].IsMyLike;
let Type = IsMyLike == 0 ? 1 : 2;
if (Type==1){
videoList[current].IsMyLike=1;
videoList[current].LikeNum = videoList[current].LikeNum+1;
}else{
videoList[current].IsMyLike = 0;
videoList[current].LikeNum = videoList[current].LikeNum - 1;
}
that.setData({
videoList: videoList
})
let msg = {
'VideoId': VideoId,
'Type': Type,
'GuestId': userInfo.GuestId
}
app.$api_t('Video_post_SetLYQVideoLike', msg).then(res => {
if (Type == 1){
wx.showToast({
title: '添加到喜欢',
icon: 'none',
duration: 1000
})
}else{
wx.showToast({
title: '已从喜欢列表移除',
icon: 'none',
duration: 1000
})
}
}).catch(err => {
//如果接口调取失败 操作还原
if (Type == 1) {
videoList[current].IsMyLike = 0;
videoList[current].LikeNum = videoList[current].LikeNum - 1;
} else {
videoList[current].IsMyLike = 1;
videoList[current].LikeNum = videoList[current].LikeNum + 1;
}
})
},
personal:function(e){
var that = this;
var pages = getCurrentPages(); // 当前页面
var beforePage = pages[pages.length - 2]; // 前一个页面
wx.navigateBack({
success: function () {
beforePage.RefreshDate(that.data.videoList); // 执行前一个页面的onLoad方法
}
});
},
})
\ No newline at end of file
{
"navigationBarTitleText": "视频详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true,
"navigationStyle": "custom",
"disableScroll": true
}
\ No newline at end of file
<view class="videoBox">
<view class="video {{touch==true? 'transfrom' : '' }}" style="transform:translateY(-{{current*100}}%);" bindtouchstart='touchstart' bindtouchmove='touchmove' bindtouchend='touchend' bindtouchcancel='touchcancel'>
<view wx:for="{{videoList}}" class='videoitem' wx:key="{{item}}">
<video src="{{item.VideoAddress}}" id="videoplayer" bindtimeupdate="videoUpdate" bindtap='videoTap' wx:if="{{current==index}}" object-fit="contain" loop='{{true}}' autoplay='{{true}}' custom-cache="{{true}}" controls='{{false}}' show-progress="{{true}}" show-fullscreen-btn="{{false}}" show-play-btn="{{false}}" bindplay='bindPlay' bindpause='bindPause'
show-center-play-btn="{{false}}" enable-progress-gesture="{{false}}" vslide-gesture-in-fullscreen="{{false}}" poster="{{item.videoImageUrl}}">
</video>
<!-- <image src="http://{{item.videoImageUrl}}" class="preImage" mode='aspectFit' lazy-load="{{true}}" wx:else></image> -->
<!-- 右侧区域 -->
<view class='btnBox {{switchTo?"show":"hide"}}'>
<view class='btnTx E_Photo' bindtap='personal'>
<image style="width:76rpx;height:76rpx;border-radius: 38rpx;" src='{{item.EmPhoto}}'></image>
</view>
<view class='btnTx' style="margin-top:20rpx" bindtap='videoLike'>
<image wx:if="{{item.IsMyLike==1}}" style="width:69rpx;height:62rpx" src='../../../images/index/dz1.png' ></image>
<image wx:elif="{{item.IsMyLike==0}}" style="width:69rpx;height:62rpx" src='../../../images/index/dz.png' ></image>
<text class="btnBoxText">{{item.LikeNum}}</text>
</view>
<view class='btnTx' bindtap='commentList'>
<image style="width:69rpx;height:62rpx" src='../../../images/index/xx.png'></image>
<text class="btnBoxText">{{item.CommentNum}}</text>
</view>
<view class='btnTx'>
<image style="width:69rpx;height:62rpx" src='../../../images/index/fx.png'></image>
</view>
<view class='btnTx' style="margin-top:20rpx">
<image style="width:69rpx;height:62rpx;marginTop:20rpx" src='../../../images/index/sp.png'></image>
</view>
</view>
<!-- 描述 -->
<view class='describe {{switchTo?"show":"hide"}}'>
<view class='nameAddr clearfix'>
<text class='fl' style="margin-right:10rpx">@{{item.EmName}}</text>
<view class='fl addr clearfix'>
<text class='fl'>#{{item.Label}}</text>
</view>
</view>
<text class="descText">{{item.Name}}</text>
<!-- <view class='labelS clearfix'>
<text wx:for='{{item.tagnamesArr}}' wx:key='{{item}}' wx:for-item="item">#{{item}}</text>
</view> -->
</view>
<!-- 播放暂停图标 请换成自己的路径 -->
<image class="playImg" src="../../../images/bofang.png" wx:if="{{play}}" bindtap='videoTap'></image>
<!-- 进度条 -->
<slider class='{{sliderShow?"show":"hide"}}' bindchange="sliderChange" bindchanging="sliderChanging" step="1" block-size='10' value="{{sliderValue}}" backgroundColor="#797979" activeColor="#fff" />
</view>
</view>
<view class='blck' bindtap='personal'>
<image src="../../../images/Close.png"></image>
</view>
</view>
/**index.wxss**/
page{
height: 100%;
}
.fl{
float:left;
}
.fr{
float: right;
}
.hide{
display: none !important;
}
.show{
display: block;
}
.videoBox{
overflow: hidden;
height: 100%;
position: relative;
}
.video{
width: 100%;
height: 100%;
display: block;
position: absolute;
top:0;
left: 0;
}
.transfrom{
transition: transform 0.6s ease-out;
}
.videoitem{
height: 100%;
background:#000000;
position: relative;
}
.videoitem video{
width: 100%;
height: 100vh;
}
.preImage{
display: block;
width: 100%;
}
/* 右侧按钮 */
.btnBox{
width: 100rpx;
position: absolute;
right: -4%;
bottom: -25%;
transform: translate(-50%,-110%);
display: flex;
flex-direction: column;
align-items: center
}
.btnBox image{
display: block;
}
.btnBox view,.btnBox button{
margin-bottom: 30rpx;
}
.btnBox button{
padding: 0;
background: transparent;
}
.btnBox view image,.btnBox button image{
margin: 0 auto;
}
.btnBox view text,.btnBox button text{
line-height: 50rpx;
font-size: 24rpx;
color: #fff;
text-align: center;
}
.btnBox .btnTx{
position: relative;
display: flex;
flex-direction: column;
align-items: center
}
.btnBox .btnTx .TX{
width: 94rpx;
height: 94rpx;
border-radius: 50%;
border: 2px solid #fff;
overflow: hidden;
}
.btnBox .btnTx .followAdd{
width: 39rpx;
height: 39rpx;
position: absolute;
top: 100%;
left: 50%;
transform: translate(-50%,-50%);
border-radius:50%;
overflow: hidden;
}
.btnBox .btnCollect image{
width: 54rpx;
height: 52rpx;
}
.btnBox .btnShare image{
width: 54rpx;
height: 43rpx;
}
.btnBox .btnTelPhone image{
width: 45rpx;
height: 47rpx;
}
.btnBox .btnShut image{
width: 49rpx;
height: 49rpx;
}
/* 详情描述 */
.describe{
position: absolute;
width:75%;
left:5%;
bottom:5%;
}
.describe .nameAddr text{
font-size: 30rpx;
line-height: 58rpx;
color: #fff;
}
.describe .addr image{
width: 22rpx;
height: 28rpx;
margin: 15rpx 10rpx 0 0;
}
.describe .descText{
font-size: 28rpx;
color: #fff;
line-height: 38rpx;
}
.describe .labelS text{
float: left;
font-size: 28rpx;
color: #fff;
line-height: 48rpx;
margin-right: 10rpx;
}
slider{
display: 100%;
width: 100%;
position: absolute;
bottom: -1%;
left: 50%;
transform: translate(-50%,-50%);
margin: 0;
}
.btnBoxText{
font-size: 28rpx;
color: #fff;
}
.E_Photo{
width: 76rpx;
height: 76rpx;
border-radius: 38rpx;
border:1px solid white
}
.playImg{
width: 80rpx;
height: 80rpx;
position: absolute;
left: 50%;
top:50%;
}
.blck{
position: relative;
left: 30rpx;
top:80rpx;
}
.blck image{
width: 40rpx;
height: 40rpx;
}
\ No newline at end of file
This diff is collapsed.
......@@ -17,7 +17,7 @@
<text class="btnBoxText">{{item.LikeNum}}</text>
</view>
<view class='btnTx' bindtap='commentList'>
<view class='btnTx' bindtap='commentList' bindtap="btnTx">
<image style="width:69rpx;height:62rpx" src='../../images/index/xx.png'></image>
<text class="btnBoxText">{{item.CommentNum}}</text>
......@@ -46,7 +46,82 @@
<!-- 播放暂停图标 请换成自己的路径 -->
<image class="playImg" src="../../images/bofang.png" wx:if="{{play}}" bindtap='videoTap'></image>
<!-- 进度条 -->
<slider class='{{switchTo?"show":"hide"}}' bindchange="sliderChange" bindchanging="sliderChanging" step="1" block-size='10' value="{{sliderValue}}" backgroundColor="#797979" activeColor="#fff" />
<slider class='{{sliderShow?"show":"hide"}}' bindchange="sliderChange" bindchanging="sliderChanging" step="1" block-size='10' value="{{sliderValue}}" backgroundColor="#797979" activeColor="#fff" />
</view>
</view>
<view class="comment {{showComment?'show':'hide'}}" >
<view class="con_box">
<view class="C_top">
<text>评论</text>
<image src="../../images/index/close.png" bindtap='closeCon'></image>
</view>
<scroll-view
bindscrolltolower="loadMore"
scroll-y style="width: 100%; height: {{height*0.7-80}}px;"
>
<view wx:for="{{conList}}" wx:key="conList" class='listBox' data-index="{{index}}" wx:for-index="index" bindlongpress="handleLongPress">
<view class='listItem'>
<view class='C_photo' bindtap="ReplyPeople" data-index="{{index}}">
<image wx:if="{{item.EmPhoto!=null && item.EmPhoto!=''}}" src="item.EmPhoto" ></image>
<image wx:else src="../../images/tabbar/me.png" bindtap='closeCon'></image>
</view>
<view class="neir">
<text wx:if="{{item.EmName!='' }}" bindtap="ReplyPeople" data-index="{{index}}">{{item.EmName}}</text>
<text wx:else bindtap="ReplyPeople" data-index="{{index}}">匿名</text>
<text style='color:#111111'>{{item.Content}} <text style='color:#888888;font-size:20rpx'>{{item.UpdateDate}}</text> </text>
<text wx:if="{{item.RevertNum>0 && item.showChildren==false}}" style="margin-top:10rpx" bindtap="openChildren" data-index="{{index}}">--展开更多的评论</text>
</view>
<view class='C_dian' bindtap="dianzan" data-index="{{index}}">
<image wx:if="{{item.IsMyLike==1}}" style="width:29rpx;height:22rpx" src='../../images/index/dz1.png' ></image>
<image wx:elif="{{item.IsMyLike==0}}" style="width:29rpx;height:22rpx" src='../../images/index/hx.png' ></image>
<text style="font-size: 24rpx;color: #888888;width:29rpx;text-align: center;margin-top:10rpx">{{item.LikeNum}}</text>
</view>
</view>
<view style="width:90%,margin-left:10%">
<view wx:if="{{item.RevertNum>0 && item.showChildren==true}}" wx:for="{{item.ChildrenList}}" wx:for-item = 'data' wx:key="item.ChildrenList" class='listItem_t' data-index1="{{index}}" data-index2="{{son_index}}" wx:for-index="son_index" bindlongpress="handleLongPress2">
<view class='C_photo'>
<image wx:if="{{data.EmPhoto!=null && data.EmPhoto!=''}}" src="data.EmPhoto" ></image>
<image wx:else src="../../images/tabbar/me.png" bindtap='closeCon'></image>
</view>
<view class="neir" >
<text wx:if="{{data.EmName!='' }}">{{data.EmName}}</text>
<text wx:else>匿名</text>
<text style='color:#111111'>{{data.Content}} <text style='color:#888888;font-size:20rpx' >{{data.UpdateDate}}</text> </text>
</view>
<view class='C_dian' bindtap="dianzan2" data-index1="{{index}}" data-index2="{{son_index}}" >
<image wx:if="{{data.IsMyLike==1}}" style="width:29rpx;height:22rpx" src='../../images/index/dz1.png' ></image>
<image wx:elif="{{data.IsMyLike==0}}" style="width:29rpx;height:22rpx" src='../../images/index/hx.png' ></image>
<text style="font-size: 24rpx;color: #888888;width:29rpx;text-align: center;margin-top:10rpx">{{data.LikeNum}}</text>
</view>
</view>
</view>
</view>
<view wx:if="{{hasMoreData}}" class="loadmore loading">正在加载中...</view>
<view wx:else class="loadmore">没有更多评论了</view>
</scroll-view>
<!-- input评论 -->
<view class="input">
<input placeholder="{{placeholder}}" bindinput='bindinput' focus="{{inputShowed}}" value="{{searchinput}}" bindblur="inputBlur"
confirm-type='发送' bindkeyboardheightchange="activeFocus"
/>
<view class='btn_c' bindtap="btn_c">
<text>发送</text>
</view>
</view>
</view>
<!-- 删除弹框 -->
<view class="delBox {{showDel && ziji==false?'show':'hide'}}" bindtap="closedel" >
<view class='del' bindtap='delItem' >删除</view>
</view>
<view class="delBox {{showDel2 && ziji==true?'show':'hide'}}" bindtap="closedel" >
<view class='del' bindtap='delItem2' >删除</view>
</view>
</view>
</view>
......@@ -168,4 +168,172 @@ slider{
position: absolute;
left: 50%;
top:50%;
}
\ No newline at end of file
}
.comment{
width: 100%;
height: 100%;
background: rgba(226, 226, 226, 0.1);
position: relative;
left: 0;
top:0;
}
.con_box{
width: 100%;
height: 70%;
position: absolute;
left: 0;
bottom: 0;
background: white;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx
}
.C_top{
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: center
}
.C_top text{
font-size: 30rpx;
color: #111111;
text-align: center;
}
.C_top image{
width: 30rpx;
height: 30rpx;
position: absolute;
right: 25rpx;
top:25rpx;
}
.input{
width: 100%;
height: 40px;
position: absolute;
left: 0;
bottom: 0;
border-top: 1px solid #E2E2E2;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between
}
.input input{
width: 70%;
height: 30px;
margin-left: 20rpx;
font-size: 24rpx;
}
.btn_c{
width: 120rpx;
height: 60rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
justify-content: center;
background: #257BF1;
font-size: 29rpx;
color: white;
margin-right: 20rpx
}
.loadmore {
color: #666666;
font-size: 24rpx;
line-height: 100rpx;
text-align: center;
width: 100%;
float: left
}
.loadmore.loading::before {
content: '';
width: 40rpx;
height: 40rpx;
margin-top: -10rpx;
margin-right: 10rpx;
display: inline-block;
vertical-align: middle;
animation: loading 1s steps(12) infinite;
background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;
background-size: 100%
}
@keyframes loading {
from {
transform: rotate(0deg)
}
to {
transform: rotate(-360deg)
}
}
.listItem{
width: 90%;
margin-left: 5%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
margin-top: 15rpx
}
.C_photo{
width: 50rpx;
height: 50rpx;
border-radius: 25rpx;
border: 1px solid white;
overflow: hidden
}
.C_photo image{
width: 50rpx;
height: 50rpx;
border-radius: 25rpx;
}
.neir{
width: 80%;
display: flex;
flex-direction: column;
font-size: 24rpx;
color: #888888;
margin-left: 20rpx
}
.C_dian{
width: 80rpx;
display: flex;
flex-direction: column;
align-items: flex-end;
}
.C_dian image{
margin-top: 10rpx
}
.listItem_t{
width: 85%;
margin-left: 10%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
margin-top: 10rpx
}
.delBox{
width: 100%;
height: 100%;
background: rgba(226, 226, 226, 0.8);
position: relative;
left: 0;
top:0;
display: flex;
align-items: center;
justify-content: center;
z-index: 999
}
.del{
width: 80%;
height: 40px;
background: white;
line-height: 40px;
font-size: 30rpx;
color: #111111;
padding-left:20rpx
}
......@@ -200,6 +200,32 @@ Page({
// icon:'none'
// })
}
},
enterPlay:function(e){
var that = this;
let list;
let index = e.currentTarget.dataset.index;
if (that.data.Selection==0){
list = encodeURIComponent(JSON.stringify(that.data.workslist))
}else{
list = encodeURIComponent(JSON.stringify(that.data.likelist))
}
wx.navigateTo({
url: '/pages/video/palyvideo/palyvideo?list=' + list + '&index=' + index
})
},
RefreshDate:function(e){ //更新数据
var that = this;
if (that.data.Selection == 0) {
that.setData({
workslist:e
})
}else{
that.setData({
likelist: e
})
}
}
})
\ No newline at end of file
......@@ -27,7 +27,7 @@
scroll-y style="width: 100%; height: {{height-290}}px;"
bindscrolltolower="loadMore"
class='workslist {{Selection==0?"show":"hide"}}'>
<view wx:for="{{workslist}}" wx:key="workslist" class='listItem'>
<view wx:for="{{workslist}}" wx:key="workslist" class='listItem' bindtap="enterPlay" data-index="{{index}}">
<image src='item.Cover' class="worksImg">
<view class="playNum">
<image class="playImg" src="../../../images/bofang.png"></image>
......@@ -35,17 +35,15 @@ class='workslist {{Selection==0?"show":"hide"}}'>
</view>
</image>
</view>
<!-- <view class="Tips">
<text wx:if="{{workslist.length==0}}" >暂无数据</text>
</view> -->
<view wx:if="{{hasMoreData}}" class="loadmore loading">正在加载中...</view>
<view wx:else class="loadmore">没有更多内容了</view>
<view wx:if="{{hasMoreData}}" class="loadmore loading">正在加载中...</view>
<view wx:else class="loadmore">没有更多内容了</view>
</scroll-view>
<scroll-view
bindscrolltolower="loadMore_l"
scroll-y style="width: 100%; height: {{height-290}}px;"
class='workslist {{Selection==1?"show":"hide"}}'>
<view wx:for="{{likelist}}" wx:key="workslist" class='listItem'>
<view wx:for="{{likelist}}" wx:key="workslist" class='listItem' data-index="{{index}}" bindtap="enterPlay">
<image src='item.Cover' class="worksImg">
<view class="playNum">
<image class="playImg" src="../../../images/bofang.png"></image>
......@@ -53,9 +51,7 @@ class='workslist {{Selection==0?"show":"hide"}}'>
</view>
</image>
</view>
<!-- <view class="Tips">
<text wx:if="{{likelist.length==0}}" >暂无数据</text>
</view> -->
<view wx:if="{{hasMoreData2}}" class="loadmore loading">正在加载中...</view>
<view wx:else class="loadmore">没有更多内容了</view>
<view wx:else class="loadmore">没有更多内容了</view>
</scroll-view>
\ No newline at end of file
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