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 = {
"code": null,
"data": {
"canUpdateNickName": null,
"figures": [
{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }
],
"newUser": 1,
"userInfo": null
"data":
{
"canUpdateNickName": false,
"figures": [{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }],
"newUser": 0,
"userInfo": { "figureId": "1", "joyBeans": 10100, "nickName": "13" }
},
"message": null,
"success": true
......@@ -14,10 +13,7 @@ export const homeInfo = {
export const updateUinfo = {
"code": null,
"data": {
result:true,
joyBeans:0
},
"data": true,
"message": null,
"success": true
}
......@@ -88,18 +84,8 @@ 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 dosign ={
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": {
"result": true,
......
......@@ -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;
......
......@@ -16,20 +16,19 @@ class Main3 extends Component {
super(props);
this.state = {
resList: resList,
nickname: 'nickname',
avatar: 1,
num: "1123",
nickName: '',
joyBeans: "0",
figureId:-1,
needguide: false
};
}
updateMoney() {
console.log('update money')
this.freshHomeInfo();
}
onClick_userinfo = () => {
Aup.show('Userinfo', {}, this);
// console.log('onClick_signBtn')
}
onClick_signBtn = () => {
......@@ -76,7 +75,13 @@ class Main3 extends Component {
//首页信息显示更新
freshHomeInfo() {
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() {
let needguide = dataCenter.getData(Store.needguide);
......@@ -139,7 +144,7 @@ class Main3 extends Component {
}
render() {
const { avatar, nickname, num, needguide } = this.state;
const { figureId, nickName, joyBeans, needguide } = this.state;
return (
<div className="main3 diacontmidpos" uuid="8754a9d1-7453-474b-b722-7cb71483ae85" ref="main3" >
<img
......@@ -148,27 +153,28 @@ class Main3 extends Component {
src={this.state.resList['caebeec6-fe80-4c78-a132-d911f97a81b6'].url}
/>
<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
className="main3_userinfo_bg "
uuid="5316b02a-5b8e-4355-b556-cd801852df7e"
src={this.state.resList['31522099-3ea6-4d2b-ae84-99e2877bd2d0'].url}
/>
{avatar == 1 && (
{figureId == 3 && (
<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 == 1 && (
<img
className="main3_avatar3 "
uuid="dc2306b9-90e0-4e98-a967-e0f263a3217a"
......@@ -176,13 +182,14 @@ class Main3 extends Component {
/>
)}
<span className="main3_num " uuid="018875e0-9592-4854-ba0b-2cd58464a6a2">
欢趣豆:12352
欢趣豆:{joyBeans}
</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>
<img
onClick={() => {
onClick={(e) => {
e.stopPropagation();
this.props.navigateTo('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