This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from longguikeji/dev/plpl
Dev/plpl
- Loading branch information
Showing
13 changed files
with
94 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { APINode } from "arkfbp/lib/apiNode" | ||
import { getOriginUrl, setOriginUrl } from '@/utils/cookies' | ||
|
||
export class GetOriginUrl extends APINode { | ||
async run() { | ||
const originUrl = getOriginUrl() | ||
if (!originUrl) { | ||
this.url = '/api/v1/get_frontendurl/' | ||
this.method = 'GET' | ||
const outputs = await super.run() | ||
const url = outputs.url as string | ||
setOriginUrl(url) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { FunctionNode } from 'arkfbp/lib/functionNode' | ||
import { getUrlParamByName } from '@/utils/url' | ||
import { setToken } from '@/utils/auth' | ||
|
||
export class InterceptToken extends FunctionNode { | ||
async run() { | ||
if (window.location.pathname === '/' && window.location.search.includes('token')) { | ||
const token = getUrlParamByName('token') as string | ||
setToken(token) | ||
const url = window.location.origin + '/' + process.env.VUE_APP_BASE_API | ||
window.location.replace(url) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { APINode } from "arkfbp/lib/apiNode" | ||
import { TenantModule } from '@/store/modules/tenant' | ||
import { getSlug } from '@/utils/url' | ||
|
||
export class Slug extends APINode { | ||
async run() { | ||
// 通过 slug 查找 | ||
const slug = getSlug() | ||
if (slug) { | ||
this.url = '/api/v1/tenant/' + slug + '/slug/' | ||
this.method = 'GET' | ||
const outputs = await super.run() | ||
if (outputs.uuid) { | ||
TenantModule.setHasSlug(true) | ||
TenantModule.changeCurrentTenant(outputs) | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters