Commit 5b137b05 authored by baixian's avatar baixian

微官网新版需求上线

parent 5f516b52
......@@ -411,11 +411,7 @@ export default {
newpageInfo.forEach((ele) => {
const element = ele;
if (element.type == 'schoolinfo') {
if (schoolDetail.data.module_switch == null) {
schoolDetail.data.module_switch = {
adCarousel: false, orgdesc: false, teacher: false, clocklist: false, classmoments: false, onlineclass: false, togetherclock: false,
};
} else {
if (schoolDetail.data.module_switch != null) {
schoolDetail.data.module_switch = JSON.parse(schoolDetail.data.module_switch);
}
schoolDetail.data.tags = schoolDetail.data.tags ? JSON.parse(schoolDetail.data.tags) : [];
......@@ -644,6 +640,11 @@ export default {
} else {
message.error(schoolIntro.msg, 1);
}
if (schoolDetail.data && schoolDetail.data.module_switch == null) {
schoolDetail.data.module_switch = {
adCarousel: newAdData.length > 0, orgdesc: orgdescs.length > 0, teacher: newTeacherData.length > 0, clocklist: clockList.data.list.length > 0, classmoments: newClassMomentsData.length > 0, onlineclass: newOnlineClassData.length > 0, togetherclock: newTogetherClockData.length > 0,
};
}
setTimeout(infoLoad);
yield put({
type: 'updateState',
......
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