You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
719 B
31 lines
719 B
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,
|
|
});
|
|
},
|
|
},
|
|
});
|
|
|