|
|
@@ -1,6 +1,23 @@
|
|
|
import { createApp } from 'vue'
|
|
|
import { createPinia } from 'pinia'
|
|
|
import App from './App.vue'
|
|
|
+import en from './views/lang/en.json'
|
|
|
+import cn from './views/lang/cn.json'
|
|
|
+import hk from './views/lang/hk.json'
|
|
|
+
|
|
|
+export let lang = cn
|
|
|
+if (window.location.href.includes('cocorobo.cn')) {
|
|
|
+ lang = cn
|
|
|
+}
|
|
|
+else if (window.location.href.includes('cocorobo.hk')) {
|
|
|
+ lang = hk
|
|
|
+}
|
|
|
+else if (window.location.href.includes('cocorobo.com')) {
|
|
|
+ lang = en
|
|
|
+}
|
|
|
+else {
|
|
|
+ lang = cn
|
|
|
+}
|
|
|
|
|
|
// TypeScript declarations for global properties
|
|
|
declare module '@vue/runtime-core' {
|
|
|
@@ -29,9 +46,9 @@ export const getCurrentVersion = () => {
|
|
|
}
|
|
|
|
|
|
// 当前版本
|
|
|
-const currentVersion = getCurrentVersion()
|
|
|
+export const currentVersion = getCurrentVersion()
|
|
|
|
|
|
-export default currentVersion
|
|
|
+export default {currentVersion, lang}
|
|
|
|
|
|
const app = createApp(App)
|
|
|
// 注册全局变量
|