| | |
| | | }); */ |
| | | APPUpdate(); |
| | | // #endif |
| | | this.getAppInfo() |
| | | this.getAppInfo(); |
| | | //this.that.bcInit(); |
| | | let userInfo = uni.getStorageSync('userInfo') |
| | | if (userInfo.id) { |
| | | this.login(userInfo) |
| | |
| | | appinfo: {}, |
| | | ifwt: 0, |
| | | hasinit:false, |
| | | hasbcinit:false, |
| | | |
| | | }, |
| | | onShow: function() { |
| | |
| | | { |
| | | that.getAppInfo(); |
| | | } |
| | | |
| | | if(!that.globalData.hasbcinit) |
| | | { |
| | | that.bcInit(); |
| | | } |
| | | /* let appInfo = utils.getCacheSync('appInfo') |
| | | if(appInfo == "" || appInfo == undefined){ |
| | | console.log("获取方法") |
| | |
| | | onHide: function() {}, |
| | | methods: { |
| | | ...mapMutations(['login']), |
| | | bcInit:function() |
| | | { |
| | | var that = this; |
| | | console.log(uni.getSystemInfoSync().platform); |
| | | 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就是初始化成功 |
| | | if(result.code==0) |
| | | { |
| | | that.globalData.hasbcinit=true; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | getAppInfo: function() { |
| | | var that = this; |
| | | this.$u.api.comminInt({}).then(e => { |
| | |
| | | }).catch(function(err) {}) |
| | | |
| | | }, |
| | | |
| | | watch:function(method,istr){ |
| | | var obj=this.globalData |
| | | console.log(obj) |