statistical.js 532 B

1234567891011121314151617181920212223
  1. const tools = require("./tools")
  2. module.exports = {
  3. // 用户使用次数统计
  4. countStartupTimes(){
  5. if(Editor.User && Editor.User.getUserData){
  6. Editor.User.getUserData().then((post_data)=>{
  7. if(!post_data) {
  8. return
  9. }
  10. tools.httpPost('120.77.174.207','/logincount',8081,post_data);
  11. });
  12. }else if(Editor.remote || Editor.remote.User || Editor.remote.User.getUserId){
  13. let cocos_uid = Editor.remote.User.getUserId();
  14. tools.httpPost('120.77.174.207','/logincount',8081,{cocos_uid});
  15. }
  16. },
  17. }