Commit eaa08510 authored by rocosen's avatar rocosen

feat:免登录跳转

parent 7fe1a2fc
//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 };
......@@ -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':
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment