| | |
| | | uni.getSystemInfo({ |
| | | success: e => { |
| | | // #ifdef APP-PLUS |
| | | console.log(e) |
| | | if (e.platform == 'android') { |
| | | this.globalData.platform = 'android' |
| | | this.globalData.systemLevel = e.system |
| | |
| | | content: '检测到网络权限可能设置为关闭,您可以在“设置”中检查无线数据及蜂窝移动网络' |
| | | }) |
| | | }else{ |
| | | console.log("是否请求过:"+that.globalData.hasinit) |
| | | if(!that.globalData.hasinit) |
| | | { |
| | | that.getAppInfo(); |
| | |
| | | var route = routes[routes.length - 1].route |
| | | } |
| | | // #ifdef APP-PLUS |
| | | console.log(this.globalData.canlisten) |
| | | if (this.globalData.canlisten && route != 'pages/mine/tools/turnChain') { |
| | | getClipboard() |
| | | } |
| | |
| | | if (uni.getSystemInfoSync().platform == 'ios') |
| | | { |
| | | const plug = uni.requireNativePlugin('xiguazhu-baichuan'); |
| | | console.log(plug) |
| | | plug.init({}, result => { |
| | | //console.log('1111111111111111111'); |
| | | console.log(result); // code等于0就是初始化成功 |
| | |
| | | getAppInfo: function() { |
| | | var that = this; |
| | | this.$u.api.comminInt({}).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | that.globalData.hasinit=true; |
| | | that.globalData.appinfo = e.data.basic |
| | |
| | | that.globalData.ifwt = 0 |
| | | } |
| | | } |
| | | console.log(that.globalData.ifwt); |
| | | } else { |
| | | if (plus.runtime.isApplicationExist({pname:'com.tencent.mm', |
| | | action: 'weixin://' |
| | |
| | | } |
| | | } |
| | | // #endif |
| | | |
| | | }).catch(function(err) {}) |
| | | |
| | | }, |