Commit 9a532b8b authored by wildfirecode13's avatar wildfirecode13

111

parent 1eeee1fe
......@@ -4,7 +4,7 @@ export const homeInfo = {
{
"canUpdateNickName": false,
"figures": [{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }],
"newUser": 0,
"newUser": 1,
"userInfo": { "figureId": "3", "joyBeans": 10100, "nickName": "13" }
},
"message": null,
......@@ -23,7 +23,7 @@ export const signInfo = {
"data": {
"todaySigned": 0,
"continuousDays": 6,
"needPopup": 1,
"needPopup": 0,
"signLists": [
{
"awardName": "欢趣豆",
......
......@@ -19,6 +19,13 @@ class Select extends Component {
};
}
onKeyUp=(e)=>{
let planame = this.refs.planame.value;
if(planame.length > 6) {
this.refs.planame.value = planame.slice(0,6)
}
}
componentDidMount() {
const {figures} = dataCenter.getData(Store.homeinfo);
//现只有三个
......@@ -255,7 +262,7 @@ class Select extends Component {
src={this.state.resList['a4412ebd-65be-4908-8894-b0aea8cbd4cf'].url}
onClick={this.changeShowRole.bind(this,"left")}
/>
<input onChange={()=>{this.setState({selected:false})}} className="planame" type="text" placeholder="请输入昵称(不超过六字)" ref="planame" />
<input onKeyUp={this.onKeyUp} onChange={()=>{this.setState({selected:false})}} className="planame" type="text" placeholder="请输入昵称(不超过六字)" ref="planame" />
</div>
);
}
......
......@@ -16,6 +16,13 @@ class Userinfo extends Component {
};
}
onKeyUp=(e)=>{
let planame = this.refs.planame.value;
if(planame.length > 6) {
this.refs.planame.value = planame.slice(0,6)
}
}
onclick = async () => {
let planame = this.refs.planame.value;
if (planame.length < 1) {
......@@ -82,7 +89,7 @@ class Userinfo extends Component {
const { figureId } = this.state;
return (
<div className="userinfo " uuid="a9143822-c421-48d3-92c3-de9eafe5c234">
<input className="planame" type="text" placeholder="请输入昵称(不超过六字)" ref="planame" />
<input onKeyUp={this.onKeyUp} className="planame" type="text" placeholder="请输入昵称(不超过六字)" ref="planame" />
<img
className="userinfo_bg "
uuid="cf852278-516f-48f3-bad2-0e38a1431c4e"
......
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