Commit 06a859ec by chenshu

fix:修改样式

parent d0f285a6
......@@ -8,8 +8,8 @@
.empty-image {
display: block;
margin: 24px auto 12px;
width:100px;
height:100px;
width:150px;
height:150px;
}
.empty-button {
display: block;
......
......@@ -10,7 +10,7 @@
import React, { useState } from 'react';
import { Table, Modal, message, Tooltip, Switch, Dropdown } from 'antd';
import { withRouter } from 'react-router-dom';
import { PageControl } from '@/components';
import { PageControl, XMTable } from "@/components";
import PlanService from '@/domains/plan-domain/planService';
import SharePlanModal from '../modal/SharePlanModal';
import { LIVE_SHARE } from '@/domains/course-domain/constants';
......@@ -305,7 +305,7 @@ function PlanList(props) {
}
return (
<div className='plan-list'>
<Table
<XMTable
rowKey={(record) => record.id}
showSorterTooltip={false}
dataSource={props.planListData}
......@@ -316,6 +316,9 @@ function PlanList(props) {
size='middle'
scroll={{ x: 1400 }}
className='plan-list-table'
renderEmpty={{
description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span>
}}
/>
<div className='box-footer'>
<PageControl
......
import User from '@/common/js/user';
import React from 'react';
import Lottie from "lottie-web";
import Header from './Header'
import { Modal } from "antd";
import Service from "@/common/js/service";
import { LIVE_SHARE } from "@/domains/course-domain/constants";
import BaseService from "@/domains/basic-domain/baseService";
import './ErrorCollege.less';
export default class ErrorCollege extends React.Component {
constructor(props) {
super(props);
this.state = {
menuType: true,
nickName: '',
}
}
componentDidMount() {
this.getUserInfo();
this.getStorePermission();
var animation = Lottie.loadAnimation({
path: "https://image.xiaomaiketang.com/xm/AhcJZHdMZf.json",
......@@ -38,15 +41,60 @@ export default class ErrorCollege extends React.Component {
});
}
handleMenuType() {
this.setState({ menuType: !menuType });
getUserInfo() {
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() {
const { menuType } = this.state;
const { nickName } = this.state;
return (
<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 id="lottie-box" className="error-college-image"></div>
<span className="error-college-tip">{User.getStoreName()}已停用</span>
......
......@@ -2,6 +2,36 @@
position: relative;
width: 100vw;
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 {
position: absolute;
top: 50px;
......@@ -10,20 +40,20 @@
bottom: 0;
.error-college-image {
position: absolute;
top: 246px;
top: 266px;
left: 50%;
transform: translateX(-50%);
width: 246px;
height: 132px;
width: 200px;
height: 200px;
display: block;
}
.error-college-tip {
position: absolute;
top: 404px;
top: 482px;
left: 50%;
transform: translateX(-50%);
color: #8C8E93;
font-size: 13px;
color: #000;
font-size: 18px;
}
}
}
\ No newline at end of file
......@@ -266,7 +266,8 @@ class PreviewPaperModal extends Component {
}
return (
<Empty
image={<div style={{ marginTop: 24 }}>
image={
<div style={{ marginTop: 24 }}>
<Lottie
options={defaultOptions}
height={150}
......@@ -274,11 +275,9 @@ class PreviewPaperModal extends Component {
isStopped={false}
isPaused={false}
/>
</div>}
imageStyle={{
height: 100,
}}
description={"暂无内容"}
</div>
}
description={<span style={{ display: 'block', paddingBottom: 24 }}>暂无内容</span>}
></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