From 1d7b09da53a6ec55b108d0bb23b3af1ec85897a3 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期日, 04 六月 2023 14:03:45 +0800 Subject: [PATCH] no message --- uniapp/components/empowerModel.vue | 2 +- uniapp/App.vue | 25 ++++++++++++++++++++++--- uniapp/pages/mine/mine.vue | 20 ++++++++++---------- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/uniapp/App.vue b/uniapp/App.vue index a2558af..5853e98 100644 --- a/uniapp/App.vue +++ b/uniapp/App.vue @@ -135,7 +135,8 @@ userInfo: {}, canlisten: true, appinfo: {}, - ifwt: 0 + ifwt: 0, + }, onShow: function() { var that = this; @@ -147,10 +148,12 @@ content: '妫�娴嬪埌缃戠粶鏉冮檺鍙兘璁剧疆涓哄叧闂紝鎮ㄥ彲浠ュ湪鈥滆缃�濅腑妫�鏌ユ棤绾挎暟鎹強铚傜獫绉诲姩缃戠粶' }) }else{ - let appInfo = utils.getCacheSync('appInfo') + that.getAppInfo(); + /* let appInfo = utils.getCacheSync('appInfo') if(appInfo == "" || appInfo == undefined){ + console.log("鑾峰彇鏂规硶") that.getAppInfo(); - } + } */ } } }) @@ -172,6 +175,7 @@ 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) @@ -206,6 +210,21 @@ }).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> diff --git a/uniapp/components/empowerModel.vue b/uniapp/components/empowerModel.vue index f104ba0..56a2be3 100644 --- a/uniapp/components/empowerModel.vue +++ b/uniapp/components/empowerModel.vue @@ -47,7 +47,7 @@ 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({ diff --git a/uniapp/pages/mine/mine.vue b/uniapp/pages/mine/mine.vue index 61fa61f..9648712 100644 --- a/uniapp/pages/mine/mine.vue +++ b/uniapp/pages/mine/mine.vue @@ -262,7 +262,6 @@ platform: '', showtar: false, bbcList:'', - sct: 0, inviteCodeShow:false, inviterShow:false @@ -286,24 +285,27 @@ 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 => { @@ -416,8 +418,6 @@ } }, - - cpr_version(a, b) { console.log(a); var _a = this.toNum(a), -- Gitblit v1.9.3