app.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //app.js
  2. App({
  3. onLaunch: function (options) {
  4. this.getSystemInfo();
  5. if (options && options.scene) {
  6. this.globalData.userSource = options.scene;
  7. }
  8. if (options && options.shareTicket) {
  9. this.globalData.shareTicket = options.shareTicket;
  10. }
  11. },
  12. getSystemInfo: function () {
  13. this.globalData.systemInfo = wx.getSystemInfoSync();
  14. },
  15. globalData: {
  16. Version: "1.0.0.9",
  17. IsProduction: false,
  18. ShareTitle: "可以用来记忆一切的工具",
  19. SharePath: "pages/index/index",
  20. ShareImage: '',
  21. ProgramID: 166,
  22. ProgramName:"秒过学习",
  23. serverUrl: "https://www.kylx365.com/apiData/",
  24. serverUrlServer: "https://www.kylx365.com/apiData/",
  25. serverUrlLocalhost: "http://localhost:3020/apiData/",
  26. audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=3&pit=5",
  27. audioUrlYoudao: "https://dict.youdao.com/dictvoice?rate=5&le=auto&audio=",
  28. pinyinUrl: "https://pinyin.kylx365.com/sounds/[pinyin].m4a",
  29. BaiduToken: "",//百度开发平台token
  30. systemInfo: null,
  31. userInfo: null,
  32. SourceID: 0,//来源ID
  33. shareTicket: null,
  34. userSource: null,//用户来源方式
  35. Key: "kylx365_chengjie",
  36. IV: "kylx365hongliren",
  37. IsEnter: true,//是否是刚进来
  38. }
  39. })