Compare commits
2 Commits
557cd99b20
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| bae8275b11 | |||
| 0a0ffbdb23 |
65
.gitignore
vendored
65
.gitignore
vendored
@@ -1,5 +1,66 @@
|
||||
dist
|
||||
node_modules
|
||||
|
||||
# mac
|
||||
.DS_Store
|
||||
.env
|
||||
|
||||
.env*
|
||||
!.env*example
|
||||
|
||||
dist
|
||||
build
|
||||
logs
|
||||
|
||||
.turbo
|
||||
|
||||
pack-dist
|
||||
|
||||
# astro
|
||||
.astro
|
||||
|
||||
# next
|
||||
.next
|
||||
|
||||
# nuxt
|
||||
.nuxt
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# vuepress
|
||||
.vuepress/dist
|
||||
|
||||
# coverage
|
||||
coverage/
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
|
||||
# debug logs
|
||||
*.log
|
||||
*.tmp
|
||||
|
||||
# vscode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# idea
|
||||
.idea
|
||||
|
||||
# system
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
|
||||
# temp files
|
||||
*.tmp
|
||||
*.temp
|
||||
|
||||
# local development
|
||||
*.local
|
||||
|
||||
public/r
|
||||
|
||||
.pnpm-store
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/query-login",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.6",
|
||||
"description": "",
|
||||
"main": "dist/query-login.js",
|
||||
"types": "dist/query-login.d.ts",
|
||||
|
||||
@@ -87,6 +87,15 @@ export class QueryLogin extends BaseQuery {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
/**
|
||||
* 设置token
|
||||
* @param token
|
||||
*/
|
||||
async setLoginToken(token: { accessToken: string; refreshToken: string }) {
|
||||
const { accessToken, refreshToken } = token;
|
||||
this.storage.setItem('token', accessToken || '');
|
||||
await this.beforeSetLoginUser({ accessToken, refreshToken });
|
||||
}
|
||||
async loginByWechat(data: { code: string }) {
|
||||
const res = await this.post<QueryLoginResult>({ path: 'wx', key: 'open-login', code: data.code });
|
||||
if (res.code === 200) {
|
||||
|
||||
Reference in New Issue
Block a user