陶杰
2024-12-20 3f55b2b3c83f41a961529f2843b6e988500ce738
1.动态刷新菜单
已修改2个文件
20 ■■■■■ 文件已修改
pages/home/supplier-home.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/supplier-user.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/supplier-home.vue
@@ -360,10 +360,20 @@
        uni.stopPullDownRefresh()
    },
    onLoad(options) {
        const url = options.q ? decodeURIComponent(options.q) : '';
        const urlcode = options.url && decodeURIComponent(options.url) || ''
    },
    onShow() {
    async onShow() {
        if(this.selftype==='supplier'){
            // 刷新供应商菜单
            await this.$store.dispatch('getAppMenuSupplier')
        }else if(this.selftype==='partner'){
            // 刷新合伙人菜单
            await this.$store.dispatch('getAppMenuPartner')
        }
        this.getTj(true)
    },
    created() {
pages/user/supplier-user.vue
@@ -642,7 +642,13 @@
        }
    },
    // #endif
    onShow() {
    async onShow() {
        if(this.selftype==='supplier'){
            await this.$store.dispatch('getAppMenuSupplier')
        }else if(this.selftype==='partner'){
            await this.$store.dispatch('getAppMenuPartner')
        }
        this.cacheUserId = ''
        this.getTj()