Commit 4c1d3ca3 authored by lvtz's avatar lvtz

fix

parent c8f3b39a
...@@ -97,22 +97,10 @@ Page({ ...@@ -97,22 +97,10 @@ Page({
clockTotal: '', clockTotal: '',
listLoading: false, listLoading: false,
shareBtnShow: 0, shareBtnShow: 0,
sort: [{ sort: [
name: 'schoolinfo', { name: 'orgdesc', desc: '学校介绍'},
desc: '机构信息', { name: 'clocklist', desc: '学生动态'}
}, { ],//默认排序
name: 'banner',
desc: 'banner图片或视频',
}, {
name: 'course',
desc: '体验课',
}, {
name: 'clocklist',
desc: '学员动态',
}, {
name: 'orgdesc',
desc: '机构介绍',
}, ],
schoolDetail: '', schoolDetail: '',
fixBottomBtn: false, fixBottomBtn: false,
scorefeedbackshow: false, scorefeedbackshow: false,
...@@ -939,6 +927,7 @@ Page({ ...@@ -939,6 +927,7 @@ Page({
data.banner = data.banner ? JSON.parse(data.banner) : ''; data.banner = data.banner ? JSON.parse(data.banner) : '';
data.tags = data.tags ? JSON.parse(data.tags) : ''; data.tags = data.tags ? JSON.parse(data.tags) : '';
let dataSort = ''; let dataSort = '';
// 机构信息/banner图片或视频/体验课 不参与排序 固定位置
if (data.sort) { if (data.sort) {
dataSort = JSON.parse(data.sort) dataSort = JSON.parse(data.sort)
let removeItem1 = dataSort.findIndex( item => item.name=="banner"); let removeItem1 = dataSort.findIndex( item => item.name=="banner");
...@@ -948,29 +937,13 @@ Page({ ...@@ -948,29 +937,13 @@ Page({
let removeItem3 = dataSort.findIndex( item => item.name=="course"); let removeItem3 = dataSort.findIndex( item => item.name=="course");
dataSort.splice(removeItem3,1) dataSort.splice(removeItem3,1)
} }
// 未设置微官网则 学生动态/学校介绍
data.sort = data.sort ? dataSort : [ data.sort = data.sort ? dataSort : [
// { { name: 'orgdesc', desc: '学校介绍'},
// name: 'schoolinfo', { name: 'clocklist', desc: '学生动态'}
// desc: '机构信息',
// },
// {
// name: 'banner',
// desc: 'banner图片或视频',
// },
// {
// name: 'course',
// desc: '体验课',
// },
{
name: 'clocklist',
desc: '学员动态',
},
{
name: 'orgdesc',
desc: '机构介绍',
}
]; ];
console.log(data.sort,'1112131223')
}else{ }else{
this.schoolInfoGet() this.schoolInfoGet()
this.setData({ this.setData({
...@@ -979,12 +952,16 @@ Page({ ...@@ -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)); data.distance = getFlatternDistance(this.data.latitude, this.data.longitude, Number(data.latitude), Number(data.longitude));
this.setData({ this.setData({
schoolInfo: data ? data : '', schoolInfo: data ? data : '',
websitehomeEmpty: data && data.banner ? false : true 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'){ if(that.data.schoolInfo.banner.type=='video'){
wxGetImageInfo({src: videoPoster(that.data.schoolInfo.banner.src[0])}).then((res)=>{ wxGetImageInfo({src: videoPoster(that.data.schoolInfo.banner.src[0])}).then((res)=>{
let w=750, initratio, bannerVideoH; 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