Commit e6c07ac9 authored by wangxuelai's avatar wangxuelai

Merge remote-tracking branch 'origin/develop' into wxl-develop

parents 79d0e4c1 dbcf34fb
......@@ -57,6 +57,7 @@ Page({
titleBarHeight: app.globalData.titleBarHeight,
statusBarHeight: app.globalData.statusBarHeight,
localImageRoot: '../../../images/',
hasModuleSwitch: true,
egBanner: ['https://cdn.img.shangjiadao.cn/qingxiao/dakav2/images/2c/websiteindex/eg/eg_banner.png'],
egBannerUrl: 'https://cdn.img.shangjiadao.cn/qingxiao/dakav2/images/2c/websiteindex/eg/eg_banner.png',
egTag: ['标签一','标签二','标签三'],
......@@ -226,14 +227,6 @@ Page({
}
this.websitehomeGet();
this.websitecourseshowGet();
this.websiteintrosGet();
this.clockListGet();
this.teacherListGet();
this.adsListGet();
this.momentlistGet();
this.onlineCoursesListGet();
// this.websiteBarrage();//弹幕
this.subjectListGet()
},
onReady: function () { // Do something when page ready
let that = this;
......@@ -312,25 +305,7 @@ Page({
goBannerVideoPlay() {
return false
},
// 机构介绍
websiteintrosGet() {
websiteintros({
type: 1,
page: 1,
perPage: 4,
school_id: this.data.sid,
}).then((res) => {
const {
data,
code
} = res;
if (code == 200) {
this.setData({
schoolInfoList: [data.list]
})
}
})
},
expandSchoolInfo (e){
this.setData({
infoexpanded: !this.data.infoexpanded
......@@ -383,6 +358,11 @@ Page({
adsList: data.list,
adsTotal: data.total
})
if(this.data.adsTotal>0 && !this.data.hasModuleSwitch){
this.setData({
'schoolInfo.module_switch.adCarousel': true
})
}
}
}).catch((e) => {})
},
......@@ -403,6 +383,11 @@ Page({
teacherList: data.list,
teacherTotal: data.total
})
if(this.data.teacherTotal>0 && !this.data.hasModuleSwitch){
this.setData({
'schoolInfo.module_switch.teacher': true
})
}
}
}).catch((e) => {})
},
......@@ -426,6 +411,11 @@ Page({
momentList: data.list,
momentTotal: data.total
})
if(this.data.momentTotal>0 && !this.data.hasModuleSwitch){
this.setData({
'schoolInfo.module_switch.classmoments': true
})
}
}
}).catch((e) => {})
},
......@@ -444,6 +434,11 @@ Page({
this.setData({
onlineCoursesList: data.list
})
if(this.data.onlineCoursesList.length>0 && !this.data.hasModuleSwitch){
this.setData({
'schoolInfo.module_switch.onlineclass': true
})
}
}
})
},
......@@ -494,6 +489,11 @@ Page({
clockList: data.list || [],
clockTotal: data.total_count
})
if(this.data.clockTotal>0 && !this.data.hasModuleSwitch){
this.setData({
'schoolInfo.module_switch.clocklist': true
})
}
}
}
let clockRecordIds = data.list.map((ele) => {
......@@ -640,8 +640,16 @@ Page({
// const myLocation = LocalStorage.getItem('myLocation');
data.banner = data.banner ? JSON.parse(data.banner) : '';
data.tags = data.tags ? JSON.parse(data.tags) : '';
data.module_switch = data.module_switch ? JSON.parse(data.module_switch): {"clocklist":true,"classmoments":true,"onlineclass":true};
this.data.hasModuleSwitch = data.module_switch ? true : false;
data.module_switch = data.module_switch ? JSON.parse(data.module_switch): {
adCarousel: false,
orgdesc: false,
teacher: false,
clocklist: false,
classmoments: false,
onlineclass: false,
togetherclock: false,
};
let dataSort = '';
// 机构信息/banner图片或视频/体验课 不参与排序 固定位置
......@@ -655,7 +663,7 @@ Page({
let removeItem3 = dataSort.findIndex( item => item.name=="course");
dataSort.splice(removeItem3,1)
}
// 未设置微官网则 学生动态/学校介绍
// 未设置微官网
data.sort = data.sort ? dataSort : [
{ name: 'orgdesc', desc: '学校介绍'},
{ name: 'clocklist', desc: '学生动态'},
......@@ -665,7 +673,25 @@ Page({
{ name: 'onlineclass', desc: '在线课堂'},
{ name: 'togetherclock', desc: '一起打卡'}
];
if (!data.sort.find(ele => ele.name == 'classmoments')) {
data.sort.splice(2,0, { name: 'adCarousel', desc: '广告轮播'})
}
if (!data.sort.find(ele => ele.name == 'classmoments')) {
data.sort.push({ name: 'classmoments', desc: '课堂瞬间'})
}
if (!data.sort.find(ele => ele.name == 'onlineclass')) {
data.sort.push({ name: 'onlineclass', desc: '在线课堂'})
}
if (!data.sort.find(ele => ele.name == 'togetherclock')) {
data.sort.push({ name: 'togetherclock', desc: '一起打卡'})
}
this.websiteintrosGet();
this.clockListGet();
this.teacherListGet();
this.adsListGet();
this.momentlistGet();
this.onlineCoursesListGet();
this.subjectListGet();
}else{
this.schoolInfoGet()
this.setData({
......@@ -676,15 +702,15 @@ Page({
// 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
bannerEmpty: data && data.banner ? false : true,
schoolInfo: data ? data : ''
},()=>{
if(that.data.schoolInfo.intro && that.data.schoolInfo.module_switch.orgdesc){
wx.createSelectorQuery().select('.business-instro .desc-box .content').boundingClientRect(function (rect) {
wx.createSelectorQuery().select('.contentMock').boundingClientRect(function (rect) {
rect.height; // 节点高度
}).exec(function (res) {
let contectHeight = res[0].height;
if(contectHeight>59){
if(contectHeight>60){
that.setData({
btnmore_isVisible: true,
})
......@@ -895,6 +921,11 @@ Page({
schoolInfoPicTotal: data.list.filter(item=>item.type==1 && item.show_status==1).length || 0,
schoolInfoVideoTotal: data.list.filter(item=>item.type==2 && item.show_status==1).length || 0,
})
if(this.data.schoolInfoPicTotal+this.data.schoolInfoVideoTotal>0 && !this.data.hasModuleSwitch){
this.setData({
'schoolInfo.module_switch.orgdesc': true
})
}
}
})
},
......@@ -961,6 +992,11 @@ Page({
subjectList: data.list || []
})
}
if(this.data.subjectTotal>0 && !this.data.hasModuleSwitch){
this.setData({
'schoolInfo.module_switch.togetherclock': true
})
}
}
}).catch((e) => {
this.setData({
......
......@@ -23,7 +23,7 @@
<image src="{{filter.imagify(item)}}" class="slide-image" mode="widthFix"/>
</swiper-item>
</swiper>
<view class="banner-numbox" wx:if="{{schoolInfo.banner.type =='img' && schoolInfo.banner.src.length>1}}">
<view class="banner-numbox {{schoolInfo.notice?'':'setPos'}}" wx:if="{{schoolInfo.banner.type =='img' && schoolInfo.banner.src.length>1}}">
<view class="dot {{currentSwiper==index? 'active': ''}}" wx:for="{{schoolInfo.banner.src}}" wx:key="index"></view>
</view>
</block>
......@@ -163,6 +163,7 @@
</view>
<view class="desc-box" wx:if="{{schoolInfo.intro}}">
<view class="content contentMock">{{schoolInfo.intro}}</view>
<view class="content {{infoexpanded?'extended':''}}">{{schoolInfo.intro}}</view>
<view class="expend-box" bindtap="expandSchoolInfo" wx:if="{{btnmore_isVisible}}">{{infoexpanded?'向下展开':'向上收起'}}
<image class="icon-arr {{infoexpanded?'':'icon-arr-trans'}}" src="{{imageRoot}}2c/websiteindex/icon_arrdown_yellow.png?{{imageVersion}}"></image>
......
......@@ -66,6 +66,9 @@ page{
align-items: center;
line-height: 1;
}
.banner-box .banner-numbox.setPos{
bottom: 76rpx;
}
.banner-box .banner-numbox .dot{
width: 8rpx;
height: 8rpx;
......@@ -211,6 +214,7 @@ page{
}
.schoolinfo-box .address-box .icon-box{
width: 35rpx;
padding-top: 4rpx;
}
.schoolinfo-box .address-box .icon-box .icon{
width: 22rpx;
......@@ -250,7 +254,7 @@ page{
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 10rpx;
right: 17rpx;
}
.schoolinfo-box .part-box .content swiper-item{
line-height: 60rpx;
......@@ -866,6 +870,15 @@ page{
font-size: 26rpx;
color: #666;
line-height: 40rpx;
word-break: break-all;
}
.business-instro .desc-box .contentMock{
position: absolute;
left: 0;
width: 100%;
opacity: 0;
z-index: -9;
word-break: break-all;
}
.business-instro .desc-box .content.extended{
max-height: 120rpx;
......
......@@ -747,7 +747,7 @@
/* 老师点评box */
.teacher-commnet-detail {
position: relative;
/* position: relative; */
}
.teacher-commnet-detail .teacher-avator-box {
......
......@@ -354,9 +354,7 @@ Page({
return;
}
if (
this.data.moreTheme.sign_up_content.radioname &&
this.data.selectedRadio == ""
) {
this.data.moreTheme.sign_up_content.radioname && this.data.moreTheme.sign_up_content.radioList.length>0 && this.data.selectedRadio == "") {
wx.showToast({
title: `请选择${that.data.moreTheme.sign_up_content.radioname}`,
icon: "none",
......@@ -366,7 +364,7 @@ Page({
}
this.data.waitSbumitContent =
this.data.moreTheme.sign_up_content.radioname == ""
(this.data.moreTheme.sign_up_content.radioname == "" || this.data.moreTheme.sign_up_content.radioList.length == 0)
? ""
: JSON.stringify({
value: this.data.selectedRadio,
......
......@@ -133,7 +133,8 @@
<input type="number" placeholder-class="placeholderclass" class="iteminput mobile" maxlength="11" value="{{mobile}}" bindinput="mobileInput" placeholder="请输入手机号"></input>
<button class="getmobilebtn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">快速填写</button>
</view> -->
<view class="ipt-box" style="padding-bottom: 40px;" wx:if="{{moreTheme.sign_up_content.radioname}}">
<view class="ipt-box" style="padding-bottom: 40px;" wx:if="{{moreTheme.sign_up_content.radioname && moreTheme.sign_up_content.radioList.length}}">
<view class="signupcontent {{raddioexpand ? 'expanded' : 'unexpanded'}}">
<view class="radiotitle" bindtap="expandsigncontentbox">
<view class="radiotitletext" wx:if="{{raddioexpand}}">请选择{{moreTheme.sign_up_content.radioname}}</view>
......
......@@ -214,17 +214,6 @@ Page({
infoexpanded: true,//默认收起
},
onLoad: function (options) { // Do some initialize when page load.
// this.innerAudioContext.onPlay(()=>{
// const { actPalyaudioValue, audioStorage} = this.data;
// console.log(audioStorage[actPalyaudioValue], 'audioStorage[actPalyaudioValue]')
// if(audioStorage[actPalyaudioValue]){
// this.innerAudioContext.seek(audioStorage[actPalyaudioValue].currentTime || 0)
// }
// this.data.audioStorage[actPalyaudioValue].isFirst = true;
// })
if (options.scene) {
let sceneQuery = scenQueryGet(options.scene);
const {
......@@ -254,16 +243,8 @@ Page({
}).then(() => {
this.websitehomeGet()
this.websitecourseshowGet()
// this.websiteintrosGet();
// this.clockListGet();
// this.teacherListGet();
// this.adsListGet();
// this.momentlistGet();
// this.onlineCoursesListGet();
this.userShow();
// this.websiteBarrage();//弹幕
// this.subjectListGet();
const myLocation = LocalStorage.getItem('myLocation');
// const myLocation = LocalStorage.getItem('myLocation');
const that = this;
wx.login({
success(res) {
......@@ -283,8 +264,8 @@ Page({
this.setData({
unauthorized: true
})
// this.websitehomeGet()
// this.websitecourseshowGet()
this.websitehomeGet()
this.websitecourseshowGet()
// this.websiteintrosGet();
// this.clockListGet();
// this.momentlistGet();
......@@ -985,7 +966,6 @@ Page({
if (code == 200) {
console.log(data,'data')
if (data) {
// const myLocation = LocalStorage.getItem('myLocation');
data.banner = data.banner ? JSON.parse(data.banner) : '';
data.tags = data.tags ? JSON.parse(data.tags) : '';
......@@ -1012,16 +992,7 @@ Page({
let removeItem3 = dataSort.findIndex( item => item.name=="course");
dataSort.splice(removeItem3,1)
}
// 未设置微官网则 学生动态/学校介绍
// sort: [
// { name: 'orgdesc', desc: '学校介绍'},
// { name: 'clocklist', desc: '学生动态'},
// { name: 'adCarousel', desc: '广告轮播'},
// { name: 'teacher', desc: '名师风采'},
// { name: 'classmoments', desc: '课堂瞬间'},
// { name: 'onlineclass', desc: '在线课堂'},
// { name: 'togetherclock', desc: '一起打卡'}
// ],//默认排序
// 未设置微官网
data.sort = data.sort ? dataSort : [
{ name: 'orgdesc', desc: '学校介绍'},
{ name: 'clocklist', desc: '学生动态'},
......@@ -1439,9 +1410,7 @@ Page({
schoolInfoPicTotal: data.list.filter(item=>item.type==1 && item.show_status==1).length || 0,
schoolInfoVideoTotal: data.list.filter(item=>item.type==2 && item.show_status==1).length || 0,
})
console.log(!this.data.hasModuleSwitch, '!this.data.hasModuleSwitch');
if(this.data.schoolInfoPicTotal+this.data.schoolInfoVideoTotal>0 && !this.data.hasModuleSwitch){
console.log('JIDSFFV')
this.setData({
'schoolInfo.module_switch.orgdesc': true
})
......
......@@ -26,7 +26,7 @@
<image src="{{filter.imagify(item)}}" class="slide-image" mode="widthFix"/>
</swiper-item>
</swiper>
<view class="banner-numbox" wx:if="{{schoolInfo.banner.type =='img' && schoolInfo.banner.src.length>1}}">
<view class="banner-numbox {{schoolInfo.notice?'':'setPos'}}" wx:if="{{schoolInfo.banner.type =='img' && schoolInfo.banner.src.length>1}}">
<view class="dot {{currentSwiper==index? 'active': ''}}" wx:for="{{schoolInfo.banner.src}}" wx:key="index"></view>
</view>
</block>
......
......@@ -66,6 +66,9 @@ page{
align-items: center;
line-height: 1;
}
.banner-box .banner-numbox.setPos{
bottom: 76rpx;
}
.banner-box .banner-numbox .dot{
width: 8rpx;
height: 8rpx;
......
......@@ -283,7 +283,13 @@
</view>
</view>
</view>
<image class="icon-status status-video" wx:if="{{item.isAction && (item.content.type==2 || item.content.type==3)}}" src="{{imageRoot}}2c/websiteindex/onlinecourse/video_play.png?{{imageVersion}}"/>
<!-- <image class="icon-status status-video" wx:if="{{item.isAction && (item.content.type==2 || item.content.type==3)}}" src="{{imageRoot}}2c/websiteindex/onlinecourse/video_play.png?{{imageVersion}}"/> -->
<view class="icon-status play_box" wx:if="{{item.isAction && (item.content.type==2 || item.content.type==3)}}">
<view class="playing-bar playing-bar1"></view>
<view class="playing-bar playing-bar2"></view>
<view class="playing-bar playing-bar3"></view>
<view class="playing-bar playing-bar4"></view>
</view>
<image class="icon-status status-pic" wx:if="{{item.isAction && (item.content.type==1 || item.content.type==4 || item.content.type==5)}}" src="{{imageRoot}}2c/websiteindex/onlinecourse/pic_play.png?{{imageVersion}}"/>
</view>
</scroll-view>
......
......@@ -1277,4 +1277,53 @@
}
.rich-text-box img{
max-width: 100%;
}
\ No newline at end of file
}
/* 音视频播放css动效 */
.play_box{
width: 34rpx;
height: 35rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.play_box .playing-bar{
background: #FB7A28;
width: 6rpx;
height: 100%;
border-radius: 3rpx 3rpx 0 0;
animation: up-and-down 1.3s ease infinite alternate;
}
.play_box .playing-bar1{
height: 50%;
}
.play_box .playing-bar2{
height: 80%;
animation-delay: -2.4s;
}
.play_box .playing-bar3{
height: 100%;
animation-delay: -3.7s;
}
.play_box .playing-bar4{
height: 60%;
animation-delay: -5s;
}
@-webkit-keyframes up-and-down {
10% {
height: 50%;
}
30% {
height: 100%;
}
60% {
height: 40%;
}
80% {
height: 75%;
}
100% {
height: 30%;
}
}
......@@ -113,25 +113,25 @@
<text class="title" bindtap="feedbackLog">意见反馈</text>
<text class="desc">不好用就吐槽</text>
</navigator>
<view class="menu-item" wx:if="{{cSchoolTotal > 0}}" bindtap="loginToManager">
<!-- <view class="menu-item" wx:if="{{cSchoolTotal > 0}}" bindtap="loginToManager">
<loginbtn loginCode="{{loginCode}}"/>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_exchangeschool.png?{{imageVersion}}"></image>
<text class="title">切换校区</text>
<text class="desc"></text>
</view>
</view> -->
<view class="menu-item">
<loginbtn loginCode="{{loginCode}}"/>
<view class="menu-item-inner" bindtap="loginToManager" wx:if="{{ loginStatus==1 }}">
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
<text class="title">机构登录</text>
<text class="desc">老师/校长在这里登录</text>
<text class="title">切换身份</text>
<text class="desc"></text>
</view>
<button class="menu-item-inner" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
<text class="title">机构登录</text>
<text class="desc">老师/校长在这里登录</text>
<text class="title">切换身份</text>
<text class="desc"></text>
</button>
</view>
......
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