app.js 2.0 KB

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