Commit 4c1d3ca3 authored by lvtz's avatar lvtz

fix

parent c8f3b39a
......@@ -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;
......
This diff is collapsed.
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