修改创客空间首页自适应手机端

This commit is contained in:
何童崇 2022-10-28 16:12:47 +08:00
parent c01c1f0d98
commit 057d5431ff
7 changed files with 60 additions and 13 deletions

View File

@ -9,6 +9,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
// 2行省略号
.ellipsis-2 {

View File

@ -15,6 +15,7 @@
.choose-title {
width: 5em;
white-space: nowrap;
}
.choose-item {

View File

@ -165,19 +165,19 @@ export default Form.create()(
if (detailData.status === status) {
switch (status) {
case 3:
surplus = detailData.collectingDays * 24 * 3600 - (new Date() - new Date(detailData.publishedAt || detailData.createdAt)) / 1000;
surplus = detailData.collectingDays * 24 * 3600 - (new Date() - new Date((detailData.publishedAt || detailData.createdAt).replace(/-/g,'/'))) / 1000;
break;
case 4:
surplus = detailData.choosingDays * 24 * 3600 - (new Date() - new Date(detailData.collectingCompleteAt)) / 1000;
surplus = detailData.choosingDays * 24 * 3600 - (new Date() - new Date(detailData.collectingCompleteAt.replace(/-/g,'/'))) / 1000;
break;
case 5:
surplus = detailData.makePublicDays * 24 * 3600 - (new Date() - new Date(detailData.makePublicAt)) / 1000;
surplus = detailData.makePublicDays * 24 * 3600 - (new Date() - new Date(detailData.makePublicAt.replace(/-/g,'/'))) / 1000;
break;
case 6:
surplus = detailData.signingDays * 24 * 3600 - (new Date() - new Date(detailData.publicityCompleteAt)) / 1000;
surplus = detailData.signingDays * 24 * 3600 - (new Date() - new Date(detailData.publicityCompleteAt.replace(/-/g,'/'))) / 1000;
break;
case 7:
surplus = detailData.payingDays * 24 * 3600 - (new Date() - new Date(detailData.signingCompleteAt)) / 1000;
surplus = detailData.payingDays * 24 * 3600 - (new Date() - new Date(detailData.signingCompleteAt.replace(/-/g,'/'))) / 1000;
break;
default:
surplus = 0;

View File

@ -41,6 +41,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
'viewport',
'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover',
);
document.querySelector('body').className = "phoneClass";
document.querySelector('#root').className = "page -layout-v -fit widthunit phoneClass";
return () => {
@ -48,7 +49,8 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
'viewport',
'width=1200',
);
document.querySelector('#root').className = "page -layout-v -fit widthunit";
document.querySelector('#root').className = "page -layout-v -fit widthunit";
document.querySelector('body').className = "";
}
}
}, [])
@ -130,19 +132,19 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
let surplus;
switch (item.status) {
case 3:
surplus = item.collectingDays * 24 * 3600 - (new Date() - new Date(item.publishedAt || item.createdAt)) / 1000;
surplus = item.collectingDays * 24 * 3600 - (new Date() - new Date((item.publishedAt || item.createdAt).replace(/-/g,'/'))) / 1000;
break;
case 4:
surplus = item.choosingDays * 24 * 3600 - (new Date() - new Date(item.collectingCompleteAt)) / 1000;
surplus = item.choosingDays * 24 * 3600 - (new Date() - new Date(item.collectingCompleteAt.replace(/-/g,'/'))) / 1000;
break;
case 5:
surplus = item.makePublicDays * 24 * 3600 - (new Date() - new Date(item.makePublicAt)) / 1000;
surplus = item.makePublicDays * 24 * 3600 - (new Date() - new Date(item.makePublicAt.replace(/-/g,'/'))) / 1000;
break;
case 6:
surplus = item.signingDays * 24 * 3600 - (new Date() - new Date(item.publicityCompleteAt)) / 1000;
surplus = item.signingDays * 24 * 3600 - (new Date() - new Date(item.publicityCompleteAt.replace(/-/g,'/'))) / 1000;
break;
case 7:
surplus = item.payingDays * 24 * 3600 - (new Date() - new Date(item.signingCompleteAt)) / 1000;
surplus = item.payingDays * 24 * 3600 - (new Date() - new Date(item.signingCompleteAt.replace(/-/g,'/'))) / 1000;
break;
default:
surplus = 0;

View File

@ -844,7 +844,7 @@ class NewHeader extends Component {
</img>
{/* </a> */}
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
<li className="bor-bottom-greyE" style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
<li className="bor-bottom-greyE ellipsis-1" style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
{
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item,key)=>{
return(

View File

@ -46,6 +46,12 @@ body>.-task-title {
align-items: center;
height: 100%;
}
.ellipsis-1 {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.globalSpin {
max-height: 700px !important;
}

View File

@ -8,6 +8,9 @@
.newFooter {
min-width: 100vw;
}
.newMain{
padding-bottom: 1rem;
}
// 头部
.newHeaders {
@ -28,7 +31,7 @@
.head-nav ul#header-nav {
display: flex;
justify-content: space-between;
padding:0 .2em;
li {
margin: 0 2px;
@ -45,6 +48,14 @@
display: none;
// }
}
.login-box{
font-size: .85rem;
.vertical-line{
margin:0;
}
}
}
.newContainers {
@ -53,6 +64,29 @@
}
}
// 登陆框
.MuiDialog-paperWidthSm-11,#log_reg_content{
max-width: 95vw;
}
#DialogID .dialogBox{
max-width: 95vw;
.logincloseIcon{
top:-70px !important;
right: 2px;
color: #666;
}
}
// 系统消息
.systemBox .ant-modal-body .sysnoticeBox{
width: 95vw;
.nContent{
padding: 1rem;
}
}
// 底部
.footerbottom {
height: 210px !important;
@ -71,5 +105,8 @@
display: block;
}
}
.footer-right{
display: none;
}
}