Commit 5295a168 authored by wangxuelai's avatar wangxuelai

'最新代码提交'

parents a89679ce 5c5ac7c8
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>轻校</title><link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<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><link href="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.css?1568968935268" rel="stylesheet"><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script></head><body><div id="root"></div><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.js?1568968935268" charset="utf-8"></script></body></html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>轻校</title>
<link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport">
<meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<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>
<link href="/dist/index.css?1569311169610" rel="stylesheet">
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script>
</head>
<body>
<div id="root"></div>
<script src="/dist/index.js?1569311169610" charset="utf-8"></script>
</body>
</html>
......@@ -158,5 +158,8 @@ export default {
integralRulesEdit: `${dakaapi}member/integral_rules/update`,
integralRulesList: `${dakaapi}member/integral_rules/show`,
},
createtheme: {
addTheme: `${dakaapi}member/subject`,
},
};
This diff is collapsed.
......@@ -37,6 +37,7 @@ import clockmgtModel from './clockmgt';
import playaudioModel from './playaudio';
import hqstatistical from './hqstatistical';
import integralModel from './integral';
import createThemeModal from './createtheme';
export default {
loginModel,
indexstaicModel,
......@@ -68,4 +69,5 @@ export default {
playaudioModel,
hqstatistical,
integralModel,
createThemeModal,
};
......@@ -64,6 +64,7 @@ export default {
chartEndDate: '',
start_time: '',
end_time: '',
tabIndex: 1,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
......@@ -577,6 +578,25 @@ export default {
// message.error(clockCharts.msg, 1);
}
},
* goTheme({ payload }, { call, put, select }) {
const { index } = payload;
yield put({
type: 'updateState',
payload: {
tabIndex: index,
},
});
yield put(routerRedux.push('/sjd/newtheme'));
},
* tabChange({ payload }, { call, put, select }) {
const { tabIndex } = payload;
yield put({
type: 'updateState',
payload: {
tabIndex,
},
});
},
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
......
......@@ -275,7 +275,6 @@ export default {
},
* integralModelGoodEdit({ payload }, { call, put, select }) {
const { record } = payload;
console.log(record, 'record');
if (record.type == 1) {
yield put({
type: 'updateState',
......@@ -424,7 +423,6 @@ export default {
},
});
const loadmessage = message.loading('数据保存中...', 0);
console.log(type1, 'type1');
const data = {
1: {
single: type1.checked == false ? 0 : type1.single || 0,
......
import { routerRedux } from 'dva/router';
import queryString from 'query-string';
import { message, Modal } from 'antd';
import moment from 'moment';
import { delay } from 'redux-saga';
import errorcode from '../common/errorcode';
import menuConfig from '../common/menuconfig';
......@@ -523,6 +524,29 @@ export default {
},
});
}
if (pathname === '/sjd/newtheme') {
dispatch({
type: 'createtheme/queryClassList',
payload: {
},
});
dispatch({
type: 'createtheme/calculatecalendar',
payload: {
currentTimestamp: moment().month(moment().month()).startOf('month').valueOf(),
judgetodaycurrentTimestamp: moment().valueOf(),
},
});
dispatch({
type: 'webapp/updateState',
payload: {
breadcrumbList: [{
path: pathname,
name: '发布主题',
}],
},
});
}
});
},
},
......@@ -629,6 +653,9 @@ export default {
yield put({
type: 'integral/pageInit',
});
yield put({
type: 'createtheme/pageInit',
});
},
* onPageEnter({ payload }, { put, call, select }) {
const { pathname } = payload;
......
......@@ -57,10 +57,22 @@ class StaticCenter extends React.Component {
});
}
createTheme = () => {
message.warning('功能即将开放,敬请期待');
const { dispatch } = this.props;
dispatch({
type: 'indexstaic/goTheme',
payload: {
index: 1,
},
});
}
createCalendarTheme = () => {
message.warning('功能即将开放,敬请期待');
const { dispatch } = this.props;
dispatch({
type: 'indexstaic/goTheme',
payload: {
index: 2,
},
});
}
createUnlockTheme = () => {
message.warning('功能即将开放,敬请期待');
......@@ -584,6 +596,8 @@ function mapStateToProps(state) {
chartStartDate,
scheduleCount,
} = state.indexstaic;
// eslint-disable-next-line no-empty-pattern
const {} = state.classmgt;
return {
staticcenter,
clockCharts,
......
......@@ -47,7 +47,6 @@
display: flex;
align-items: center;
margin-top: 15px;
margin-left: 20px;
.formflex,.formflex1 {
display: flex;
align-items: center;
......@@ -59,7 +58,7 @@
line-height: 30px;
}
.numberActive {
width: 80px;
width: 88px;
height: 35px;
line-height: 35px;
}
......@@ -114,11 +113,26 @@
text-align: left;
margin: 15px 0;
}
.checkboxWrap {
margin-top: 10px;
}
}
@media (max-width: 703px) {
.tophead {
flex-wrap: wrap;
}
.topheadright {
margin-top: 5px;
}
}
@media (max-width: 615px) {
.formItem {
margin-left: 0;
}
}
@media (max-width: 600px) {
.formItem {
.formflex, .formflex1 {
margin-left: 20px;
margin-bottom: 20px;
}
}
......@@ -126,3 +140,14 @@
padding: 0;
}
}
@media (max-width: 580px) {
.formItem {
flex-wrap: wrap;
.formflex, .formflex1 {
width: 100%;
}
.formflex span:nth-child(1){
margin-right: 55px;
}
}
}
......@@ -86,6 +86,7 @@ class StoreMgt extends React.Component {
dataSource={recordList}
columns={columns}
pagination={false}
scroll={{ x: 'max-content' }}
footer={() => (
<div className="tablefooterbox">
<span className="tablefooterstatic">{recordListTotal}条数据</span>
......
......@@ -36,7 +36,7 @@ class GoodsAddModal extends React.Component {
currentIndex: -1,
});
if (editCouponInfo.id == 0 && (couponImg == '' || couponImg == undefined)) {
message.error('请上传卡券封面', 0.5);
message.error('请上传商品封面', 0.5);
return;
}
form.validateFields((err, values) => {
......
......@@ -68,13 +68,6 @@ class StoreMgt extends React.Component {
payload: {
id: item.id,
},
callback(res) {
if (res.code === 1) {
message.success(res.msg);
} else {
message.error(res.msg);
}
},
});
},
okButtonProps: {
......@@ -339,6 +332,7 @@ class StoreMgt extends React.Component {
<Table
dataSource={goodsList}
columns={columns}
scroll={{ x: 'max-content' }}
pagination={false}
/>
</div>
......
import { connect } from 'dva';
import React from 'react';
import { Icon, Divider, Tabs, Select, Form, Upload, Row, Col, Input, Radio, Modal, message } from 'antd';
import pageStyle from './ThemeEditor.less';
import { pageIn, hasBtnPower, imagify, ossVideofy } from '../../utils/index';
const { TabPane } = Tabs;
const { TextArea } = Input;
class ThemeEditor extends React.Component {
constructor(props) {
super(props);
this.state = {
previewVisible: false,
previewImage: '',
};
}
componentDidMount() { // 挂载
pageIn('轻校-发布主题');
}
componentDidUpdate() {
}
componentWillUnmount() { // 卸载
}
priviewImg = (img) => {
this.setState({
previewVisible: true,
previewImage: img,
});
}
handleCancel = () => {
this.setState({
previewVisible: false,
});
}
render() {
const { previewVisible, previewImage } = this.state;
const {
editorUploadImg,
commentParams,
editorUploadAudio,
editorChange,
deleteThemeImg,
deleteThemeVideo,
editorText,
} = this.props;
return (
<div className={pageStyle.container}>
<TextArea value={editorText} onChange={e => editorChange(e)} placeholder="请输入内容" style={{ width: 560 }} maxLength={500} rows={6} />
<div className={pageStyle.editorwrap}>
<div className={pageStyle.uploadimgbox}>
{commentParams.content.map((item, index) => (
item.type === 'img' &&
<div className={pageStyle.imgwrap}>
<img alt={item.type} className={pageStyle.teacheruploadimg} src={imagify(item.value)} />
<div className={pageStyle.imghide}>
<a title="预览文件" onClick={() => this.priviewImg(item.value)} href="javascript:;" ><Icon style={{ color: '#fff' }} type="eye" /> 预览</a>
<Divider type="vertical" />
<a title="删除文件" onClick={() => deleteThemeImg(index)} href="javascript:;"> <Icon style={{ color: '#fff' }} type="delete" />删除</a>
</div>
</div>
))}
{commentParams.content.map((item, index) => (
item.type === 'video' &&
<div className={pageStyle.videowrap}>
<video controls="controls" className={pageStyle.videoPoster} src={ossVideofy(item.value)} />
<div className={pageStyle.videohide}>
<a title="删除文件" onClick={() => deleteThemeImg(index)} href="javascript:;"> <Icon style={{ color: '#fff' }} type="delete" />删除</a>
</div>
</div>
))}
</div>
</div>
<div className={pageStyle.uploadflex}>
<div className={pageStyle.uploadimg}><input type="file" id="uploadImg" className={pageStyle.fileuploadinput} onChange={editorUploadImg} accept="image/*" /><Icon style={{ marginRight: 10 }} type="picture" />添加图片</div>
<div className={pageStyle.uploadimg}><input type="file" id="uploadVideo" className={pageStyle.fileuploadinput} onChange={editorUploadAudio} accept="video/*" /><Icon style={{ marginRight: 10 }} type="video-camera" />添加视频</div>
</div>
<Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
<img alt="图片" style={{ width: '100%' }} src={imagify(previewImage)} />
</Modal>
</div>
);
}
}
ThemeEditor.propTypes = {
};
export default connect()(ThemeEditor);
.editorwrap {
width: 563px;
margin-top: 15px;
.uploadimgbox {
display: flex;
align-items: flex-end;
margin-bottom: 18px;
flex-wrap: wrap;
.imgwrap {
width: 135px;
height: 135px;
border-radius: 4px;
margin-right: 6px;
position: relative;
}
.imgwrap:hover {
cursor: pointer;
.imghide {
opacity: 1;
background-color: rgba(0,0,0,0.5);
transition: all .3s;
z-index: 1;
color: #fff;
}
}
.imghide {
position: absolute;
width: 100%;
height: 100%;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
color: #fff;
z-index: -1;
a {
color: #fff;
}
}
.teacheruploadimg {
width: 100%;
height: 100%;
border-radius: 4px;
}
.teacheruploadimg:nth-child(4n){
margin-right: 0;
}
.videowrap {
width: 150px;
height: 150px;
position: relative;
.videoPoster {
width: 100%;
height: 100%;
}
}
.videowrap:hover {
cursor: pointer;
.videohide {
opacity: 1;
background-color: rgba(0,0,0,0.5);
transition: all .3s;
z-index: 1;
color: #fff;
}
}
.videohide {
position: absolute;
width: 100%;
height: 100%;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
color: #fff;
z-index: -1;
a {
color: #fff;
}
}
}
}
.uploadflex {
display: flex;
align-items: center;
.uploadimg {
cursor: pointer;
width: 106px;
height: 32px;
line-height: 32px;
text-align: center;
border: 1px solid #D9D9D9;
border-radius: 4px;
color: rgba(0,0,0,0.65);
position: relative;
margin-right: 30px;
.fileuploadinput {
cursor: pointer;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
opacity: 0;
left: 0;
top: 0;
}
}
}
This diff is collapsed.
.container {
background-color: #fff;
padding: 0 20px;
position: relative;
}
.title {
font-size:16px;
font-family:PingFangSC;
font-weight:600;
color:rgba(0,0,0,0.85);
line-height:24px;
position: relative;
padding-bottom: 30px;
.pack {
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:20px;
display: inline-block;
margin-left: 36px;
cursor: pointer;
}
}
.title:after {
position: absolute;
content: '';
display: block;
width: 3px;
height: 19px;
background-color: #1890FF;
left: -10px;
top: 4px;
border-radius:2px;
}
.commonwrap {
display: flex;
align-items: flex-start;
:global {
.ant-form-item-label > label::after {
content: '';
}
}
.commonleft {
width: 105px;
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:40px;
}
.commonright {
width: 80%;
:global {
.ant-form-text1 {
font-size:12px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.55);
line-height:22px;
display: inline-block;
margin-left: 10px;
}
.ant-form-item .ant-switch {
margin-left: -12px;
}
}
}
}
.panpelBox {
display: block;
transition: all .3s;
}
.panpelhideBox {
display: none;
}
.toblock {
display: inline-block;
margin: 0 10px;
}
.calendarlist {
display: flex;
.calendaritem {
width: 40px;
height: 40px;
font-size: 14px;
border: 1px solid #D9D9D9;
line-height: 40px;
text-align: center;
border-radius: 50%;
color: #595959;
cursor: pointer;
}
.calendaritemActive {
width: 40px;
height: 40px;
font-size: 14px;
border: 1px solid #1890FF;
line-height: 40px;
text-align: center;
border-radius: 50%;
background-color: #1890FF;
color: #fff;
cursor: pointer;
}
.calendaritem:not(:last-child), .calendaritemActive:not(:last-child){
margin-right: 10px;
}
}
.clockflex {
display: flex;
align-items: center;
margin-bottom: 24px;
:global {
.ant-form-item {
margin-bottom: 0;
}
}
.clockflexLeft {
font-size:14px;
color:rgba(0,0,0,0.85);
min-width: 83px;
}
.clockflexRight {
display: flex;
align-items: center;
margin-left: 30px;
}
}
.rowFlex {
display: flex;
align-items: center;
position: relative;
.custom {
display: flex;
align-items: center;
width: 280px;
margin-left: 15px;
height: 32px;
border: 1px solid #D9D9D9;
border-radius:4px;
.freeBtn {
width: 80px;
text-align: center;
font-size:14px;
font-family:PingFang SC;
font-weight:500;
color: #9B9B9B;
display: inline-block;
cursor: pointer;
position: relative;
}
.freeBtn:after {
content: '';
display: block;
width: 1px;
height: 16px;
background-color: #D9D9D9;
position: absolute;
right: 0;
top: 12px;
}
.checkedNumber {
width: 190px;
display: flex;
align-items: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size:14px;
font-family:PingFang SC;
font-weight:500;
color:rgba(155,155,155,1);
margin-left: 10px;
position: relative;
.checkedNumItem {
margin-right: 6px;
}
}
}
}
.daybox {
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
border: 1px solid #D9D9D9;
border-radius: 50%;
margin-right: 11px;
cursor: pointer;
&.dayselectbox {
color: #1890FF;
border-color: #1890FF;
}
}
.calendarbox {
box-shadow:0px 2px 8px 0px rgba(0,0,0,0.15);
border-radius:4px;
background:rgba(255,255,255,1);
display: inline-block;
width: 280px;
.totoday {
border-top: 1px solid rgba(0,0,0,0.09);
line-height: 40px;
text-align: center;
color: #108EE9;
cursor: pointer;
position: relative;
&>span {
display: inline-block;
margin: 0 auto;
width: 100px;
}
.tosure {
position: absolute;
width: 85px;
text-align: center;
right: 0;
top: 0;
height: 40px;
}
}
.dayselect {
border-bottom: 1px solid rgba(0,0,0,0.09);
line-height: 40px;
// display: flex;
padding: 0 20px;
// align-items: center;
text-align: center;
.doubleleft, .arrowleft {
float: left;
cursor: pointer;
padding-right: 10px;
}
.doubleright, .arrowright {
float: right;
cursor: pointer;
padding-left: 10px;
}
.currentmonth {
justify-content: center;
}
}
.notopen {
opacity: .5;
}
}
.dayrow {
display: flex;
.weekday {
width: 30px;
height: 30px;
text-align: center;
line-height: 30px;
color: #000;
font-weight: 500;
margin: 0px 5px 0px 5px;
}
.dayitem {
width: 30px;
height: 30px;
text-align: center;
line-height: 30px;
cursor: pointer;
margin: 0px 5px 0px 5px;
color: rgba(0, 0, 0, 0.5);
border-radius: 2px;
&.current {
color: rgba(0,0,0,1);
}
&.istoday {
border:1px solid rgba(24,144,255,1);
color: #1890FF;
}
&:hover {
background-color: #E6F7FF;
}
&.dayselected {
background-color:#1890FF;
color: #fff;
}
}
}
.clockWrapShow {
right: 0;
display: block;
position: absolute;
z-index: 1;
top: 16px;
}
.clockWrapHide {
display: none;
}
@media (max-width: 1700px) {
.clockflex {
.clockflexRight {
margin-right: 0;
}
}
}
.pushlocation {
:global {
.ant-form-item {
.ant-form-item-children {
display: flex;
align-items: center;
}
}
}
}
This diff is collapsed.
.container {
background-color: #fff;
padding: 0 20px;
position: relative;
}
.title {
font-size:16px;
font-family:PingFangSC;
font-weight:600;
color:rgba(0,0,0,0.85);
line-height:24px;
position: relative;
padding-bottom: 30px;
.pack {
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:20px;
display: inline-block;
margin-left: 36px;
cursor: pointer;
}
}
.title:after {
position: absolute;
content: '';
display: block;
width: 3px;
height: 19px;
background-color: #1890FF;
left: -10px;
top: 4px;
border-radius:2px;
}
.commonwrap {
display: flex;
align-items: flex-start;
:global {
.ant-form-item-label > label::after {
content: '';
}
}
.commonleft {
width: 105px;
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:40px;
}
.commonright {
width: 80%;
:global {
.ant-form-text1 {
font-size:12px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.55);
line-height:22px;
display: inline-block;
margin-left: 10px;
}
.ant-form-item .ant-switch {
margin-left: -12px;
}
}
}
}
.panpelBox {
display: block;
transition: all .3s;
}
.panpelhideBox {
display: none;
}
.pushlocation {
:global {
.ant-form-item {
.ant-form-item-children {
display: flex;
align-items: center;
}
}
}
}
import { connect } from 'dva';
import React from 'react';
import { Icon, Button, Tabs, Select, Form, InputNumber, Row, Col, Input, Radio, Modal, message } from 'antd';
import moment from 'moment';
import pageStyle from './index.less';
import { pageIn, hasBtnPower } from '../../utils/index';
import JobClock from './jobclock/index';
import CalendarClock from './calendarclock/index';
import EmigratedClock from './emigratedclock/index';
const { TabPane } = Tabs;
class NewThemeForm extends React.Component {
componentDidMount() { // 挂载
pageIn('轻校-发布主题');
}
componentDidUpdate() {
}
componentWillUnmount() { // 卸载
}
tabChange=(key) => {
const { dispatch, tabIndex } = this.props;
if (Number(key) === 3) {
message.warning('功能即将开放,敬请期待', 1);
return;
}
dispatch({
type: 'indexstaic/tabChange',
payload: {
tabIndex: key,
},
});
}
render() {
const {
tabIndex,
} = this.props;
return (
<div className={pageStyle.container}>
<div className={pageStyle.typeTip}>主题类型</div>
<Tabs activeKey={`${tabIndex}`} tabPosition="left" onChange={this.tabChange} animated={false}>
<TabPane
tab={
<div className={pageStyle.makeitem}>
<div className={pageStyle.makeitemLeft}>
<div className={`${pageStyle.themeicon}`}>
<img src={`${__IMGCDN__}themeaicon.png`} alt="" />
</div>
<div className={pageStyle.themetypename}>新建作业打卡</div>
</div>
</div>
}
key="1"
>
<JobClock />
</TabPane>
<TabPane
tab={
<div className={pageStyle.makeitem}>
<div className={pageStyle.makeitemLeft}>
<div className={`${pageStyle.themeicon}`}>
<img src={`${__IMGCDN__}themebicon.png`} alt="" />
</div>
<div className={pageStyle.themetypename}>新建日历打卡</div>
</div>
</div>
}
key="2"
>
<CalendarClock />
</TabPane>
<TabPane
tab={
<div className={pageStyle.makeitem}>
<div className={pageStyle.makeitemLeft}>
<div className={`${pageStyle.themeicon}`}>
<img src={`${__IMGCDN__}themecicon.png`} alt="" />
</div>
<div className={pageStyle.themetypename}>新建闯关打卡</div>
</div>
</div>
}
key="3"
>
<EmigratedClock />
</TabPane>
</Tabs>
</div>
);
}
}
NewThemeForm.propTypes = {
};
const NewTheme = Form.create()(NewThemeForm);
function mapStateToProps(state) {
const {
tabIndex,
} = state.indexstaic;
return {
tabIndex,
};
}
export default connect(mapStateToProps)(NewTheme);
@import '../../less/variables.less';
.container {
background-color: #fff;
padding: 12px 20px 24px 20px;
position: relative;
overflow-y: hidden;
min-width: 1350px;
border-radius:2px 0px 2px 2px;
:global {
.ant-tabs .ant-tabs-left-bar .ant-tabs-tab, .ant-tabs .ant-tabs-right-bar .ant-tabs-tab {
padding: 0;
}
.ant-tabs-nav-scroll {
border-right: 1px solid rgba(0, 0, 0, .1);
padding-right: 30px;
}
.ant-tabs-ink-bar {
background-color: transparent;
}
.ant-tabs-tab {
border: 1px solid rgba(217, 217, 217, 1);
font-size: 18px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
border-radius: 6px;
}
//.ant-tabs-tab:hover {
// border: none;
//}
.ant-tabs-nav .ant-tabs-tab-active {
border: none;
background: rgba(230, 247, 255, 1);
color: #1890FF;
}
}
}
.typeTip {
font-size: 16px;
font-family: PingFangSC;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
line-height: 24px;
margin-bottom: 30px;
}
.makeitem {
cursor: pointer;
width: 217px;
height: 59px;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 22px;
.makeitemLeft {
display: flex;
align-items: center;
}
}
.makeitem:hover {
cursor: pointer;
background: rgba(230, 247, 255, 1);
border: 0;
.themetypename {
font-weight: 400;
color: rgba(24, 144, 255, 1);
font-family: PingFangSC;
}
.themetypeicon {
color: rgba(24, 144, 255, 1);
}
}
.themeicon {
img {
width: 40px;
height: 40px;
margin-right: 15px;
}
}
This diff is collapsed.
.container {
background-color: #fff;
padding: 0 20px;
position: relative;
}
.title {
font-size:16px;
font-family:PingFangSC;
font-weight:600;
color:rgba(0,0,0,0.85);
line-height:24px;
position: relative;
padding-bottom: 30px;
.pack {
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:20px;
display: inline-block;
margin-left: 36px;
cursor: pointer;
}
}
.title:after {
position: absolute;
content: '';
display: block;
width: 3px;
height: 19px;
background-color: #1890FF;
left: -10px;
top: 4px;
border-radius:2px;
}
.commonwrap {
display: flex;
align-items: flex-start;
:global {
.ant-form-item-label > label::after {
content: '';
}
}
.commonleft {
width: 105px;
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:40px;
}
.commonright {
width: 80%;
:global {
.ant-form-text1 {
font-size:12px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.55);
line-height:22px;
display: inline-block;
margin-left: 10px;
}
.ant-form-item .ant-switch {
margin-left: -12px;
}
}
}
}
.panpelBox {
display: block;
transition: all .3s;
}
.panpelhideBox {
display: none;
}
.pushlocation {
:global {
.ant-form-item {
.ant-form-item-children {
display: flex;
align-items: center;
}
}
}
}
......@@ -51,10 +51,15 @@ const IndexStaic = props => (
);
const Integralmanage = props => (
<Bundle load={() => import(/* webpackChunkName:"officialweb" */'./pages/integralmanage/index')}>
<Bundle load={() => import(/* webpackChunkName:"integralmanage" */'./pages/integralmanage/index')}>
{ Integralmanage => (<Integralmanage {...props} />) }
</Bundle>
);
const NewTheme = props => (
<Bundle load={() => import(/* webpackChunkName:"newtheme" */'./pages/newtheme/index')}>
{ NewTheme => (<NewTheme {...props} />) }
</Bundle>
);
const Storesetting = props => (
<Bundle load={() => import(/* webpackChunkName:"officialweb" */'./pages/integralmanage/storesetting/index')}>
{ Storesetting => (<Storesetting {...props} />) }
......@@ -180,6 +185,7 @@ function RouterConfig({ history }) {
render={() => (
<SjdIndex>
<Route path="/sjd/storesetting" exact component={Storesetting} />
<Route path="/sjd/newtheme" config={{ needAuth: true }} exact component={NewTheme} />
<Route path="/sjd/integralmanage" config={{ needAuth: true }} exact component={Integralmanage} />
<Route path="/sjd/officialweb" config={{ needAuth: true }} exact component={Officialweb} />
<Route path="/sjd/officialwebeditor" exact component={OfficialwebEditor} />
......
import qs from 'qs';
import request from '../utils/request';
import api from '../common/api';
export function addTheme(params) {
const data = qs.stringify(params);
return request({
url: `${api.createtheme.addTheme}`,
method: 'POST',
data,
});
}
......@@ -691,8 +691,88 @@ function DayCount(date1, date2) {
const day = parseInt(days / (1000 * 60 * 60 * 24));
return (day + 1);
}
// 获取某个时间段的周几
function getWeek(begin, end, weekNum) {
const dateArr = [];
const stimeArr = begin.split('-');
const etimeArr = end.split('-');
const stoday = new Date();
stoday.setUTCFullYear(stimeArr[0], stimeArr[1] - 1, stimeArr[2]);
const etoday = new Date();
etoday.setUTCFullYear(etimeArr[0], etimeArr[1] - 1, etimeArr[2]);
const unixDb = stoday.getTime();// 开始时间的毫秒数
const unixDe = etoday.getTime();// 结束时间的毫秒数
for (let k = unixDb; k <= unixDe;) {
// eslint-disable-next-line no-use-before-define,radix
const needJudgeDate = msToDate(parseInt(k)).withoutTime;
// 不加这个if判断直接push的话就是已知时间段内的所有日期
if (new Date(needJudgeDate).getDay() === weekNum) {
dateArr.push(needJudgeDate);
}
k += 24 * 60 * 60 * 1000;
}
return dateArr;
}
function msToDate(msec) {
const datetime = new Date(msec);
const year = datetime.getFullYear();
const month = datetime.getMonth();
const date = datetime.getDate();
const hour = datetime.getHours();
const minute = datetime.getMinutes();
const second = datetime.getSeconds();
const result1 = `${year
}-${
(month + 1) >= 10 ? (month + 1) : `0${month + 1}`
}-${
(date + 1) < 10 ? `0${date}` : date
} ${
(hour + 1) < 10 ? `0${hour}` : hour
}:${
(minute + 1) < 10 ? `0${minute}` : minute
}:${
(second + 1) < 10 ? `0${second}` : second}`;
const result2 = `${year
}-${
(month + 1) >= 10 ? (month + 1) : `0${month + 1}`
}-${
(date + 1) < 11 ? `0${date}` : date}`;
const result = {
hasTime: result1,
withoutTime: result2,
};
return result;
}
// 数组去重
function unique1(arr) {
const j = arr.length;
const cache = {};
let key = [];
const result = [];
for (let i = 0; i < j; i++) {
const _key = arr[i][0];
key = typeof (_key) + _key;
if (!cache[key]) {
cache[key] = 1;
result.push(arr[i]);
}
}
return result;
}
// 根据日期获取周几
function getWeekDay(day) {
const weekDay = ['0', '1', '2', '3', '4', '5', '6'];
const myDate = new Date(Date.parse(day));
const result = weekDay[myDate.getDay()];
return result;
}
export {
pageIn,
SessionStorage,
......@@ -733,4 +813,7 @@ export {
getBetweenDays,
hasBtnPower,
DayCount,
getWeek,
unique1,
getWeekDay,
};
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