Commit 029e9110 authored by lvtz's avatar lvtz

fix

parent 14b78db9
......@@ -218,6 +218,7 @@ const apis = {
momentdetail: `${api}common/moment/detail`, //C端-课堂瞬间详情
newslist: `${api}common/news`, //C端-机构新鲜事列表创
newsdetail: `${api}student/news/detail`, //C端-机构新鲜详情
teacherlist: `${api}common/website/teachers`,//名师列表
onlinecourseslist: `${api}common/online_courses`, //C端-在线课列表
onlinecoursesdetail: `${api}common/online_courses/detail`, //C端-在线课列表详情
onlinesubcourses: `${api}student/online_courses/sub_courses`, //C端-线上课专栏对应的单课列表
......
......@@ -115,6 +115,15 @@ function newsdetailGet (data) {
errorresolve: 1,
})
}
function teacherlistGet (data) {
return wxRequest({
url: apis.customer.websiteindex.teacherlist,
data,
method: 'GET',
errorresolve: 1,
notExactly: true
})
}
function onlinecourseslistGet (data) {
return wxRequest({
url: apis.customer.websiteindex.onlinecourseslist,
......@@ -177,6 +186,7 @@ export {
websitecourseshow,
momentdetailGet,
newslistGet,
teacherlistGet,
newsdetailGet,
onlinecourseslistGet,
onlinecoursesdetailGet,
......
......@@ -11,6 +11,7 @@ import {
websitecourseshow,
onlinecourseslistGet,
newslistGet,
teacherlistGet,
momentlistGet,
websiteBarrage,
websitesubjectGet
......@@ -129,6 +130,8 @@ Page({
momentTotal: 0,
freshList: [], //新鲜事列表
freshTotal: 0,
teacherList: [],//名师列表
teacherTotal: 0,
businessInstroEg: [{
title: '教室介绍1'
},
......@@ -197,8 +200,9 @@ Page({
this.websiteintrosGet();
this.clockListGet();
this.newslistGet();
this.teacherListGet();
this.momentlistGet();
this.onlineCoursesListGet();
// this.onlineCoursesListGet();
this.userShow();
this.websiteBarrage()
this.subjectListGet('init')
......@@ -531,6 +535,27 @@ Page({
}
}).catch((e) => {})
},
// 名师风采
teacherListGet (){
teacherlistGet({
page: 1,
perPage: 20,
school_id: this.data.sid,
}).then((res) => {
const {
code,
data
} = res;
if (code != 200) { // 失败的处理
} else {
this.setData({
teacherList: data.list,
teacherTotal: data.total
})
console.log(this.data.teacherList,'名师列表')
}
}).catch((e) => {})
},
// 课堂瞬间
momentlistGet() {
momentlistGet({
......
......@@ -107,24 +107,21 @@
</swiper-item>
</swiper>
</view>
<view class="section-wrap section-teacher">
<block wx:if="{{true}}">
<view class="box-title">
<view class="title">名师风采<view class="text">(12)</view></view>
<view class="right" bindtap="">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
<view class="section-wrap section-teacher" wx:if="{{teacherTotal>0}}">
<view class="box-title">
<view class="title">名师风采<view class="text">({{teacherTotal}})</view></view>
<view class="right" bindtap="">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
<view class="teacher-list">
<view class="item">
<image class="avatar" src="https://cdn.img.shangjiadao.cn/clock/consumer/4296340/2019-09-03/ff415d032c8f3bc02aa63a3205ff4eeb.jpg"></image>
<view class="nickname">黄老师</view>
<view class="kind">书法</view>
<view class="desc">10年教龄</view>
</view>
</view>
</block>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<view class="teacher-list">
<view class="item" wx:for="{{teacherList}}" wx:key="index">
<image class="avatar" src="https://cdn.img.shangjiadao.cn/clock/consumer/4296340/2019-09-03/ff415d032c8f3bc02aa63a3205ff4eeb.jpg"></image>
<view class="nickname">黄老师</view>
<view class="kind">书法</view>
<view class="desc">10年教龄</view>
</view>
</view>
</view>
<block wx:for="{{schoolInfo.sort?schoolInfo.sort:sort}}" wx:key="idx" wx:for-index="idx" wx:for-item="sortItem" >
......@@ -181,8 +178,8 @@
<view class="instro-swiper" wx:if="{{schoolInfoTotal>0}}">
<swiper indicator-dots="{{false}}" autoplay="{{false}}" circular="{{true}}" style="height:368rpx;" bindchange="swiperChange">
<swiper-item wx:for="{{schoolInfoList}}" wx:key="index">
<image class="cover" src="{{filter.imagify(filter.jsonParse(item.content)[0])}}" wx:if="{{item.type==1}}" mode="aspectFill"></image>
<image class="cover" src="{{filter.gifvideoPoster(filter.jsonParse(item.content)[0])}}" wx:else mode="aspectFill"></image>
<image class="cover" src="{{filter.imagify(item.content)}}" wx:if="{{item.type==1}}" mode="aspectFill"></image>
<image class="cover" src="{{filter.gifvideoPoster(item.content)}}" wx:else mode="aspectFill"></image>
<!-- <image src="{{filter.imagify(item)}}" class="slide-image" mode="widthFix"/> -->
</swiper-item>
</swiper>
......
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