Commit 06a859ec by chenshu

fix:修改样式

parent d0f285a6
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
.empty-image { .empty-image {
display: block; display: block;
margin: 24px auto 12px; margin: 24px auto 12px;
width:100px; width:150px;
height:100px; height:150px;
} }
.empty-button { .empty-button {
display: block; display: block;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Table, Modal, message, Tooltip, Switch, Dropdown } from 'antd'; import { Table, Modal, message, Tooltip, Switch, Dropdown } from 'antd';
import { withRouter } from 'react-router-dom'; import { withRouter } from 'react-router-dom';
import { PageControl } from '@/components'; import { PageControl, XMTable } from "@/components";
import PlanService from '@/domains/plan-domain/planService'; import PlanService from '@/domains/plan-domain/planService';
import SharePlanModal from '../modal/SharePlanModal'; import SharePlanModal from '../modal/SharePlanModal';
import { LIVE_SHARE } from '@/domains/course-domain/constants'; import { LIVE_SHARE } from '@/domains/course-domain/constants';
...@@ -305,7 +305,7 @@ function PlanList(props) { ...@@ -305,7 +305,7 @@ function PlanList(props) {
} }
return ( return (
<div className='plan-list'> <div className='plan-list'>
<Table <XMTable
rowKey={(record) => record.id} rowKey={(record) => record.id}
showSorterTooltip={false} showSorterTooltip={false}
dataSource={props.planListData} dataSource={props.planListData}
...@@ -316,6 +316,9 @@ function PlanList(props) { ...@@ -316,6 +316,9 @@ function PlanList(props) {
size='middle' size='middle'
scroll={{ x: 1400 }} scroll={{ x: 1400 }}
className='plan-list-table' className='plan-list-table'
renderEmpty={{
description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span>
}}
/> />
<div className='box-footer'> <div className='box-footer'>
<PageControl <PageControl
......
import User from '@/common/js/user'; import User from '@/common/js/user';
import React from 'react'; import React from 'react';
import Lottie from "lottie-web"; import Lottie from "lottie-web";
import Header from './Header' import { Modal } from "antd";
import Service from "@/common/js/service"; import Service from "@/common/js/service";
import { LIVE_SHARE } from "@/domains/course-domain/constants";
import BaseService from "@/domains/basic-domain/baseService";
import './ErrorCollege.less'; import './ErrorCollege.less';
export default class ErrorCollege extends React.Component { export default class ErrorCollege extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
menuType: true, nickName: '',
} }
} }
componentDidMount() { componentDidMount() {
this.getUserInfo();
this.getStorePermission(); this.getStorePermission();
var animation = Lottie.loadAnimation({ var animation = Lottie.loadAnimation({
path: "https://image.xiaomaiketang.com/xm/AhcJZHdMZf.json", path: "https://image.xiaomaiketang.com/xm/AhcJZHdMZf.json",
...@@ -38,15 +41,60 @@ export default class ErrorCollege extends React.Component { ...@@ -38,15 +41,60 @@ export default class ErrorCollege extends React.Component {
}); });
} }
handleMenuType() { getUserInfo() {
this.setState({ menuType: !menuType }); const param = {
storeUserId: User.getStoreUserId(),
};
BaseService.getStoreUser(param).then((res) => {
const { nickName } = res.result;
this.setState({ nickName });
});
}
handleLogoutConfirm() {
return Modal.confirm({
title: "你确定要退出登录吗?",
content: "退出后,需重新登录",
icon: (
<span className="icon iconfont default-confirm-icon">&#xe839; </span>
),
okText: "退出登录",
cancelText: "点错了",
onOk: () => {
this.handleLogout();
},
});
}
handleLogout() {
BaseService.logout({identifier:User.getIdentifier()}).then((res) => {
User.removeUserId();
User.removeToken();
User.removeEnterpriseId();
User.clearUserInfo();
const url = `${LIVE_SHARE}store/index?id=${User.getCustomerStoreId()||User.getStoreId()}&userId=${User.getUserId()}&from=work_weixin`;
window.location.href = url;
});
} }
render() { render() {
const { menuType } = this.state; const { nickName } = this.state;
return ( return (
<div className="error-college-page"> <div className="error-college-page">
<Header id="error" handleMenuType={this.handleMenuType} menuType={menuType} /> <div className="header">
<img src='https://image.xiaomaiketang.com/xm/FEdG7BMwKr.png' className="logo" alt="" />
<div className="name-box">
<img src='https://image.xiaomaiketang.com/xm/hcp6zs5HTn.png' className="avatar" alt="" />
<span className="name">{nickName}</span>
<span
className="control"
onClick={() => {
this.handleLogoutConfirm();
}}
>退出登录</span>
</div>
</div>
<div className="error-college-box"> <div className="error-college-box">
<div id="lottie-box" className="error-college-image"></div> <div id="lottie-box" className="error-college-image"></div>
<span className="error-college-tip">{User.getStoreName()}已停用</span> <span className="error-college-tip">{User.getStoreName()}已停用</span>
......
...@@ -2,6 +2,36 @@ ...@@ -2,6 +2,36 @@
position: relative; position: relative;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
.header {
display: flex;
align-items: center;
height: 60px;
padding: 0 344px;
justify-content: space-between;
.logo {
width: 117px;
height: 30px;
}
.name-box {
display: flex;
align-items: center;
.avatar {
width: 24px;
height: 24px;
border-radius: 50%;
margin-right: 6px;
}
.name {
color: #666;
font-size: 16px;
margin-right: 8px;
}
.control {
color: #2966FF;
cursor: pointer;
}
}
}
.error-college-box { .error-college-box {
position: absolute; position: absolute;
top: 50px; top: 50px;
...@@ -10,20 +40,20 @@ ...@@ -10,20 +40,20 @@
bottom: 0; bottom: 0;
.error-college-image { .error-college-image {
position: absolute; position: absolute;
top: 246px; top: 266px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
width: 246px; width: 200px;
height: 132px; height: 200px;
display: block; display: block;
} }
.error-college-tip { .error-college-tip {
position: absolute; position: absolute;
top: 404px; top: 482px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
color: #8C8E93; color: #000;
font-size: 13px; font-size: 18px;
} }
} }
} }
\ No newline at end of file
...@@ -266,19 +266,18 @@ class PreviewPaperModal extends Component { ...@@ -266,19 +266,18 @@ class PreviewPaperModal extends Component {
} }
return ( return (
<Empty <Empty
image={<div style={{ marginTop: 24 }}> image={
<Lottie <div style={{ marginTop: 24 }}>
options={defaultOptions} <Lottie
height={150} options={defaultOptions}
width={150} height={150}
isStopped={false} width={150}
isPaused={false} isStopped={false}
/> isPaused={false}
</div>} />
imageStyle={{ </div>
height: 100, }
}} description={<span style={{ display: 'block', paddingBottom: 24 }}>暂无内容</span>}
description={"暂无内容"}
></Empty> ></Empty>
); );
}; };
......
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