const LoginApi = require('./LoginApi'); // const ShareAction = require('../utils/ShareAction'); // const AlertManager = require('../utils/AlertManager'); // const SkillApi = require("../net/SkillApi"); class QQPlayer { static qqLogin(cb) { if (typeof GameStatusInfo != undefined && GameStatusInfo != undefined) { let openId = GameStatusInfo.openId; //获取当前用户的唯一标识 let accessToken = GameStatusInfo.accessToken; console.log('gamestatusInfo' + GameStatusInfo); BK.QQ.fetchOpenKey(function (errCode, cmd, data) { if (errCode == 0) { let openKey = data.openKey; console.log('qq openKey' + openKey); console.log('qq openId' + openId); let gender = data.sex; // 1 男 2 女 if (gender == 2) { gender = 0; } if (gender == undefined) { gender = -1; } LoginApi.qqLogin(openId, openKey, gender, cb); } else { console.log('login fail'); } }); } else { // LoginApi.qqLogin('oadDi5C3mWabn5c5cUjWEa1HAecwqq', 'oadDi5C3mWabn5c5cUjWEa1HAecwqq', 1); console.log('GameStatusInfo is undefined'); } // //Test // PLATFORM.authQQ(0, 0, 0); } static shareObjcts = [ {'title': '猜猜他是谁?', 'icon': 'share_3.png'}, {'title': '猜猜他是谁?', 'icon': 'share_4.png'}, {'title': '看到这位明星了吗,签下这份合同,她就是你的人了~', 'icon': 'share_5.png'}, {'title': '就、就算你是大明星,签约了你也是我的人!', 'icon': 'share_6.png'}, {'title': '老板跟着小姨子跑路啦!本公司签约女团低价转让!', 'icon': 'share_7.png'}, {'title': '你,还有你,我钦定你们两个。。。组CP!', 'icon': 'share_8.png'}, {'title': '猜猜他是谁?', 'icon': 'share_9.png'}, {'title': '猜猜他是谁?', 'icon': 'share_10.png'}, {'title': '猜猜她是谁?', 'icon': 'share_11.png'} ] } module.exports = QQPlayer;