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