Commit fa1e1158 authored by 范雪寒's avatar 范雪寒

feat: 上报作业完成情况

parent d7c7cb26
...@@ -183,6 +183,7 @@ cc.Class({ ...@@ -183,6 +183,7 @@ cc.Class({
initData() { initData() {
// 所有全局变量 默认都是null // 所有全局变量 默认都是null
this._cantouch = true; this._cantouch = true;
this.onHomeworkFinish();
}, },
initView() { initView() {
...@@ -427,6 +428,18 @@ cc.Class({ ...@@ -427,6 +428,18 @@ cc.Class({
picNode.getComponent('picNode').initWithData(data) picNode.getComponent('picNode').initWithData(data)
}, },
onHomeworkFinish() {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
if (middleLayerComponent.role == 'student') {
middleLayerComponent.onHomeworkFinish(() => { });
}
} else {
console.log('onHomeworkFinish');
}
},
// ------------------------------------------ // ------------------------------------------
update() { update() {
if (this.data) { if (this.data) {
......
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