Commit 34ce7633 authored by baixian's avatar baixian

微官网

parent 371d834a
......@@ -11,13 +11,12 @@
<script src="js/console-polyfill.js"></script>
<![endif]-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script>
<script src="/js/ueeditor/ueditor.config.js?20200107" charset="utf-8"></script><script src="/js/ueeditor/ueditor.all.js?20200107" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20200107" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20200107" charset="utf-8"></script>
<script src="js/console-polyfill.js?20200107" charset="utf-8"></script><script src="js/es6-shim.min.js?20200107" charset="utf-8"></script><script src="js/es5-shim.js?20200107" charset="utf-8"></script><script src="js/es5-sham.min.js?20200107" charset="utf-8"></script><script src="js/json3.min.js?20200107" charset="utf-8"></script><script src="js/html5shiv.min.js?20200107" charset="utf-8"></script><script src="js/polyfill.js?20200107" charset="utf-8"></script><script src="lib/vendor.dll.js?20200107" charset="utf-8"></script>
</head>
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="/dist/main.31c1eb.js"></script></body>
</html>
</html>
<script type="text/javascript" src="/dist/main.f651b7.js"></script></body>
</html>
\ No newline at end of file
......@@ -134,6 +134,7 @@ export default {
subjectMixtureSave: `${dakaapi}member/website/subject_mixture/save`,
teacher: `${dakaapi}member/website/teachers`,
teacherSave: `${dakaapi}member/website/teacher/save`,
mixed_simple: `${dakaapi}member/subject/mixed_simple`,
},
schedule: `${dakaapi}member/erp/schedules`,
scheduleMgt: {
......
......@@ -103,7 +103,6 @@ class CommonEditor extends React.Component {
commentParams,
editorAdd,
} = this.props;
console.log(commentParams, 'commentParams');
return (
<div className={pageStyle.container}>
<div className={pageStyle.editor}>
......
This diff is collapsed.
......@@ -64,7 +64,6 @@ export default {
signature, avatorUploader, files, uploaderLoading, uploadtype, orgIndex, imgIndex, orgType, action,
} = payload;
const file = files.files ? files.files[0] : null;
console.log(file, 'file');
uploaderLoading();
const filename = `${signature.dir}${getRandomFilename(file.name)}`;
const params = {
......
......@@ -171,6 +171,9 @@ export default {
});
}
if (pathname === '/sjd/officialweb' || pathname === '/sjd/officialwebeditor') {
dispatch({
type: 'officialweb/pageInit',
});
dispatch({
type: 'officialweb/queryinfo',
payload: {
......
......@@ -31,7 +31,6 @@ class RichText extends React.Component {
Authorization: `Bearer ${user.token}}`,
},
}).then(response => response.json());
console.log(res.data, 'access');
const {
accessid,
policy,
......@@ -56,7 +55,6 @@ class RichText extends React.Component {
body: formData2,
}).then(response => response.json());
if (res2.status == 'ok') {
console.log(res2, 'res21111111');
param.success({
url: `${host}/${filename}`,
meta: {
......@@ -73,7 +71,6 @@ class RichText extends React.Component {
}
handleChangeEditor = (editorState) => {
const { handleChangeEditor, index } = this.props;
console.log(editorState, 'editorState');
handleChangeEditor(editorState, index);
}
render() {
......@@ -96,7 +93,6 @@ class RichText extends React.Component {
'size',
'remove',
];
console.log(editorValue, 'editorValue');
const newValue = BraftEditor.createEditorState(editorValue);
return (
<div className={pageStyle.container}>
......
This diff is collapsed.
......@@ -4,18 +4,16 @@ import { Icon, Button } from 'antd';
import pageStyle from './index.less';
import { pageIn, hasBtnPower } from '../../utils/index';
import SchoolInfo from './pagecomponent/SchoolInfo';
import SchoolInfoEditor from './pagecomponent/SchoolInfoEditor';
import Banner from './pagecomponent/Banner';
import BannerEditor from './pagecomponent/BannerEditor';
import Course from './pagecomponent/Course';
import CourseEditor from './pagecomponent/CourseEditor';
import Orgdesc from './pagecomponent/Orgdesc';
import OrgdescEditor from './pagecomponent/OrgdescEditor';
import StudentClock from './pagecomponent/StudentClock';
import BtnPermission from '../../components/BtnPermission';
import AdCarousel from './pagecomponent/AdCarousel';
import ClassMoments from './pagecomponent/ClassMoments';
import SchoolIntro from './pagecomponent/SchoolIntro';
import OnlineClass from './pagecomponent/OnlineClass';
import TogetherClock from './pagecomponent/TogetherClock';
import Teacher from './pagecomponent/Teacher';
import Cropper from '../../components/Cropper';
class Officialweb extends React.Component {
componentDidMount() { // 挂载
......@@ -104,13 +102,13 @@ class Officialweb extends React.Component {
return (
<div className={pageStyle.container}>
<div className={pageStyle.mobilecontainer}>
{course.switch == 1 &&
<div className={pageStyle.floatcoursebox}>
<Course
course={course}
/>
</div>
}
{/* {course.switch == 1 && */}
{/* <div className={pageStyle.floatcoursebox}> */}
{/* <Course */}
{/* course={course} */}
{/* /> */}
{/* </div> */}
{/* } */}
{
newPageInfo.map((ele, index) => {
switch (ele.type) {
......@@ -143,7 +141,7 @@ class Officialweb extends React.Component {
);
break;
case 'adCarousel':
renderDom = (
renderDom = (schoolInfo.module_switch && schoolInfo.module_switch.adCarousel &&
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox}`}
......@@ -157,23 +155,53 @@ class Officialweb extends React.Component {
</div>
);
break;
case 'clocklist':
renderDom = (
case 'orgdesc':
renderDom = (schoolInfo.module_switch && schoolInfo.module_switch.orgdesc &&
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox}`}
key={ele.type}
>
<StudentClock
clockList={ele.data}
<SchoolIntro
data={ele.data}
schoolInfo={schoolInfo}
/>
</div>
</div>
);
break;
case 'teacher':
renderDom = (schoolInfo.module_switch && schoolInfo.module_switch.teacher &&
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox}`}
key={ele.type}
>
<Teacher
data={ele.data}
schoolInfo={schoolInfo}
/>
</div>
</div>
);
break;
case 'clocklist':
renderDom = (schoolInfo.module_switch && schoolInfo.module_switch.clocklist &&
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox}`}
key={ele.type}
>
<StudentClock
clockList={ele.data}
schoolInfo={schoolInfo}
/>
</div>
</div>
);
break;
case 'classmoments':
renderDom = (
renderDom = (schoolInfo.module_switch && schoolInfo.module_switch.classmoments &&
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox}`}
......@@ -187,21 +215,36 @@ class Officialweb extends React.Component {
</div>
);
break;
case 'orgdesc':
renderDom = (
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox}`}
key={ele.type}
>
<SchoolIntro
data={ele.data}
schoolInfo={schoolInfo}
/>
</div>
case 'onlineclass':
renderDom = (schoolInfo.module_switch && schoolInfo.module_switch.onlineclass &&
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox}`}
key={ele.type}
>
<OnlineClass
data={ele.data}
schoolInfo={schoolInfo}
/>
</div>
);
break;
</div>
);
break;
case 'togetherclock':
renderDom = (schoolInfo.module_switch && schoolInfo.module_switch.togetherclock &&
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox}`}
key={ele.type}
>
<TogetherClock
data={ele.data}
schoolInfo={schoolInfo}
/>
</div>
</div>
);
break;
case 'course':
renderDom = (ele.data.switch == 1 &&
<div className={pageStyle.box} key={ele.type}>
......
@import '../../less/variables.less';
.container {
background-color: #fff;
padding: 63px 0 750px 63px;
padding: 63px 0 200px 63px;
display: flex;
position: relative;
overflow-y: hidden;
......@@ -93,12 +93,21 @@
border: none;
}
.savebtnbox {
position: absolute;
right: 34px;
top: 55px;
width: 200px;
display: flex;
justify-content: flex-end;
position: fixed;
bottom: 0;
background-color: #fff;
padding: 20px 20px 14px 20px;
width: 100%;
box-shadow:1px -6px 6px 0px rgba(0, 0, 0, 0.04);
transition: 0.2s left;
transition: 0.1s width;
z-index: 20;
text-align: center;
:global {
.ant-popover {
position: fixed;
}
}
}
.qrcodebox {
width: 200px;
......
......@@ -24,13 +24,15 @@ class adCarousel extends React.Component {
});
}
render() {
const { data, schoolInfo } = this.props;
console.log(schoolInfo, 'schoolInfo');
const { data, schoolInfo, showStatus } = this.props;
return (
<div className={PageStyle.Bannercontainer}>
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.adCarousel} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'adCarousel')} />
</div>
{
showStatus &&
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.adCarousel} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'adCarousel')} />
</div>
}
<div className={PageStyle.carouselWrap}>
{
data.length > 0 ?
......@@ -40,7 +42,7 @@ class adCarousel extends React.Component {
{
data.map((item, index) => {
return (
<img className={PageStyle.img} src={imagify(item.cover)} alt="" />
<img key={item.id} className={PageStyle.img} src={imagify(item.cover)} alt="" />
);
})
}
......
......@@ -24,13 +24,15 @@ class ClassMoments extends React.Component {
});
}
render() {
const { data, schoolInfo } = this.props;
console.log(data, 'datadatadatadata');
const { data, schoolInfo, showStatus } = this.props;
return (
<div className={PageStyle.Bannercontainer}>
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.classmoments} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'classmoments')} />
</div>
{
showStatus &&
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.classmoments} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'classmoments')} />
</div>
}
<div className={PageStyle.commonTitle}>
<div>课堂瞬间</div>
<div className={PageStyle.right}>更多<Icon type="right" /></div>
......
......@@ -200,7 +200,7 @@ class ClassMomentsEditor extends React.Component {
switch (ele.type) {
case 'img':
return (
<div className={PageStyle.imgItem} key={ele.type}>
<div className={PageStyle.imgItem} key={ele.value}>
<img className={PageStyle.img} src={imagify(ele.value)} alt="图片" />
<div className={PageStyle.closeAdIcon} onClick={() => this.deleteClassMomentImg(index, i)}>
<Icon type="close" />
......
......@@ -3,6 +3,7 @@ import { connect } from 'dva';
import { Carousel, Empty, Icon, Switch } from 'antd';
import PageStyle from './OnlineClass.less';
import { ossVideofy, imagify, videoPoster } from '../../../utils/index';
import Course from './Course';
class OnlineClass extends React.Component {
constructor(props) {
super(props);
......@@ -24,12 +25,15 @@ class OnlineClass extends React.Component {
});
}
render() {
const { data, schoolInfo } = this.props;
const { data, schoolInfo, showStatus } = this.props;
return (
<div className={PageStyle.Bannercontainer}>
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.onlineclass} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'togetherclock')} />
</div>
{
showStatus &&
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.onlineclass} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'onlineclass')} />
</div>
}
<div className={PageStyle.commonTitle}>
<div>在线课堂</div>
<div className={PageStyle.right}>更多<Icon type="right" /></div>
......
......@@ -40,7 +40,6 @@ class OnlineClassEditor extends React.Component {
onlineClassStatus,
onlineClassTargetKeys,
} = this.props;
console.log(onlineClassTargetKeys, 'onlineClassTargetKeys');
return (
<div className={`${PageStyle.SchoolInfoEditorcontainer} SchoolInfoEditorcontainer`}>
<div className={PageStyle.header}><span>在线课堂 </span><p>您可以从课堂列表中最多选择4个课程在微官网首页【在线课堂】展示</p></div>
......@@ -55,6 +54,7 @@ class OnlineClassEditor extends React.Component {
rowKey={record => record.id}
showSearch
lazy
showSelectAll={false}
/>
</div>
</div>
......
......@@ -5,7 +5,6 @@ import PageStyle from './SchoolInfo.less';
const { Sider } = Layout;
function SchoolInfo(props) {
const { schoolinfo } = props;
console.log(schoolinfo, 'schoolinfo');
return (
<div className={PageStyle.SchoolInfocontainer}>
<div className={PageStyle.schoolinfo}>
......@@ -13,7 +12,7 @@ function SchoolInfo(props) {
<div className={PageStyle.name}>{schoolinfo.title || ''}</div>
<div className={PageStyle.wantlearnstatic}>
{schoolinfo.tags && schoolinfo.tags.length > 0 && schoolinfo.tags.map((item, index) => {
return (<span>{index < 4 && <Tag>{item}</Tag>} {index > 4 && '...'}</span>);
return (<span key={item}>{index < 4 && <Tag>{item}</Tag>} {index > 4 && '...'}</span>);
})}
</div>
</div>
......
......@@ -142,7 +142,6 @@ class SchoolInfoEditorForm extends React.Component {
labelCol: { span: 6 },
wrapperCol: { span: 18 },
};
console.log(schoolTags, 'schoolTags');
return (
<div className={`${PageStyle.SchoolInfoEditorcontainer} SchoolInfoEditorcontainer`}>
<div className={PageStyle.header}>机构信息</div>
......
......@@ -24,12 +24,15 @@ class SchoolIntro extends React.Component {
});
}
render() {
const { data, schoolInfo } = this.props;
const { data, schoolInfo, showStatus } = this.props;
return (
<div className={PageStyle.Bannercontainer}>
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.orgdesc} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'orgdesc')} />
</div>
{
showStatus &&
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.orgdesc} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'orgdesc')} />
</div>
}
<div className={PageStyle.commonTitle}>
学校介绍
</div>
......@@ -45,7 +48,7 @@ class SchoolIntro extends React.Component {
{
data.map((item, index) => {
return (
<div>
<div key={item.id}>
{
item.type == 1 && <img className={PageStyle.img} src={imagify(item.content)} alt="" />
}
......
......@@ -187,7 +187,7 @@ class SchoolIntroEditor extends React.Component {
{
schoolIntro.length > 0 && schoolIntro.map((item, index) => {
return (
<div className={PageStyle.formItem} key={item}>
<div className={PageStyle.formItem} key={item.id}>
<div className={PageStyle.formLeft}>
{index == 0 && <div className={`${PageStyle.formItemIcon} ${PageStyle.formItemIconGray}`}><Icon className={PageStyle.itemIcon} type="arrow-up" /></div>}
{ index > 0 && <div className={PageStyle.formItemIcon} onClick={() => this.moveSchoolIntroPlate(index, 'up')}><Icon className={PageStyle.itemIcon} type="arrow-up" /></div> }
......
......@@ -34,6 +34,7 @@ class StudentClock extends React.Component {
const {
menus, defaultMenu, collapsed, clockList,
schoolInfo,
showStatus,
} = this.props;
const menuItemStyle = {
fontSize: '16px',
......@@ -45,9 +46,12 @@ class StudentClock extends React.Component {
学生动态
</div>
</div>
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.clocklist} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'clocklist')} />
</div>
{
showStatus &&
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.clocklist} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'clocklist')} />
</div>
}
<div className={PageStyle.clockListBox}>
{clockList.list && clockList.list.length > 0 && clockList.list.map(ele => (
<div className={PageStyle.clockitem} key={ele.id}>
......
......@@ -24,13 +24,16 @@ class Teacher extends React.Component {
});
}
render() {
const { data, schoolInfo } = this.props;
const { data, schoolInfo, showStatus } = this.props;
console.log(data, 'data111');
return (
<div className={PageStyle.Bannercontainer}>
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.teacher} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'teacher')} />
</div>
{
showStatus &&
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.teacher} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'teacher')} />
</div>
}
<div className={PageStyle.commonTitle}>
<div>名师风采</div>
<div className={PageStyle.right}>更多<Icon type="right" /></div>
......@@ -41,7 +44,7 @@ class Teacher extends React.Component {
{
data.map((item, index) => {
return (
<div className={PageStyle.commonItem}>
<div className={PageStyle.commonItem} key={item.id}>
<div className={PageStyle.commonLeft}>
<img src={imagify(item.avatar)} alt="" />
</div>
......
......@@ -24,13 +24,15 @@ class TogetherClock extends React.Component {
});
}
render() {
const { data, schoolInfo } = this.props;
console.log(data, '一起来打卡');
const { data, schoolInfo, showStatus } = this.props;
return (
<div className={PageStyle.Bannercontainer}>
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.togetherclock} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'togetherclock')} />
</div>
{
showStatus &&
<div className={PageStyle.switchWrap}>
<Switch checked={schoolInfo.module_switch && schoolInfo.module_switch.togetherclock} checkedChildren="开" unCheckedChildren="关" onChange={e => this.handleChangeSwitch(e, 'togetherclock')} />
</div>
}
<div className={PageStyle.commonTitle}>
<div>一起打卡</div>
<div className={PageStyle.right}>更多<Icon type="right" /></div>
......
import React from 'react';
import { connect } from 'dva';
import { Form, Layout, Transfer, Button, Icon, message, Modal, Popconfirm, Progress } from 'antd';
import { Form, Layout, Transfer, Button, Icon, message, Pagination, Popconfirm, Progress } from 'antd';
import { videoPoster, imagify, ossVideofy } from '../../../utils/index';
import PageStyle from './TogetherClockEditor.less';
const FormItem = Form.Item;
......@@ -51,9 +51,10 @@ class TogetherClockEditor extends React.Component {
onChange={this.handleChangeClock}
targetKeys={togetherClockTargetKeys}
render={item => item.title}
rowKey={record => record.subject_mixed_id}
rowKey={record => record.id}
showSearch
lazy
showSelectAll={false}
/>
</div>
</div>
......
......@@ -187,3 +187,10 @@ export function teacherSave(params) {
data,
});
}
export function getMixedSimple(params) {
const data = qs.stringify(params);
return request({
url: `${api.officaialweb.mixed_simple}?${data}`,
method: 'GET',
});
}
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