12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- //app.js
- import Audio from 'utils/audio.js'
- App({
- onLaunch: function (options) {
- var info = wx.getSystemInfoSync()
- this.globalData.userAgent = 'Program_CD#' + info.system + '~' + info.version + '~' + info.SDKVersion + '#105'
- this.globalData.sys = info
- this.globalData.isIOS = info.system.indexOf("iOS") == 0
- this.clearAudioStorage()
- },
- onHide: function () {
-
- },
- clearAudioStorage () {
- var audio = new Audio()
- audio.clearStorage()
- audio = null
- },
- onHomeStart(f) {
- this.log(f.o() == null ? 'end' : 'start')
- },
- onHomeReady(f) {
- this.log(f.o() == null ? 'end' : 'start')
- },
- onError: function () {
- },
- log: function (info) {
- if (this.globalData.debug) {
- console.log(info)
- }
- },
- server: {},
- globalData: {
- debug: false,
- isIOS: true,
- userAgent: '',
- code: '',
- isFirstLoad: true,
- nextDayTime: 0,
- timeDifference: 0,
- sys: {},
- identify: {//点击别人分享保存的标示
- recomCode: null,
- shareIdentify: null,
- },
- user: {
- cell: 0,
- playGameC: 0,
- withdrawalbleFee: 0
- },
- userInfo: {},
- rankInfo: {},
- rankOneInfo: {},
- }
- })
|