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
4c1d3ca3
Commit
4c1d3ca3
authored
Apr 15, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c8f3b39a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
140 additions
and
145 deletions
+140
-145
index.js
src/pages/websiteindex/index.js
+15
-38
index.wxml
src/pages/websiteindex/index.wxml
+125
-107
No files found.
src/pages/websiteindex/index.js
View file @
4c1d3ca3
...
...
@@ -97,22 +97,10 @@ Page({
clockTotal
:
''
,
listLoading
:
false
,
shareBtnShow
:
0
,
sort
:
[{
name
:
'schoolinfo'
,
desc
:
'机构信息'
,
},
{
name
:
'banner'
,
desc
:
'banner图片或视频'
,
},
{
name
:
'course'
,
desc
:
'体验课'
,
},
{
name
:
'clocklist'
,
desc
:
'学员动态'
,
},
{
name
:
'orgdesc'
,
desc
:
'机构介绍'
,
},
],
sort
:
[
{
name
:
'orgdesc'
,
desc
:
'学校介绍'
},
{
name
:
'clocklist'
,
desc
:
'学生动态'
}
],
//默认排序
schoolDetail
:
''
,
fixBottomBtn
:
false
,
scorefeedbackshow
:
false
,
...
...
@@ -939,6 +927,7 @@ Page({
data
.
banner
=
data
.
banner
?
JSON
.
parse
(
data
.
banner
)
:
''
;
data
.
tags
=
data
.
tags
?
JSON
.
parse
(
data
.
tags
)
:
''
;
let
dataSort
=
''
;
// 机构信息/banner图片或视频/体验课 不参与排序 固定位置
if
(
data
.
sort
)
{
dataSort
=
JSON
.
parse
(
data
.
sort
)
let
removeItem1
=
dataSort
.
findIndex
(
item
=>
item
.
name
==
"banner"
);
...
...
@@ -948,29 +937,13 @@ Page({
let
removeItem3
=
dataSort
.
findIndex
(
item
=>
item
.
name
==
"course"
);
dataSort
.
splice
(
removeItem3
,
1
)
}
// 未设置微官网则 学生动态/学校介绍
data
.
sort
=
data
.
sort
?
dataSort
:
[
// {
// name: 'schoolinfo',
// desc: '机构信息',
// },
// {
// name: 'banner',
// desc: 'banner图片或视频',
// },
// {
// name: 'course',
// desc: '体验课',
// },
{
name
:
'clocklist'
,
desc
:
'学员动态'
,
},
{
name
:
'orgdesc'
,
desc
:
'机构介绍'
,
}
{
name
:
'orgdesc'
,
desc
:
'学校介绍'
},
{
name
:
'clocklist'
,
desc
:
'学生动态'
}
];
console
.
log
(
data
.
sort
,
'1112131223'
)
}
else
{
this
.
schoolInfoGet
()
this
.
setData
({
...
...
@@ -979,12 +952,16 @@ Page({
})
}
console
.
log
(
data
.
sort
,
'11111'
)
data
.
distance
=
getFlatternDistance
(
this
.
data
.
latitude
,
this
.
data
.
longitude
,
Number
(
data
.
latitude
),
Number
(
data
.
longitude
));
this
.
setData
({
schoolInfo
:
data
?
data
:
''
,
websitehomeEmpty
:
data
&&
data
.
banner
?
false
:
true
},()
=>
{
console
.
log
(
this
.
data
.
schoolInfo
.
banner
,
'banner'
)
console
.
log
(
data
.
sort
,
'排序'
)
console
.
log
(
this
.
data
.
schoolInfo
.
sort
,
'schoolInfo.sort'
)
if
(
that
.
data
.
schoolInfo
.
banner
.
type
==
'video'
){
wxGetImageInfo
({
src
:
videoPoster
(
that
.
data
.
schoolInfo
.
banner
.
src
[
0
])}).
then
((
res
)
=>
{
let
w
=
750
,
initratio
,
bannerVideoH
;
...
...
src/pages/websiteindex/index.wxml
View file @
4c1d3ca3
...
...
@@ -98,31 +98,76 @@
<image class="icon-mobile" src="{{localImageRoot}}2c/websiteindex/website_phone.png?{{imageVersion}}" bindtap="makecall" data-mobile="{{schoolInfo.tel_phone}}"></image>
</view>
</view>
<view class="section-wrap section-ad" wx:if="{{adsTotal>0}}">
<swiper indicator-dots="{{false}}" autoplay="{{true}}" circular="{{true}}" style="height:180rpx;">
<swiper-item wx:for="{{adsList}}" wx:key="index">
<image class="cover" src="{{filter.imagify(item.cover)}}" mode="aspectFill"/>
</swiper-item>
</swiper>
</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="toMoreList" data-type="schoolteacher">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
<block wx:for="{{schoolInfo.sort?schoolInfo.sort:sort}}" wx:key="idx" wx:for-index="idx" wx:for-item="sortItem" >
<!-- 广告banner -->
<block wx:if="{{sortItem.name=='adCarousel'}}">
<view class="section-wrap section-ad" wx:if="{{adsTotal>0}}">
<swiper indicator-dots="{{false}}" autoplay="{{true}}" circular="{{true}}" style="height:180rpx;">
<swiper-item wx:for="{{adsList}}" wx:key="index">
<image class="cover" src="{{filter.imagify(item.cover)}}" mode="aspectFill"/>
</swiper-item>
</swiper>
</view>
</view>
<view class="teacher-list">
<view class="item" wx:for="{{teacherList}}" wx:key="index" bindtap="bindTeacherDetail" data-id="{{item.id}}">
<image class="avatar" src="{{filter.imagify(item.avatar)}}"></image>
<view class="line nickname">{{item.name}}</view>
<view class="line">{{item.course}}</view>
<view class="line">{{item.seniority}}年教龄</view>
</block>
<!-- 名师风采 -->
<block wx:if="{{sortItem.name=='teacher'}}">
<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="toMoreList" data-type="schoolteacher">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="teacher-list">
<view class="item" wx:for="{{teacherList}}" wx:key="index" bindtap="bindTeacherDetail" data-id="{{item.id}}">
<image class="avatar" src="{{filter.imagify(item.avatar)}}"></image>
<view class="line nickname">{{item.name}}</view>
<view class="line">{{item.course}}</view>
<view class="line">{{item.seniority}}年教龄</view>
</view>
</view>
</view>
</block>
<!-- 学校介绍 -->
<view class="section-wrap business-instro" id="business-info" wx:if="{{sortItem.name=='orgdesc'}}">
<view class="box-title">
<view class="title">学校介绍</view>
<view class="right" bindtap="toMoreList" data-type="schoolinfo1" wx:if="{{schoolInfoTotal>0}}">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="desc-box" wx:if="{{schoolInfo.intro}}">
<view class="content">{{schoolInfo.intro}}</view>
<view class="expend-box" bindtap="expandSchoolInfo">{{infoexpanded?'向下展开':'向上收起'}}
<image wx:if="{{infoexpanded}}" class="icon-arr" src="{{localImageRoot}}2c/websiteindex/icon_arrdown_yellow.png?{{imageVersion}}"></image>
<image wx:if="{{!infoexpanded}}" class="icon-arr icon-arr-trans" src="{{localImageRoot}}2c/websiteindex/icon_arrdown_yellow.png?{{imageVersion}}"></image>
</view>
</view>
<view class="instro-swiper" wx:if="{{schoolInfoTotal>0}}">
<swiper indicator-dots="{{false}}" autoplay="{{false}}" circular="{{true}}" style="height:368rpx;" bindtap="toMoreList" data-type="schoolinfo">
<swiper-item wx:for="{{schoolInfoList}}" wx:key="index">
<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>
</swiper-item>
</swiper>
<view class="label-box">
<view class="icon-item" bindtap="toMoreList" data-type="schoolinfo1">
<image class="icon" src="{{localImageRoot}}2c/websiteindex/label_pic.png?{{imageVersion}}"></image>{{schoolInfoPicTotal}}
</view>
<view class="icon-item" bindtap="toMoreList" data-type="schoolinfo2">
<image class="icon" src="{{localImageRoot}}2c/websiteindex/label_video.png?{{imageVersion}}"></image>{{schoolInfoVideoTotal}}
</view>
</view>
</view>
<view class="instro-swiper" wx:else>
<view class="list-item" wx:for="{{businessInstroEg}}" wx:key="index" >
<image class="cover" src="{{imageRoot}}2c/websiteindex/exainfo{{index+1}}.png?{{imageVersion}}"></image>
</view>
</view>
</view>
</view>
<block wx:for="{{schoolInfo.sort?schoolInfo.sort:sort}}" wx:key="idx" wx:for-index="idx" wx:for-item="sortItem" >
<!-- 学生动态 -->
<view class="section-wrap student-clock-box" id="student-clock" wx:if="{{sortItem.name=='clocklist'}}">
<block wx:if="{{clockList.length > 0}}">
<view class="box-title">
...
...
@@ -169,103 +214,76 @@
<list-loading loading="{{listLoading}}"></list-loading>
<view class="btn-more" bindtap="goclocklist" wx:if="{{clockList.length > 0}}">查看更多学员作品</view>
</view>
<view class="section-wrap business-instro" id="business-info" wx:if="{{sortItem.name=='orgdesc'}}">
<view class="box-title">
<view class="title">学校介绍</view>
<view class="right" bindtap="toMoreList" data-type="schoolinfo1" wx:if="{{schoolInfoTotal>0}}">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="desc-box" wx:if="{{schoolInfo.intro}}">
<view class="content">{{schoolInfo.intro}}</view>
<view class="expend-box" bindtap="expandSchoolInfo">{{infoexpanded?'向下展开':'向上收起'}}
<image wx:if="{{infoexpanded}}" class="icon-arr" src="{{localImageRoot}}2c/websiteindex/icon_arrdown_yellow.png?{{imageVersion}}"></image>
<image wx:if="{{!infoexpanded}}" class="icon-arr icon-arr-trans" src="{{localImageRoot}}2c/websiteindex/icon_arrdown_yellow.png?{{imageVersion}}"></image>
</view>
</view>
<view class="instro-swiper" wx:if="{{schoolInfoTotal>0}}">
<swiper indicator-dots="{{false}}" autoplay="{{false}}" circular="{{true}}" style="height:368rpx;" bindtap="toMoreList" data-type="schoolinfo">
<swiper-item wx:for="{{schoolInfoList}}" wx:key="index">
<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>
</swiper-item>
</swiper>
<view class="label-box">
<view class="icon-item" bindtap="toMoreList" data-type="schoolinfo1">
<image class="icon" src="{{localImageRoot}}2c/websiteindex/label_pic.png?{{imageVersion}}"></image>{{schoolInfoPicTotal}}
</view>
<view class="icon-item" bindtap="toMoreList" data-type="schoolinfo2">
<image class="icon" src="{{localImageRoot}}2c/websiteindex/label_video.png?{{imageVersion}}"></image>{{schoolInfoVideoTotal}}
<!-- 课堂瞬间 -->
<block wx:if="{{sortItem.name == 'classmoments'}}">
<view class="section-wrap section-brick" wx:if="{{momentTotal>0}}">
<view class="box-title">
<view class="title">课堂瞬间</view>
<view class="right" bindtap="toMoreList" data-type="moment">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
<view class="instro-swiper" wx:else>
<view class="list-item" wx:for="{{businessInstroEg}}" wx:key="index" >
<image class="cover" src="{{imageRoot}}2c/websiteindex/exainfo{{index+1}}.png?{{imageVersion}}"></image>
<view class="brick-list">
<brick-layout
card="{{momentList}}"
bind:tapCard="tapCard"
type="{{2}}"
/>
</view>
</view>
</view>
</block>
<view class="section-wrap section-brick" wx:if="{{momentTotal>0}}">
<view class="box-title">
<view class="title">课堂瞬间</view>
<view class="right" bindtap="toMoreList" data-type="moment">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="brick-list">
<brick-layout
card="{{momentList}}"
bind:tapCard="tapCard"
type="{{2}}"
/>
</view>
</view>
<view class="section-wrap online-classroom" wx:if="{{onlineCoursesList.length>0}}">
<view class="box-title">
<view class="title">在线课堂</view>
<view class="right" bindtap="toMoreList" data-type="onlinecourselist">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="content-box">
<view class="online-item" bindtap="goOnlineClass" data-item="{{item}}" wx:for="{{onlineCoursesList}}" wx:key="index">
<view class="cover-box">
<image class="cover" src="{{filter.imagify(item.online_course.cover, 'image/resize,w_600/format,jpg')}}" mode="aspectFill" wx:if="{{item.online_course.cover}}" />
<image class="cover" src="{{filter.imagify('qingxiao/biz/image/course/courseDefaultImg.png')}}" mode="aspectFill" wx:else/>
<view class="count-box">
<image class="icon" src="{{localImageRoot}}2c/websiteindex/icon_eye.png?{{imageVersion}}"/>{{item.online_course.study_count}}人已学习
</block>
<!-- 在线课堂 -->
<block wx:if="{{sortItem.name == 'onlineclass'}}">
<view class="section-wrap online-classroom" wx:if="{{onlineCoursesList.length>0}}">
<view class="box-title">
<view class="title">在线课堂</view>
<view class="right" bindtap="toMoreList" data-type="onlinecourselist">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="title-box">
<view class="title">{{item.online_course.title}}</view>
<view class="content-box">
<view class="online-item" bindtap="goOnlineClass" data-item="{{item}}" wx:for="{{onlineCoursesList}}" wx:key="index">
<view class="cover-box">
<image class="cover" src="{{filter.imagify(item.online_course.cover, 'image/resize,w_600/format,jpg')}}" mode="aspectFill" wx:if="{{item.online_course.cover}}" />
<image class="cover" src="{{filter.imagify('qingxiao/biz/image/course/courseDefaultImg.png')}}" mode="aspectFill" wx:else/>
<view class="count-box">
<image class="icon" src="{{localImageRoot}}2c/websiteindex/icon_eye.png?{{imageVersion}}"/>{{item.online_course.study_count}}人已学习
</view>
</view>
<view class="title-box">
<view class="title">{{item.online_course.title}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="section-wrap section-subject" wx:if="{{subjectList.length>0}}">
<view class="box-title">
<view class="title">一起打卡</view>
<view class="right" bindtap="toMoreList" data-type="subjectlist">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="subject-list">
<view class="list-item" wx:for="{{subjectList}}" wx:key="index" bindtap="goSharemoretheme" data-item="{{item}}">
<view class="cover-box">
<image class="cover" src="{{filter.imagify(item.subject_mixture.subject.land_content.cover)}}" mode="aspectFill" wx:if="{{item.subject_mixture.subject_type==3}}"/>
<image class="cover" src="{{filter.imagify(item.subject_mixture.subject.land_content.cover)}}" mode="aspectFill" wx:else/>
</block>
<!-- 一起打卡 -->
<block wx:if="{{sortItem.name == 'togetherclock'}}">
<view class="section-wrap section-subject" wx:if="{{subjectList.length>0}}">
<view class="box-title">
<view class="title">一起打卡</view>
<view class="right" bindtap="toMoreList" data-type="subjectlist">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="main">
<view class="title">{{item.subject_mixture.title}}</view>
<view class="count-box">
<image class="icon" src="{{localImageRoot}}2c/websiteindex/icon_user.png?{{imageVersion}}"/>{{item.subject_mixture.subject_students_count}}人参与
<view class="subject-list">
<view class="list-item" wx:for="{{subjectList}}" wx:key="index" bindtap="goSharemoretheme" data-item="{{item}}">
<view class="cover-box">
<image class="cover" src="{{filter.imagify(item.subject_mixture.subject.land_content.cover)}}" mode="aspectFill" wx:if="{{item.subject_mixture.subject_type==3}}"/>
<image class="cover" src="{{filter.imagify(item.subject_mixture.subject.land_content.cover)}}" mode="aspectFill" wx:else/>
</view>
<view class="main">
<view class="title">{{item.subject_mixture.title}}</view>
<view class="count-box">
<image class="icon" src="{{localImageRoot}}2c/websiteindex/icon_user.png?{{imageVersion}}"/>{{item.subject_mixture.subject_students_count}}人参与
</view>
</view>
</view>
<list-loading loading="{{subjectListLoading}}"></list-loading>
</view>
</view>
<list-loading loading="{{subjectListLoading}}"></list-loading>
</view>
</view>
</block>
</block>
<view class="videodialog" wx:if="{{videostatus.videoShow}}">
<view class="videodialogmask" bindtap="closeVideo"></view>
...
...
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