Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
netdisc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rocosen
netdisc
Commits
eaa08510
Commit
eaa08510
authored
Nov 25, 2022
by
rocosen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:免登录跳转
parent
7fe1a2fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
api_address.js
src/commons/utils/api_address.js
+2
-2
head.jsx
src/renderer/components/head.jsx
+5
-1
userDetails.jsx
src/renderer/console/userDetails.jsx
+10
-1
No files found.
src/commons/utils/api_address.js
View file @
eaa08510
//const BACKEND_API_URI_PREFIX = 'https://www.cloudam.cn';
//const BACKEND_API_URI_PREFIX = 'http://47.57.4.97'
const
BACKEND_API_URI_PREFIX
=
'http://47.75.104.171'
;
const
BACKEND_API_URI_PREFIX
=
'http://47.57.4.97'
;
//
const BACKEND_API_URI_PREFIX = 'http://47.75.104.171';
export
{
BACKEND_API_URI_PREFIX
};
src/renderer/components/head.jsx
View file @
eaa08510
...
...
@@ -4,6 +4,7 @@ import { shell } from 'electron';
//js
import
public
from
'commons/public'
;
import
{
getUserInfo
}
from
'../../commons/utils/publicMethod'
;
import
{
Constants
}
from
'../../commons/utils/constants'
;
//ui
import
TextField
from
'@mui/material/TextField'
;
...
...
@@ -110,8 +111,11 @@ export default (props) => {
case
'1'
:
return
;
case
'4'
:
let
Token
=
localStorage
.
getItem
(
Constants
.
TOKEN_KEY
)
&&
JSON
.
parse
(
localStorage
.
getItem
(
Constants
.
TOKEN_KEY
));
shell
.
openExternal
(
'https://www.cloudam.cn/v2/console/cloude-dashboard'
`http://47.57.4.97/v2/console/cloude-dashboard?access_token=
${
Token
[
'access_token'
]}
&expires_in=
${
Token
[
'expires_in'
]}
&refresh_token=
${
Token
[
'refresh_token'
]}
`
);
return
;
case
'5'
:
...
...
src/renderer/console/userDetails.jsx
View file @
eaa08510
...
...
@@ -261,7 +261,16 @@ export default (props) => {
classes=
{
{
root
:
classes
.
rootButton
,
}
}
onClick=
{
()
=>
{}
}
onClick=
{
()
=>
{
let
Token
=
localStorage
.
getItem
(
Constants
.
TOKEN_KEY
)
&&
JSON
.
parse
(
localStorage
.
getItem
(
Constants
.
TOKEN_KEY
)
);
shell
.
openExternal
(
`http://47.57.4.97/v2/console/cloude-dashboard?access_token=${Token['access_token']}&expires_in=${Token['expires_in']}&refresh_token=${Token['refresh_token']}&recharge=true`
);
}
}
>
充值
</
Button
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment