app.js 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //app.js
  2. App({
  3. onLaunch: function (options) {
  4. this.getSystemInfo();
  5. if (options && options.scene) {
  6. this.globalData.userSource = options.scene;
  7. console.log("options.scene:" + options.scene);
  8. }
  9. if (options && options.shareTicket) {
  10. this.globalData.shareTicket = options.shareTicket;
  11. }
  12. },
  13. getSystemInfo: function () {
  14. this.globalData.systemInfo = wx.getSystemInfoSync();
  15. if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
  16. this.globalData.IsIOS =false;
  17. this.globalData.IsAndroid=true;
  18. }
  19. else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
  20. this.globalData.IsIOS = true;
  21. this.globalData.IsAndroid=false;
  22. if (this.globalData.systemInfo.model.indexOf("X") >= 0
  23. || this.globalData.systemInfo.model.indexOf("11") >= 0
  24. || this.globalData.systemInfo.model.indexOf("12") >= 0
  25. || this.globalData.systemInfo.model.indexOf("13") >= 0)
  26. this.globalData.IsIPhoneX=true;
  27. }
  28. if (this.globalData.systemInfo.model.indexOf("iPad")>=0){
  29. this.globalData.IsIPad=true;
  30. }
  31. },
  32. globalData: {
  33. Version: "1.4.13",
  34. IsProduction: false,
  35. ShareTitle: "高效学习从秒过开始",
  36. SharePath: "pages/index/index",
  37. ShareImage: '../images/program_screenshot_main.png',
  38. ProgramID: 166,
  39. ProgramName: "秒过学习",
  40. AppID: "wx84b3feac6069eec3",
  41. serverUrl: "https://www.kylx365.com/apiData/",
  42. serverUrlServer: "https://www.kylx365.com/apiData/",
  43. serverUrlLocalhost: "http://localhost:3020/apiData/",
  44. audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=3&pit=5",
  45. audioUrlYoudao: "https://dict.youdao.com/dictvoice?rate=5&le=auto&audio=",
  46. pinyinUrl: "https://pinyin.kylx365.com/sounds/[pinyin].m4a",
  47. uploadImageUrl:"https://miaguo-1253256735.file.myqcloud.com/",
  48. BaiduToken: "",//百度开发平台token
  49. IsIOS: true,
  50. IsAndroid:false,
  51. IsIPad: false,
  52. IsIPhoneX: false,
  53. systemInfo: null,
  54. userInfo: null,
  55. SourceID: 0,//来源ID
  56. shareTicket: null,
  57. userSource: null,//用户来源方式
  58. Key: "kylx365_chengjie",
  59. IV: "kylx365hongliren",
  60. IsEnter: true,//是否是刚进来
  61. LessonID:0,//听课ID
  62. CardWaitTimeMax:3,//每张卡最长等待时间(分钟)
  63. IsRecorderAccredit:0,
  64. CardList:[],//卡列表变量
  65. TaskToday:[],//今天任务列表
  66. SearchResultList: [],//搜索获得要选择的字词或古诗词列表
  67. TempMiaoguoCardID: 0,//临时题卡ID,用于资料选取时用
  68. SearchNull: 0,//资料搜索为空时标记,用于资料搜索时用
  69. SearchItem: {},//资料搜索项信息,用于资料搜索时用
  70. TempFieldNumber:0,//资料搜索时的段落编号
  71. TempSearcchBackNumber:3,//资料搜索时返回的页面数
  72. MemoryLevel:0,//记忆水平
  73. ColorIndex:0,//色彩方案
  74. ClickType:0,//点击方案
  75. SecondConfigArray:[0,0,0],//选择记忆水平建议
  76. GotoUrl:"",//首页跳转页面
  77. SymbolArray: "∬_+-×÷=<>≤≥*/·≈≠±“”()[]{}《》「」%‰°℃⁰¹²³⁴⁵⁶⁷⁸⁹ⁱʲᵏˡᵐⁿ⁺⁻⁼⁽⁾₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑᵢₒᵤ﹫⓪①②③④⑤⑥⑦⑧⑨⑩ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ½⅓⅔¼¾⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞∵∴|‖∠⊥○☐△▽▷◁☆♤♧♡♢●■▲▼▶︎◀︎★⊙√ㄨ←↑→↓⇄⇅↖↗↘↙āáǎàōóǒòēéěèīíǐìūúǔùǖǘǚǜüê$¥〒¢£ΓΔΘΞΠΣΥΦΨΩαβγδεζηθικλμνξπρστυφψω∈∪∩⊆⊂⊇⊃∞",
  78. SymbolMain: [{ "Name": "( )", "CSS": "btn2" }, { "Name": "_", "CSS": "btn2" }, { "Name": "+", "CSS": "btn2" }, { "Name": "-", "CSS": "btn2" }, { "Name": "×", "CSS": "btn2" }, { "Name": "÷", "CSS": "btn2" }, { "Name": "=", "CSS": "btn2" }],
  79. SelectUserData: [2, 1152] //选择查看的用户
  80. }
  81. })