Commit 8e825082 authored by wildfirecode13's avatar wildfirecode13

1

parent ca6e03c5
No preview for this file type
No preview for this file type
......@@ -5,7 +5,7 @@ export const homeInfo = {
"canUpdateNickName": false,
"figures": [{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }],
"newUser": 0,
"userInfo": { "figureId": "1", "joyBeans": 10100, "nickName": "13" }
"userInfo": { "figureId": "3", "joyBeans": 10100, "nickName": "13" }
},
"message": null,
"success": true
......@@ -28,7 +28,7 @@ export const signInfo = {
"data": {
"todaySigned": 1,
"continuousDays": 7,
"needPopup": 1,
"needPopup": 0,
"signLists": [
{
"awardName": "欢趣豆",
......
......@@ -4,16 +4,49 @@ import React, { Component } from 'react';
import { Aup } from '../../pop';
import resList from '../../resconfig/resList';
import './userinfo.less';
import { Toast, Loading, Badge, CountDownButton, InputNumber } from '@spark/ui';
class Userinfo extends Component {
constructor(props) {
super(props);
this.state = {
resList: resList,
figureId:props.data.figureId
};
}
onclick=()=>{
let planame = this.refs.planame.value;
if(planame.length<1){
return Toast("名字不能为空");
}
let updateuinfo = await getAPIdata(Store.updateUinfo,{
type:2,
nickName:planame
});
if(updateuinfo&&updateuinfo.success){
// if(updateuinfo.data){
// const {result,joyBeans} = updateuinfo.data;
// if(result){
// dataCenter.setData(Store.newgoldnum,joyBeans);
// }
// }
// getHomeInfo();
// this.props.onClose();
// dataCenter.setData(Store.needguide,true);
}else{
// if(updateuinfo){
// let msg = updateuinfo.message;
// Toast(msg);
// }else{
// Toast(netErrMsg)
// }
}
}
render() {
const {figureId}=this.state;
return (
<div className="userinfo " uuid="a9143822-c421-48d3-92c3-de9eafe5c234">
<input className="planame" type="text" placeholder="请输入昵称(不超过六字)" ref="planame" />
......@@ -27,6 +60,10 @@ class Userinfo extends Component {
uuid="1addc1b2-f339-4f8b-81c8-21153b03653a"
src={this.state.resList['5406c697-b889-4062-8910-343038c4dc93'].url}
/>
{figureId==1&&<img className="userinfo_avatar " src="//yun.duiba.com.cn/spark/assets/393b5936219fa987a141cfcce17d2ffe13cc924e.png" />}
{figureId==2&&<img className="userinfo_avatar " src="//yun.duiba.com.cn/spark/assets/042c2b238932872aa066fd989f2169715789a3c3.png" />}
{figureId==3&&<img className="userinfo_avatar " src="//yun.duiba.com.cn/spark/assets/5a672d98433d289091b879a2d546970c281cb9d2.png" />}
<img
onClick={this.props.onClose}
className="userinfo_close "
......@@ -34,6 +71,7 @@ class Userinfo extends Component {
src={this.state.resList['c7826e1a-8b74-44da-922f-0fe078587999'].url}
/>
<img
onClick={this.onclick}
className="userinfo_btn "
uuid="dbbad0c1-ead1-4515-ae55-144e26640415"
src={this.state.resList['2208dc94-a012-4a45-8f4e-64468993e652'].url}
......
......@@ -29,7 +29,7 @@ class Main3 extends Component {
}
onClick_userinfo = () => {
Aup.show('Userinfo', {}, this);
Aup.show('Userinfo', {figureId:this.state.figureId}, this);
}
onClick_signBtn = () => {
......@@ -161,7 +161,7 @@ class Main3 extends Component {
uuid="5316b02a-5b8e-4355-b556-cd801852df7e"
src={this.state.resList['31522099-3ea6-4d2b-ae84-99e2877bd2d0'].url}
/>
{figureId == 3 && (
{figureId == 1 && (
<img
className="main3_avatar1 "
uuid="f2277018-36fd-4f47-9124-d73324505dff"
......@@ -175,7 +175,7 @@ class Main3 extends Component {
src={this.state.resList['6ff31046-e036-4218-8cc9-5d715dfa64a1'].url}
/>
)}
{figureId == 1 && (
{figureId == 3 && (
<img
className="main3_avatar3 "
uuid="dc2306b9-90e0-4e98-a967-e0f263a3217a"
......
This diff is collapsed.
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