Commit 506b8dc7 authored by wangxuelai's avatar wangxuelai

'sss'

parent 5baab9dc
......@@ -220,7 +220,7 @@ const apis = {
newsdetail: `${api}student/news/detail`, //C端-机构新鲜详情
teacherlist: `${api}common/website/teachers`,//名师列表
onlinecourseslist: `${api}common/online_courses`, //C端-在线课列表
onlinecoursesdetail: `${api}common/online_courses/detail`, //C端-在线课列表详情
onlinecoursesdetail: `${api}student/online_courses/detail`, //C端-在线课列表详情
onlinesubcourses: `${api}student/online_courses/sub_courses`, //C端-线上课专栏对应的单课列表
onlinecoursesverifypwd: `${api}student/online_courses/verify_pwd`, //C端-线上课堂验证密码接口
websiteBarrage: `${api}common/odd_job/school_barrage`, //微官网弹幕
......
......@@ -88,6 +88,7 @@ Page({
canvasImagePath: '',
posterBoxShow: false,
qrcodeGenerating: false,
tab: 1,
},
/**
......@@ -213,14 +214,24 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
if (this.data.curTabIndex == 2) {
this.setData({
hasmore:true,
page:1,
})
this.getCommentList('down');
} else {
wx.stopPullDownRefresh();
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if (this.data.curTabIndex == 2) {
this.getCommentList('up');
}
},
/**
......@@ -247,6 +258,12 @@ Page({
path: `/src/pages/websiteindex/onlineclassroomplay?sid=${this.data.sid}&onlineCourseId=${this.data.onlineCourseId}&pid=${this.data.pid}&w=${app.globalData.currentSchoolStudentId}`,
}
},
tabchange (e) {
const { index } = e.currentTarget.dataset;
this.setData({
tab: index
})
},
onlinecoursesdetailGet(){
const that = this;
onlinecoursesdetailGet({
......@@ -473,6 +490,9 @@ Page({
this.setData({
curTabIndex: index
})
if (index == 2 && this.data.commentList.length == 0) {
this.getCommentList('init');
}
},
ShowQuickenDailog(){
this.setData({
......@@ -495,7 +515,7 @@ Page({
})
},
commentscrollbottom() {
this.getCommentList('up');
// this.getCommentList('up');
},
getCommentList(type) {
if (!this.data.hasmore) {
......
{
"navigationBarTitleText": "在线课堂",
"pageOrientation": "auto",
"enablePullDownRefresh": true,
"usingComponents": {
"list-loading": "../../../components/listloading",
"empty-content": "../../../components/emptycontent",
......
......@@ -90,14 +90,14 @@
<view class="coursecounttext">已更新65期</view>
</view>
</view>
<image class="shareicon" src="{{imageRoot}}2c/onlineclass/shareicon.png?{{imageVersion}}"></image>
<image class="shareicon" bindtap="ShowShareDailog" src="{{imageRoot}}2c/onlineclass/shareicon.png?{{imageVersion}}"></image>
</view>
</view>
<view class="divideline"></view>
<view class="content-box">
<view class="tab-box">
<view class="tab-item" data-index="{{1}}">详情</view>
<view class="tab-item" data-index="{{2}}">课程介绍</view>
<view class="tab-item" data-index="{{1}}" bindtap="tabChange">详情<view wx:if="{{curTabIndex == 1}}" class="tabactive"></view></view>
<view class="tab-item" data-index="{{2}}" bindtap="tabChange">评论<view wx:if="{{curTabIndex == 2}}" class="tabactive"></view></view>
</view>
<view class="introduction" wx:if="{{curTabIndex==1}}">
<block wx:for="{{coursesDetail.intro}}" wx:key="index">
......@@ -143,33 +143,58 @@
<view class="in-btn" >进店</view>
</view>
</view>
<view class="introduction" wx:if="{{curTabIndex==2}}">
<view
class="comment-list"
>
<view class="comment-item" wx:for="{{commentList}}" wx:key="index">
<view class="avatar-box">
<image class="" src="{{filter.imagify(item.comment_user.avatar)}}" />
<view class="info-box">
<view class="name">{{item.comment_user.nickname}} <view class="top-tag" wx:if="{{item.place_top_at}}">置顶</view></view>
<view class="time">{{item.created_at}}</view>
</view>
</view>
<view class="content-box"><text class="" selectable="false" space="false" decode="false" wx:if="{{item.p_id}}">回复</text><text class="reflyname" selectable="false" space="false" decode="false" wx:if="{{item.p_id}}">@{{item.passive_comment_user.nickname}}</text>{{item.content}}</view>
<view class="responsebox">
<view class="response">
<text class="responsename">老师</text>
<text class="responsetext"> 回复 </text>
<text class="responsename">汪雪来:</text>
<text class="responsetext">asfdsafdsfds发的撒范德萨发asfdsafdsfds发的撒范德萨发asfdsafdsfds发的撒范德萨发asfdsafdsfds发的撒范德萨发asfdsafdsfds发的撒范德萨发asfdsafdsfds发的撒范德萨发</text>
</view>
</view>
</view>
</view>
<list-loading loading="{{listLoading}}" style="margin: 0 auto"></list-loading>
</view>
</view>
<view class="booking-box" wx:if="{{ !pid && coursesDetail.is_encrypt == 2 && coursesDetail.isShowButton}}" bindtap="freeStudy">
<!-- <view class="booking-box" wx:if="{{ !pid && coursesDetail.is_encrypt == 2 && coursesDetail.isShowButton}}" bindtap="freeStudy">
<view class="text">免费学习</view>
<image class="icon-clock2" src="{{imageRoot}}2c/websiteindex/icon_clock2.png?{{imageVersion}}"></image>
</view>
</view> -->
<view class="booking-box" bindtap="showPasswordDialog" wx:if="{{coursesDetail && !coursesDetail.hasInputPwd}}">
<view class="text">输入密码后学习</view>
<image class="icon-clock2" src="{{imageRoot}}2c/websiteindex/icon_clock2.png?{{imageVersion}}"></image>
</view>
<view class="footer-box" wx:if="{{(coursesDetail.is_encrypt == 2 && !coursesDetail.isShowButton) || (coursesDetail.is_encrypt == 1 && coursesDetail.hasInputPwd) || pid}}">
<view class="footer-innerbox">
<view class="btn-item" bindtap="goback">
<!-- <view class="btn-item" bindtap="goback">
<image class="btn-icon" src="{{imageRoot}}2b/common/detailbackicon.png?{{imageVersion}}"></image>
<view class="btn-title">返回</view>
</view>
</view> -->
<view class="impressions" bindtap="showcommenteditor" style="{{pid ? '':'margin:0 40rpx 0 48rpx'}}">
<view class="icon"></view>
<view class="text">写点感想…</view>
</view>
<view class="btn-item" bindtap="commentBoxShow" style="margin-right: {{pid ? 20: 50}}rpx; padding-right: {{pid ? 20: 50}}rpx;" bindtap="commentBoxShow">
<!-- <view class="btn-item" bindtap="commentBoxShow" style="margin-right: {{pid ? 20: 50}}rpx; padding-right: {{pid ? 20: 50}}rpx;" bindtap="commentBoxShow">
<image class="icon" src="{{imageRoot}}2c/clockitem/messge.png?{{imageVersion}}"></image>
<view class="btn-title">评论</view>
</view>
<view class="btn-item" bindtap="ShowShareDailog" style="padding-right: {{pid ? 40: 20}}rpx;">
</view> -->
<!-- <view class="btn-item" bindtap="ShowShareDailog" style="padding-right: {{pid ? 40: 20}}rpx;">
<image class="icon" src="{{imageRoot}}2c/clockitem/sharewx.png?{{imageVersion}}"></image>
<view class="btn-title">分享</view>
</view>
</view> -->
<view class="btn-item" bindtap="showCatlogDailog" wx:if="{{pid}}">
<image class="icon catlog-icon" src="{{imageRoot}}2c/websiteindex/catlog-icon.png?{{imageVersion}}"></image>
<view class="btn-title">课程列表</view>
......@@ -231,15 +256,13 @@
</view>
<view class="line-4"></view>
<view class="subtitle">全部评论</view>
<scroll-view
class="comment-list"
scroll-y="true"
<view class="comment-list" >
<!-- scroll-y="true"
bindscrolltolower="commentscrollbottom"
wx:if="{{!emptyPage}}"
scroll-top="{{0}}"
id="scrollview"
lower-threshold="100"
>
lower-threshold="100" -->
<view class="comment-item" wx:for="{{commentList}}" wx:key="index">
<view class="avatar-box">
<image class="" src="{{filter.imagify(item.comment_user.avatar)}}" />
......@@ -250,7 +273,7 @@
<view class="content-box"><text class="" selectable="false" space="false" decode="false" wx:if="{{item.p_id}}">回复</text><text class="reflyname" selectable="false" space="false" decode="false" wx:if="{{item.p_id}}">@{{item.passive_comment_user.nickname}}</text>{{item.content}}</view>
</view>
</view>
</scroll-view>
</view>
<view class="footer-btn">
<view class="btn-box" bindtap="showcommenteditor">
<view class="big-dot"></view>
......
......@@ -24,7 +24,12 @@
min-height: 100vh;
}
.top-box{
/* position: fixed;
width: 100%;
height: 392rpx;
left: 0;
top: 0;
z-index: 100; */
}
.media-box{
height:392rpx;
......@@ -172,7 +177,7 @@
.coursecount .newicon {
width: 24rpx;
height: 24rpx;
margin-right: 4rpx;
margin-right: 6rpx;
}
.coursecount .coursecounttext {
color: #666666;
......@@ -189,7 +194,7 @@
height: 48rpx;
border-radius: 50%;
position: relative;
margin-left: -8rpx;
margin-left: -12rpx;
}
.studentboxavatarbox .studentboxavatar:first-child {
margin-left: 0;
......@@ -263,9 +268,20 @@
.content-box .tab-box{
display: flex;
padding: 26rpx 0;
border-bottom: 2rpx solid rgba(247,247,249,1);
position: relative;
}
.content-box .tab-box .tabactive {
width: 30rpx;
height: 6rpx;
border-radius: 3rpx;
background-color: #FEA917;
position: absolute;
left: 50%;
margin-left: -15rpx;
bottom: -20rpx;
}
.content-box .tab-box .tab-item{
position: relative;
flex: 1;
font-size:28rpx;
font-family:PingFangSC-Medium,PingFang SC;
......@@ -274,6 +290,9 @@
line-height:1;
text-align: center;
}
.content-box .tab-box .tab-item:first-child {
border-right: 1px solid #CCCCCC;
}
.content-box .tab-box .tab-item image{
width: 24rpx;
height: 20rpx;
......@@ -769,39 +788,47 @@
font-weight:700;
color:rgba(51,51,51,1);
}
.comment-dailog .comment-list {
height: calc(100vh - 660rpx);
.comment-list {
/* height: calc(100vh - 660rpx); */
}
.comment-dailog .comment-list .comment-item{
.comment-list .comment-item{
padding: 30rpx 22rpx 0 22rpx;
display: flex;
/* display: flex; */
/* justify-content: space-between; */
}
.comment-dailog .comment-list .comment-item .avatar-box{
width: 60rpx;
margin-right: 18rpx;
.comment-list .comment-item .avatar-box{
/* width: 70rpx;
height: 70rpx; */
/* margin-right: 18rpx; */
display: flex;
align-items: center;
margin-bottom: 20rpx;
/* justify-content: center; */
}
.comment-dailog .comment-list .comment-item .avatar-box image{
width: 60rpx;
height: 60rpx;
.comment-list .comment-item .avatar-box image{
width: 70rpx;
height: 70rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.comment-dailog .comment-list .comment-item .info-box {
width: 100%;
padding-bottom: 28rpx;
border-bottom: 2rpx solid rgba(211,212,213,.5);
.comment-list .comment-item .info-box {
height: 70rpx;
display: flex;
justify-content: space-between;
flex-direction: column;
/* padding-bottom: 28rpx; */
/* border-bottom: 2rpx solid rgba(211,212,213,.5); */
}
.comment-dailog .comment-list .comment-item .info-box .name{
font-size:20rpx;
.comment-list .comment-item .info-box .name{
font-size:26rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(51,51,51,1);
font-weight:600;
color:#222222;
line-height: 1;
padding-bottom: 8rpx;
display:flex;
align-items: center;
}
.comment-dailog .comment-list .comment-item .info-box .name .top-tag{
.comment-list .comment-item .info-box .name .top-tag{
padding: 4rpx 10rpx;
border-radius:14rpx;
border:1px solid rgba(249,187,0,1);
......@@ -812,25 +839,63 @@
line-height: 1;
margin-left: 10rpx;
}
.comment-dailog .comment-list .comment-item .info-box .time{
font-size:16rpx;
.comment-list .comment-item .info-box .time{
font-size:22rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(141,142,143,1);
line-height:1;
padding-bottom: 18rpx;
color: #999999;
}
.comment-dailog .comment-list .comment-item .info-box .content-box{
font-size:22rpx;
.comment-list .comment-item .content-box{
font-size:26rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:bold;
color:rgba(51,51,51,1);
color:#666666;
padding-left: 90rpx;
word-break: break-all;
}
.comment-list .comment-item .responsebox {
padding-left: 90rpx;
}
.comment-list .comment-item .response {
background-color: #F7F7F7;
padding: 24rpx;
border-radius: 20rpx;
margin-top: 24rpx;
position: relative;
}
.comment-list .comment-item .response .responsename {
font-size: 26rpx;
color: #222222;
font-weight: 600;
}
.comment-list .comment-item .response .responsetext {
color: #666666;
font-size: 26rpx;
}
.comment-list .comment-item .response::after {
content: '';
display: block;
width: 0;
height: 0;
border: 18rpx solid transparent;
border-bottom-color: #F7F7F7;
position: absolute;
top: -30rpx;
left: 24rpx;
}
.comment-list .comment-item .response {
background-color: #F7F7F7;
}
.comment-list .comment-item .response .responsename {
color: #222222;
font-size: 26rpx;
}
.comment-dailog .comment-list .comment-item .info-box .content-box text{
.comment-list .comment-item .info-box .content-box text{
padding-right: 4rpx;
font-size: 22rpx;
}
.comment-dailog .comment-list .comment-item .info-box .content-box .reflyname{
.comment-list .comment-item .info-box .content-box .reflyname{
font-size: 22rpx;
color:#F9BB00;
}
......
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