Commit 19b9b3a1 authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 72753af8
......@@ -36,7 +36,7 @@ export class TaskItem extends ScrollListItem {
onItemRender(data, index) {
super.onItemRender(data, index);
console.log(`task item: `, index, data);
// console.log(`task item: `, index, data);
if (!data) return;
......
import {
_decorator,
Node,
Button,
Button, v3, tween, easing,
screen, Widget,
} from "cc";
import Panel from "db://assets/Module/Panel";
import { ScrollList, SCROLL_VERTICAL } from "../../ScrollList/ScrollList";
......@@ -26,8 +27,15 @@ export class TaskPanel extends Panel {
@property(Node)
closeBtn: Node = null;
onShow() {
this.node.setPosition(v3(0, -812, 0));
tween(this.node)
.to(0.188, {position: v3(0, 0, 0)}, {easing: easing.quadInOut})
.start();
}
async start() {
this.closeBtn.on(Button.EventType.CLICK, this.closePannel, this);
this.closeBtn.on(Button.EventType.CLICK, this.closePanel, this);
store.updateTask();
......@@ -62,7 +70,7 @@ export class TaskPanel extends Panel {
}
/** 关闭弹窗 */
closePannel() {
closePanel() {
this.hidePanel();
unwatchPageVisibility(this.pageVChange)
}
......
......@@ -36,9 +36,19 @@ export class PrizeScene extends Scene {
return;
}
this.vScroll.setDataList(data, SCROLL_VERTICAL, [0, 0, 16]);
const list = [];
data.forEach((item) => {
if (
["sp_challenge_times", "sp_rich_man"].indexOf(item.prizeId) > -1
) {
return;
}
list.push(item);
});
this.vScroll.setDataList(list, SCROLL_VERTICAL, [0, 0, 16]);
this.vScroll.scrollToTop(0);
this.empty.active = (data.length <= 0);
this.empty.active = (list.length <= 0);
}
/** 返回首页 */
......
......@@ -56,16 +56,6 @@ export class RecordScene extends Scene {
async getGameRecordInfo() {
const res = await sendWebNet(WebNetName.gameRecord);
if (res?.success) {
const list = [];
res?.data.forEach((item) => {
if (
item.prizeId == "sp_challenge_times"
|| item.prizeId == "sp_rich_man"
) {
return;
}
list.push(item);
});
this.recordRender(res?.data || []);
}
}
......
......@@ -505,7 +505,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 166,
"y": 30,
"z": 0
},
"_lrot": {
......@@ -1032,14 +1032,14 @@
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 10,
"_alignFlags": 18,
"_target": null,
"_left": 66.99999999999989,
"_right": 324.99999999999994,
"_top": 774,
"_bottom": 774,
"_horizontalCenter": 0,
"_verticalCenter": 166,
"_verticalCenter": 30,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
......
This diff is collapsed.
......@@ -977,7 +977,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 287.64007568359375,
"width": 347.84002685546875,
"height": 50.4
},
"_anchorPoint": {
......@@ -1007,7 +1007,7 @@
"b": 255,
"a": 255
},
"_string": "每周一0点后结算奖励",
"_string": "活动结束次日0点结算奖励",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 30.1,
......
......@@ -22,23 +22,26 @@
"__id__": 2
},
{
"__id__": 8
"__id__": 10
},
{
"__id__": 16
"__id__": 18
}
],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 42
},
{
"__id__": 42
"__id__": 44
},
{
"__id__": 46
}
],
"_prefab": {
"__id__": 44
"__id__": 48
},
"_lpos": {
"__type__": "cc.Vec3",
......@@ -85,10 +88,13 @@
},
{
"__id__": 5
},
{
"__id__": 7
}
],
"_prefab": {
"__id__": 7
"__id__": 9
},
"_lpos": {
"__type__": "cc.Vec3",
......@@ -196,13 +202,51 @@
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_target": {
"__id__": 2
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "52eaFiLZRODbZefXYvaWBd"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 750,
"_originalHeight": 1624,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "40ezf315RDp4r5P1eCTcRZ"
},
{
"__type__": "cc.PrefabInfo",
"root": {
......@@ -227,18 +271,18 @@
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
},
{
"__id__": 13
},
{
"__id__": 15
}
],
"_prefab": {
"__id__": 15
"__id__": 17
},
"_lpos": {
"__type__": "cc.Vec3",
......@@ -275,11 +319,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 10
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
......@@ -303,11 +347,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 12
"__id__": 14
},
"_customMaterial": null,
"_srcBlendFactor": 2,
......@@ -348,11 +392,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 14
"__id__": 16
},
"_alignFlags": 4,
"_target": null,
......@@ -401,14 +445,11 @@
},
"_children": [
{
"__id__": 17
"__id__": 19
}
],
"_active": true,
"_components": [
{
"__id__": 31
},
{
"__id__": 33
},
......@@ -417,15 +458,18 @@
},
{
"__id__": 37
},
{
"__id__": 39
}
],
"_prefab": {
"__id__": 39
"__id__": 41
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -151,
"y": -147,
"z": 0
},
"_lrot": {
......@@ -457,18 +501,15 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 16
"__id__": 18
},
"_children": [
{
"__id__": 18
"__id__": 20
}
],
"_active": true,
"_components": [
{
"__id__": 22
},
{
"__id__": 24
},
......@@ -477,10 +518,13 @@
},
{
"__id__": 28
},
{
"__id__": 30
}
],
"_prefab": {
"__id__": 30
"__id__": 32
},
"_lpos": {
"__type__": "cc.Vec3",
......@@ -517,17 +561,17 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 17
"__id__": 19
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
"__id__": 21
}
],
"_prefab": {
"__id__": 21
"__id__": 23
},
"_lpos": {
"__type__": "cc.Vec3",
......@@ -564,11 +608,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 18
"__id__": 20
},
"_enabled": true,
"__prefab": {
"__id__": 20
"__id__": 22
},
"_contentSize": {
"__type__": "cc.Size",
......@@ -605,16 +649,16 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 17
"__id__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 23
"__id__": 25
},
"_contentSize": {
"__type__": "cc.Size",
"width": 750,
"height": 661
"height": 665
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -633,11 +677,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 17
"__id__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 25
"__id__": 27
},
"_type": 0,
"_inverted": false,
......@@ -655,11 +699,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 17
"__id__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 27
"__id__": 29
},
"_customMaterial": null,
"_srcBlendFactor": 2,
......@@ -701,11 +745,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 17
"__id__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 29
"__id__": 31
},
"_alignFlags": 45,
"_target": null,
......@@ -750,16 +794,16 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 16
"__id__": 18
},
"_enabled": true,
"__prefab": {
"__id__": 32
"__id__": 34
},
"_contentSize": {
"__type__": "cc.Size",
"width": 750,
"height": 661
"height": 665
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -778,11 +822,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 16
"__id__": 18
},
"_enabled": true,
"__prefab": {
"__id__": 34
"__id__": 36
},
"_customMaterial": null,
"_srcBlendFactor": 2,
......@@ -820,11 +864,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 16
"__id__": 18
},
"_enabled": true,
"__prefab": {
"__id__": 36
"__id__": 38
},
"bounceDuration": 1,
"brake": 0.5,
......@@ -835,7 +879,7 @@
"cancelInnerEvents": true,
"scrollEvents": [],
"_content": {
"__id__": 18
"__id__": 20
},
"_horizontalScrollBar": null,
"_verticalScrollBar": null,
......@@ -855,13 +899,13 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 16
"__id__": 18
},
"_enabled": true,
"__prefab": {
"__id__": 38
"__id__": 40
},
"_alignFlags": 5,
"_alignFlags": 4,
"_target": null,
"_left": 0,
"_right": 0,
......@@ -908,7 +952,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 41
"__id__": 43
},
"_contentSize": {
"__type__": "cc.Size",
......@@ -936,10 +980,10 @@
},
"_enabled": true,
"__prefab": {
"__id__": 43
"__id__": 45
},
"vScroll": {
"__id__": 35
"__id__": 37
},
"closeBtn": {
"__id__": 2
......@@ -950,6 +994,42 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "2dfIDgPu9BR4luUR858AeP"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 47
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 750,
"_originalHeight": 1624,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "dbeIAAEghIWrQ4iQ42cbOb"
},
{
"__type__": "cc.PrefabInfo",
"root": {
......
......@@ -39,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/aurora/assets/2403d1edf2acd15b179306b6ddaa5f0967d78a8f.js"></script>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/style.css"/>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215045905/style.css"/>
<style>
.sui-captcha {
......@@ -94,17 +94,17 @@
</div>
<!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/src/polyfills.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215045905/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/src/system.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215045905/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215045905/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/index.js').catch(function (err) {
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215045905/index.js').catch(function (err) {
console.error(err);
})
</script>
......
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