12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import {
- GetQueryString
- } from 'utils/util'
- import {
- userLogin
- } from '~/api/user'
- App({
- watch(method) {
- let obj = this.globalData
-
- Object.defineProperty(obj, "openId", {
- configurable: true,
- enumerable: true,
- set: function (value) {
- console.log('zzeweqweqw', value);
- method(value)
- }
- })
- },
- async onLaunch(options) {
-
-
- this.checkIsIPhoneX()
- options.referrerInfo.extraData && (this.globalData.upgradeHide = options.referrerInfo.extraData.upgrade)
- },
- globalData: {
- isIPX: false,
- isIOS: false,
- userInfo: null,
- statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
- userGrade: '二年级',
- upgradeHide: true,
- openId: null
- },
- checkIsIPhoneX: function () {
- const self = this
- wx.getSystemInfo({
- success: function (res) {
-
- if (res.model.search('iPhone X') != -1) {
- self.globalData.isIPX = true
- }
- if (res.system.search('iOS') != -1) {
- self.globalData.isIOS = true
- }
- }
- })
- },
-
- })
|