| | |
| | | userInfo: {}, |
| | | canlisten: true, |
| | | appinfo: {}, |
| | | ifwt: 0 |
| | | ifwt: 0, |
| | | |
| | | }, |
| | | onShow: function() { |
| | | var that = this; |
| | |
| | | content: '检测到网络权限可能设置为关闭,您可以在“设置”中检查无线数据及蜂窝移动网络' |
| | | }) |
| | | }else{ |
| | | let appInfo = utils.getCacheSync('appInfo') |
| | | that.getAppInfo(); |
| | | /* let appInfo = utils.getCacheSync('appInfo') |
| | | if(appInfo == "" || appInfo == undefined){ |
| | | console.log("获取方法") |
| | | that.getAppInfo(); |
| | | } |
| | | } */ |
| | | } |
| | | } |
| | | }) |
| | |
| | | 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.appinfo = e.data.basic |
| | | utils.setCache('appInfo', e.data.basic) |
| | |
| | | }).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> |
| | |
| | | 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({ |
| | |
| | | platform: '', |
| | | showtar: false, |
| | | bbcList:'', |
| | | |
| | | sct: 0, |
| | | inviteCodeShow:false, |
| | | inviterShow:false |
| | |
| | | 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.getInit,'appinfo') |
| | | this.centerInfo() |
| | | this.getbanner() |
| | | } |
| | | |
| | | }, |
| | | onShow() { |
| | | if(this.hasLogin){ |
| | | this.getmoneyInfo() |
| | | this.getuserInfo() |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | getInit() |
| | | { |
| | | // #ifdef APP-PLUS |
| | | 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), |