Commit 4d759dd3 authored by 曲世俊's avatar 曲世俊

上报界面优化

parent ac16d70f
......@@ -52,6 +52,12 @@ export default class NewClass extends cc.Component {
@property(cc.ScrollView)
reportSV: cc.ScrollView = null;
@property(cc.Node)
nd_storyWord: cc.Node = null;
@property(cc.Node)
nd_storySentence: cc.Node = null;
@property(cc.Node)
nd_storyStory: cc.Node = null;
// LIFE-CYCLE CALLBACKS:
m_sentenceNodeList=[]
......@@ -86,7 +92,7 @@ export default class NewClass extends cc.Component {
this.title.string=_data.name
this.unit.string=_data.unitName
this.study_duration.string=_data.study_duration
this.last_play.string=_data.last_play && new Date(_data.last_play).toString() || ""
this.last_play.string=_data.last_play && new Date(_data.last_play).toLocaleString() || ""
this.question_right_percent1.string=_data.question_right_percent
this.question_right_percent2.string=_data.question_right_percent
this.record_times.string=_data.record_times
......@@ -108,10 +114,33 @@ export default class NewClass extends cc.Component {
// 句子
if (_data.knowledge){
this.storyItem.active=true
if (_data.knowledge.word){
this.storyWord.string=_data.knowledge.word
this.nd_storyWord.active=true
} else {
this.nd_storyWord.active=false
}
if (_data.knowledge.sentence){
this.storyScentence.string=_data.knowledge.sentence
this.nd_storySentence.active=true
} else {
this.nd_storySentence.active=false
}
if (_data.knowledge.story){
this.storyStory.string=_data.knowledge.story
this.nd_storyStory.active=true
} else {
this.nd_storyStory.active=false
}
if (!_data.knowledge.word&&
!_data.knowledge.sentence&&
!_data.knowledge.story)
{
this.storyItem.active=false
} else {
this.storyItem.active=true
}
} else {
this.storyItem.active=false
}
......
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