图标调整
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 693 B |
|
@ -63,7 +63,7 @@
|
|||
<view class="topItemText">自助模考</view>
|
||||
</a>
|
||||
<a class="topItem" bindtap="goLianxi">
|
||||
<image class="topItemImg" src="/images/lianxi.png" mode="widthFix"></image>
|
||||
<image class="topItemImg" src="/images/lianxii.png" mode="widthFix"></image>
|
||||
<view class="topItemText">题库练习</view>
|
||||
</a>
|
||||
<a class="topItem" bindtap="goCuoti">
|
||||
|
|
|
@ -1,29 +1,28 @@
|
|||
// pages/lianxi/index.js
|
||||
const api = require("../../utils/request.js");
|
||||
const api = require("../../utils/request");
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
results: [],
|
||||
query: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
type:'视频'
|
||||
}
|
||||
},
|
||||
isAutoPlay:false
|
||||
},
|
||||
// onLoad: function () {
|
||||
// var that = this
|
||||
// that.getList(that.data.query)
|
||||
// },
|
||||
onShow: function () {
|
||||
onLoad: function () {
|
||||
var that = this
|
||||
that.getList(that.data.query)
|
||||
},
|
||||
getList: function () {
|
||||
var that = this
|
||||
api.request('/cms/material/', 'GET', that.data.query).then(res => {
|
||||
// for(var i=0;i<res.data.results.length;i++){
|
||||
// res.data.results[i].showTitle=true
|
||||
// }
|
||||
for(var i=0;i<res.data.results.length;i++){
|
||||
res.data.results[i].showTitle=true
|
||||
}
|
||||
if (that.data.query.page == 1) {
|
||||
that.data.results = res.data.results
|
||||
} else {
|
||||
|
@ -35,7 +34,6 @@ Page({
|
|||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
|
@ -45,7 +43,6 @@ Page({
|
|||
that.getList();
|
||||
wx.stopPullDownRefresh();
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
|
@ -60,11 +57,10 @@ Page({
|
|||
that.data.query.page = that.data.query.page + 1
|
||||
that.getList()
|
||||
}
|
||||
|
||||
},
|
||||
play:function(e){
|
||||
let index = e.currentTarget.dataset.index
|
||||
// this.data.results[index].showTitle=false
|
||||
this.data.results[index].showTitle=false
|
||||
this.setData({
|
||||
results:this.data.results
|
||||
})
|
||||
|
@ -74,7 +70,7 @@ Page({
|
|||
},
|
||||
pause:function(e){
|
||||
let index = e.currentTarget.dataset.index
|
||||
// this.data.results[index].showTitle=true
|
||||
this.data.results[index].showTitle=true
|
||||
this.setData({
|
||||
results:this.data.results
|
||||
})
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
"txv-video": "plugin://tencentvideo/video"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 50
|
||||
"onReachBottomDistance": 50,
|
||||
"navigationBarTitleText": "学习视频"
|
||||
}
|
|
@ -1,12 +1,17 @@
|
|||
<view class="page" style="padding: 20rpx;">
|
||||
<view style="text-align:center" wx:if="{{count==0}}">暂无视频资源</view>
|
||||
<block wx:for="{{results}}" wx:key="unique">
|
||||
<view style="background-color: #ffffff;box-shadow: 0 0 10rpx 10rpx #dddddd;border-radius: 10rpx;overflow: hidden;margin-bottom: 20rpx;">
|
||||
<block wx:if="{{results}}">
|
||||
<view wx:for="{{results}}" wx:key="{{item.id}}" class="videoWrap">
|
||||
<txv-video
|
||||
wx:if="{{item.id}}"
|
||||
vid="{{item.vid}}"
|
||||
playerid="txv1"
|
||||
autoplay="{{isAutoPlay}}"
|
||||
playerid="{{item.vid}}"
|
||||
autoplay="{{false}}"
|
||||
|
||||
>
|
||||
<view class='txv-video-slot' wx:if="{{item.name}}">
|
||||
<span style="margin-left:6px">{{item.name}}</span>
|
||||
</view>
|
||||
</txv-video>
|
||||
<view style="display: flex;justify-content: space-between;padding: 5rpx 15rpx;">
|
||||
<view>{{item.name}}</view>
|
||||
|
|
|
@ -12,3 +12,10 @@
|
|||
background-color: black;
|
||||
opacity:0.3;
|
||||
}
|
||||
.videoWrap{
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 0 10rpx 10rpx #dddddd;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
}
|