app.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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",
  17. IsProduction: false,
  18. ShareTitle: "可以用来记忆一切的工具",
  19. SharePath: "pages/index/index",
  20. ShareImage: '',
  21. ProgramID: 166,
  22. serverUrl: "https://www.kylx365.com/apiData/",
  23. serverUrlServer: "https://www.kylx365.com/apiData/",
  24. serverUrlLocalhost: "http://localhost:3020/apiData/",
  25. audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=3&pit=5",
  26. audioUrlYoudao: "https://dict.youdao.com/dictvoice?rate=5&le=auto&audio=",
  27. BaiduToken: "",//百度开发平台token
  28. systemInfo: null,
  29. userInfo: null,
  30. SourceID: 0,//来源ID
  31. shareTicket: null,
  32. userSource: null,//用户来源方式
  33. Key: "kylx365_chengjie",
  34. IV: "kylx365hongliren",
  35. IsEnter: true,//是否是刚进来
  36. }
  37. })