Commit 01a72eb2 by yuananting

Merge branch 'master' into refactor/yuananting/20210615/category-tree-related

parents d082113c 77f02561
...@@ -10,6 +10,8 @@ import Service from '@/common/js/service'; ...@@ -10,6 +10,8 @@ import Service from '@/common/js/service';
// import _ from 'underscore'; // import _ from 'underscore';
import './ChooseMembersModal.less'; import './ChooseMembersModal.less';
import User from '@/common/js/user' import User from '@/common/js/user'
import { XMTable } from '@/components';
import college from '@/common/lottie/college';
const { Search } = Input; const { Search } = Input;
...@@ -155,7 +157,7 @@ class ChooseMembersModal extends React.Component { ...@@ -155,7 +157,7 @@ class ChooseMembersModal extends React.Component {
let rightsList = []; // 保存新加进去的成员 let rightsList = []; // 保存新加进去的成员
selectUserList.map((item) => { selectUserList.map((item) => {
rightsList.push({ rightsList.push({
rights: "LOOK_DOWNLOAD", rights: "LOOK",
userId: item.userId userId: item.userId
}) })
return rightsList return rightsList
...@@ -203,10 +205,8 @@ class ChooseMembersModal extends React.Component { ...@@ -203,10 +205,8 @@ class ChooseMembersModal extends React.Component {
title: '全选', // 实际为头像,但在表格上这行要求显示为全选 title: '全选', // 实际为头像,但在表格上这行要求显示为全选
key: 'avatar', key: 'avatar',
dataIndex: 'avatar', dataIndex: 'avatar',
width: '40%',
render: (value, record) => { render: (value, record) => {
const { adminName } = record; const { adminName } = record;
return ( return (
<div className='avatar'> <div className='avatar'>
{ {
...@@ -232,7 +232,7 @@ class ChooseMembersModal extends React.Component { ...@@ -232,7 +232,7 @@ class ChooseMembersModal extends React.Component {
title: '学员名', title: '学员名',
key: 'adminNameRight', key: 'adminNameRight',
dataIndex: 'adminName', dataIndex: 'adminName',
width: '70%', width: '65%',
render: (value, record) => { render: (value, record) => {
const { adminName = '', avatar } = record; const { adminName = '', avatar } = record;
return ( return (
...@@ -293,16 +293,19 @@ class ChooseMembersModal extends React.Component { ...@@ -293,16 +293,19 @@ class ChooseMembersModal extends React.Component {
enterButton={<span className="icon iconfont">&#xe832;</span>} enterButton={<span className="icon iconfont">&#xe832;</span>}
/> />
<div className='container-left-body-table'> <div className='container-left-body-table'>
<Table <XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
rowKey={(record) => record.userId} rowKey={(record) => record.userId}
dataSource={allUserList} dataSource={allUserList}
columns={this.selectedColumnsLeft()} columns={this.selectedColumnsLeft()}
pagination={false} pagination={false}
scroll={{ y: 290}} scroll={{ y: 290}}
// bordered={true}
size={'small'} size={'small'}
rowSelection={{ rowSelection={{
columnWidth : 24, columnWidth : 63,
selectedRowKeys, selectedRowKeys,
onChange : this.onChangeRow, onChange : this.onChangeRow,
getCheckboxProps : this.getCheckboxProps, getCheckboxProps : this.getCheckboxProps,
...@@ -326,7 +329,11 @@ class ChooseMembersModal extends React.Component { ...@@ -326,7 +329,11 @@ class ChooseMembersModal extends React.Component {
<span className={ (selectUserList.length > 0) ? 'span-right-l' : null }>清空</span> <span className={ (selectUserList.length > 0) ? 'span-right-l' : null }>清空</span>
</div> </div>
<div className='container-right-body'> <div className='container-right-body'>
<Table <XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
rowKey={(record) => record.userId} rowKey={(record) => record.userId}
dataSource={selectUserList} dataSource={selectUserList}
columns={this.selectedColumnsRight()} columns={this.selectedColumnsRight()}
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
>tr >td { >tr >td {
border-bottom: none; border-bottom: none;
background-color: #fff !important; background-color: #fff !important;
padding:8px 8px !important;
} }
} }
} }
...@@ -45,6 +45,14 @@ ...@@ -45,6 +45,14 @@
.ant-empty-normal { .ant-empty-normal {
margin: 100px 0 !important; margin: 100px 0 !important;
} }
.ant-empty {
margin-top: 60px;
}
.ant-empty-description {
color: #999;
}
.avatar{ .avatar{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -119,6 +127,13 @@ ...@@ -119,6 +127,13 @@
margin: 144px 0 !important; margin: 144px 0 !important;
} }
.ant-empty {
margin-top: 60px;
}
.ant-empty-description {
color: #999;
}
.avatar{ .avatar{
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -8,7 +8,7 @@ import React from 'react'; ...@@ -8,7 +8,7 @@ import React from 'react';
import { Modal, Button, Breadcrumb, Radio, message } from 'antd'; import { Modal, Button, Breadcrumb, Radio, message } from 'antd';
import Service from '@/common/js/service'; import Service from '@/common/js/service';
import { FILE_TYPE_ICON_MAP, DEFAULT_SIZE_UNIT } from "@/domains/resource-disk/constants"; import { FILE_TYPE_ICON_MAP, DEFAULT_SIZE_UNIT } from "@/domains/resource-disk/constants";
import { LottieIcon } from 'xiaomai-b-components'; import LottieIcon from '@/components/LottieIcon';
import _ from 'underscore'; import _ from 'underscore';
import { getEllipsText } from "@/domains/basic-domain/utils"; import { getEllipsText } from "@/domains/basic-domain/utils";
import * as lodash from 'lodash'; import * as lodash from 'lodash';
...@@ -334,6 +334,8 @@ class CopyFileModal extends React.Component { ...@@ -334,6 +334,8 @@ class CopyFileModal extends React.Component {
<div className="lottie-box"> <div className="lottie-box">
<LottieIcon <LottieIcon
title={<span className="desc">这个文件夹是空的</span>} title={<span className="desc">这个文件夹是空的</span>}
type="college"
size={150}
/> />
</div> </div>
} }
......
...@@ -57,12 +57,17 @@ ...@@ -57,12 +57,17 @@
} }
} }
.lottie-box { .copy-body {
border:1px solid #E8E8E8; .lottie-box {
border-radius:4px; border:1px solid #E8E8E8;
height: 320px; border-radius:4px;
height: 320px;
}
.lottie-icon{
margin: 70px 0 !important;
.lottie-icon__title {
color: #999;
}
}
} }
.lottie-icon{
margin: 100px 0;
}
\ No newline at end of file
...@@ -19,7 +19,7 @@ class ManagingMembersModal extends React.Component { ...@@ -19,7 +19,7 @@ class ManagingMembersModal extends React.Component {
addManagingMember: false, // 是否点击了添加成员 addManagingMember: false, // 是否点击了添加成员
storeId :User.getStoreId() , // 学院Id storeId :User.getStoreId() , // 学院Id
iconRotateList: [], iconRotateList: [],
userAuthority : ['可编辑', '可查看/下载', '仅可查看', '', '创建者', '学院管理员'] , // 空 代表删除 userAuthority : ['可编辑', '可下载', '可查看', '', '创建者', '学院管理员'] , // 空 代表删除
} }
} }
componentDidMount() { componentDidMount() {
...@@ -64,7 +64,7 @@ class ManagingMembersModal extends React.Component { ...@@ -64,7 +64,7 @@ class ManagingMembersModal extends React.Component {
// 修改成员权限 // 修改成员权限
updateFileUserAuthority = (params, newRights = 1) => { updateFileUserAuthority = (params, newRights = 1) => {
const rightList = ['EDIT', 'LOOK_DOWNLOAD', '']; const rightList = ['EDIT', 'LOOK_DOWNLOAD', 'LOOK'];
let { iconRotateList } = this.state; let { iconRotateList } = this.state;
let _params = params; let _params = params;
_params.rights = rightList[newRights]; _params.rights = rightList[newRights];
...@@ -173,10 +173,10 @@ class ManagingMembersModal extends React.Component { ...@@ -173,10 +173,10 @@ class ManagingMembersModal extends React.Component {
<span className='menu-bottom'>下载、复制</span> <span className='menu-bottom'>下载、复制</span>
</div> </div>
</Menu.Item> </Menu.Item>
{/* <Menu.Item key="LOOK" > <Menu.Item key="LOOK" >
<div onClick={() => this.updateFileUserAuthority(params, 2)}>仅可查看</div> <div onClick={() => this.updateFileUserAuthority(params, 2)}>{userAuthority[2]}</div>
<span className='menu-bottom'>{userAuthority[2]}</span> <span className='menu-bottom'>查看</span>
</Menu.Item> */} </Menu.Item>
<Menu.Divider key='LINE'/> <Menu.Divider key='LINE'/>
<Menu.Item key="REMOVE" > <Menu.Item key="REMOVE" >
<div className='remove' onClick={() => this.removeUser(params, userAuthority[3])}>移除</div> <div className='remove' onClick={() => this.removeUser(params, userAuthority[3])}>移除</div>
...@@ -247,6 +247,8 @@ class ManagingMembersModal extends React.Component { ...@@ -247,6 +247,8 @@ class ManagingMembersModal extends React.Component {
num = 1; num = 1;
} else if (record.rights === "EDIT") { } else if (record.rights === "EDIT") {
num = 0; num = 0;
}else if(record.rights=="LOOK"){
num = 2;
} }
} }
return ( return (
......
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
.ant-table-row{ .ant-table-row{
background-color: #fff !important; background-color: #fff !important;
} }
tr:first-child{
display: none;
}
.ant-table-row:hover{ .ant-table-row:hover{
background-color: #E9E9E9; background-color: #E9E9E9;
} }
......
...@@ -10,7 +10,7 @@ import React from 'react'; ...@@ -10,7 +10,7 @@ import React from 'react';
import { Modal, Button, Radio, Checkbox, message, Tooltip } from 'antd'; import { Modal, Button, Radio, Checkbox, message, Tooltip } from 'antd';
import _ from 'underscore'; import _ from 'underscore';
import * as lodash from 'lodash'; import * as lodash from 'lodash';
import { LottieIcon } from 'xiaomai-b-components'; import LottieIcon from '@/components/LottieIcon';
import Service from '@/common/js/service'; import Service from '@/common/js/service';
import { getEllipsText } from "@/domains/basic-domain/utils"; import { getEllipsText } from "@/domains/basic-domain/utils";
...@@ -647,6 +647,8 @@ class SelectPrepareFileModal extends React.Component { ...@@ -647,6 +647,8 @@ class SelectPrepareFileModal extends React.Component {
<Otherwise> <Otherwise>
<LottieIcon <LottieIcon
title={<span className="desc">这个文件夹是空的</span>} title={<span className="desc">这个文件夹是空的</span>}
type="college"
size={150}
/> />
</Otherwise> </Otherwise>
</Choose> </Choose>
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
} }
.lottie-icon { .lottie-icon {
margin: 12px 0 0 0; margin: 0;
border: 1px solid #E8E8E8; border: 1px solid #E8E8E8;
border-radius: 4px; border-radius: 4px;
padding: 100px 0; padding: 69px 0 59px 0;
.desc { .desc {
color: #999; color: #999;
......
.lottie-icon{
text-align: center;
margin-top: 200px;
margin-bottom: 50px;
&__title{
font-size:14px;
font-family:PingFangSC-Regular;
font-weight:400;
color:#999;
line-height:20px;
margin-top: 20px;
}
}
\ No newline at end of file
/*
* @Author: wufan
* @Date: 2021-06-15 13:48:35
* @LastEditors: wufan
* @LastEditTime: 2021-06-15 14:24:57
* @Description: Description
*/
import React from 'react';
import Lottie from 'react-lottie';
import student from '@/common/lottie/student.json';
import activity from '@/common/lottie/activity.json';
import teacher from '@/common/lottie/teacher.json';
import college from '@/common/lottie/college.json';
import './LottieIcon.less';
interface LottieIconInterface {
size: number,
type: string,
title: string,
isStopped: boolean,
isPaused: boolean,
}
const ANIMATION_DATA_MAP: {
[key: string]: any,
} = {
student,
activity,
teacher,
college
}
function LottieIcon(props: LottieIconInterface) {
const {
title,
size = 90,
type = 'student',
isPaused = true,
isStopped = true,
} = props;
const options = {
loop: true,
autoplay: true,
animationData: ANIMATION_DATA_MAP[type],
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return (
<div className="lottie-icon">
<Lottie
options={options}
width={size}
height={size}
isPaused={isPaused}
isStopped={isStopped}
/>
<div className="lottie-icon__title">{title}</div>
</div>
)
}
export default LottieIcon;
\ No newline at end of file
/*
* @Author: wufan
* @Date: 2021-05-26 10:29:56
* @LastEditors: wufan
* @LastEditTime: 2021-06-17 14:15:00
* @Description: Description
*/
import React from "react"; import React from "react";
import { Tag } from 'antd'
import "./WatchDataHeader.less"; import "./WatchDataHeader.less";
interface WatchDataHeaderProps { interface WatchDataHeaderProps {
......
/* /*
* @Author: 陈剑宇 * @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01 * @Date: 2020-05-07 14:43:01
* @LastEditTime: 2021-05-28 15:20:40 * @LastEditTime: 2021-06-11 16:44:17
* @LastEditors: fusanqiasng * @LastEditors: Please set LastEditors
* @Description: * @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts * @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
*/ */
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-20 09:21:40 * @Date: 2020-08-20 09:21:40
* @LastEditors: zhangleyuan * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-02-20 17:08:58 * @LastEditTime: 2021-06-11 15:17:56
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
......
...@@ -210,7 +210,6 @@ class ChooseMembersModal extends React.Component { ...@@ -210,7 +210,6 @@ class ChooseMembersModal extends React.Component {
title: '全选', // 实际为头像,但在表格上这行要求显示为全选 title: '全选', // 实际为头像,但在表格上这行要求显示为全选
key: 'avatar', key: 'avatar',
dataIndex: 'avatar', dataIndex: 'avatar',
width: '40%',
render: (value, record) => { render: (value, record) => {
const { name } = record; const { name } = record;
...@@ -328,7 +327,7 @@ class ChooseMembersModal extends React.Component { ...@@ -328,7 +327,7 @@ class ChooseMembersModal extends React.Component {
}} }}
size={'small'} size={'small'}
rowSelection={{ rowSelection={{
columnWidth : 24, columnWidth : 63,
selectedRowKeys, selectedRowKeys,
onChange : this.onChangeRow, onChange : this.onChangeRow,
getCheckboxProps : this.getCheckboxProps, getCheckboxProps : this.getCheckboxProps,
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:12:45 * @Date: 2020-08-05 10:12:45
* @LastEditors: yuananting * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-02 15:05:54 * @LastEditTime: 2021-06-15 20:01:05
* @Description: 视频课-列表模块 * @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
* @Last Modified by: chenshu * @Last Modified by: chenshu
* @Last Modified time: 2021-06-08 18:18:46 * @Last Modified time: 2021-06-08 18:18:46
*/ */
import React, { useEffect, useState } from 'react'; import React from 'react';
import { Modal, Button, Table, Progress, message, Tooltip, Spin, Popconfirm } from 'antd'; import { Modal, Button, Table, message, Tooltip, Spin, Popconfirm } from 'antd';
import { QuestionCircleOutlined,LoadingOutlined} from "@ant-design/icons"; import { QuestionCircleOutlined,LoadingOutlined} from "@ant-design/icons";
import _ from 'underscore'; import _ from 'underscore';
import moment from 'moment'; import moment from 'moment';
import Lottie from "lottie-web"; import Lottie from "lottie-web";
import User from '@/common/js/user'; import User from '@/common/js/user';
import { suffixType, DEFAULT_SIZE_UNIT, SupportFileType } from '@/common/constants/academic/liveEnum'; import { suffixType, DEFAULT_SIZE_UNIT } from '@/common/constants/academic/liveEnum';
import { FileVerifyMap, FileTypeIcon, DISK_MAP } from '@/common/constants/academic/lessonEnum'; import { FileVerifyMap, FileTypeIcon } from '@/common/constants/academic/lessonEnum';
import ScanFileModal from '@/modules/prepare-lesson/modal/ScanFileModal' import ScanFileModal from '@/modules/prepare-lesson/modal/ScanFileModal'
import SelectPrepareFileModal from '@/modules/prepare-lesson/modal/SelectPrepareFileModal'; import SelectPrepareFileModal from '@/modules/prepare-lesson/modal/SelectPrepareFileModal';
import Service from '@/common/js/service'; import Service from '@/common/js/service';
...@@ -229,14 +229,18 @@ class ManageCoursewareModal extends React.Component { ...@@ -229,14 +229,18 @@ class ManageCoursewareModal extends React.Component {
const antIcon = <LoadingOutlined/>; const antIcon = <LoadingOutlined/>;
const type = FileVerifyMap[fileType].type; const type = FileVerifyMap[fileType].type;
return <div className="courseware-name" onClick={() => this.handleScanFile(item)}> return <div className="courseware-name" onClick={() => this.handleScanFile(item)}>
{(type === 'JPG' || type === 'PNG') && item.progress ? <Choose>
<Spin indicator={antIcon} /> <When condition={(type === 'JPG' || type === 'PNG') && item.progress}>
:<img <Spin indicator={antIcon} />
src={FileTypeIcon[FileVerifyMap[fileType].type] || (item.docUrls[0] || {}).conversionFileUrl} </When>
alt="" <Otherwise>
className="item-img" <img
/> src={FileTypeIcon[FileVerifyMap[fileType].type] || (item.docUrls[0] || {}).conversionFileUrl}
} alt=""
className="item-img"
/>
</Otherwise>
</Choose>
<Tooltip title={item.fileName}><span className="name">{item.fileName}</span></Tooltip> <Tooltip title={item.fileName}><span className="name">{item.fileName}</span></Tooltip>
</div> </div>
}, },
...@@ -270,7 +274,7 @@ class ManageCoursewareModal extends React.Component { ...@@ -270,7 +274,7 @@ class ManageCoursewareModal extends React.Component {
width: "16%", width: "16%",
dataIndex: "control", dataIndex: "control",
render: (_value, item) => { render: (_value, item) => {
const { uploadObject, failObject, cancelObject } = this.state; const { failObject } = this.state;
const uploadFail = failObject[item.id]; const uploadFail = failObject[item.id];
// 上课前45分钟/上课中/已结束的情况下都不可操作 // 上课前45分钟/上课中/已结束的情况下都不可操作
...@@ -295,7 +299,7 @@ class ManageCoursewareModal extends React.Component { ...@@ -295,7 +299,7 @@ class ManageCoursewareModal extends React.Component {
const { const {
list, scanFileModal, editData, cancelObject, list, scanFileModal, editData, cancelObject,
showSelectFileModal, selectedFileList, showSelectFileModal, selectedFileList,
diskList, currentRootDisk, isLessonPermission diskList
} = this.state; } = this.state;
const _list = _.reject(list, (item) => cancelObject[item.id]); const _list = _.reject(list, (item) => cancelObject[item.id]);
return ( return (
......
...@@ -52,6 +52,13 @@ class ShareLiveModal extends React.Component { ...@@ -52,6 +52,13 @@ class ShareLiveModal extends React.Component {
size: 98, size: 98,
}) })
qrcodeWrapDom.appendChild(qrcodeNode) qrcodeWrapDom.appendChild(qrcodeNode)
const qrcodeWrapDomDownload = document.querySelector('#qrcodeWrap-dowload')
const qrcodeNodeDownLoad = new qrcode({
text: this.state.shareUrl,
size: 196,
})
qrcodeWrapDomDownload.appendChild(qrcodeNodeDownLoad)
} }
) )
}) })
...@@ -72,13 +79,12 @@ class ShareLiveModal extends React.Component { ...@@ -72,13 +79,12 @@ class ShareLiveModal extends React.Component {
() => { () => {
this.setState({ time: new Date().valueOf() }, () => { this.setState({ time: new Date().valueOf() }, () => {
setTimeout(() => { setTimeout(() => {
let node = document.getElementById('poster') let node = document.getElementById('poster-dowload')
domtoimage.toPng(node).then((imgData) => { domtoimage.toPng(node).then((imgData) => {
console.log(imgData) console.log(imgData)
const download = document.createElement('a') const download = document.createElement('a')
const { courseName } = this.props.data const { courseName } = this.props.data
$(download).attr('href', imgData).attr('download', `${courseName}.png`).get(0).click() $(download).attr('href', imgData).attr('download', `${courseName}.png`).get(0).click()
// this.props.close()
}) })
}, 1000) }, 1000)
}) })
...@@ -158,6 +164,29 @@ class ShareLiveModal extends React.Component { ...@@ -158,6 +164,29 @@ class ShareLiveModal extends React.Component {
<div className='qrcode-wrap__right' id='qrcodeWrap'></div> <div className='qrcode-wrap__right' id='qrcodeWrap'></div>
</div> </div>
</div> </div>
<div id='poster-dowload'>
<div className='store-name'>
<span className='text'>{User.getStoreName()}</span>
</div>
<div className='course-name-title'>{type === 'videoClass' ? `${courseName}开课啦` : `邀请你观看直播:`}</div>
{type === 'liveClass' && <div class='live-couse-name'>{courseName}</div>}
<Choose>
<When condition={showImg}>
<img crossOrigin='*' src={coverImgSrc + `?=${time}`} className='course-cover' alt='' />
</When>
<Otherwise>
<img src={coverImgSrc + `?=${time}`} className='course-cover' alt='' />
</Otherwise>
</Choose>
<div className='qrcode-wrap'>
<div className='qrcode-wrap__left'>
<div className='text'>长按识别二维码进入观看</div>
<img className='finger' src='https://image.xiaomaiketang.com/xm/thpkWDwJsC.png' alt='' />
</div>
<div className='qrcode-wrap__right' id='qrcodeWrap-dowload'></div>
</div>
</div>
</div> </div>
<div className='right'> <div className='right'>
<div className='share-poster right__item'> <div className='share-poster right__item'>
......
.share-live-modal { .share-live-modal {
.ant-modal-body { .ant-modal-body {
display: flex; display: flex;
#poster{ height:510px !important;
background: #FFF; overflow: hidden !important;
margin:0;
padding: 20px;
}
.left { .left {
width: 303px; width: 303px;
margin: 0 32px 0 16px; margin: 0 32px 0 16px;
box-shadow:0px 2px 10px 0px rgba(0,0,0,0.05); box-shadow:0px 2px 10px 0px rgba(0,0,0,0.05);
border-radius: 12px; border-radius: 12px;
#poster{
.course-name-title { background: #FFF;
font-size: 14px; margin:0;
color: #333; padding: 20px;
line-height: 20px; margin-bottom:140px;
margin-bottom: 4px; .course-name-title {
} font-size: 14px;
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333; color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px; line-height: 20px;
} margin-bottom: 4px;
}
.course-cover { .live-couse-name{
width: 263px; font-size:16px;
height: 143px; color:#333333;
border-radius: 6px; font-weight: 600;
margin-top: 8px; }
} .course-name {
color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px;
}
.course-cover {
width: 263px;
height: 143px;
border-radius: 6px;
margin-top: 8px;
}
.qrcode-wrap { .qrcode-wrap {
padding: 0 16px; padding: 0 16px;
display: flex; display: flex;
align-items: center; align-items: center;
margin: 24px 0 16px 0; margin: 24px 0 16px 0;
&__left { &__left {
width: 98px; width: 98px;
text-align: center; text-align: center;
margin-right: 22px; margin-right: 22px;
.text { .text {
line-height: 20px; line-height: 20px;
}
.finger {
width: 40px;
height: 40px;
margin-top: 8px;
}
} }
.finger { &__right {
width: 40px; width: 110px;
height: 40px; height: 110px;
margin-top: 8px; padding: 6px
} }
} }
&__right { .store-name {
width: 110px; // padding: 8px 16px;
height: 110px; display: flex;
padding: 6px align-items: center;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
} }
} }
#poster-dowload{
.store-name { background: #FFF;
// padding: 8px 16px; margin:0;
display: flex; padding: 40px;
align-items: center; width:606px;
.course-name-title {
font-size: 28px;
color: #333;
line-height: 40px;
margin-bottom: 8px; margin-bottom: 8px;
.text { }
font-size: 12px; .live-couse-name{
color: #999; font-size:32px;
font-size: 14px; color:#333333;
line-height: 20px; font-weight: 600;
text-overflow: ellipsis; }
overflow: hidden; .course-name {
white-space: nowrap; color: #333;
width: 100%; font-size: 32px;
font-weight: 600;
line-height: 40px;
}
.course-cover {
width: 526px;
height: 286px;
border-radius: 6px;
margin-top: 16px;
}
.qrcode-wrap {
padding: 0 32px;
display: flex;
align-items: center;
margin: 48px 0 32px 0;
&__left {
width: 196px;
text-align: center;
margin-right: 44px;
.text {
line-height: 40px;
}
.finger {
width: 80px;
height: 80px;
margin-top: 16px;
}
}
&__right {
width: 220px;
height: 220px;
padding: 12px
}
}
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 16px;
.text {
font-size: 24px;
color: #999;
font-size: 28px;
line-height: 40px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
} }
} }
} }
.right { .right {
.title { .title {
color: #333; color: #333;
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:12:45 * @Date: 2020-08-05 10:12:45
* @LastEditors: yuananting * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-02 16:15:55 * @LastEditTime: 2021-06-11 16:44:42
* @Description: 视频课-列表模块 * @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: * @Description:
* @Author: zangsuyun * @Author: zangsuyun
* @Date: 2021-03-12 14:49:40 * @Date: 2021-03-12 14:49:40
* @LastEditors: wufan * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-05-30 20:37:42 * @LastEditTime: 2021-06-11 16:44:59
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
......
import React from 'react'; import React from 'react';
import { Button } from 'antd';
import { withRouter } from 'react-router-dom'; import { withRouter } from 'react-router-dom';
import User from '@/common/js/user';
import './ExpiredCourseList.less'; import './ExpiredCourseList.less';
function ExpiredCourseList(props) { function ExpiredCourseList(props) {
......
...@@ -51,6 +51,13 @@ class ShareLiveModal extends React.Component { ...@@ -51,6 +51,13 @@ class ShareLiveModal extends React.Component {
size: 98, size: 98,
}) })
qrcodeWrapDom.appendChild(qrcodeNode) qrcodeWrapDom.appendChild(qrcodeNode)
const qrcodeWrapDomDownload = document.querySelector('#qrcodeWrap-dowload')
const qrcodeNodeDownLoad = new qrcode({
text: this.state.shareUrl,
size: 196,
})
qrcodeWrapDomDownload.appendChild(qrcodeNodeDownLoad)
} }
) )
}) })
...@@ -70,9 +77,8 @@ class ShareLiveModal extends React.Component { ...@@ -70,9 +77,8 @@ class ShareLiveModal extends React.Component {
}, },
() => { () => {
this.setState({ time: new Date().valueOf() }, () => { this.setState({ time: new Date().valueOf() }, () => {
let node = document.getElementById('poster') let node = document.getElementById('poster-dowload')
domtoimage.toPng(node).then((imgData) => { domtoimage.toPng(node).then((imgData) => {
console.log(imgData)
const download = document.createElement('a') const download = document.createElement('a')
const { planName } = this.props.data const { planName } = this.props.data
$(download).attr('href', imgData).attr('download', `${planName}.png`).get(0).click() $(download).attr('href', imgData).attr('download', `${planName}.png`).get(0).click()
...@@ -112,7 +118,7 @@ class ShareLiveModal extends React.Component { ...@@ -112,7 +118,7 @@ class ShareLiveModal extends React.Component {
<div className='course-name-title'>邀请你参与培训:</div> <div className='course-name-title'>邀请你参与培训:</div>
<div class='live-couse-name'>{planName}</div> <div className='live-couse-name'>{planName}</div>
<Choose> <Choose>
<When condition={showImg}> <When condition={showImg}>
<img crossOrigin='*' src={coverUrl + `?=${time}`} className='course-cover' alt='' /> <img crossOrigin='*' src={coverUrl + `?=${time}`} className='course-cover' alt='' />
...@@ -130,6 +136,31 @@ class ShareLiveModal extends React.Component { ...@@ -130,6 +136,31 @@ class ShareLiveModal extends React.Component {
<div className='qrcode-wrap__right' id='qrcodeWrap'></div> <div className='qrcode-wrap__right' id='qrcodeWrap'></div>
</div> </div>
</div> </div>
<div id='poster-dowload'>
<div className='store-name'>
<span className='text'>{User.getStoreName()}</span>
</div>
<div className='course-name-title'>邀请你参与培训:</div>
<div className='live-couse-name'>{planName}</div>
<Choose>
<When condition={showImg}>
<img crossOrigin='*' src={coverUrl + `?=${time}`} className='course-cover' alt='' />
</When>
<Otherwise>
<img src={coverUrl + `?=${time}`} className='course-cover' alt='' />
</Otherwise>
</Choose>
<div className='qrcode-wrap'>
<div className='qrcode-wrap__left'>
<div className='text'>长按识别二维码进入观看</div>
<img className='finger' src='https://image.xiaomaiketang.com/xm/thpkWDwJsC.png' alt='' />
</div>
<div className='qrcode-wrap__right' id='qrcodeWrap-dowload'></div>
</div>
</div>
</div> </div>
<div className='right'> <div className='right'>
<div className='share-poster right__item'> <div className='share-poster right__item'>
......
.share-live-modal { .share-live-modal {
.ant-modal-body { .ant-modal-body {
display: flex; display: flex;
#poster{ height:510px !important;
background: #FFF; overflow: hidden !important;
margin:0;
padding: 20px;
}
.left { .left {
width: 303px; width: 303px;
margin: 0 32px 0 16px; margin: 0 32px 0 16px;
box-shadow:0px 2px 10px 0px rgba(0,0,0,0.05); box-shadow:0px 2px 10px 0px rgba(0,0,0,0.05);
border-radius: 12px; border-radius: 12px;
#poster{
.course-name-title { background: #FFF;
font-size: 14px; margin:0;
color: #333; padding: 20px;
line-height: 20px; margin-bottom:140px;
margin-bottom: 4px; .course-name-title {
} font-size: 14px;
.live-couse-name{ color: #333;
font-size:16px; line-height: 20px;
color:#333333; margin-bottom: 4px;
font-weight: 600; }
} .live-couse-name{
.course-name { font-size:16px;
color: #333; color:#333333;
font-size: 16px; font-weight: 600;
font-weight: 600; }
line-height: 20px; .course-name {
} color: #333;
font-size: 16px;
.course-cover { font-weight: 600;
width: 263px; line-height: 20px;
height: 143px; }
border-radius: 6px;
margin-top: 8px; .course-cover {
} width: 263px;
height: 143px;
border-radius: 6px;
margin-top: 8px;
}
.qrcode-wrap { .qrcode-wrap {
padding: 0 16px; padding: 0 16px;
display: flex; display: flex;
align-items: center; align-items: center;
margin: 24px 0 16px 0; margin: 24px 0 16px 0;
&__left { &__left {
width: 98px; width: 98px;
text-align: center; text-align: center;
margin-right: 22px; margin-right: 22px;
.text { .text {
line-height: 20px; line-height: 20px;
}
.finger {
width: 40px;
height: 40px;
margin-top: 8px;
}
} }
.finger { &__right {
width: 40px; width: 110px;
height: 40px; height: 110px;
margin-top: 8px; padding: 6px
} }
} }
&__right { .store-name {
width: 110px; // padding: 8px 16px;
height: 110px; display: flex;
padding: 6px align-items: center;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
} }
} }
#poster-dowload{
background: #FFF;
margin:0;
padding: 40px;
width:606px;
.course-name-title {
font-size: 28px;
color: #333;
line-height: 40px;
margin-bottom: 8px;
}
.live-couse-name{
font-size:32px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333;
font-size: 32px;
font-weight: 600;
line-height: 40px;
}
.course-cover {
width: 526px;
height: 286px;
border-radius: 6px;
margin-top: 16px;
}
.store-name { .qrcode-wrap {
// padding: 8px 16px; padding: 0 32px;
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 8px; margin: 48px 0 32px 0;
.text {
font-size: 12px; &__left {
color: #999; width: 196px;
font-size: 14px; text-align: center;
line-height: 20px; margin-right: 44px;
text-overflow: ellipsis;
overflow: hidden; .text {
white-space: nowrap; line-height: 40px;
width: 100%; }
.finger {
width: 80px;
height: 80px;
margin-top: 16px;
}
}
&__right {
width: 220px;
height: 220px;
padding: 12px
}
}
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 16px;
.text {
font-size: 12px;
color: #999;
font-size: 28px;
line-height: 40px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
} }
} }
} }
......
...@@ -7,23 +7,20 @@ ...@@ -7,23 +7,20 @@
*/ */
import React from 'react'; import React from 'react';
import { Modal, Button, Radio, Checkbox, Spin, Upload, message, Tooltip } from 'antd'; import { Modal, Button, Radio, Checkbox, message, Tooltip } from 'antd';
import InfiniteScroll from 'react-infinite-scroller';
import User from '@/common/js/user'; import User from '@/common/js/user';
import { getEllipsText } from "@/core/util"; import { getEllipsText } from "@/core/util";
import DefaultIcon from '@/modules/common/DefaultIcon';
import UploadProgressModal from './UploadProgressModal'; import UploadProgressModal from './UploadProgressModal';
import NonCompliantFileModal from './NonCompliantFileModal'; import NonCompliantFileModal from './NonCompliantFileModal';
import Service from '@/common/js/service'; import Service from '@/common/js/service';
import _ from 'underscore'; import _ from 'underscore';
import { import {
DEFAULT_SIZE_UNIT, FileTypeIcon, NonCompliantFileMap, DEFAULT_SIZE_UNIT, FileTypeIcon,
DISK_LIST, SupportFileType, LocalFileType,FileVerifyMap SupportFileType, FileVerifyMap
} from "@/common/constants/academic/lessonEnum"; } from "@/common/constants/academic/lessonEnum";
import { getFileTypeByName } from '../components/FolderManage'; import { getFileTypeByName } from '../components/FolderManage';
import LottieIcon from '@/components/LottieIcon';
import './SelectPrepareFileModal.less'; import './SelectPrepareFileModal.less';
const defaultQuery = { const defaultQuery = {
...@@ -660,9 +657,10 @@ class SelectPrepareFileModal extends React.Component { ...@@ -660,9 +657,10 @@ class SelectPrepareFileModal extends React.Component {
} }
</div> </div>
</div> : </div> :
<DefaultIcon <LottieIcon
type='student'
title={<span className="desc">这个文件夹是空的</span>} title={<span className="desc">这个文件夹是空的</span>}
type="college"
size={150}
/> />
} }
......
...@@ -13,7 +13,7 @@ import _ from 'underscore'; ...@@ -13,7 +13,7 @@ import _ from 'underscore';
import Service from '@/common/js/service'; import Service from '@/common/js/service';
import { getEllipsText } from '@/domains/basic-domain/utils'; import { getEllipsText } from '@/domains/basic-domain/utils';
import { DEFAULT_SIZE_UNIT, LOCAL_FILE_TYPE_MAP,FILR_VERIFY_MAP,SUPPORT_FILE_TYPE_MAP} from '@/domains/resource-disk/constants'; import { DEFAULT_SIZE_UNIT,FILR_VERIFY_MAP,SUPPORT_FILE_TYPE_MAP} from '@/domains/resource-disk/constants';
import { getFileTypeByName } from '@/domains/resource-disk/utils'; import { getFileTypeByName } from '@/domains/resource-disk/utils';
import UploadProgressModal from '@/bu-components/UploadProgressModal'; import UploadProgressModal from '@/bu-components/UploadProgressModal';
......
...@@ -29,25 +29,6 @@ class PrepareLessonPage extends React.Component { ...@@ -29,25 +29,6 @@ class PrepareLessonPage extends React.Component {
} }
} }
componentWillMount() {
// this.handleFetchDiskList();
}
handleFetchDiskList = async () => {
const res = await Service.Hades('public/apollo/getUserDisk', {});
const { result = [] } = res;
const diskList = result.map((item) => {
return {
...item,
folderName: DISK_MAP[item.disk]
}
});
this.setState({
diskList,
currentRootDisk: diskList[0] || defaultRootDisk
});
}
handleChangeDisk = (disk) => { handleChangeDisk = (disk) => {
this.setState({ this.setState({
currentRootDisk: disk currentRootDisk: disk
......
import React from 'react'; import React from 'react';
import { Modal, Input, Form, message } from 'antd'; import { Modal, Input, Form } from 'antd';
import ShowTips from '@/bu-components/ShowTip';
import './CreateFolderModal.less'; import './CreateFolderModal.less';
class CreateFolderModal extends React.Component { class CreateFolderModal extends React.Component {
...@@ -107,5 +106,4 @@ class CreateFolderModal extends React.Component { ...@@ -107,5 +106,4 @@ class CreateFolderModal extends React.Component {
} }
} }
// export default Form.create()(CreateFolderModal);
export default CreateFolderModal; export default CreateFolderModal;
\ No newline at end of file
import React from 'react';
import "./PreviewFileModal.less";
import { Spin } from 'antd'
class PreviewFileModal extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
cancelPreView = ()=>{
this.props.onCancel();
}
toPreView = (url)=>{
const a = document.createElement('a');
document.body.appendChild(a);
a.setAttribute('href', url);
a.setAttribute('target', '_blank');
a.click();
document.body.removeChild(a);
this.props.onCancel();
}
render() {
const { previewStatus,url} = this.props
return (
<div className="preview-modal">
<div className="preview-modal-content">
<div className="load-img-box">
{previewStatus === "UPLOAD" &&
<Spin size="large"/>
}
{previewStatus === "UPLOAD_SUCCESS" &&
<img className="load-img" src="https://image.xiaomaiketang.com/xm/jJRK3bTEdc.png"></img>
}
</div>
<div className="load-text-box">
{previewStatus === "UPLOAD" &&
<div className="load-text-box-title">预览生成中</div>
}
{previewStatus === "UPLOAD_SUCCESS" &&
<div className="load-text-box-title">预览生成成功</div>
}
</div>
<div className="operate">
<span className="btn cancel-preview-btn" onClick={()=>this.cancelPreView()}>取消预览</span>
{previewStatus === "UPLOAD" &&
<span className="btn to-preview-btn__disabled to-preview-btn">去查看</span>
}
{previewStatus === "UPLOAD_SUCCESS" &&
<span className="btn to-preview-btn" onClick={()=>this.toPreView(url)}>去查看</span>
}
</div>
</div>
</div>
);
}
}
export default PreviewFileModal;
.preview-modal{
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 102;
height: 100%;
background: rgba(0, 0, 0, 0.7);
.preview-modal-content{
position:absolute;
left:calc(50% - 133px);
top:calc(50% - 87px);
color:#FFF;
text-align:center;
width:266px;
height:174px;
.ant-spin-dot-item{
background-color: #FFF;
}
.load-img-box{
.load-img{
width:44px;
height:44px;
}
}
.load-text-box{
margin-top:23px;
font-size:16px;
color:#FFF;
.load-text-box-title{
margin-bottom:8px;
}
}
.operate{
margin-top:24px;
.btn {
padding:5px 12px;
border:1px solid #E8E8E8;
border-radius:2px;
}
.cancel-preview-btn{
margin-right:8px;
}
.to-preview-btn__disabled{
border:1px solid #E8E8E8;
opacity: 0.4;
}
}
}
}
\ No newline at end of file
...@@ -116,7 +116,6 @@ const App: React.FC = (props: any) => { ...@@ -116,7 +116,6 @@ const App: React.FC = (props: any) => {
setMenuType(!menuType); setMenuType(!menuType);
} }
if (!storeUserId) { if (!storeUserId) {
return <div></div> return <div></div>
} }
...@@ -127,7 +126,7 @@ const App: React.FC = (props: any) => { ...@@ -127,7 +126,7 @@ const App: React.FC = (props: any) => {
<ConfigProvider locale={zhCN} autoInsertSpaceInButton={false}> <ConfigProvider locale={zhCN} autoInsertSpaceInButton={false}>
<Main menuType={menuType} /> <Main menuType={menuType} />
</ConfigProvider> </ConfigProvider>
<Menu menuType={menuType} handleMenuType={handleMenuType}/> <Menu menuType={menuType} handleMenuType={handleMenuType} />
</div> </div>
) )
} }
......
...@@ -11,6 +11,7 @@ import { Radio, Button, Dropdown, Modal, Tooltip, message } from "antd"; ...@@ -11,6 +11,7 @@ import { Radio, Button, Dropdown, Modal, Tooltip, message } from "antd";
import { LIVE_SHARE } from "@/domains/course-domain/constants"; import { LIVE_SHARE } from "@/domains/course-domain/constants";
import User from "@/common/js/user"; import User from "@/common/js/user";
import Service from "@/common/js/service"; import Service from "@/common/js/service";
import StoreService from "@/domains/store-domain/storeService";
import BaseService from "@/domains/basic-domain/baseService"; import BaseService from "@/domains/basic-domain/baseService";
import { XMContext } from "@/store/context"; import { XMContext } from "@/store/context";
import logoImg from "@/common/images/logo.png"; import logoImg from "@/common/images/logo.png";
...@@ -18,6 +19,7 @@ import CourseService from "@/domains/course-domain/CourseService"; ...@@ -18,6 +19,7 @@ import CourseService from "@/domains/course-domain/CourseService";
import qrcode from "@/libs/qrcode/qrcode.js"; import qrcode from "@/libs/qrcode/qrcode.js";
import Bus from '@/core/tbus'; import Bus from '@/core/tbus';
import ClickOutside from '../../components/ClickOutside'; import ClickOutside from '../../components/ClickOutside';
import _ from "underscore";
const baseImg = "https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png"; const baseImg = "https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png";
const { confirm } = Modal; const { confirm } = Modal;
...@@ -38,6 +40,8 @@ function Header(props) { ...@@ -38,6 +40,8 @@ function Header(props) {
const storeUserId = User.getStoreUserId(); const storeUserId = User.getStoreUserId();
const enterpriseId = User.getEnterpriseId(); const enterpriseId = User.getEnterpriseId();
const messageHelpRef = useRef(null)
const domRef = useRef(null); const domRef = useRef(null);
const listRef = useRef(list); const listRef = useRef(list);
...@@ -53,6 +57,17 @@ function Header(props) { ...@@ -53,6 +57,17 @@ function Header(props) {
storeUserId && getUserInfo(); storeUserId && getUserInfo();
enterpriseId ? getEnterpriseUser() : User.setIsAdmin(false); enterpriseId ? getEnterpriseUser() : User.setIsAdmin(false);
}, [storeUserId]); }, [storeUserId]);
useEffect(()=> {
if (!messageHelpRef.current) {
return
}
if (menuType) {
messageHelpRef.current.style.marginLeft = "194px"
} else {
messageHelpRef.current.style.marginLeft = "76px"
}
},[menuType])
function getUserInfo() { function getUserInfo() {
const param = { const param = {
...@@ -218,10 +233,10 @@ function Header(props) { ...@@ -218,10 +233,10 @@ function Header(props) {
return ( return (
<div id="top-container" className="top-container"> <div id="top-container" className="top-container">
<div className="top top-nav"> <div className="top top-nav">
<div> {/* <div>
<img src='https://image.xiaomaiketang.com/xm/WEsMPAYxAs.png' className="logo" alt="" /> <img src={topLeftLogo} className="logo" alt="" />
</div> </div> */}
<div className="message-help"> <div className="message-help" ref={messageHelpRef}>
{list.length ? ( {list.length ? (
<ClickOutside <ClickOutside
onClickOutside={() => { onClickOutside={() => {
......
@import '../../core/variables.less'; @import '../../core/variables.less';
@top-height: 60px; @top-height: 0px;
@menu-bakg: #FFF; @menu-bakg: #FFF;
@active-color: #2966FF; @active-color: #2966FF;
.left-container { .left-container {
...@@ -12,6 +12,15 @@ ...@@ -12,6 +12,15 @@
width: @xm-left-width; width: @xm-left-width;
background: @menu-bakg; background: @menu-bakg;
color: #333; color: #333;
.topLogo {
height: 62px;
img {
width: 138px;
height: 35px;
margin-left: 19px;
margin-top: 13px;
}
}
.menu-type-icon{ .menu-type-icon{
margin:4px 0 0px 150px; margin:4px 0 0px 150px;
cursor: pointer; cursor: pointer;
......
...@@ -5,8 +5,12 @@ import { ...@@ -5,8 +5,12 @@ import {
import { Menu} from 'antd'; import { Menu} from 'antd';
import { menuList } from '../../routes//config/menuList' import { menuList } from '../../routes//config/menuList'
import { XMContext } from '../../store/context'; import { XMContext } from '../../store/context';
import Service from "@/common/js/service";
import StoreService from "@/domains/store-domain/storeService";
import User from "@/common/js/user";
import _ from 'underscore'; import _ from 'underscore';
import "./Menu.less"; import "./Menu.less";
console.log('2021-06-17')
const { SubMenu } = Menu; const { SubMenu } = Menu;
function Aside(props: any) { function Aside(props: any) {
...@@ -14,6 +18,7 @@ function Aside(props: any) { ...@@ -14,6 +18,7 @@ function Aside(props: any) {
const ctx: any = useContext(XMContext); const ctx: any = useContext(XMContext);
const [selectKey, setSelectKey] = useState(); const [selectKey, setSelectKey] = useState();
const [openKeys, setOpenKeys] = useState(['']); const [openKeys, setOpenKeys] = useState(['']);
const [topLogoUrl, setTopLogoUrl] = useState("")
const rootSubmenuKeys = _.pluck(menuList, 'groupCode'); const rootSubmenuKeys = _.pluck(menuList, 'groupCode');
useEffect(() => { useEffect(() => {
const link = props.location.pathname; const link = props.location.pathname;
...@@ -31,6 +36,17 @@ function Aside(props: any) { ...@@ -31,6 +36,17 @@ function Aside(props: any) {
return item; return item;
}) })
}, [props.location.pathname]) }, [props.location.pathname])
useEffect(()=> {
getTopLeftLogo()
})
function getTopLeftLogo() {
if (User.getToken()) {
StoreService.getStoreDetail({storeId:User.getStoreId()})
.then(res=> {
setTopLogoUrl(res.result.logo)
})
}
}
function toggleMenu(item: any) { function toggleMenu(item: any) {
window.RCHistory.push(item.link) window.RCHistory.push(item.link)
} }
...@@ -54,6 +70,10 @@ function Aside(props: any) { ...@@ -54,6 +70,10 @@ function Aside(props: any) {
: "left-container left-container-vertical" : "left-container left-container-vertical"
} }
> >
<div className="topLogo">
{ menuType ? (<img src={topLogoUrl} alt=""></img>) : ("")}
</div>
<div className="menu-type-icon" onClick={handleMenu}> <div className="menu-type-icon" onClick={handleMenu}>
{menuType ? ( {menuType ? (
<span <span
......
import React from 'react'; import React from 'react';
import { Modal, Button, message } from 'antd'; import { Modal, message } from 'antd';
import html2canvas from 'html2canvas'; import html2canvas from 'html2canvas';
import User from "../../../common/js/user"; import User from "../../../common/js/user";
import QRCode from '../../../libs/qrcode/qrcode'; import QRCode from '../../../libs/qrcode/qrcode';
...@@ -27,7 +27,6 @@ class ExamShareModal extends React.Component { ...@@ -27,7 +27,6 @@ class ExamShareModal extends React.Component {
handleConvertShortUrl = () => { handleConvertShortUrl = () => {
const longUrl = `${LIVE_SHARE}test_detail/${this.props.data.examId}?id=${User.getStoreId()}` const longUrl = `${LIVE_SHARE}test_detail/${this.props.data.examId}?id=${User.getStoreId()}`
console.log(longUrl)
// 发请求 // 发请求
Service.Sales('public/businessShow/convertShortUrls', { Service.Sales('public/businessShow/convertShortUrls', {
urls: [longUrl] urls: [longUrl]
......
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