Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
029e9110
Commit
029e9110
authored
Apr 11, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
14b78db9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
20 deletions
+53
-20
api.js
constants/api.js
+1
-0
websiteindex.js
service/customer/websiteindex.js
+10
-0
index.js
src/pages/websiteindex/index.js
+26
-1
index.wxml
src/pages/websiteindex/index.wxml
+16
-19
No files found.
constants/api.js
View file @
029e9110
...
...
@@ -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端-线上课专栏对应的单课列表
...
...
service/customer/websiteindex.js
View file @
029e9110
...
...
@@ -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
,
...
...
src/pages/websiteindex/index.js
View file @
029e9110
...
...
@@ -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
({
...
...
src/pages/websiteindex/index.wxml
View file @
029e9110
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment