Commit ca86ee0b authored by 徐士卿's avatar 徐士卿

md

parent ecfa20a9
...@@ -48,7 +48,7 @@ export default [ ...@@ -48,7 +48,7 @@ export default [
], ],
"hasChallengeDay": 5, "hasChallengeDay": 5,
"latestChallengeSuccessTime": 5, "latestChallengeSuccessTime": 5,
"boolNeedResign": true, "boolNeedResign": false,
"boolNeedResignPop": false, "boolNeedResignPop": false,
"taskInfoList": [ "taskInfoList": [
{ {
...@@ -61,6 +61,7 @@ export default [ ...@@ -61,6 +61,7 @@ export default [
"intervalType": -18649400.705077305, "intervalType": -18649400.705077305,
"jumpUrl": '', "jumpUrl": '',
"boolShowCompletePop": false, "boolShowCompletePop": false,
"id": 1,
}, },
{ {
"code": "xhqg_{200}", "code": "xhqg_{200}",
...@@ -72,6 +73,7 @@ export default [ ...@@ -72,6 +73,7 @@ export default [
"intervalType": 69737947.09434697, "intervalType": 69737947.09434697,
"jumpUrl": '', "jumpUrl": '',
"boolShowCompletePop": false, "boolShowCompletePop": false,
"id": 2,
}, },
{ {
"code": "xhjf_{300}", "code": "xhjf_{300}",
...@@ -83,6 +85,7 @@ export default [ ...@@ -83,6 +85,7 @@ export default [
"intervalType": 15800400.399293274, "intervalType": 15800400.399293274,
"jumpUrl": '', "jumpUrl": '',
"boolShowCompletePop": false, "boolShowCompletePop": false,
"id": 3,
}, },
{ {
"code": "yqzl", "code": "yqzl",
...@@ -94,6 +97,7 @@ export default [ ...@@ -94,6 +97,7 @@ export default [
"intervalType": -54395962.26549375, "intervalType": -54395962.26549375,
"jumpUrl": '', "jumpUrl": '',
"boolShowCompletePop": false, "boolShowCompletePop": false,
"id": 4,
}, },
{ {
"code": "yqzl_new", "code": "yqzl_new",
...@@ -105,6 +109,7 @@ export default [ ...@@ -105,6 +109,7 @@ export default [
"intervalType": -54395962.26549375, "intervalType": -54395962.26549375,
"jumpUrl": '', "jumpUrl": '',
"boolShowCompletePop": false, "boolShowCompletePop": false,
"id": 5,
}, },
{ {
"code": "scan", "code": "scan",
...@@ -116,6 +121,7 @@ export default [ ...@@ -116,6 +121,7 @@ export default [
"intervalType": -54395962.26549375, "intervalType": -54395962.26549375,
"jumpUrl": '', "jumpUrl": '',
"boolShowCompletePop": false, "boolShowCompletePop": false,
"id": 6,
}, },
{ {
"code": "browse_{x}", "code": "browse_{x}",
...@@ -127,6 +133,7 @@ export default [ ...@@ -127,6 +133,7 @@ export default [
"intervalType": -54395962.26549375, "intervalType": -54395962.26549375,
"jumpUrl": 'https://www.baidu.com/index.html', "jumpUrl": 'https://www.baidu.com/index.html',
"boolShowCompletePop": false, "boolShowCompletePop": false,
"id": 7,
}, },
], ],
"boolNeedChallengeCompletePop": false, "boolNeedChallengeCompletePop": false,
......
...@@ -39,7 +39,8 @@ class Check extends React.Component<any, any> { ...@@ -39,7 +39,8 @@ class Check extends React.Component<any, any> {
} }
// 按钮 // 按钮
handlegofinish = async (type, n, code, title, jumpUrl) => { handlegofinish = async (type, n, code, title, jumpUrl, id) => {
handleLogClick(4, id)
const { jfNum = 0, qgNum = 0 } = store?.baseInfo || {}; const { jfNum = 0, qgNum = 0 } = store?.baseInfo || {};
if (type === "xhqg") { if (type === "xhqg") {
if (n <= qgNum) { if (n <= qgNum) {
...@@ -68,7 +69,7 @@ class Check extends React.Component<any, any> { ...@@ -68,7 +69,7 @@ class Check extends React.Component<any, any> {
handlegosign = _asyncThrottle((hasChallengeDay, resignJf, resignQg, type) => { handlegosign = _asyncThrottle((hasChallengeDay, resignJf, resignQg, type) => {
// if (type === 'task') handleLogClick(5) if (type === 'task') handleLogClick(5)
// else if (type === 'calendar') handleLogClick(6) // else if (type === 'calendar') handleLogClick(6)
ModalCtrl.showModal(Renewmodule, { hasChallengeDay, resignJf, resignQg }); ModalCtrl.showModal(Renewmodule, { hasChallengeDay, resignJf, resignQg });
}); });
...@@ -154,21 +155,23 @@ class Check extends React.Component<any, any> { ...@@ -154,21 +155,23 @@ class Check extends React.Component<any, any> {
{Array.isArray(taskInfoList) && {Array.isArray(taskInfoList) &&
taskInfoList.length > 0 && taskInfoList.length > 0 &&
taskInfoList?.map((v, i) => { taskInfoList?.map((v, i) => {
const { title, subTitle, icon, code, completedSize, intervalLimitSize, jumpUrl } = v || {}; const { title, subTitle, icon, code, completedSize, intervalLimitSize, jumpUrl, id } = v || {};
// 获取按钮状态 // 获取按钮状态
const renderActionButton = (code, completedSize, intervalLimitSize) => { const renderActionButton = (code, completedSize, intervalLimitSize) => {
// 先判断是否为续签状态 // 先判断是否为续签状态
if (boolNeedResign) { if (boolNeedResign) {
return <Button className="gosign md5" onClick={() => this.handlegosign(hasChallengeDay, resignJf, resignQg, 'task')} /> handleLogExposure(5)
return <Button className="gosign" onClick={() => this.handlegosign(hasChallengeDay, resignJf, resignQg, 'task')} />
} else if (completedSize < intervalLimitSize) { } else if (completedSize < intervalLimitSize) {
handleLogExposure(4, id)
switch (true) { switch (true) {
// 签到 // 签到
case code.startsWith("sign"): { case code.startsWith("sign"): {
return ( return (
<Button <Button
className="gofinish" className="gofinish"
onClick={() => this.handlegofinish("sign", '', code, title, '')} onClick={() => this.handlegofinish("sign", '', code, title, '', id)}
/> />
); );
} }
...@@ -179,7 +182,7 @@ class Check extends React.Component<any, any> { ...@@ -179,7 +182,7 @@ class Check extends React.Component<any, any> {
return ( return (
<Button <Button
className="gofinish" className="gofinish"
onClick={() => this.handlegofinish("xhqg", n, code, title, '')} onClick={() => this.handlegofinish("xhqg", n, code, title, '', id)}
/> />
); );
} }
...@@ -190,7 +193,7 @@ class Check extends React.Component<any, any> { ...@@ -190,7 +193,7 @@ class Check extends React.Component<any, any> {
return ( return (
<Button <Button
className="gofinish" className="gofinish"
onClick={() => this.handlegofinish("xhjf", n, code, title, '')} onClick={() => this.handlegofinish("xhjf", n, code, title, '', id)}
/> />
); );
} }
...@@ -199,7 +202,7 @@ class Check extends React.Component<any, any> { ...@@ -199,7 +202,7 @@ class Check extends React.Component<any, any> {
return ( return (
<Button <Button
className="gofinish" className="gofinish"
onClick={() => this.handlegofinish("yqzl", '', code, title, '')} onClick={() => this.handlegofinish("yqzl", '', code, title, '', id)}
/> />
) )
} }
...@@ -208,7 +211,7 @@ class Check extends React.Component<any, any> { ...@@ -208,7 +211,7 @@ class Check extends React.Component<any, any> {
return ( return (
<Button <Button
className="gofinish" className="gofinish"
onClick={() => this.handlegofinish("yqzl_new", '', code, title, '')} onClick={() => this.handlegofinish("yqzl_new", '', code, title, '', id)}
/> />
) )
} }
...@@ -219,7 +222,7 @@ class Check extends React.Component<any, any> { ...@@ -219,7 +222,7 @@ class Check extends React.Component<any, any> {
return ( return (
<Button <Button
className="gofinish" className="gofinish"
onClick={() => this.handlegofinish("scan", '', code, title, jumpUrl)} onClick={() => this.handlegofinish("scan", '', code, title, jumpUrl, id)}
/> />
); );
} }
...@@ -228,7 +231,7 @@ class Check extends React.Component<any, any> { ...@@ -228,7 +231,7 @@ class Check extends React.Component<any, any> {
return ( return (
<Button <Button
className="gofinish" className="gofinish"
onClick={() => this.handlegofinish("browse", '', code, title, jumpUrl)} onClick={() => this.handlegofinish("browse", '', code, title, jumpUrl, id)}
/> />
); );
} }
......
...@@ -171,6 +171,7 @@ class Store { ...@@ -171,6 +171,7 @@ class Store {
resignQg: number; resignQg: number;
}>; }>;
taskInfoList?: Array<{ taskInfoList?: Array<{
id: string | number;
code: string; code: string;
icon: string; icon: string;
subTitle: string; subTitle: string;
......
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