window.__require=function e(t,o,n){function a(c,r){if(!o[c]){if(!t[c]){var s=c.split("/");if(s=s[s.length-1],!t[s]){var l="function"==typeof __require&&__require;if(!r&&l)return l(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+c+"'")}}var h=o[c]={exports:{}};t[c][0].call(h.exports,function(e){return a(t[c][1][e]||e)},h,h.exports,e,t,o,n)}return o[c].exports}for(var i="function"==typeof __require&&__require,c=0;c<n.length;c++)a(n[c]);return a}({rank:[function(e,t,o){"use strict";cc._RF.push(t,"dc2c1dEKyNBJ79z1JWGLjJR","rank");var n=[],a=!1,i=[];cc.Class({extends:cc.Component,properties:{scrollview:{default:null,type:cc.ScrollView},scrollbg:{default:null,type:cc.Node},layer:{default:null,type:cc.Layout}},loadPic:function(e,t){var o=t.avatarUrl,n=wx.createImage();n.src=o,n.onload=function(){var t=new cc.Texture2D;t.initWithElement(n),t.handleLoadedTexture(),e.spriteFrame=new cc.SpriteFrame(t),console.log("load!!!!!!!!!!")}},initItem:function(e,t,o){e.active=!0,e.getChildByName("rank").getComponent(cc.Label).string=o;e.getChildByName("icon").getComponent(cc.Sprite);var n=e.getChildByName("name");n.x=-92,n.getComponent(cc.Label).string=t.nickname,e.getChildByName("score").getComponent(cc.Label).string=t.KVDataList[0].value},loadItems:function(){var e=this.scrollbg.children,t=[];t[0]={key:"highscore",value:"109"},i[0]={openid:"o4u4u5V9P1Xbd4pZoDKYse2GFNOM",nickname:"\u4e5a",avatarUrl:"https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLlK8ljt\u2026hquCOaFmiboIPWe3MXEUSrfQEIQg0ynKhD5BeXgVpKFhw/132",KVDataList:t};var o=i,n=o.length,a=0,c=0;console.log("ggggggggggggggggggg"),console.log(o);for(var r=0;r<e.length;r++){var s=e[r],l=-a-40;a+=s.getContentSize().height,s.y=l,r<10&&n>0?(c=a,this.initItem(s,o[0],r+1)):s.active=!1}this.scrollbg.height<c&&(this.scrollbg.height=c)},TouchEvent:function(e,t){e.type==cc.Node.EventType.TOUCH_END&&"sharerank"==t&&(this.layer.node.active=!0,this.layer.node.scale=1)},start:function(){this.onListen(),console.log("rank start>>>>>>>>>>>>>>>>>>>>");var e=this.layer.node.getChildByName("listbg"),t=(cc.winSize,cc.winSize.width/640);e.scale=t,this.loadItems()},update:function(e){a&&(console.log("hhhhhhhhhhhhhhhhhhhhhhhhh"),this.loadItems(),a=!1)},getFriendCloudStorage:function(){console.log("22222222"),cc.sys.platform==cc.sys.WECHAT_GAME&&(console.log("444444444"),wx.getFriendCloudStorage({keyList:["highscore","token"],success:function(e){console.log(e);for(var t=e.data,o=t.length,n=0;n<o;n++)i[n]=t[n];a=!0},fail:function(e){console.log(e)}}))},getGroupCloudStorage:function(e){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getGroupCloudStorage({shareTicket:e,keyList:["highscore","token"],success:function(e){console.log(e);for(var t=e.data,o=t.length,i=0;i<o;i++)n[i]=t[i];a=!0},fail:function(e){console.log(e)}})},getUserCloudStorage:function(){var e=this;cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getUserCloudStorage({keyList:["highscore","token"],success:function(t){console.log(t);for(var o=t.data,a=0;a<i.length;a++)if(o.token==i[a].value){e.getFriendCloudStorage();break}for(a=0;a<n.length;a++)if(o.token==n[a].value){e.getGroupCloudStorage();break}},fail:function(e){console.log(e)}})},onListen:function(){var e=this;cc.sys.platform==cc.sys.WECHAT_GAME&&wx.onMessage(function(t){console.log(t);var o=t.data;console.log(o);var n=o.flag;if("getFriendsData"==n)e.getFriendCloudStorage();else if("getGroupData"==n){var a=o.ticket;e.getGroupCloudStorage(a)}else"getUserData"==n&&e.getUserCloudStorage()})}}),cc._RF.pop()},{}],test:[function(e,t,o){"use strict";cc._RF.push(t,"6993ac3Kq9CpKiE/5pFBgk8","test");cc.Class({extends:cc.Component,properties:{ranklayout:{default:null,type:cc.Layout},open:!1},TouchEvent:function(e,t){e.type==cc.Node.EventType.TOUCH_END&&("rank"==t?this.onclick():"back"==t&&(this.open=!1,this.ranklayout.node.active=!1))},onclick:function(){this.ranklayout.node.active=!0,this.open=!0,this.tex=new cc.Texture2D;var e=cc.winSize,t=this.ranklayout.node;t.setContentSize(e),t.on(cc.Node.EventType.TOUCH_END,function(e){});var o=wx.getOpenDataContext().canvas;o.width=e.width,o.height=e.height},_updateSubDomainCanvas:function(){if(void 0!=this.tex&&null!=this.tex){var e=wx.getOpenDataContext().canvas;this.tex.initWithElement(e),this.tex.handleLoadedTexture(),this.ranklayout.node.getComponent(cc.Sprite).spriteFrame=new cc.SpriteFrame(this.tex)}},setBackPosition:function(){var e=cc.winSize,t=this.ranklayout.node.getChildByName("backbtn");t.x=-e.width/2+50,t.y=e.height/2-50},start:function(){this.ranklayout.node.active=!1},update:function(e){this.open&&this._updateSubDomainCanvas()}}),cc._RF.pop()},{}]},{},["rank","test"]);