mirror of
https://github.com/eyebluecn/tank-front
synced 2024-04-21 12:31:55 +00:00
remove js-cookie.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
"@ant-design/icons": "4.2.1",
|
||||
"pretty-format": "25.5.0",
|
||||
"@types/echarts": "^4.6.1",
|
||||
"@types/js-cookie": "^2.2.6",
|
||||
"@types/photoswipe": "^4.1.0",
|
||||
"antd": "4.4.3",
|
||||
"axios": "^0.19.2",
|
||||
@@ -18,7 +17,6 @@
|
||||
"echarts-for-react": "^2.0.16",
|
||||
"fs-extra": "^8.1.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"js-cookie": "^2.2.1",
|
||||
"photoswipe": "^4.1.3",
|
||||
"qs": "^6.9.4",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* 全局性的国际化
|
||||
*/
|
||||
import BrowserUtil from "../../util/BrowserUtil";
|
||||
import Cookies from "js-cookie";
|
||||
import LangEn from "./i18n/LangEn";
|
||||
import LangZh from "./i18n/LangZh";
|
||||
|
||||
@@ -22,7 +21,7 @@ export default class Lang {
|
||||
|
||||
//读取默认的语言
|
||||
let lang = BrowserUtil.browserLang()
|
||||
let localLang = Cookies.get("_lang");
|
||||
let localLang = localStorage.getItem("_lang");
|
||||
if (localLang === "zh" || localLang === "en") {
|
||||
lang = localLang
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* 这个类不包含Base的子类,比如User, Preference.
|
||||
* 和Moon形成姊妹篇
|
||||
*/
|
||||
import BrowserUtil from "../../util/BrowserUtil";
|
||||
import Cookies from "js-cookie"
|
||||
|
||||
export default class Sun {
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import "./BottomLayout.less";
|
||||
import TankComponent from "../../common/component/TankComponent";
|
||||
import Moon from "../../common/model/global/Moon";
|
||||
import DefaultLogoPng from "../../assets/image/logo.png";
|
||||
import Cookies from "js-cookie";
|
||||
import Sun from "../../common/model/global/Sun";
|
||||
import Lang from "../../common/model/global/Lang";
|
||||
|
||||
@@ -23,8 +22,7 @@ export default class BottomLayout extends TankComponent<IProps, IState> {
|
||||
} else {
|
||||
Lang.getSingleton().lang = "zh";
|
||||
}
|
||||
Cookies.set("_lang", Lang.getSingleton().lang);
|
||||
|
||||
localStorage.setItem("_lang", Lang.getSingleton().lang);
|
||||
Sun.updateFrame();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user