Commit 4a27f593 by shijiuyan

1

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