refactor(api):调整模板

This commit is contained in:
zhengxinonly
2021-07-27 03:34:00 +08:00
parent b26237e24b
commit 635dcc1dac
4 changed files with 106 additions and 110 deletions
+10
View File
@@ -40,6 +40,16 @@ class Role {
'ROLE_POWER': (role_id) => `${this.ROLE_PATH}/role_power/${role_id}`
}
}
async get_roles () {
return fetch(this.ROLE_API.ROLES())
.then(function (response) {
return response.json()
})
.then(function (myJson) {
return myJson
})
}
}
class Users {