Commit 8ff541d3 authored by lvtz's avatar lvtz

fix

parent fdd6cd45
......@@ -143,13 +143,12 @@ Page({
},
getAds() {
helpAds({
type: 1,
type: 2,
page: 1,
perPage: 10,
}).then((res) => {
const { code, data } = res;
if (code == 200) {
// this.adsList = data.list;
this.setData({
adsList: data.list,
});
......@@ -339,7 +338,7 @@ Page({
},
toStaticCenter (){
wx.navigateTo({
url: '/business/pages/helpcenter/detail?alias=pay',
url: '/business/pages/helpcenter/detail?alias=information',
})
},
// 待处理更多
......
......@@ -49,7 +49,7 @@
</view>
</view>
</view> -->
<view class="section-wrap">
<view class="section-wrap" wx:if="{{adsList.length>0}}">
<view class="section section-swiperbox">
<swiper class="swiperbox" autoplay circular bindchange="bindSwiperchange">
<swiper-item class="swiperitembox" wx:for="{{adsList}}" wx:key="id" wx:for-item="item">
......
......@@ -24,7 +24,8 @@
</view>
<view class="rolebox" wx:for="{{masterSchoolList}}" wx:key="id" wx:for-item="masterschool" bindtap='godeskcenter' data-item="{{masterschool}}">
<view class="leftbox">
<image class="schoolavatar" src="{{filter.imagify(masterschool.school_teacher.avatar)}}" />
<image class="schoolavatar" wx:if="{{masterschool.logo}}" src="{{filter.imagify(masterschool.logo)}}" />
<image class="schoolavatar" wx:else src="{{imageRoot}}2c/common/logologo.png?{{imageVersion}}"></image>
<view class="schoolname {{currole == 2 && sid == masterschool.id ? 'short' : ''}}">{{masterschool.title}}</view>
</view>
<view class="currenttag" wx:if="{{currole == 2 && sid == masterschool.id}}">您当前身份</view>
......@@ -36,7 +37,8 @@
</view>
<view class="rolebox" wx:for="{{teacherSchoolList}}" wx:key="id" wx:for-item="teacherschool" bindtap='godeskcenter' data-item="{{teacherschool}}">
<view class="leftbox">
<image class="schoolavatar" src="{{filter.imagify(teacherschool.school_teacher.avatar)}}" />
<image class="schoolavatar" src="{{filter.imagify(teacherschool.logo)}}" wx:if="{{teacherschool.logo}}"/>
<image class="schoolavatar" wx:else src="{{imageRoot}}2c/common/logologo.png?{{imageVersion}}"></image>
<view class="schoolname {{currole == 2 && sid == teacherschool.id ? 'short' : ''}}">{{teacherschool.title}}</view>
</view>
<view class="currenttag" wx:if="{{currole == 2 && sid == teacherschool.id}}">您当前身份</view>
......@@ -48,7 +50,9 @@
</view>
<view class="rolebox" wx:for="{{studentSchoolList}}" wx:key="id" wx:for-item="studentschool" data-item="{{studentschool}}" bindtap="goUcenter">
<view class="leftbox">
<image class="schoolavatar" src="{{filter.imagify(studentschool.avatar)}}" />
<image class="schoolavatar" src="{{filter.imagify(studentschool.avatar)}}" wx:if="{{studentschool.avatar}}"/>
<image class="schoolavatar" wx:else src="{{imageRoot}}2c/common/logologo.png?{{imageVersion}}"></image>
<view class="schoolname {{currole == 1 && sid == studentschool.school_id && studentId == studentschool.id ? 'short' : ''}}">
<view class="schoolnametext">
{{studentschool.school.title}}
......
......@@ -37,7 +37,7 @@ export default {
1140: '提现金额有误', // amount is invalid
1141: '你的账号已在其他设备登录', // user has logged in other places
1142: '登录参数错误', // login force is invalid
1167: '该账户未设置密码', // password not set
3360: '获取验证码频繁,请一小时后再试', //please wait a moment try again in an hour
3361: '获取验证码频繁,请一天后再试', //please try again after one day
3362: '获取验证码频繁,请稍后再试', //ip requests too much
......
......@@ -232,6 +232,11 @@ function mediaPng (src, params) {
function gifvideoPoster (src, params) {
if (!src) return '';
var _src = src;
// 如果带.后缀,截取 再处理
// var pointIndex = _src.lastIndexOf('.')
// if (pointIndex !== -1) {
// src = _src.substring(0,pointIndex)
// }
if (src.indexOf('media.shangjiadao.cn') == -1) {
_src = 'https://media.shangjiadao.cn/' + src + '.gif';
}
......
......@@ -91,7 +91,6 @@ Page({
schoolInfoTotal: 0,
schoolInfoPicTotal: 0,
schoolInfoVideoTotal: 0,
infoexpanded: true,
mockSchoolInfoList: [1, 1, 1, 1], //直接循环四次空
clockPage: 1,
clockTotal: '',
......@@ -152,6 +151,9 @@ Page({
subjectTotal:'',
unauthorized: false,
loginCode: '',
btnmore_isVisible: false, // 展开按钮是否可见
infoexpanded: true,//默认收起
},
onLoad: function (options) { // Do some initialize when page load.
......@@ -969,7 +971,16 @@ Page({
schoolInfo: data ? data : '',
websitehomeEmpty: data && data.banner ? false : true
},()=>{
console.log(this.data.schoolInfo,'xuexiaoxinxi ')
wx.createSelectorQuery().select('.business-instro .desc-box .content').boundingClientRect(function (rect) {
rect.height; // 节点高度
}).exec(function (res) {
let contectHeight = res[0].height;
if(contectHeight>59){
that.setData({
btnmore_isVisible: true,
})
}
})
if(that.data.schoolInfo.banner.type=='video'){
wxGetImageInfo({src: videoPoster(that.data.schoolInfo.banner.src[0])}).then((res)=>{
let w=750, initratio, bannerVideoH;
......@@ -1314,7 +1325,7 @@ Page({
const {
item
} = e.currentTarget.dataset;
if (item.type == 2) {
if (item.online_course.type == 2) {
wx.navigateTo({
url: `/src/pages/websiteindex/onlineclassroomindex?sid=${this.data.sid}&onlineCourseId=${item.online_course_id}`,
})
......
......@@ -93,7 +93,7 @@
<view class="other" wx:if="{{schoolInfo.address}}">{{schoolInfo.address}}</view>
</view>
<view class="address" wx:else>
<view class="other">暂未设置位置信息</view>
<view class="other" style="padding-top: 0;">暂未设置位置信息</view>
</view>
<image class="icon-mobile" src="{{localImageRoot}}2c/websiteindex/website_phone.png?{{imageVersion}}" bindtap="makecall" data-mobile="{{schoolInfo.tel_phone}}"></image>
</view>
......@@ -116,7 +116,7 @@
<view class="section-wrap section-teacher" wx:if="{{teacherTotal>0 && schoolInfo.module_switch.teacher}}">
<view class="box-title">
<view class="title">名师风采<view class="text">({{teacherTotal}})</view></view>
<view class="right" bindtap="toMoreList" data-type="schoolteacher" wx:if="{{teacherTotal>5}}">
<view class="right" bindtap="toMoreList" data-type="schoolteacher">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
......@@ -138,15 +138,16 @@
更多<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 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="{{localImageRoot}}2c/websiteindex/icon_arrdown_yellow.png?{{imageVersion}}"></image>
</view>
</view>
<view class="pdb-14" wx:if="{{schoolInfo.intro && schoolInfoList.length>0 && !btnmore_isVisible}}"></view>
<view class="instro-swiper" wx:if="{{schoolInfoList.length>0}}">
<swiper indicator-dots="{{false}}" autoplay="{{false}}" circular="{{true}}" style="height:368rpx;">
<swiper indicator-dots="{{false}}" autoplay="{{true}}" circular="{{true}}" style="height:368rpx;">
<swiper-item wx:for="{{schoolInfoList}}" wx:key="index" bindtap="tapInstroCard" data-id="{{item.id}}">
<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>
......
......@@ -218,6 +218,7 @@ page{
.schoolinfo-box .address-box .address{
width: 520rpx;
position: relative;
padding-right: 20rpx;
}
.schoolinfo-box .address-box .address::after{
content: '';
......@@ -804,6 +805,10 @@ page{
height: 20rpx;
margin-left: 14rpx;
}
.pdb-14{
width: 100%;
height: 20rpx;
}
/* 查看更多 */
.section-wrap .btn-more{
width: 497rpx;
......@@ -850,6 +855,13 @@ page{
color: #666;
line-height: 40rpx;
}
.business-instro .desc-box .content.extended{
max-height: 120rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.business-instro .desc-box .expend-box{
display: flex;
align-items: center;
......@@ -857,6 +869,7 @@ page{
font-size: 22rpx;
color: #FB7A28;
height: 50rpx;
}
.business-instro .desc-box .expend-box .icon-arr{
width: 20rpx;
......
......@@ -23,7 +23,7 @@
<image class="studentboxavatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
</block>
<image class="studentboxavatar" src="{{imageRoot}}2c/onlineclass/moreicon.png?{{imageVersion}}"></image>
<text class="learncount">{{coursesDetail.study_count + coursesDetail.real_study_count}}人已学习</text>
<text class="learncount">{{coursesDetail.study_count}}人已学习</text>
</view>
<view class="coursecount">
<image class="newicon" src="{{imageRoot}}2c/onlineclass/newicon.png?{{imageVersion}}"></image>
......
......@@ -34,7 +34,7 @@
</view>
<view class="learnbox">
<view class="learnitem">
<image class="eyeicon" src="{{imageRoot}}2c/onlineclass/eyeicon.png?{{imageVersion}}"/>{{item.study_count + item.real_study_count}}人已学习
<image class="eyeicon" src="{{imageRoot}}2c/onlineclass/eyeicon.png?{{imageVersion}}"/>{{item.study_count}}人已学习
</view>
<view class="learnitem" wx:if="{{item.type==1}}">
<image class="totalicon" src="{{localImageRoot}}2c/websiteindex/onlinecourse/icon_all.png?{{imageVersion}}"/>共1期
......
......@@ -265,12 +265,6 @@ 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({
......@@ -511,10 +505,16 @@ Page({
},
tabChange(e){
const { index } = e.target.dataset;
if(index == this.data.curTabIndex) {
return
}
this.setData({
curTabIndex: index
})
if (index == 2 && this.data.commentList.length == 0) {
if (index == 2) {
this.data.hasmore = true;
this.data.page = 1;
this.getCommentList('init');
}
},
......@@ -825,6 +825,7 @@ audioStorage[value].isWaiting = true;
const { commentList } = this.data;
const { comment } = e.detail;
if(comment) {
comment.website_likes_count=0;
commentList.push(comment)
this.setData({
emptyPage:false,
......@@ -894,32 +895,34 @@ audioStorage[value].isWaiting = true;
passwordDialogShow:false,
'coursesDetail.hasInputPwd':true
})
this.onlinecoursesdetailGet()
wx.showToast({
title: '成功',
icon: 'success',
duration: 2000
})
}else{
this.setData({
showPassWordTip:true,
passWord: ''
})
wx.showToast({
title: '密码错误',
icon: 'none',
duration: 2000
})
// wx.showToast({
// title: '密码错误',
// icon: 'none',
// duration: 2000
// })
}
}).catch((res)=>{
this.setData({
showPassWordTip:true,
passWord: ''
})
wx.showToast({
title: '密码错误',
icon: 'none',
duration: 2000
})
// wx.showToast({
// title: '密码错误',
// icon: 'none',
// duration: 2000
// })
})
},
onlinefullscreenchange(e){
......
......@@ -3,7 +3,7 @@
<view class="container">
<view class="top-box">
<view class="media-box">
<block wx:if="{{coursesDetail.content && coursesDetail.hasInputPwd && ((coursesDetail.hasInputPwd && coursesDetail.is_encrypt == 1) || (!coursesDetail.isShowButton && coursesDetail.is_encrypt == 2 && !pid) || pid)}}">
<block wx:if="{{coursesDetail.content && coursesDetail.hasInputPwd && ((coursesDetail.hasInputPwd && coursesDetail.is_encrypt == 1) || (coursesDetail.is_encrypt == 2 && !pid) || pid)}}">
<view class="image-box" wx:if="{{coursesDetail.content.type == 1 || coursesDetail.content.type == 4 || coursesDetail.content.type == 5}}">
<swiper style="height: 420rpx;" indicator-dots="{{swiperSetting.indicatorDots}}" bindchange="imageSwiperChange" autoplay="{{swiperSetting.autoplay}}" interval="{{swiperSetting.interval}}" duration="{{swiperSetting.duration}}">
<block wx:for="{{coursesDetail.content.images}}" wx:key="index">
......@@ -84,7 +84,7 @@
<image class="studentboxavatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
</block>
<image class="studentboxavatar" src="{{imageRoot}}2c/onlineclass/moreicon.png?{{imageVersion}}"></image>
<text class="learncount">{{coursesDetail.study_count + coursesDetail.real_study_count}}人已学习</text>
<text class="learncount">{{coursesDetail.study_count}}人已学习</text>
</view>
<view class="coursecount">
<image class="newicon" src="{{imageRoot}}2c/websiteindex/bookicon.png?{{imageVersion}}"></image>
......@@ -153,7 +153,7 @@
<view class="like-box" bindtap="fingureUp" data-id="{{item.id}}" data-act="{{item.has_like}}">
<image class="icon-like" src="{{localImageRoot}}2c/websiteindex/onlinecourse/like_active.png?{{imageVersion}}" wx:if="{{item.has_like}}"></image>
<image class="icon-like" src="{{localImageRoot}}2c/websiteindex/onlinecourse/like.png?{{imageVersion}}" wx:else></image>
<view class="num">{{item.website_likes_count}}</view>
<view class="num">{{item.website_likes_count || 0}}</view>
</view>
<view class="avatar-box">
<image class="" src="{{filter.imagify(item.comment_user.avatar)}}" />
......
......@@ -113,12 +113,12 @@
<text class="title" bindtap="feedbackLog">意见反馈</text>
<text class="desc">不好用就吐槽</text>
</navigator>
<!-- <view class="menu-item" wx:if="{{cSchoolTotal > 0}}" bindtap="exchangeSchool">
<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}}"/>
......
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