import operateAuthDefault from "@config/operate-auth"; const app = getApp(); export default Behavior({ data: { operateAuthLoaded: false, operateAuth: { ...operateAuthDefault }, }, lifetimes: {}, methods: { // 初始化获取权限 async iniGetOperateAuth(agencyId: string, gridId: string) { await app.doAfterLogin(); if (!agencyId) { agencyId = this.data.agencyId; } if (!gridId) { gridId = this.data.gridId; } const operateAuth = await app.getOperateAuth(agencyId, gridId); console.log(operateAuth); this.setData({ operateAuthLoaded: true, operateAuth, }); }, }, });