From b8f6f514b675fa6a006dfafbc99303b3c5c8ba85 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Fri, 17 May 2024 10:52:12 +0800
Subject: [PATCH] 一鍵平倉增加英文多语言,IFSC改成Select recharge account
---
src/page/newUser/setting.vue | 75 ++++---------------------------------
1 files changed, 8 insertions(+), 67 deletions(-)
diff --git a/src/page/newUser/setting.vue b/src/page/newUser/setting.vue
index 2d773cf..8648d51 100644
--- a/src/page/newUser/setting.vue
+++ b/src/page/newUser/setting.vue
@@ -65,25 +65,8 @@
<div style="margin-right: 10px">{{ language }}</div>
</div>
</div>
- <van-popup
- v-model="settingDialog"
- position="bottom"
- :style="{ height: '35%' }"
- @close="popClose"
- >
- <div
- class="lang_box"
- v-for="(item, index) in actions"
- :key="index"
- @click="qkclick(item)"
- >
- <div
- :class="$i18n.locale == item.lang ? 'lang_box_txt' : 'lang_box_txta'"
- >
- {{ item.text }}
- </div>
- </div>
- </van-popup>
+ <Language ref="language" @onChange="onChange" />
+
<van-popup v-model="pswDialog" position="bottom" :style="{ height: '40%' }">
<div class="setting_content">
<div class="old_password">
@@ -129,6 +112,7 @@
import { isNull, pwdReg } from "@/utils/utils";
import { mapMutations } from "vuex";
import { Notify } from "vant";
+import Language from "@/components/Language/index.vue";
export default {
name: "newUser",
@@ -143,63 +127,20 @@
cirNewPassword: "", // 确认新密码
userInfo: [],
onlineService: "",
- language: "",
- actions: [
- {
- text: "English",
- icon: require("@/assets/ico/english.png"),
- lang: "zh-CN",
- },
- {
- text: "हिंदी",
- icon: require("@/assets/ico/india.png"),
- lang: "en",
- },
- {
- text: "한국인",
- icon: require("@/assets/ico/india.png"),
- lang: "hy",
- },
- {
- text: "ภาษาไทย",
- icon: require("@/assets/ico/india.png"),
- lang: "ty",
- },
- {
- text: "日本語にほんご",
- icon: require("@/assets/ico/india.png"),
- lang: "ry",
- },
-
- {
- text: "繁体中文",
- icon: require("@/assets/ico/tw.png"),
- lang: "tw",
- },
- ],
+ language: "English",
};
},
- components: {},
+ components: { Language },
created() {
this.getUserInfo();
- this.language = window.localStorage.getItem("language") || "zh-CN";
- let arr = this.actions.filter((item) => item.lang === this.language);
- this.language = arr[0].text;
},
methods: {
...mapMutations(["undataToken"]),
-
- popClose() {
- this.settingDialog = false;
- },
- qkclick(e) {
- this.settingDialog = false;
- window.localStorage.setItem("language", e.lang);
- this.$i18n.locale = e.lang;
- this.language = e.text;
+ onChange(e) {
+ this.language = e;
},
clicklang() {
- this.settingDialog = true;
+ this.$refs.language.settingDialog = true;
},
yebclick() {
this.$router.push("/yeb");
--
Gitblit v1.9.3