Commit 01e5857d authored by wildfirecode13's avatar wildfirecode13

1

parent 6fc969c1
......@@ -4,7 +4,7 @@ export const homeInfo = {
{
"canUpdateNickName": false,
"figures": [{ "figureId": "1" }, { "figureId": "2" }, { "figureId": "3" }],
"newUser": 0,
"newUser": 0,
"userInfo": { "figureId": "1", "joyBeans": 10100, "nickName": "13" }
},
"message": null,
......@@ -26,8 +26,9 @@ export const doshare = {
export const signInfo = {
"code": null,
"data": {
"continuousDays": 1,
"needPopup": 0,
"todaySigned": 1,
"continuousDays": 7,
"needPopup": 1,
"signLists": [
{
"awardName": "欢趣豆",
......@@ -78,13 +79,13 @@ export const signInfo = {
"ruleId": "ru_1",
"type": "daPaiCoupons"
}
],
"todaySigned": false
]
},
"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 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": {
......
......@@ -10,7 +10,7 @@ import API from '../../api';
class Sign extends Component {
constructor(props) {
super(props);
const { todaySigned, continuousDays,signLists } = props.data;
const { todaySigned, continuousDays, signLists } = props.data;
this.state = {
resList: resList,
todaySigned,
......@@ -36,11 +36,61 @@ class Sign extends Component {
};
render() {
const { todaySigned ,signLists,continuousDays} = this.state;
const signedList=[];
for(let i=0;i <7;i++) {
signedList[i] = i <continuousDays;
const { todaySigned, signLists, continuousDays } = this.state;
const signedList = [];
for (let i = 0; i < 7; i++) {
signedList[i] = i < continuousDays;
}
let lineList = [];
switch (continuousDays) {
case 0:
lineList=[]
break;
case 1:
if(todaySigned)
lineList=[]
else
lineList=[1]
break;
case 2:
if(todaySigned)
lineList=[1]
else
lineList=[1,1]
break;
case 3:
if(todaySigned)
lineList=[1,1]
else
lineList=[1,1,1]
break;
case 4:
if(todaySigned)
lineList=[1,1,1]
else
lineList=[1,1,1,1]
break;
case 5:
if(todaySigned)
lineList=[1,1,1,1]
else
lineList=[1,1,1,1,1]
break;
case 6:
if(todaySigned)
lineList=[1,1,1,1,1]
else
lineList=[1,1,1,1,1,1]
break;
case 7:
if(todaySigned)
lineList=[1,1,1,1,1,1]
else
lineList=[1,1,1,1,1,1,1]
break;
}
return (
<div className="sign " uuid="14a66aed-4e41-4fea-9d16-6aa02c1bad5a">
<img
......@@ -60,71 +110,71 @@ class Sign extends Component {
uuid="07f33a4a-3703-4ae2-870b-c32ab66c2293"
src={this.state.resList['61973e7b-efa4-42ee-b8c7-be7397ebbbb3'].url}
/>
<img
{signedList[0] && <img
className="sign_progress_dot1 "
uuid="39cd9c87-74cc-456c-b35f-d7ad1de8a1c8"
src={this.state.resList['5cae1415-9956-47e8-9a26-bfbd4b7c7d7a'].url}
/>
<img
/>}
{signedList[1] && <img
className="sign_progress_dot2 "
uuid="baa83cd1-6f94-4ff9-b454-c8ada9c465fa"
src={this.state.resList['5cae1415-9956-47e8-9a26-bfbd4b7c7d7a'].url}
/>
<img
/>}
{signedList[2] && <img
className="sign_progress_dot3 "
uuid="ea1a7572-0d0d-4395-99a5-549cf4f5cdec"
src={this.state.resList['5cae1415-9956-47e8-9a26-bfbd4b7c7d7a'].url}
/>
<img
/>}
{signedList[3] && <img
className="sign_progress_dot4 "
uuid="45d60d76-9ed6-4899-ae2c-6499bf4d4946"
src={this.state.resList['5cae1415-9956-47e8-9a26-bfbd4b7c7d7a'].url}
/>
<img
/>}
{signedList[4] && <img
className="sign_progress_dot5 "
uuid="acfad11b-093b-467e-877f-a0d2ad282069"
src={this.state.resList['5cae1415-9956-47e8-9a26-bfbd4b7c7d7a'].url}
/>
<img
/>}
{signedList[5] && <img
className="sign_progress_dot6 "
uuid="1aff7c26-b98b-4c1d-9bb9-818326d304b5"
src={this.state.resList['5cae1415-9956-47e8-9a26-bfbd4b7c7d7a'].url}
/>
<img
/>}
{signedList[6] && <img
className="sign_progress_dot7 "
uuid="8b7bc509-e55a-4c5c-b587-18abcc9bd75e"
src={this.state.resList['5cae1415-9956-47e8-9a26-bfbd4b7c7d7a'].url}
/>
<img
/>}
{!!lineList[2] && <img
className="sign_progress_line3 "
uuid="c84309d1-c863-4209-bb4d-ba8cdb90e00f"
src={this.state.resList['76a9336d-fc89-4b21-aa95-b5b6fa1e09e5'].url}
/>
<img
/>}
{!!lineList[5] && <img
className="sign_progress_line6 "
uuid="b4e4d782-3517-408f-a0ed-21dc03bbc399"
src={this.state.resList['76a9336d-fc89-4b21-aa95-b5b6fa1e09e5'].url}
/>
<img
/>}
{!!lineList[3] && <img
className="sign_progress_line4 "
uuid="35be9a32-90f1-454f-9e57-ee84d5ef008b"
src={this.state.resList['76a9336d-fc89-4b21-aa95-b5b6fa1e09e5'].url}
/>
<img
/>}
{!!lineList[4] && <img
className="sign_progress_line5 "
uuid="280540ed-e886-44e7-9897-c4f26ee3b4ab"
src={this.state.resList['76a9336d-fc89-4b21-aa95-b5b6fa1e09e5'].url}
/>
<img
/>}
{!!lineList[1] && <img
className="sign_progress_line2 "
uuid="997cf0d4-ce93-436c-9a57-b2f1f305c4f3"
src={this.state.resList['76a9336d-fc89-4b21-aa95-b5b6fa1e09e5'].url}
/>
<img
/>}
{!!lineList[0] && <img
className="sign_progress_line1 "
uuid="687b92c8-1051-4ad2-9841-d376b567904c"
src={this.state.resList['76a9336d-fc89-4b21-aa95-b5b6fa1e09e5'].url}
/>
/>}
</div>
<div className="sgin_1 " uuid="96df8cfc-972a-4346-baa6-d0b054c1f234">
<img
......@@ -227,7 +277,7 @@ class Sign extends Component {
+{signLists[0].awardValue}
</span>
</div>}
{signedList[1] &&<div className="signed_2 " uuid="01a19090-6b12-408a-8ae2-04fa052b421e">
{signedList[1] && <div className="signed_2 " uuid="01a19090-6b12-408a-8ae2-04fa052b421e">
<img
className="signed_2_bg "
uuid="499e7734-4c6e-4dc1-ae57-9533cfadbe7c"
......@@ -239,8 +289,8 @@ class Sign extends Component {
<span className="signed_2_num " uuid="acfbff8d-8670-436a-8f7e-e960d7b7c82a">
+{signLists[1].awardValue}
</span>
</div>}
{signedList[2] &&<div className="signed_3 " uuid="94200bbc-fca2-41e5-a9a5-0ab43ece60d7">
</div>}
{signedList[2] && <div className="signed_3 " uuid="94200bbc-fca2-41e5-a9a5-0ab43ece60d7">
<img
className="signed_3_bg "
uuid="4a7e2ba6-0719-4cac-bc14-365998f2175d"
......@@ -252,8 +302,8 @@ class Sign extends Component {
<span className="signed_3_num " uuid="81f622ec-d099-4270-92c8-1da247bcf4f3">
+{signLists[2].awardValue}
</span>
</div>}
{signedList[3] &&<div className="signed_4 " uuid="bf7a2ddd-c662-4ab2-93a5-a60693043863">
</div>}
{signedList[3] && <div className="signed_4 " uuid="bf7a2ddd-c662-4ab2-93a5-a60693043863">
<img
className="signed_4_bg "
uuid="afb52fc3-1968-4bf5-a9ab-9d19dee08d6c"
......@@ -266,7 +316,7 @@ class Sign extends Component {
+{signLists[3].awardValue}
</span>
</div>}
{signedList[4] &&<div className="signed_5 " uuid="a49b0dac-b1ea-41e3-988d-79f164620568">
{signedList[4] && <div className="signed_5 " uuid="a49b0dac-b1ea-41e3-988d-79f164620568">
<img
className="signed_5_bg "
uuid="0e3d6178-e9cc-4f47-9344-585b8bc1e15f"
......@@ -279,7 +329,7 @@ class Sign extends Component {
+{signLists[4].awardValue}
</span>
</div>}
{signedList[5] &&<div className="signed_6 " uuid="96acf396-cef8-43a4-bd69-fb7d9c1467c6">
{signedList[5] && <div className="signed_6 " uuid="96acf396-cef8-43a4-bd69-fb7d9c1467c6">
<img
className="signed_6_bg "
uuid="af53284f-de9a-4ed6-94f8-90576911d120"
......@@ -307,7 +357,7 @@ class Sign extends Component {
src={this.state.resList['13b618c4-cd2a-4037-9664-b77381fbfade'].url}
/>
)}
{signedList[5] &&<div className="signed_7 " uuid="7b91c31c-0de4-4148-9887-6ab24e963258">
{signedList[6] && <div className="signed_7 " uuid="7b91c31c-0de4-4148-9887-6ab24e963258">
<img
className="signed_7_bg "
uuid="348400d8-166c-463b-b6a4-e4b3a24d9a7b"
......@@ -316,7 +366,7 @@ class Sign extends Component {
<span className="signed_7_txt " uuid="32c14336-2aa7-4bdd-8e5f-8c3763ad8c6b">
第7天
</span>
</div>}
</div>}
</div>
);
}
......
......@@ -31,7 +31,7 @@
.sign_progress_dot1 {
width: 22px;
height: 22px;
left: 1px;
left: 0px;
position: absolute;
}
.sign_progress_dot2 {
......@@ -73,42 +73,42 @@
.sign_progress_line3 {
width: 77px;
height: 4px;
left: 159px;
left: 152px;
top: 9px;
position: absolute;
}
.sign_progress_line6 {
width: 77px;
height: 4px;
left: 391px;
left: 381px;
top: 9px;
position: absolute;
}
.sign_progress_line4 {
width: 77px;
height: 4px;
left: 238px;
left: 228px;
top: 9px;
position: absolute;
}
.sign_progress_line5 {
width: 77px;
height: 4px;
left: 309px;
left: 305px;
top: 9px;
position: absolute;
}
.sign_progress_line2 {
width: 77px;
height: 4px;
left: 86px;
left: 76px;
top: 9px;
position: absolute;
}
.sign_progress_line1 {
width: 77px;
height: 4px;
left: 19px;
left: 0px;
top: 9px;
position: absolute;
}
......
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