zhaojs
2023-06-04 1d7b09da53a6ec55b108d0bb23b3af1ec85897a3
no message
已修改3个文件
47 ■■■■ 文件已修改
uniapp/App.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/components/empowerModel.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/mine/mine.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
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({
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),