| | |
| | | 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(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) |
| | |
| | | }, |
| | | created() { |
| | | this.applogo = getApp().globalData.appinfo.logo |
| | | if(!getApp().globalData.hasbcinit) |
| | | { |
| | | getApp().bcInit(); |
| | | } |
| | | /* console.log(uni.getSystemInfoSync().platform); |
| | | if (uni.getSystemInfoSync().platform == 'ios') { |
| | | plug.init({}, result => { |
| | |
| | | import pddEmpower from '../../components/pddempower.vue' |
| | | import inviteCodeModel from '../../components/inviteCode.vue' |
| | | import inviterModel from '../../components/inviterModel.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | empowerModel, |
| | |
| | | { |
| | | console.log("初始化") |
| | | getApp().getAppInfo(); |
| | | } |
| | | if(!getApp().globalData.hasbcinit) |
| | | { |
| | | getApp().bcInit(); |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | |
| | | goodsId: this.optionsInfo.goodsId, |
| | | type: 0 |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | var res = e.data.info; |
| | | var tburl = res.shortUrl |
| | | // #ifdef APP-PLUS |
| | | |
| | | if (plus.runtime.isApplicationExist({ |
| | | pname: 'com.taobao.taobao', |
| | | action: 'taobao://' |
| | |
| | | }, |
| | | onPullDownRefresh() |
| | | { |
| | | |
| | | this.getuserInfo(); |
| | | this.centerInfo(); |
| | | this.getmoneyInfo(); |
| | |
| | | url:"/pages/login/wxlogin" |
| | | }) |
| | | }else{ |
| | | getApp().watch(this.getInit,'ifwt') |
| | | //getApp().watch(this.ifwtChange,'ifwt') |
| | | this.centerInfo() |
| | | this.getbanner() |
| | | } |
| | |
| | | this.getInit(); |
| | | this.getmoneyInfo() |
| | | this.getuserInfo() |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | if(!getApp().globalData.hasinit) |
| | | { |
| | | getApp().getAppInfo(); |
| | | setTimeout(()=>{ |
| | | this.getInit(); |
| | | },2000) |
| | | } |
| | | // #ifdef APP-PLUS |
| | | this.appInfo = uni.getStorageSync('appInfo'); |
| | | this.showtar = getApp().globalData.ifwt == 1 ? false : true; |
| | | this.platform = plus.os.name |
| | | // #endif |
| | | |
| | | // #ifdef APP-PLUS |
| | | console.log(getApp().globalData.ifwt) |
| | | this.appInfo = uni.getStorageSync('appInfo'); |
| | | this.showtar = getApp().globalData.ifwt == 1 ? false : true; |
| | | this.platform = plus.os.name |
| | | // #endif |
| | | }, |
| | | getmoneyInfo() { |
| | | var that = this; |