Commit ab9828a7 by Zhang Xin

fix bug 1982 & 1993

parent b3cb510e
...@@ -131,9 +131,11 @@ export default class ReplenishSkuPage extends React.Component{ ...@@ -131,9 +131,11 @@ export default class ReplenishSkuPage extends React.Component{
<div className={"skuInfo"}> <div className={"skuInfo"}>
<div className={"skuImg"}> <div className={"skuImg"}>
<img src={taskList.skuImage || UTILPATH.localImg.defaultImg} alt=""/> <img src={taskList.skuImage || UTILPATH.localImg.defaultImg} alt=""/>
<div className={"skuImgText font20"}>货品图片</div>
</div> </div>
<div className={"areaImg"}> <div className={"areaImg"}>
<img src={taskList.areaImage || UTILPATH.localImg.defaultImg} alt=""/> <img src={taskList.areaImage || UTILPATH.localImg.defaultImg} alt=""/>
<div className={"skuImgText font20"}>摆放方式</div>
</div> </div>
<div className={"skuPos col333 font30"}> <div className={"skuPos col333 font30"}>
<ul> <ul>
......
...@@ -7,11 +7,30 @@ export default class HomePageContainer extends React.Component{ ...@@ -7,11 +7,30 @@ export default class HomePageContainer extends React.Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state = { this.state = {
text : ''
} }
} }
componentWillMount(){ componentWillMount(){
let text = '';
let hour = parseInt(new Date().getHours());
switch (true){
case hour >= 0 && hour < 11:
text = '上午好,';
break;
case hour >= 11 && hour < 13:
text = '中午好,';
break;
case hour >= 13 && hour < 18:
text = '下午好,';
break;
case hour >= 18 && hour < 24:
text = '晚上好,';
break;
}
this.setState({
text:text
})
} }
render(){ render(){
...@@ -37,7 +56,7 @@ export default class HomePageContainer extends React.Component{ ...@@ -37,7 +56,7 @@ export default class HomePageContainer extends React.Component{
taskInfo.area ? <div className={'homeWelcom font30 clo333'} style={{marginTop:marginTop50}}>欢迎来到<span className="homeArea font50 colff775c" style={{padding:`0 ${padding}`}}>{taskInfo.area || ''}</span></div> taskInfo.area ? <div className={'homeWelcom font30 clo333'} style={{marginTop:marginTop50}}>欢迎来到<span className="homeArea font50 colff775c" style={{padding:`0 ${padding}`}}>{taskInfo.area || ''}</span></div>
: null : null
} }
<div className={"homeText font42"} style={{fontWeight:'800',marginTop:marginTop20}}>下午好, 你辛苦了!</div> <div className={"homeText font42"} style={{fontWeight:'800',marginTop:marginTop20}}>{this.state.text}你辛苦了!</div>
<Button text={'开始工作'} btnContainer={'colfff font30'} style={buttonStyle} option={this.start.bind(this)}/> <Button text={'开始工作'} btnContainer={'colfff font30'} style={buttonStyle} option={this.start.bind(this)}/>
</div> </div>
</div> </div>
......
/*.replenishContainer{ /*
.replenishContainer{
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -36,19 +37,32 @@ ...@@ -36,19 +37,32 @@
} }
.replenishSkuInfo .skuInfo .skuImg{ .replenishSkuInfo .skuInfo .skuImg{
width: 200px; width: 200px;
height: 200px; height: 260px;
border: 1px solid #e5e5e5; position: relative;
text-align: center;
} }
.replenishSkuInfo .skuInfo .areaImg{ .replenishSkuInfo .skuInfo .areaImg{
width: 200px; width: 200px;
height: 200px; height: 260px;
border: 1px solid #e5e5e5; position: relative;
margin: 0 60px 0 60px; margin: 0 60px 0 60px;
text-align: center;
} }
.replenishSkuInfo .skuInfo img{ .replenishSkuInfo .skuInfo .skuImgText{
position: absolute;
white-space: nowrap;
bottom: 0;
width: 100%; width: 100%;
height: 100%; }
.replenishSkuInfo .skuInfo img{
width: 200px;
height: 200px;
border: 1px solid #e5e5e5;
position: absolute;
left: 0;
top: 0;
} }
...@@ -67,7 +81,8 @@ ...@@ -67,7 +81,8 @@
} }
.replenishSkuInfo .skuInfo .skuPos ul>li .showAreaImg{ .replenishSkuInfo .skuInfo .skuPos ul>li .showAreaImg{
margin-left: 10px; margin-left: 10px;
}*/ }
*/
/*---------px rem 分割线-----------*/ /*---------px rem 分割线-----------*/
...@@ -107,18 +122,30 @@ ...@@ -107,18 +122,30 @@
} }
.replenishSkuInfo .skuInfo .skuImg{ .replenishSkuInfo .skuInfo .skuImg{
width: 1.6666666666666667rem; width: 1.6666666666666667rem;
height: 1.6666666666666667rem; height: 2.1666666666666665rem;
border: 1px solid #e5e5e5; position: relative;
text-align: center;
} }
.replenishSkuInfo .skuInfo .areaImg{ .replenishSkuInfo .skuInfo .areaImg{
width: 1.6666666666666667rem; width: 1.6666666666666667rem;
height: 1.6666666666666667rem; height: 2.1666666666666665rem;
border: 1px solid #e5e5e5; position: relative;
margin: 0 0.5rem 0 0.5rem; margin: 0 0.5rem 0 0.5rem;
text-align: center;
} }
.replenishSkuInfo .skuInfo img{ .replenishSkuInfo .skuInfo .skuImgText{
position: absolute;
white-space: nowrap;
bottom: 0;
width: 100%; width: 100%;
height: 100%; }
.replenishSkuInfo .skuInfo img{
width: 1.6666666666666667rem;
height: 1.6666666666666667rem;
border: 1px solid #e5e5e5;
position: absolute;
left: 0;
top: 0;
} }
.replenishSkuInfo .skuInfo .skuPos{ .replenishSkuInfo .skuInfo .skuPos{
line-height: 0.38333333333333336rem; line-height: 0.38333333333333336rem;
......
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