mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
feat: 用户登录使用mock api, 可以使用test用户登录 (#233)
* feat: 用户登录使用mock api, 可以使用test用户登录 * Update permission.ts
This commit is contained in:
@@ -33,12 +33,12 @@ export const useUserStore = defineStore({
|
||||
},
|
||||
// 登入
|
||||
async loginByUsername(data) {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
getLogin(data)
|
||||
.then(data => {
|
||||
if (data) {
|
||||
setToken(data);
|
||||
resolve();
|
||||
.then(res => {
|
||||
if (res) {
|
||||
setToken(res);
|
||||
resolve(res);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user