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

md

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