app.js 3.9 KB

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