| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- /**
- * 签到界面
- * @author 薛鸿潇
- */
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class Sign extends cc.Component {
- @property({ type: cc.ScrollView, displayName: '滚动视图' })
- private scroll_view: cc.ScrollView = null!;
- onLoad() {
- }
- start() {
- g.sign.initListData();
- // 数据刷新测试
- // this.scheduleOnce(() => {
- // g.sign.c_sign[0].login_day = 666
- // g.sign.initListData();
- // }, 5)
- }
- /**
- * 初始化滚动视图
- */
- private initScollView() {
- let list_data = g.sign.list_data;
- this.scroll_view.node.emit('srollview-init', list_data)
- cc.log(list_data)
- }
- /**
- * 点击领取按钮
- */
- private clickReceiveReward() {
- }
- update(dt) {
- if (g.sign.init_data) {
- g.sign.init_data = false;
- this.initScollView();
- }
- }
- }
|