|
@@ -54,6 +54,7 @@
|
|
|
<script>
|
|
|
import UserInfo from "@/components/userInfo.vue";
|
|
|
import { i18n } from "@/lang";
|
|
|
+import browser from "@/utils/browser";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -114,7 +115,13 @@ export default {
|
|
|
methods: {
|
|
|
changeLanguage(lang) {
|
|
|
let arr = location.href.split("#/");
|
|
|
- location.href = `material.html?lang=${lang}#/${arr[1]}`;
|
|
|
+ const from = browser.urlQueryValue("from");
|
|
|
+ if (from) {
|
|
|
+ location.href = `material.html?lang=${lang}&from=${from}#/${arr[1]}`;
|
|
|
+ } else {
|
|
|
+ location.href = `material.html?lang=${lang}#/${arr[1]}`;
|
|
|
+ }
|
|
|
+
|
|
|
localStorage.language = lang;
|
|
|
},
|
|
|
handleItem(item) {
|