Commit 80a8d9b2 authored by 王杰's avatar 王杰

feat: 写一点签到

parent 25c8262c
...@@ -478,7 +478,7 @@ ...@@ -478,7 +478,7 @@
"y": -180, "y": -180,
"z": -12.000012657215834 "z": -12.000012657215834
}, },
"_id": "e5yCjA/fBHQqB0Ynz3XmQ/" "_id": "3fu71OSfxPJ7IxiKyTYODi"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -500,7 +500,7 @@ ...@@ -500,7 +500,7 @@
"x": 0, "x": 0,
"y": 1 "y": 1
}, },
"_id": "aep5EZeoFDNKlALem7PtqZ" "_id": "edohtEawFLU4tTs8OP2lnf"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -536,7 +536,7 @@ ...@@ -536,7 +536,7 @@
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_useGrayscale": false, "_useGrayscale": false,
"_atlas": null, "_atlas": null,
"_id": "56XdQn5DNLpru3gZCxTHuC" "_id": "12HnYSKllPbZ9GnTHbpDB4"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -584,7 +584,7 @@ ...@@ -584,7 +584,7 @@
"y": -180, "y": -180,
"z": -11.00000220913452 "z": -11.00000220913452
}, },
"_id": "95Epc+aRNJtbk++8rW293G" "_id": "33iKf63r1KeKrZHITTo9nE"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -606,7 +606,7 @@ ...@@ -606,7 +606,7 @@
"x": 0, "x": 0,
"y": 1 "y": 1
}, },
"_id": "f3nohNwk9CYrezNbl/59VD" "_id": "08Gx9l259Hn4Ew0vcDHeGN"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -642,7 +642,7 @@ ...@@ -642,7 +642,7 @@
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_useGrayscale": false, "_useGrayscale": false,
"_atlas": null, "_atlas": null,
"_id": "90lPl+nVdDSabEAZTXBAFV" "_id": "5c2kpPSYdM17nukHt2zoSs"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -690,7 +690,7 @@ ...@@ -690,7 +690,7 @@
"y": -180, "y": -180,
"z": -64.00000614258742 "z": -64.00000614258742
}, },
"_id": "fciGIB1udHUJxd72cAVPWE" "_id": "7bw8zf+TxJ2oP2XKsSQbuZ"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -712,7 +712,7 @@ ...@@ -712,7 +712,7 @@
"x": 0, "x": 0,
"y": 1 "y": 1
}, },
"_id": "eehDHpEM5G5agLMWMA5Sre" "_id": "a8iAl9DkJHf65f4gflY9N8"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -748,7 +748,7 @@ ...@@ -748,7 +748,7 @@
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_useGrayscale": false, "_useGrayscale": false,
"_atlas": null, "_atlas": null,
"_id": "b0qGl0MRpIG5c302aFTvyK" "_id": "dfxIBu3hpE8KNGF8Od1vBK"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -796,7 +796,7 @@ ...@@ -796,7 +796,7 @@
"y": 180, "y": 180,
"z": 25.99999385741257 "z": 25.99999385741257
}, },
"_id": "feimniHO9HoYMwQId7pwTr" "_id": "9dd9iWlqlGXZ993HKNVVNZ"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -818,7 +818,7 @@ ...@@ -818,7 +818,7 @@
"x": 0, "x": 0,
"y": 1 "y": 1
}, },
"_id": "760O/SJ79HwreRPPbJXhlu" "_id": "3fJB8xsOBBl5OV7G8au6B6"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -854,7 +854,7 @@ ...@@ -854,7 +854,7 @@
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_useGrayscale": false, "_useGrayscale": false,
"_atlas": null, "_atlas": null,
"_id": "daRP4utA1MzaBacM0BhGFz" "_id": "cdche52+ZBboXFzn9zIxd/"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -5253,6 +5253,15 @@ ...@@ -5253,6 +5253,15 @@
"rankBtn": { "rankBtn": {
"__id__": 25 "__id__": 25
}, },
"blessBagBtn": {
"__id__": 123
},
"PropBtn": {
"__id__": 108
},
"signBtn": {
"__id__": 114
},
"userName": { "userName": {
"__id__": 70 "__id__": 70
}, },
......
This diff is collapsed.
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
], ],
"subMetas": {}, "subMetas": {},
"userData": { "userData": {
"syncNodeName": "signPanel" "syncNodeName": "SignPanel"
} }
} }
import Panel from "../../Module/Panel";
import { _decorator, Button, Node,} from "cc";
import store from "../store/store";
import { observer, render } from "../store/decorators";
const {ccclass, property} = _decorator;
import { HTMLRichText } from "../../Component/HTMLRichText/HTMLRichText";
@observer
@ccclass('SignPanel')
export default class SignPanel extends Panel {
static bundle = "SignPanel";
static skin = "SignPanel";
@property(Node) closeBtn: Node = null;
@property(Node) signBtn: Node = null;
onLoad() {
this.closeBtn.on(Button.EventType.CLICK, this.clickClose);
}
async start() {
// this.setRuleTxt(store.homeInfo.activityRule);
}
clickClose = () => {
this.hidePanel();
}
// @render
// render() {
// const {ruleInfo = ""} = store;
// this.setRuleTxt(ruleInfo);
// }
setRuleTxt(txt: string) {
// this.spNode.getComponent(HTMLRichText).html = txt;
// this.spNode.once(HTMLRichText.EventType.AFTER_RENDER, ()=>{
// const {width: pw, height: ph} = this.spNode.getComponent(UITransform);
// const width = this.spNode.parent.getComponent(UITransform).width;
// const height = ph * width / pw;
// this.spNode.getComponent(UITransform).setContentSize(width, height);
// });
}
}
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"471fae17-612c-411b-8e0e-8ad152176179","files":[],"subMetas":{},"userData":{}}
...@@ -15,6 +15,7 @@ import { RankScence } from "./RankScene"; ...@@ -15,6 +15,7 @@ import { RankScence } from "./RankScene";
import {BlessingBagPage} from "db://assets/Scripts/Scenes/BlessingBagPage"; import {BlessingBagPage} from "db://assets/Scripts/Scenes/BlessingBagPage";
import {PropPage} from "db://assets/Scripts/Scenes/PropPage"; import {PropPage} from "db://assets/Scripts/Scenes/PropPage";
import { AudioMgr } from "../../core_tgx/base/AudioMgr"; import { AudioMgr } from "../../core_tgx/base/AudioMgr";
import SignPanel from "../Panels/SignPanel";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
...@@ -32,6 +33,7 @@ export class HomeScene extends Scene { ...@@ -32,6 +33,7 @@ export class HomeScene extends Scene {
@property(Node) rankBtn: Node = null; @property(Node) rankBtn: Node = null;
@property(Node) blessBagBtn: Node = null; @property(Node) blessBagBtn: Node = null;
@property(Node) PropBtn: Node = null; @property(Node) PropBtn: Node = null;
@property(Node) signBtn: Node = null;
@property(Label) userName: Label; @property(Label) userName: Label;
@property(Label) pointNum: Label; @property(Label) pointNum: Label;
...@@ -44,6 +46,7 @@ export class HomeScene extends Scene { ...@@ -44,6 +46,7 @@ export class HomeScene extends Scene {
this.rankBtn.on(Button.EventType.CLICK, this.clickRank, this); this.rankBtn.on(Button.EventType.CLICK, this.clickRank, this);
this.blessBagBtn.on(Button.EventType.CLICK, this.clickBag, this); this.blessBagBtn.on(Button.EventType.CLICK, this.clickBag, this);
this.PropBtn.on(Button.EventType.CLICK, this.clickProp, this); this.PropBtn.on(Button.EventType.CLICK, this.clickProp, this);
this.signBtn.on(Button.EventType.CLICK, this.clickSign, this);
} }
async start() { async start() {
...@@ -88,6 +91,9 @@ export class HomeScene extends Scene { ...@@ -88,6 +91,9 @@ export class HomeScene extends Scene {
await changeScene(BlessingBagPage) await changeScene(BlessingBagPage)
}) })
clickSign= _asyncThrottle(async () => {
showPanel(SignPanel);
});
clickProp = _asyncThrottle(async ()=>{ clickProp = _asyncThrottle(async ()=>{
await changeScene(PropPage) await changeScene(PropPage)
......
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