Commit 4a27f593 by shijiuyan

1

parent 27b622eb
......@@ -12,7 +12,7 @@ page, view, scroll-view, swiper, movable-area, cover-view, text, icon, rich-text
progress, button, checkbox-group, checkbox, form, input, label, picker,
picker-view, radio-group, slider, switch, textarea, navigator, audio, image,
video, live-player, live-pusher, open-data, web-view {
font-family: "微软雅黑"
font-family: "仿宋"
}
.van-tabbar-item{
position: relative;
......
// pages/classDetails/classDetails.js
import Toast from '../../dist/toast/toast';
var app = getApp();
Page({
......@@ -221,7 +222,9 @@ Page({
play:1
})
},
fail(res) { }
fail(res) {
Toast.fail('支付失败');
}
})
}
}
......
......@@ -34,10 +34,12 @@
</view>
<view class='fufeilook' wx:if="{{fufeiPage==1}}">
<view class='con_fufeilook'>
<image src="/img/money.png"></image>
<view class='top_con_fufeilook'>付费观看</view>
<view style="margin-top:50px;margin-left:33%;">
金额:<text>{{money}}</text>
<view style="margin-top:50px;">
付费金额
</view>
<view style="margin-top: 10px;font-size: 18px;">¥<text style="color:red;">{{money}}</text></view>
<view class='fufeiBtn'>
<view bindtap='backfufei'>取消</view>
<view style='background:rgb(91,155,213)' bindtap='surefufei'>确认</view>
......@@ -45,3 +47,4 @@
</view>
</view>
</view>
<van-toast id="van-toast" />
\ No newline at end of file
......@@ -132,30 +132,39 @@ page{
bottom: 0;
right: 0;
margin: auto;
width: 200px;
height: 200px;
width: 280px;
height: 300px;
background: #fff;
border-radius: 5px;
overflow: hidden;
text-align: center;
}
.con_fufeilook>image{
width:50px;
height: 50px;
position: absolute;
top:-19px;
left:-16px;
}
.top_con_fufeilook{
width: 100%;
text-align: center;
font-size: 16px;
font-size: 18px;
margin-top:25px;
font-weight: 600;
}
.fufeiBtn{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 30px;
height: 50px;
display: flex;
justify-content: space-between;
border-top: 1px solid #ccc;
}
.fufeiBtn>view{
width: 50%;
height: 30px;
line-height: 30px;
line-height: 50px;
text-align: center;
font-size: 14px;
}
\ No newline at end of file
......@@ -6,25 +6,36 @@ Page({
* 页面的初始数据
*/
data: {
page:0,
pageCount:0,
list:[],
play:false,
playUrl:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that=this;
var config = wx.getStorageSync('config');
wx:wx.request({
wx.request({
url: app.url+'ajax_get_user_media_history.php',
data: {
unionId: config.unionId,
page:0
page:that.data.page
},
header: { 'content-type': 'application/json'},
method: 'GET',
dataType: 'json',
success: function(res) {
console.log(res)
if(res.data.status=='OK'){
that.setData({
list: that.data.list.concat(res.data.result.list),
pageCount:res.data.result.pageCount
})
}
},
fail: function(res) {},
complete: function(res) {},
......@@ -79,12 +90,17 @@ Page({
onShareAppMessage: function () {
},
classDetails() {
wx.navigateTo({
url: '../classDetails/classDetails',
});
wx.setNavigationBarTitle({
title: '课程详情'
classDetails(e) {
var src = e.currentTarget.dataset.src;
var that=this;
that.setData({
play:true,
playUrl:src
})
},
closeVideo(){
this.setData({
play:false
})
}
})
\ No newline at end of file
<!--pages/lishi/lishi.wxml-->
<view>
<view class='listPublicWelfare'>
<view bindtap='classDetails'>
<view bindtap='classDetails' data-src='{{item.media}}' wx:for="{{list}}">
<view class='left_listPublicWelfare'>
<image src='../../img/3.jpg'></image>
<image src='{{item.front_image}}'></image>
</view>
<view class='right_listPublicWelfare'>
<text>陈老师关于志愿者理论1</text>
<text>{{item.title}}</text>
<view>
<van-button type="default" size="mini">小学课堂</van-button>
<image src='../../img/kefu.png'></image>
<text>10000</text>
<text>{{item.view_count}}</text>
</view>
<text>主讲教师:陈老师</text>
<text>主讲教师:{{item.teacher}}</text>
</view>
</view>
<view>
<!-- <view>
<view class='left_listPublicWelfare'>
<image src='../../img/3.jpg'></image>
</view>
......@@ -38,10 +38,14 @@
<view>
<!-- <van-button type="default" size="mini">小学课堂</van-button>
<image src='../../img/kefu.png'></image>
<text>10000</text> -->
<text>10000</text>
</view>
<text>主讲教师:陈老师</text>
</view>
</view> -->
</view>
</view>
</view>
<view wx:if="{{play}}" class="play-view">
<video src="{{playUrl}}"></video>
<van-button type="warning" bind:click="closeVideo">关闭</van-button>
</view>
\ No newline at end of file
/* pages/lishi/lishi.wxss */
.play-view{
position: fixed;
height: 100%;
width: 100%;
z-index: 5;
top: 0;
background: #fff;
text-align: center;
}
.play-view>video{
width:100%;
max-height: 500px;
}
\ 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