| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- //app.js
- App({
- onLaunch: function (options) {
- this.getSystemInfo();
- if (options && options.scene) {
- this.globalData.userSource = options.scene;
- console.log("options.scene:" + options.scene);
- }
- if (options && options.shareTicket) {
- this.globalData.shareTicket = options.shareTicket;
- }
- },
- getSystemInfo: function () {
- this.globalData.systemInfo = wx.getSystemInfoSync();
- if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
- this.globalData.IsIOS =false;
- this.globalData.IsAndroid=true;
- }
- else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
- this.globalData.IsIOS = true;
- this.globalData.IsAndroid=false;
- }
- if (this.globalData.systemInfo.model.indexOf("iPad")>=0){
- this.globalData.IsIPad=true;
- }
- },
- globalData: {
- Version: "1.2.0",
- IsProduction: false,
- ShareTitle: "刻意学习,高效成长",
- SharePath: "pages/index/index",
- ShareImage: '../images/program_screenshot_main.png',
- ProgramID: 166,
- ProgramName:"秒过学习",
- serverUrl: "https://www.kylx365.com/apiData/",
- serverUrlServer: "https://www.kylx365.com/apiData/",
- serverUrlLocalhost: "http://localhost:3020/apiData/",
- audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=3&pit=5",
- audioUrlYoudao: "https://dict.youdao.com/dictvoice?rate=5&le=auto&audio=",
- pinyinUrl: "https://pinyin.kylx365.com/sounds/[pinyin].m4a",
- uploadImageUrl:"https://miaguo-1253256735.file.myqcloud.com/",
- BaiduToken: "",//百度开发平台token
- IsIOS:true,
- IsAndroid:false,
- IsIPad:false,
- systemInfo: null,
- userInfo: null,
- SourceID: 0,//来源ID
- shareTicket: null,
- userSource: null,//用户来源方式
- Key: "kylx365_chengjie",
- IV: "kylx365hongliren",
- IsEnter: true,//是否是刚进来
- LessonID:0,//听课ID
- CardWaitTimeMax:3,//每张卡最长等待时间(分钟)
- IsRecorderAccredit:0,
- CardList:[],//卡列表变量
- TaskToday:[],//今天任务列表
- SearchResultList: [],//搜索获得要选择的字词或古诗词列表
- TempMiaoguoCardID: 0,//临时题卡ID,用于资料选取时用
- SearchNull: 0,//资料搜索为空时标记,用于资料搜索时用
- SearchItem: {},//资料搜索项信息,用于资料搜索时用
- TempFieldNumber:0,//资料搜索时的段落编号
- TempSearcchBackNumber:3,//资料搜索时返回的页面数
- MemoryLevel:0,//记忆水平
- ColorIndex:0,//色彩方案
- ClickType:0,//点击方案
- SecondConfigArray:[0,0,0],//选择记忆水平建议
- }
- })
|