cc.Class({ extends: cc.BaseClass, properties: { m_WXLabel:cc.Label, m_QQLabel:cc.Label, }, OnShowView:function () { var layout = this.$(`BG/ScrollView/view/Layout`); for(var i=0;i 0){ this.Num++; this.$(`BG/ScrollView/view/Layout/WX/Label@Label`).string = Json[0][i]; this.m_LabText[this.Num] = this.CopyLabel(this.m_LabExample, this.m_Parent); } } var webUrl1 = window.PHP_HOME+'/Services.php?&GetMark=1'; WebCenter.GetData(webUrl1, 0, function (data) { var Data = JSON.parse(data); for(var i=0;i 0){ this.Num++; this.$(`BG/ScrollView/view/Layout/QQ/Label@Label`).string = Data[0][i]; this.m_LabText[this.Num] = this.CopyLabel(this.m_LabQQExample, this.m_QQParent); } } this.m_LabText[this.Num] = this.CopyLabel(this.m_Lab24Example, this.m_24Parent); }.bind(this)); }.bind(this)); }, CopyLabel: function(pLabel, Parent) { var pLabCopy = cc.instantiate(pLabel); Parent.addChild(pLabCopy); pLabCopy.name = `${Parent.children.length-1}`; pLabCopy.active = true; return pLabCopy; }, OnBtWXCopy:function(){ cc.gSoundRes.PlaySound('Button'); ThirdPartyCopyClipper(this.m_WXLabel.string); this.m_Hook.ShowTips('已複製到剪貼簿') }, OnBtCallBack:function(){ cc.gSoundRes.PlaySound('Button'); this.ShowPrefabDLG('CallBack'); }, OnBtComplain:function(){ cc.gSoundRes.PlaySound('Button'); this.ShowPrefabDLG('Complain'); } // update (dt) {}, });