<script> //app.js var user = require('./common/user.js'); var config = require('./common/config.js'); var http = require('./common/http.js'); var storage = require('./common/storage.js'); import SystemInfoUtil from './common/SystemInfoUtil.js'; var eventBus = require('./common/event.js'); export default { data() { return {}; }, onLaunch: function(options) { if (options.query && options.query.qrCode) { this.globalData.qrCode = options.query.qrCode } var that = this; SystemInfoUtil.init(); //http.getAppConfig(); // const accountInfo = wx.getAccountInfoSync() // const pData = { // appid: accountInfo.miniProgram.appId, // terminal: 'wx_app' // } // http.getApi(config.API_INDEX_APP_CONFIG, pData, function(resp) { // if(resp.data.code === 200) { // const appConfig = resp.data.data.appConfig // storage.setAppConfig(appConfig) // wx.setNavigationBarTitle({ // title: appConfig.app_name, // }) // } // }) // 登录从本地找openid // user.getUserInfo(()=>{}) // 获取用户信息 // wx.getSetting({ // success: res => { // user.getUserInfo() // // if (res.authSetting['scope.userInfo']) { // // // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 // // wx.getUserInfo({ // // success: res => { // // // 可以将 res 发送给后台解码出 unionId // // that.globalData.userInfo = res.userInfo // // // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 // // // 所以此处加入 callback 以防止这种情况 // // if (this.userInfoReadyCallback) { // // this.userInfoReadyCallback(res) // // } // // } // // }) // // } // } // }) }, globalData: { isScan: false, preventClick: true, userInfo: null, qrCode:'', adapterStateChangeFunc: {}, connectionStateChangeFunc: {}, characteristicStateChangeFunc: {}, connectionState: {}, bus: eventBus.eventBus, orderSign: '', orderSignUrl: '', reportData: {}, reponseData: {}, bluetoothConfig: {}, deviceBTBMSBuf: {} ,// 用于分包组包 permissionArr:[], nearLockInfo:{},//蓝牙配对信息 nearLockCheck:false,//是否已经蓝牙配对成功 sensitivityType:0,//车辆灵敏度存储 } }; </script> <style> @import './app.css'; @font-face { font-family: DIN; src: url('~@/static/font/DIN-MediumItalicAlt.otf'); } </style>