app.js 3.6 KB

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