app.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. App({
  2. globalData: {
  3. Version: "1.2.23",
  4. IsProduction: true,
  5. //IsProduction: false,
  6. ProgramID: 106,
  7. AppID: "wx313a8f2c0741efe1",
  8. ProgramName: "秒过识字",
  9. ShareTitle:"赢在阅读起跑线",
  10. SharePath: "pages/index/index",
  11. ShareImage: "../../pages/images/program_share-a01.png",
  12. userInfo: null,
  13. fileUrl: "https://www.kylx365.com/",
  14. serverUrl: "https://www.kylx365.com/apiData/",
  15. serverUrlServer: "https://www.kylx365.com/apiData/",
  16. serverUrlLocalhost: "http://localhost:3020/apiData/",
  17. imageUrl: "https://hanzi-1253256735.file.myqcloud.com",
  18. audioUrl: "https://pinyin.kylx365.com",
  19. audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=3&pit=5",
  20. uploadImageUrl: "https://miaguo-1253256735.file.myqcloud.com/",
  21. Key: "kylx365_chengjie",
  22. IV: "kylx365hongliren",
  23. systemInfo: null,
  24. userInfo: null,
  25. SourceID: 0,//来源ID
  26. DayNumber: 0,//使用天数
  27. PayMoney: 19.8,//产品销售价
  28. BaiduToken:"",//百度开发平台token
  29. IsShow: 0,
  30. IsLocked: 0,
  31. IsIOS: true,
  32. IsAndroid: false,
  33. IsIPad: false,
  34. NewUserNumberMax:6,//邀请新用户最大值
  35. IsSaveCustom:false,//是否保存了定制
  36. goto:"",//用于服务直达的跳转
  37. IsShowMiaoguo:false,
  38. IsRefresh: false,
  39. IsShowGift:0,
  40. },
  41. onLaunch: function (options) {
  42. this.getSystemInfo();
  43. if (options && options.scene) {
  44. //console.log("scene:" + options.scene);
  45. this.globalData.userSource = options.scene;
  46. }
  47. },
  48. getSystemInfo: function () {
  49. this.globalData.systemInfo = wx.getSystemInfoSync();
  50. if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
  51. this.globalData.IsIOS = false;
  52. this.globalData.IsAndroid = true;
  53. }
  54. else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
  55. this.globalData.IsIOS = true;
  56. this.globalData.IsAndroid = false;
  57. }
  58. if (this.globalData.systemInfo.model.indexOf("iPad") >= 0) {
  59. this.globalData.IsIPad = true;
  60. }
  61. }
  62. })