Commit 31a52cdd authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 53049f77
...@@ -15,6 +15,7 @@ import { CircleItem } from './CircleItem'; ...@@ -15,6 +15,7 @@ import { CircleItem } from './CircleItem';
import { HandItem } from './HandItem'; import { HandItem } from './HandItem';
import { showToast } from 'db://assets/Module/UIFast'; import { showToast } from 'db://assets/Module/UIFast';
import store from "../../../store/store"; import store from "../../../store/store";
import { toJS } from "mobx";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -297,7 +298,7 @@ export class ChangeEquipPanel extends Panel { ...@@ -297,7 +298,7 @@ export class ChangeEquipPanel extends Panel {
/** 任务栏渲染 */ /** 任务栏渲染 */
taskRender() { taskRender() {
const data = this.loopList?.[this.middleIndex]; const data = this.loopList?.[this.middleIndex];
const {isUsed, title, completedSize, intervalLimitSize, loopType} = data || {}; const {taskData, taskCode, isUsed, title, completedSize, intervalLimitSize, loopType} = data || {};
/** 气泡渲染 */ /** 气泡渲染 */
if (loopType == "1") { if (loopType == "1") {
this.bubble.active = false; this.bubble.active = false;
...@@ -306,6 +307,7 @@ export class ChangeEquipPanel extends Panel { ...@@ -306,6 +307,7 @@ export class ChangeEquipPanel extends Panel {
this.bubble.getChildByName("Content").getComponent(Label).string = `分数提升 ${BUFF?.[loopType] || ""}%` this.bubble.getChildByName("Content").getComponent(Label).string = `分数提升 ${BUFF?.[loopType] || ""}%`
} }
console.log(data);
if (!!isUsed) { if (!!isUsed) {
/** 已装备 */ /** 已装备 */
this.mainBtnGrey.active = true; this.mainBtnGrey.active = true;
...@@ -324,7 +326,14 @@ export class ChangeEquipPanel extends Panel { ...@@ -324,7 +326,14 @@ export class ChangeEquipPanel extends Panel {
this.mainBtn.active = false; this.mainBtn.active = false;
this.taskBox.active = true; this.taskBox.active = true;
this.taskBox.getChildByName("Title").getComponent(Label).string = strFormat(title, 22); this.taskBox.getChildByName("Title").getComponent(Label).string = strFormat(title, 22);
this.taskBox.getChildByName("Progress").getComponent(Label).string = `完成 ${completedSize}/${intervalLimitSize}`;
if (taskCode == "bank_2201") {
const descObj = taskData.desc ? JSON.parse(taskData.desc) : {};
const t = descObj?.progressAmount || 0;
this.taskBox.getChildByName("Progress").getComponent(Label).string = `累计已提升金额:${t}`;
} else {
this.taskBox.getChildByName("Progress").getComponent(Label).string = `完成 ${completedSize}/${intervalLimitSize}`;
}
} }
} }
} }
......
...@@ -51,16 +51,17 @@ export class TaskItem extends ScrollListItem { ...@@ -51,16 +51,17 @@ export class TaskItem extends ScrollListItem {
if (code?.startsWith("it")) { if (code?.startsWith("it")) {
this.title.string = strFormat(`${title}(${completedSize}/${intervalLimitSize})`, 24); this.title.string = strFormat(`${title}(${completedSize}/${intervalLimitSize})`, 24);
this.subTitle.string = strFormat(subTitle, 38);
} else if (code === "bank_2202") { } else if (code === "bank_2202") {
const descObj = desc ? JSON.parse(desc) : {}; const descObj = desc ? JSON.parse(desc) : {};
const t = ~~((descObj?.progressAmount || 0) / 1000); const t = descObj?.progressAmount || 0;
this.title.string = strFormat(`${title}(${t}/10)`, 30); this.title.string = strFormat(`${title}(${~~(t / 1000)}/10)`, 30);
this.subTitle.string = strFormat(`累计已提升金额:${t}元`, 38);
} else { } else {
this.title.string = strFormat(title, 24); this.title.string = strFormat(title, 24);
this.subTitle.string = strFormat(subTitle, 38);
} }
this.subTitle.string = strFormat(subTitle, 38);
const btnSp = this.btn.getComponent(Sprite); const btnSp = this.btn.getComponent(Sprite);
const {timeStamp} = getWebData(WebNetName.index) || {}; const {timeStamp} = getWebData(WebNetName.index) || {};
...@@ -79,9 +80,8 @@ export class TaskItem extends ScrollListItem { ...@@ -79,9 +80,8 @@ export class TaskItem extends ScrollListItem {
btnSp.spriteFrame = this.doSf; btnSp.spriteFrame = this.doSf;
} else { } else {
if (code === "bank_2202") { // 特殊任务 if (code === "bank_2202") { // 特殊任务
const descObj = desc ? JSON.parse(desc) : {};
// hasReceivedNum 特殊任务的已领奖次数 // hasReceivedNum 特殊任务的已领奖次数
if (descObj.hasReceivedNum >= 1) { if (completedSize >= 1) {
btnSp.spriteFrame = this.fightSf; btnSp.spriteFrame = this.fightSf;
} else { } else {
btnSp.spriteFrame = this.doSf; btnSp.spriteFrame = this.doSf;
......
...@@ -6,10 +6,11 @@ import { resetBackCookie } from "../../../AppTool"; ...@@ -6,10 +6,11 @@ import { resetBackCookie } from "../../../AppTool";
// import { isFromShare, newUser } from 'duiba-utils'; // import { isFromShare, newUser } from 'duiba-utils';
// let mergeData = { let mergeData = {
// user_type: newUser ? '0' : '1', // user_type: newUser ? '0' : '1',
// is_from_share: isFromShare ? '0' : '1', // is_from_share: isFromShare ? '0' : '1',
// } // channel: getUrlParams('channel'),
}
export const DEFAULF_ERROR = '网络异常,请稍后重试'; export const DEFAULF_ERROR = '网络异常,请稍后重试';
//////////////星速台接口方法集成 //////////////星速台接口方法集成
......
...@@ -16,6 +16,7 @@ import { UIMgr } from "../Module/UIMgr"; ...@@ -16,6 +16,7 @@ import { UIMgr } from "../Module/UIMgr";
import { changeScene, showToast } from "db://assets/Module/UIFast"; import { changeScene, showToast } from "db://assets/Module/UIFast";
import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene"; import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import store from "../store/store"; import store from "../store/store";
import { appRequest, disableGestureReturn } from "../AppTool";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -33,6 +34,8 @@ export class Start extends Component { ...@@ -33,6 +34,8 @@ export class Start extends Component {
@property(ProgressBar) @property(ProgressBar)
progressBar: ProgressBar; progressBar: ProgressBar;
interval = null;
onLoad() { onLoad() {
// game.frameRate = _FPS; // game.frameRate = _FPS;
...@@ -45,8 +48,26 @@ export class Start extends Component { ...@@ -45,8 +48,26 @@ export class Start extends Component {
store.updateFrontVariable(); store.updateFrontVariable();
disableGestureReturn();
this.interval = setInterval(() => {
this.keepLive();
}, 1000 * 60 * 5);
} }
onDestroy() {
clearInterval(this.interval);
}
keepLive = () => {
appRequest('/activityCommonService/duiBaKeepAlive', {
method: 'POST',
}).then(res => {
console.log('keepLive', res);
});
};
async start() { async start() {
await this.preload([ await this.preload([
{ {
......
...@@ -3,22 +3,7 @@ ...@@ -3,22 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>套圈挑战赛</title> <title>套圈挑战赛</title>
<script id="monitorjs" src="//yun.duiba.com.cn/woodpecker/sdk/0.0.36/woodpecker_outer.js" ></script>
<script id="registerMonitor">
// 烽火台注入前端监控脚本,请勿修改
try {
woodpecker.setConfig({
projectId: "pc9c1ee11",
developer: [
"fa17c4667c62b5ba014f382c0802a462"
],
});
} catch (e) {
console.error(e);
}
</script>
<!--http://www.html5rocks.com/en/mobile/mobifying/--> <!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport" <meta name="viewport"
...@@ -54,7 +39,7 @@ ...@@ -54,7 +39,7 @@
<script src="//yun.duiba.com.cn/polaris/SVGA.Lite.v2.1.1.d3a67cbc13c591c53c6f87ab34c57ce387010374.js" crossorigin="anonymous"></script> <script src="//yun.duiba.com.cn/polaris/SVGA.Lite.v2.1.1.d3a67cbc13c591c53c6f87ab34c57ce387010374.js" crossorigin="anonymous"></script>
<script src="//yun.duiba.com.cn/aurora/assets/2403d1edf2acd15b179306b6ddaa5f0967d78a8f.js"></script> <script src="//yun.duiba.com.cn/aurora/assets/2403d1edf2acd15b179306b6ddaa5f0967d78a8f.js"></script>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1720404223993/style.css"/> <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1720511787175/style.css"/>
<style> <style>
.sui-captcha { .sui-captcha {
...@@ -116,16 +101,16 @@ ...@@ -116,16 +101,16 @@
</script> </script>
<!-- Polyfills bundle. --> <!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1720404223993/src/polyfills.bundle.js" charset="utf-8"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1720511787175/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. --> <!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1720404223993/src/system.bundle.js" charset="utf-8"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1720511787175/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map --> <!-- Import map -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1720404223993/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1720511787175/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script> <script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1720404223993/index.js').catch(function (err) { System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1720511787175/index.js').catch(function (err) {
console.error(err); console.error(err);
}) })
</script> </script>
......
{ {
"code": null, "code": null,
"data": { "data": {
"handType": "1", "handType": "3",
"taskInfo": [ "taskInfo": [
{ {
"isUsed": false, "isUsed": false,
"loopType": 2, "loopType": 2,
"taskCode": "join_5" "taskCode": "join_3"
}, },
{ {
"isUsed": false, "isUsed": false,
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
{ {
"isUsed": false, "isUsed": false,
"loopType": 4, "loopType": 4,
"taskCode": "score_1000" "taskCode": "score_300"
}, },
{ {
"isUsed": false, "isUsed": false,
"loopType": 5, "loopType": 5,
"taskCode": "score_8000" "taskCode": "bank_2201"
}, },
{ {
"isUsed": true, "isUsed": true,
...@@ -32,5 +32,5 @@ ...@@ -32,5 +32,5 @@
}, },
"message": null, "message": null,
"success": true, "success": true,
"timeStamp": 1718776874488 "timeStamp": 1720598101102
} }
\ No newline at end of file
...@@ -3,43 +3,6 @@ ...@@ -3,43 +3,6 @@
"data": { "data": {
"endTimestamp": 1785495731000, "endTimestamp": 1785495731000,
"item": [ "item": [
{
"buttonText": null,
"code": "bank_2202",
"completedSize": 0,
"desc": "{\"taskType\":2,\"hasReceivedNum\":10, \"progressAmount\":10000}",
"extra": null,
"icon": null,
"id": "savjpxbs",
"index": null,
"indexes": null,
"intervalLimitSize": 1,
"intervalType": 0,
"jumpUrl": "/",
"options": [
{
"degree": null,
"icon": null,
"icon2": null,
"id": "sp_challenge_times",
"index": null,
"name": "挑战次数",
"prizeId": "sp_challenge_times",
"prizeType": null,
"refId": null,
"refType": null,
"sendCount": 3
}
],
"playwayId": "task_1",
"prizePendingCode": null,
"prizePendingCodeList": null,
"ruleId": "spPrize@sp_challenge_times@3",
"sendPrize": null,
"subTitle": "/",
"taskStatus": 0,
"title": "资产每提升1000元得次数*1"
},
{ {
"buttonText": "请邀请好友给你助力", "buttonText": "请邀请好友给你助力",
"code": "it", "code": "it",
...@@ -179,7 +142,7 @@ ...@@ -179,7 +142,7 @@
"id": "jnu13vqb", "id": "jnu13vqb",
"index": null, "index": null,
"indexes": null, "indexes": null,
"intervalLimitSize": 10, "intervalLimitSize": 100,
"intervalType": 1, "intervalType": 1,
"jumpUrl": "https://www.baidu.com1", "jumpUrl": "https://www.baidu.com1",
"options": [ "options": [
...@@ -187,20 +150,59 @@ ...@@ -187,20 +150,59 @@
"degree": null, "degree": null,
"icon": null, "icon": null,
"icon2": null, "icon2": null,
"id": "sp_challenge_times", "id": "of05a780e",
"index": null, "index": 1,
"name": "挑战次数", "name": "88积分测试数据",
"prizeId": "sp_challenge_times", "prizeId": "third_ZHXYKHQ240802",
"prizeType": null, "prizeType": 1,
"refId": null,
"refType": null,
"sendCount": 1
},
{
"degree": null,
"icon": null,
"icon2": null,
"id": "obc9d8d93",
"index": 2,
"name": "立减金测试",
"prizeId": "third_ZHXYKHQ240801",
"prizeType": 1,
"refId": null, "refId": null,
"refType": null, "refType": null,
"sendCount": 10 "sendCount": 10
},
{
"degree": null,
"icon": "//yun.dui88.com/images/202211/vo9167fvxo.png",
"icon2": null,
"id": "o02dcd829",
"index": 3,
"name": "非首次-漫漫测试实物-星速台",
"prizeId": "sss_3",
"prizeType": 2,
"refId": "42731",
"refType": "object",
"sendCount": 1
},
{
"degree": null,
"icon": "//yun.duiba.com.cn/db-m/app/turntable/circle/images/prize/谢谢参与_6311f27.png",
"icon2": null,
"id": "thanks",
"index": 4,
"name": "谢谢参与",
"prizeId": "thanks",
"prizeType": 0,
"refId": null,
"refType": null,
"sendCount": 1
} }
], ],
"playwayId": "task_1", "playwayId": "task_1",
"prizePendingCode": null, "prizePendingCode": null,
"prizePendingCodeList": null, "prizePendingCodeList": null,
"ruleId": "spPrize@sp_challenge_times@10", "ruleId": "ru_loop",
"sendPrize": null, "sendPrize": null,
"subTitle": "百度1副标题", "subTitle": "百度1副标题",
"taskStatus": 0, "taskStatus": 0,
...@@ -218,7 +220,7 @@ ...@@ -218,7 +220,7 @@
"indexes": null, "indexes": null,
"intervalLimitSize": 1, "intervalLimitSize": 1,
"intervalType": 4, "intervalType": 4,
"jumpUrl": "https://e.czbank.com/weixinHTML/creditCardApply/creditCardFullApplyETF.html?creditPreFlag=1", "jumpUrl": "https://mobapp.czbank.com/life/mobile_recharge.html",
"options": [ "options": [
{ {
"degree": null, "degree": null,
...@@ -253,19 +255,58 @@ ...@@ -253,19 +255,58 @@
"id": "cvzdcxpe", "id": "cvzdcxpe",
"index": null, "index": null,
"indexes": null, "indexes": null,
"intervalLimitSize": 1, "intervalLimitSize": 10,
"intervalType": 4, "intervalType": 4,
"jumpUrl": "https://mobapp.czbank.com/setUp/loginManage.html", "jumpUrl": "https://mobapp.czbank.com/life/mobile_recharge.html",
"options": [ "options": [
{ {
"degree": null, "degree": null,
"icon": null, "icon": null,
"icon2": null, "icon2": null,
"id": "sp_challenge_times", "id": "of05a780e",
"index": null, "index": 1,
"name": "挑战次数", "name": "88积分测试数据",
"prizeId": "sp_challenge_times", "prizeId": "third_ZHXYKHQ240802",
"prizeType": null, "prizeType": 1,
"refId": null,
"refType": null,
"sendCount": 1
},
{
"degree": null,
"icon": null,
"icon2": null,
"id": "obc9d8d93",
"index": 2,
"name": "立减金测试",
"prizeId": "third_ZHXYKHQ240801",
"prizeType": 1,
"refId": null,
"refType": null,
"sendCount": 10
},
{
"degree": null,
"icon": "//yun.dui88.com/images/202211/vo9167fvxo.png",
"icon2": null,
"id": "o02dcd829",
"index": 3,
"name": "非首次-漫漫测试实物-星速台",
"prizeId": "sss_3",
"prizeType": 2,
"refId": "42731",
"refType": "object",
"sendCount": 1
},
{
"degree": null,
"icon": "//yun.duiba.com.cn/db-m/app/turntable/circle/images/prize/谢谢参与_6311f27.png",
"icon2": null,
"id": "thanks",
"index": 4,
"name": "谢谢参与",
"prizeId": "thanks",
"prizeType": 0,
"refId": null, "refId": null,
"refType": null, "refType": null,
"sendCount": 1 "sendCount": 1
...@@ -274,7 +315,7 @@ ...@@ -274,7 +315,7 @@
"playwayId": "task_1", "playwayId": "task_1",
"prizePendingCode": null, "prizePendingCode": null,
"prizePendingCodeList": null, "prizePendingCodeList": null,
"ruleId": "spPrize@sp_challenge_times@1", "ruleId": "ru_loop",
"sendPrize": null, "sendPrize": null,
"subTitle": "/", "subTitle": "/",
"taskStatus": 0, "taskStatus": 0,
...@@ -321,7 +362,7 @@ ...@@ -321,7 +362,7 @@
"buttonText": null, "buttonText": null,
"code": "bank_2201", "code": "bank_2201",
"completedSize": 0, "completedSize": 0,
"desc": "{\"taskType\":1}", "desc": "{\"taskType\":1,\"progressAmount\":\"1\"}",
"extra": null, "extra": null,
"icon": null, "icon": null,
"id": "oywi1c5s", "id": "oywi1c5s",
...@@ -338,13 +379,55 @@ ...@@ -338,13 +379,55 @@
"sendPrize": null, "sendPrize": null,
"subTitle": "/", "subTitle": "/",
"taskStatus": 0, "taskStatus": 0,
"title": "资产提升10000元任务" "title": "【圈圈】资产提升10000元任务"
},
{
"buttonText": null,
"code": "bank_2202",
"completedSize": 1,
"desc": "{\"taskType\":2,\"progressAmount\":\"1001\"}",
"extra": null,
"icon": null,
"id": "oumzgwqz",
"index": null,
"indexes": null,
"intervalLimitSize": 10,
"intervalType": 4,
"jumpUrl": "/",
"options": [
{
"degree": null,
"icon": null,
"icon2": null,
"id": "sp_challenge_times",
"index": null,
"name": "挑战次数",
"prizeId": "sp_challenge_times",
"prizeType": null,
"refId": null,
"refType": null,
"sendCount": 3
}
],
"playwayId": "task_1",
"prizePendingCode": "",
"prizePendingCodeList": [
{
"code": null,
"index": 1
}
],
"ruleId": "spPrize@sp_challenge_times@3",
"sendPrize": true,
"subTitle": "/",
"taskStatus": 0,
"title": "资产每提升1000元得次数*1"
} }
], ],
"startTimestamp": 1718190131000, "startTimestamp": 1718190131000,
"timestamp": 1719490008971 "timestamp": 1720597476609
}, },
"message": null, "message": null,
"success": true, "success": true,
"timeStamp": 1719490009176 "timeStamp": 1720597476795
} }
\ No newline at end of file
{"proSetting":{"projectxIDs":{"devId":[],"testId":[{"label":"test","value":"pa7410987"}],"prodId":[{"label":"prodTest","value":"pc9c1ee11"}]},"skinVariables":[],"mockSetting":{"projectId":"","pageId":""}},"envSetting":{},"psdSetting":{"psdFSSetting":true,"psdCenterSetting":true}} {"proSetting":{"projectxIDs":{"devId":[],"testId":[{"label":"test","value":"pa7410987"}],"prodId":[{"label":"prodTest","value":"pc9c1ee11"},{"label":"prod","value":"p7bdf2f84"}]},"skinVariables":[],"mockSetting":{"projectId":"","pageId":""}},"envSetting":{},"psdSetting":{"psdFSSetting":true,"psdCenterSetting":true}}
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