Commit bc30bccf authored by wildfirecode13's avatar wildfirecode13

1

parent abf50c06
......@@ -3,7 +3,8 @@ export const homeInfo = {
"data":
{
"canUpdateNickName": false,
"figures": [{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }], "newUser": false,
"figures": [{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }],
"newUser": 0,
"userInfo": { "figureId": "2", "joyBeans": 10100, "nickName": "13" }
},
"message": null,
......@@ -83,17 +84,7 @@ export const signInfo = {
"message": null,
"success": true
}
export const pagelist = {
"code": null,
"data": {
"result": true,
"type": "daPaiCoupons",
"awardName": "大牌券",
"awardPic": "//yun.dui88.com/projectxh5/coupon-250-250.png"
},
"message": null,
"success": true
}
export const pagelist = [{"bizType":"SUB","credits":100,"description":"每日签到","gmtCreate":"2020-12-22 17:02:07"},{"bizType":"ADD","credits":10000,"description":"每日签到","gmtCreate":"2020-12-22 17:01:17"}]
export const dosign = {
"code": null,
"data": {
......
......@@ -9,7 +9,9 @@ class Detail2 extends Component {
constructor(props) {
super(props);
this.state = {
resList: resList
resList: resList,
list:[]
};
}
......@@ -19,14 +21,19 @@ class Detail2 extends Component {
pageSize:20
}).then((res) => {
console.log('pagelist ', res)
this.setState({list:res})
})
}
render() {
const arr = [];
for (let i = 0; i < 30; i++) {
arr.push(i)
}
const {list} = this.state
const list2 = list.map(i=>{
return {
description:i.description,
gmtCreate:i.gmtCreate,
nums:i.bizType=='ADD' ? `+${i.credits}`: `-${i.credits}`
}
})
return (
<div className="detail2 " uuid="c5abc304-1a0b-4804-956a-d61c1d5b75ed">
......@@ -39,16 +46,16 @@ class Detail2 extends Component {
<img onClick={() => this.props.navigateTo('mainpage')} className="detail2_back" uuid="detail2_back" src="//yun.duiba.com.cn/spark/assets/805d9455ffa59e37f0f0f19249959c3a9c458f96.png"></img>
<div className="detail2_item_list" uuid="3804f60d-697f-4d68-98b5-ca8cf2e2d3ba">
{
arr.map((i) => (
list2.map(({description,gmtCreate,nums},i) => (
<div key={i} className="detail2_item " uuid="4d8289ea-9464-4a92-a81c-3e24c364e707">
<span className="detail2_item_title " uuid="48b63d65-a3d8-4b94-b979-3fcb19c9d89c">
每日签到{i}
{description}
</span>
<span className="detail2_item_day " uuid="5e6c50df-f25c-4b91-acc7-95d4829ff7db">
2020-12-25 09:54:30
{gmtCreate}
</span>
<span className="detail2_item_num " uuid="e576e938-d57d-4101-82bc-c0b0782033c9">
+418
{nums}
</span>
<img
className="detail2_item_bg "
......
......@@ -68,9 +68,10 @@
color: #949494;
}
.detail2_item_num {
// width: 88px;
width: 188px;
text-align: right;
// height: 31px;
left: 455px;
right: 30px;
top: 23px;
position: absolute;
font-size: 40px;
......
......@@ -77,12 +77,12 @@ class Main3 extends Component {
freshHomeInfo() {
let homeinfo = dataCenter.getData(Store.homeinfo);
console.log('freshHomeInfo',homeinfo.userInfo);
this.setState({
nickName:homeinfo.userInfo.nickName,
joyBeans:homeinfo.userInfo.joyBeans,
figureId:homeinfo.userInfo.figureId,
})
if(homeinfo.userInfo)
this.setState({
nickName:homeinfo.userInfo.nickName,
joyBeans:homeinfo.userInfo.joyBeans,
figureId:homeinfo.userInfo.figureId,
})
}
changeGuideShow() {
let needguide = dataCenter.getData(Store.needguide);
......@@ -145,7 +145,7 @@ class Main3 extends Component {
}
render() {
const { avatar, nickName, joyBeans, needguide } = this.state;
const { figureId, nickName, joyBeans, needguide } = this.state;
return (
<div className="main3 diacontmidpos" uuid="8754a9d1-7453-474b-b722-7cb71483ae85" ref="main3" >
<img
......@@ -160,21 +160,21 @@ class Main3 extends Component {
uuid="5316b02a-5b8e-4355-b556-cd801852df7e"
src={this.state.resList['31522099-3ea6-4d2b-ae84-99e2877bd2d0'].url}
/>
{avatar == 1 && (
{figureId == 1 && (
<img
className="main3_avatar1 "
uuid="f2277018-36fd-4f47-9124-d73324505dff"
src={this.state.resList['6dda365e-565e-4e15-9fc9-89b5e173dcd9'].url}
/>
)}
{avatar == 2 && (
{figureId == 2 && (
<img
className="main3_avatar2 "
uuid="07d1620b-d31e-4ef7-a63a-9b0ef49497da"
src={this.state.resList['6ff31046-e036-4218-8cc9-5d715dfa64a1'].url}
/>
)}
{avatar == 3 && (
{figureId == 3 && (
<img
className="main3_avatar3 "
uuid="dc2306b9-90e0-4e98-a967-e0f263a3217a"
......
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