Commit 1621f59c authored by zhangjinzhou's avatar zhangjinzhou

Merge branch 'master' of gitlab2.dui88.com:wildfirecode13/icbcrpg into 引导选人load

# Conflicts:
#	project/mock/e-family/index.js
合并master
parents 8fe860be af600967
export const homeInfo = { export const homeInfo = {
"code": null, "code": null,
"data": { "data":
"canUpdateNickName": null, {
"figures": [ "canUpdateNickName": false,
{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" } "figures": [{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }],
], "newUser": 0,
"newUser": 1, "userInfo": { "figureId": "1", "joyBeans": 10100, "nickName": "13" }
"userInfo": null
}, },
"message": null, "message": null,
"success": true "success": true
...@@ -14,10 +13,7 @@ export const homeInfo = { ...@@ -14,10 +13,7 @@ export const homeInfo = {
export const updateUinfo = { export const updateUinfo = {
"code": null, "code": null,
"data": { "data": true,
result:true,
joyBeans:0
},
"message": null, "message": null,
"success": true "success": true
} }
...@@ -88,18 +84,8 @@ export const signInfo = { ...@@ -88,18 +84,8 @@ export const signInfo = {
"message": null, "message": null,
"success": true "success": true
} }
export const pagelist ={ 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"}]
"code": null, export const dosign = {
"data": {
"result": true,
"type": "daPaiCoupons",
"awardName": "大牌券",
"awardPic": "//yun.dui88.com/projectxh5/coupon-250-250.png"
},
"message": null,
"success": true
}
export const dosign ={
"code": null, "code": null,
"data": { "data": {
"result": true, "result": true,
......
...@@ -9,7 +9,9 @@ class Detail2 extends Component { ...@@ -9,7 +9,9 @@ class Detail2 extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
resList: resList resList: resList,
list:[]
}; };
} }
...@@ -19,14 +21,19 @@ class Detail2 extends Component { ...@@ -19,14 +21,19 @@ class Detail2 extends Component {
pageSize:20 pageSize:20
}).then((res) => { }).then((res) => {
console.log('pagelist ', res) console.log('pagelist ', res)
this.setState({list:res})
}) })
} }
render() { render() {
const arr = []; const {list} = this.state
for (let i = 0; i < 30; i++) { const list2 = list.map(i=>{
arr.push(i) return {
description:i.description,
gmtCreate:i.gmtCreate,
nums:i.bizType=='ADD' ? `+${i.credits}`: `-${i.credits}`
} }
})
return ( return (
<div className="detail2 " uuid="c5abc304-1a0b-4804-956a-d61c1d5b75ed"> <div className="detail2 " uuid="c5abc304-1a0b-4804-956a-d61c1d5b75ed">
...@@ -39,16 +46,16 @@ class Detail2 extends Component { ...@@ -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> <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"> <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"> <div key={i} className="detail2_item " uuid="4d8289ea-9464-4a92-a81c-3e24c364e707">
<span className="detail2_item_title " uuid="48b63d65-a3d8-4b94-b979-3fcb19c9d89c"> <span className="detail2_item_title " uuid="48b63d65-a3d8-4b94-b979-3fcb19c9d89c">
每日签到{i} {description}
</span> </span>
<span className="detail2_item_day " uuid="5e6c50df-f25c-4b91-acc7-95d4829ff7db"> <span className="detail2_item_day " uuid="5e6c50df-f25c-4b91-acc7-95d4829ff7db">
2020-12-25 09:54:30 {gmtCreate}
</span> </span>
<span className="detail2_item_num " uuid="e576e938-d57d-4101-82bc-c0b0782033c9"> <span className="detail2_item_num " uuid="e576e938-d57d-4101-82bc-c0b0782033c9">
+418 {nums}
</span> </span>
<img <img
className="detail2_item_bg " className="detail2_item_bg "
......
...@@ -68,9 +68,10 @@ ...@@ -68,9 +68,10 @@
color: #949494; color: #949494;
} }
.detail2_item_num { .detail2_item_num {
// width: 88px; width: 188px;
text-align: right;
// height: 31px; // height: 31px;
left: 455px; right: 30px;
top: 23px; top: 23px;
position: absolute; position: absolute;
font-size: 40px; font-size: 40px;
......
...@@ -16,20 +16,19 @@ class Main3 extends Component { ...@@ -16,20 +16,19 @@ class Main3 extends Component {
super(props); super(props);
this.state = { this.state = {
resList: resList, resList: resList,
nickname: 'nickname', nickName: '',
avatar: 1, joyBeans: "0",
num: "1123", figureId:-1,
needguide: false needguide: false
}; };
} }
updateMoney() { updateMoney() {
console.log('update money') this.freshHomeInfo();
} }
onClick_userinfo = () => { onClick_userinfo = () => {
Aup.show('Userinfo', {}, this); Aup.show('Userinfo', {}, this);
// console.log('onClick_signBtn')
} }
onClick_signBtn = () => { onClick_signBtn = () => {
...@@ -76,7 +75,13 @@ class Main3 extends Component { ...@@ -76,7 +75,13 @@ class Main3 extends Component {
//首页信息显示更新 //首页信息显示更新
freshHomeInfo() { freshHomeInfo() {
let homeinfo = dataCenter.getData(Store.homeinfo); let homeinfo = dataCenter.getData(Store.homeinfo);
console.error("freshHome",homeinfo); console.log('freshHomeInfo',homeinfo.userInfo);
if(homeinfo.userInfo)
this.setState({
nickName:homeinfo.userInfo.nickName,
joyBeans:homeinfo.userInfo.joyBeans,
figureId:homeinfo.userInfo.figureId,
})
} }
changeGuideShow() { changeGuideShow() {
let needguide = dataCenter.getData(Store.needguide); let needguide = dataCenter.getData(Store.needguide);
...@@ -139,7 +144,7 @@ class Main3 extends Component { ...@@ -139,7 +144,7 @@ class Main3 extends Component {
} }
render() { render() {
const { avatar, nickname, num, needguide } = this.state; const { figureId, nickName, joyBeans, needguide } = this.state;
return ( return (
<div className="main3 diacontmidpos" uuid="8754a9d1-7453-474b-b722-7cb71483ae85" ref="main3" > <div className="main3 diacontmidpos" uuid="8754a9d1-7453-474b-b722-7cb71483ae85" ref="main3" >
<img <img
...@@ -148,27 +153,28 @@ class Main3 extends Component { ...@@ -148,27 +153,28 @@ class Main3 extends Component {
src={this.state.resList['caebeec6-fe80-4c78-a132-d911f97a81b6'].url} src={this.state.resList['caebeec6-fe80-4c78-a132-d911f97a81b6'].url}
/> />
<div className="main3_top " uuid="257105ac-5616-4e29-a4dc-302ed2604193"> <div className="main3_top " uuid="257105ac-5616-4e29-a4dc-302ed2604193">
<div className="main3_userinfo " uuid="25d45126-3476-4d8e-9756-34e2ccf96163"> <div
onClick={this.onClick_userinfo} className="main3_userinfo " uuid="25d45126-3476-4d8e-9756-34e2ccf96163">
<img <img
className="main3_userinfo_bg " className="main3_userinfo_bg "
uuid="5316b02a-5b8e-4355-b556-cd801852df7e" uuid="5316b02a-5b8e-4355-b556-cd801852df7e"
src={this.state.resList['31522099-3ea6-4d2b-ae84-99e2877bd2d0'].url} src={this.state.resList['31522099-3ea6-4d2b-ae84-99e2877bd2d0'].url}
/> />
{avatar == 1 && ( {figureId == 3 && (
<img <img
className="main3_avatar1 " className="main3_avatar1 "
uuid="f2277018-36fd-4f47-9124-d73324505dff" uuid="f2277018-36fd-4f47-9124-d73324505dff"
src={this.state.resList['6dda365e-565e-4e15-9fc9-89b5e173dcd9'].url} src={this.state.resList['6dda365e-565e-4e15-9fc9-89b5e173dcd9'].url}
/> />
)} )}
{avatar == 2 && ( {figureId == 2 && (
<img <img
className="main3_avatar2 " className="main3_avatar2 "
uuid="07d1620b-d31e-4ef7-a63a-9b0ef49497da" uuid="07d1620b-d31e-4ef7-a63a-9b0ef49497da"
src={this.state.resList['6ff31046-e036-4218-8cc9-5d715dfa64a1'].url} src={this.state.resList['6ff31046-e036-4218-8cc9-5d715dfa64a1'].url}
/> />
)} )}
{avatar == 3 && ( {figureId == 1 && (
<img <img
className="main3_avatar3 " className="main3_avatar3 "
uuid="dc2306b9-90e0-4e98-a967-e0f263a3217a" uuid="dc2306b9-90e0-4e98-a967-e0f263a3217a"
...@@ -176,13 +182,14 @@ class Main3 extends Component { ...@@ -176,13 +182,14 @@ class Main3 extends Component {
/> />
)} )}
<span className="main3_num " uuid="018875e0-9592-4854-ba0b-2cd58464a6a2"> <span className="main3_num " uuid="018875e0-9592-4854-ba0b-2cd58464a6a2">
欢趣豆:12352 欢趣豆:{joyBeans}
</span> </span>
<span onClick={this.onClick_userinfo} className="main3_nick " uuid="a7518930-17cc-427a-a6e5-27a593b309c4"> <span className="main3_nick " uuid="a7518930-17cc-427a-a6e5-27a593b309c4">
用户昵称 {nickName}
</span> </span>
<img <img
onClick={() => { onClick={(e) => {
e.stopPropagation();
this.props.navigateTo('detail'); this.props.navigateTo('detail');
}} }}
className="main3_btn_detail " className="main3_btn_detail "
......
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