Merge branch 'hotfix/修复苹果问题'
| | |
| | | userInfo: {}, |
| | | canlisten: true, |
| | | appinfo: {}, |
| | | ifwt: 0 |
| | | ifwt: 0, |
| | | hasinit:false, |
| | | hasbcinit:false, |
| | | |
| | | }, |
| | | onShow: function() { |
| | | var that = this; |
| | |
| | | content: 'æ£æµå°ç½ç»æéå¯è½è®¾ç½®ä¸ºå
³éï¼æ¨å¯ä»¥å¨â设置â䏿£æ¥æ çº¿æ°æ®åèçªç§»å¨ç½ç»' |
| | | }) |
| | | }else{ |
| | | let appInfo = utils.getCacheSync('appInfo') |
| | | if(appInfo == "" || appInfo == undefined){ |
| | | console.log("æ¯å¦è¯·æ±è¿ï¼"+that.globalData.hasinit) |
| | | if(!that.globalData.hasinit) |
| | | { |
| | | that.getAppInfo(); |
| | | } |
| | | if(!that.globalData.hasbcinit) |
| | | { |
| | | that.bcInit(); |
| | | } |
| | | /* let appInfo = utils.getCacheSync('appInfo') |
| | | if(appInfo == "" || appInfo == undefined){ |
| | | console.log("è·åæ¹æ³") |
| | | that.getAppInfo(); |
| | | } */ |
| | | } |
| | | } |
| | | }) |
| | |
| | | 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 => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | that.globalData.hasinit=true; |
| | | that.globalData.appinfo = e.data.basic |
| | | utils.setCache('appInfo', e.data.basic) |
| | | utils.setCache('baseUrl', this.$u.http.config.baseUrl) |
| | |
| | | }).catch(function(err) {}) |
| | | |
| | | }, |
| | | |
| | | watch:function(method,istr){ |
| | | var obj=this.globalData |
| | | console.log(obj) |
| | | Object.defineProperty(obj,istr,{ |
| | | configurable:true, |
| | | enumerable:true, |
| | | set:function(value){ |
| | | this._consumerGoodsStatus=value |
| | | method(value) |
| | | }, |
| | | get:function(value){ |
| | | return this._consumerGoodsStatus |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | }, |
| | | 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 => { |
| | |
| | | console.log(getApp().globalData.appinfo); |
| | | console.log(plug); |
| | | plug.login({}, result => { |
| | | console.log(plug); |
| | | console.log(result); |
| | | var nick = result.userinfo.nick |
| | | if (result.code == 0) { |
| | | plug.taobaoOauth({ |
| | |
| | | |
| | | <script> |
| | | import util from '../utils/utils.js' |
| | | const plug = uni.requireNativePlugin('Html5app-Baichuan') |
| | | const plug = uni.requireNativePlugin('xiguazhu-baichuan') |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | import pddEmpower from '../../components/pddempower.vue' |
| | | import inviteCodeModel from '../../components/inviteCode.vue' |
| | | import inviterModel from '../../components/inviterModel.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | empowerModel, |
| | |
| | | if (this.memberId) { |
| | | this.updataUser() |
| | | } |
| | | |
| | | if(!getApp().globalData.hasinit) |
| | | { |
| | | console.log("åå§å") |
| | | getApp().getAppInfo(); |
| | | } |
| | | if(!getApp().globalData.hasbcinit) |
| | | { |
| | | getApp().bcInit(); |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.appinfo = utils.getCacheSync('appInfo') |
| | |
| | | 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://' |
| | |
| | | platform: '', |
| | | showtar: false, |
| | | bbcList:'', |
| | | |
| | | sct: 0, |
| | | inviteCodeShow:false, |
| | | inviterShow:false |
| | |
| | | this.getuserInfo(); |
| | | this.centerInfo(); |
| | | this.getmoneyInfo(); |
| | | this.getInit(); |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | onLoad() { |
| | |
| | | url:"/pages/login/wxlogin" |
| | | }) |
| | | }else{ |
| | | // #ifdef APP-PLUS |
| | | this.appInfo = uni.getStorageSync('appInfo'); |
| | | console.log(this.appInfo.iosExamine); |
| | | this.showtar = getApp().globalData.ifwt == 1 ? false : true; |
| | | this.platform = plus.os.name |
| | | // #endif |
| | | //getApp().watch(this.ifwtChange,'ifwt') |
| | | this.centerInfo() |
| | | this.getbanner() |
| | | } |
| | | |
| | | }, |
| | | onShow() { |
| | | if(this.hasLogin){ |
| | | this.getInit(); |
| | | this.getmoneyInfo() |
| | | this.getuserInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | getInit() |
| | | { |
| | | if(!getApp().globalData.hasinit) |
| | | { |
| | | getApp().getAppInfo(); |
| | | setTimeout(()=>{ |
| | | this.getInit(); |
| | | },2000) |
| | | } |
| | | |
| | | // #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; |
| | | this.$u.api.getEstimateAmount({}).then(e => { |
| | |
| | | } |
| | | |
| | | }, |
| | | |
| | | |
| | | cpr_version(a, b) { |
| | | console.log(a); |
| | | var _a = this.toNum(a), |