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

111

parent 3d6432b0
...@@ -55,13 +55,13 @@ export default [ ...@@ -55,13 +55,13 @@ export default [
"icon": "//yun.duiba.com.cn/polaris/credits.55f43bd9eece2d29fd077bbad5f38ea147938c45.png", "icon": "//yun.duiba.com.cn/polaris/credits.55f43bd9eece2d29fd077bbad5f38ea147938c45.png",
"subTitle": "签到", "subTitle": "签到",
"title": "签到", "title": "签到",
"completedSize": 1, "completedSize": 0,
"intervalLimitSize": 1, "intervalLimitSize": 1,
"intervalType": -18649400.705077305 "intervalType": -18649400.705077305
}, },
{ {
"code": "xhqg_{200}", "code": "xhqg_{200}",
"icon": "//yun.duiba.com.cn/polaris/credits.55f43bd9eece2d29fd077bbad5f38ea147938c45.png", "icon": "//yun.duiba.com.cn/polaris/Qg.ce064174141cb66ced062f69809e43cfb4595486.png",
"subTitle": "点击确认消耗200青果", "subTitle": "点击确认消耗200青果",
"title": "消耗200青果", "title": "消耗200青果",
"completedSize": 0, "completedSize": 0,
...@@ -79,7 +79,7 @@ export default [ ...@@ -79,7 +79,7 @@ export default [
}, },
{ {
"code": "yqzl", "code": "yqzl",
"icon": "//yun.duiba.com.cn/polaris/credits.55f43bd9eece2d29fd077bbad5f38ea147938c45.png", "icon": "//yun.duiba.com.cn/polaris/assist.2d9c5be86de1b7ff8652c27d9df73e625d316fdb.png",
"subTitle": "邀请助力", "subTitle": "邀请助力",
"title": "邀请助力", "title": "邀请助力",
"completedSize": 3, "completedSize": 3,
...@@ -88,7 +88,7 @@ export default [ ...@@ -88,7 +88,7 @@ export default [
}, },
{ {
"code": "yqzl_new", "code": "yqzl_new",
"icon": "//yun.duiba.com.cn/polaris/credits.55f43bd9eece2d29fd077bbad5f38ea147938c45.png", "icon": "//yun.duiba.com.cn/polaris/sign.3976eb6cfb3124aee5a0d3c869f82398a8713928.png",
"subTitle": "邀请新用户", "subTitle": "邀请新用户",
"title": "邀请新用户", "title": "邀请新用户",
"completedSize": 3, "completedSize": 3,
...@@ -96,8 +96,8 @@ export default [ ...@@ -96,8 +96,8 @@ export default [
"intervalType": -54395962.26549375 "intervalType": -54395962.26549375
}, },
{ {
"code": "scan_{n}", "code": "scan",
"icon": "//yun.duiba.com.cn/polaris/credits.55f43bd9eece2d29fd077bbad5f38ea147938c45.png", "icon": "//yun.duiba.com.cn/polaris/scan.9b0733c0dae1cc733524431ec5112478e2fefba3.png",
"subTitle": "扫码", "subTitle": "扫码",
"title": "扫码", "title": "扫码",
"completedSize": 3, "completedSize": 3,
...@@ -106,7 +106,7 @@ export default [ ...@@ -106,7 +106,7 @@ export default [
}, },
{ {
"code": "browse_{x}", "code": "browse_{x}",
"icon": "//yun.duiba.com.cn/polaris/credits.55f43bd9eece2d29fd077bbad5f38ea147938c45.png", "icon": "//yun.duiba.com.cn/polaris/see.c249defe0f5dcd540898adbffe3fc6c7f9e7f212.png",
"subTitle": "浏览", "subTitle": "浏览",
"title": "浏览", "title": "浏览",
"completedSize": 3, "completedSize": 3,
......
...@@ -122,8 +122,8 @@ export default [ ...@@ -122,8 +122,8 @@ export default [
"id": 328, "id": 328,
"strategyId": 11, "strategyId": 11,
"prizeId": "g4c7ba888", "prizeId": "g4c7ba888",
"type": 1, "type": 4,
"moneyStatus": 1, "moneyStatus": 2,
"moneyCanReissueStartTimestamp": 1565213353000, "moneyCanReissueStartTimestamp": 1565213353000,
"moneyCanReissueEndTimestamp": 1565213353000, "moneyCanReissueEndTimestamp": 1565213353000,
}, },
......
...@@ -23,6 +23,10 @@ class Renewmodule extends React.Component { ...@@ -23,6 +23,10 @@ class Renewmodule extends React.Component {
store.getBaseIndex(); store.getBaseIndex();
} }
handleclose = () => {
ModalCtrl.closeModal();
};
handleClick = (choice) => { handleClick = (choice) => {
this.setState({ activeChoice: choice }); this.setState({ activeChoice: choice });
}; };
...@@ -107,6 +111,7 @@ class Renewmodule extends React.Component { ...@@ -107,6 +111,7 @@ class Renewmodule extends React.Component {
{hasChallengeDay + 1}<span className="special">未打卡</span> {hasChallengeDay + 1}<span className="special">未打卡</span>
</span> </span>
<span className="title1">已累计打卡{hasChallengeDay}</span> <span className="title1">已累计打卡{hasChallengeDay}</span>
<Button className="close" onClick={this.handleclose} />
</div> </div>
); );
} }
......
...@@ -198,4 +198,13 @@ ...@@ -198,4 +198,13 @@
line-height: 53px; line-height: 53px;
color: rgba(0, 0, 0, 1); color: rgba(0, 0, 0, 1);
} }
.close {
left: 20px;
top: 740px;
width: 28px;
height: 43px;
position: absolute;
.sparkBg("renewModule/返回.png");
}
} }
\ No newline at end of file
...@@ -7,6 +7,7 @@ import API from '@/api'; ...@@ -7,6 +7,7 @@ import API from '@/api';
import { _asyncThrottle, dateFormatter } from '@/utils/utils'; import { _asyncThrottle, dateFormatter } from '@/utils/utils';
import { PageCtrl } from '@/core/ctrls/PageCtrl'; import { PageCtrl } from '@/core/ctrls/PageCtrl';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl'; import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import Finish_task from '../../../components/finish_task/finish_task';
import Consume_qg from '../../../components/consume_qg/consume_qg'; import Consume_qg from '../../../components/consume_qg/consume_qg';
import Consume_credits from '../../../components/consume_credits/consume_credits'; import Consume_credits from '../../../components/consume_credits/consume_credits';
import Renewmodule from '../../../components/renewmodule/renewmodule'; import Renewmodule from '../../../components/renewmodule/renewmodule';
...@@ -24,7 +25,7 @@ class Check extends React.Component<any, any> { ...@@ -24,7 +25,7 @@ class Check extends React.Component<any, any> {
} }
// 按钮 // 按钮
handlegofinish = (type, n, code, title) => { handlegofinish = async (type, n, code, title) => {
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) {
...@@ -38,9 +39,19 @@ class Check extends React.Component<any, any> { ...@@ -38,9 +39,19 @@ class Check extends React.Component<any, any> {
} else { } else {
Toast.show("很抱歉,您的积分不足"); Toast.show("很抱歉,您的积分不足");
} }
} } else if (type === "yqzl") {
else { // todo
} else if (type === "yqzl_new") {
// todo // todo
} else if (type === "scan") {
// todo
} else if (type === "browse") {
// wx.miniProgram.switchTab({ url: jumpUrl })
const { success } = await API.getChallenegeComplate({ taskCode: code });
if (success) {
ModalCtrl.showModal(Finish_task, { title });
}
store.getTaskInfo();
} }
}; };
...@@ -76,7 +87,7 @@ class Check extends React.Component<any, any> { ...@@ -76,7 +87,7 @@ class Check extends React.Component<any, any> {
); );
// 当前挑战信息 // 当前挑战信息
const { const {
challengeTotalDay = 0, challengeTotalDay = 0,
prizeName = '', prizeName = '',
prizeImg = '', prizeImg = '',
...@@ -180,13 +191,13 @@ class Check extends React.Component<any, any> { ...@@ -180,13 +191,13 @@ class Check extends React.Component<any, any> {
) )
} }
// 扫码 // 扫码
case code.startsWith("scan_"): { case code.startsWith("scan"): {
const number = (code.split("_")[1]); const number = (code.split("_")[1]);
const n = parseInt(number.replace(/[{}]/g, ''), 10); const n = parseInt(number.replace(/[{}]/g, ''), 10);
return ( return (
<Button <Button
className="gofinish" className="gofinish"
onClick={() => this.handlegofinish("scan", n, code, title)} onClick={() => this.handlegofinish("scan", '', code, title)}
/> />
); );
} }
......
...@@ -74,9 +74,9 @@ ...@@ -74,9 +74,9 @@
.yifafang { .yifafang {
position: absolute; position: absolute;
width: 141px; width: 178px;
height: 44px; height: 44px;
left: 520px; left: 490px;
top: 53px; top: 53px;
text-align: center; text-align: center;
line-height: 44px; line-height: 44px;
...@@ -105,6 +105,17 @@ ...@@ -105,6 +105,17 @@
.webpBg("MyPrize/发放中.png"); .webpBg("MyPrize/发放中.png");
} }
.shibai {
position: absolute;
width: 178px;
height: 44px;
left: 490px;
top: 53px;
text-align: center;
line-height: 44px;
.webpBg("MyPrize/发放失败.png");
}
.prizeImg { .prizeImg {
position: absolute; position: absolute;
left: 30px; left: 30px;
......
...@@ -79,6 +79,10 @@ class MyPrize extends React.Component<any, any> { ...@@ -79,6 +79,10 @@ class MyPrize extends React.Component<any, any> {
} }
} }
handleshibai = (item) => {
Toast.show("发放失败")
}
handlefafangzhong = (item) => { handlefafangzhong = (item) => {
Toast.show("正在发放中,请耐心等待") Toast.show("正在发放中,请耐心等待")
} }
...@@ -101,6 +105,7 @@ class MyPrize extends React.Component<any, any> { ...@@ -101,6 +105,7 @@ class MyPrize extends React.Component<any, any> {
{item.type === 4 ? ( {item.type === 4 ? (
<> <>
{item.moneyStatus === 1 && <Button className="yifafang" onClick={() => this.handleyifafang(item)} />} {item.moneyStatus === 1 && <Button className="yifafang" onClick={() => this.handleyifafang(item)} />}
{item.moneyStatus === 2 && <Button className="shibai" onClick={() => this.handleshibai(item)} />}
{item.moneyStatus === 10 && <Button className="bufa" onClick={() => this.handlebufa(item)} />} {item.moneyStatus === 10 && <Button className="bufa" onClick={() => this.handlebufa(item)} />}
{item.moneyStatus === 11 && <Button className="fafangzhong" onClick={() => this.handlefafangzhong(item)} />} {item.moneyStatus === 11 && <Button className="fafangzhong" onClick={() => this.handlefafangzhong(item)} />}
</> </>
......
...@@ -30,6 +30,12 @@ declare namespace wx { ...@@ -30,6 +30,12 @@ declare namespace wx {
fail?: (...args: any[]) => void; fail?: (...args: any[]) => void;
complete?: (...args: any[]) => void; complete?: (...args: any[]) => void;
}): void; }): void;
switchTab(params: {
url: string;
success?: (...args: any[]) => void;
fail?: (...args: any[]) => void;
complete?: (...args: any[]) => void;
}): void;
} }
const miniProgram: MiniProgram; const miniProgram: MiniProgram;
......
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