From cb9eeec0baa75abb9c5e961aeb8e0c519a951f64 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Tue, 16 Jul 2024 10:18:32 +0800
Subject: [PATCH] 123

---
 src/page/newUser/setting.vue |   94 +++++++++++++----------------------------------
 1 files changed, 26 insertions(+), 68 deletions(-)

diff --git a/src/page/newUser/setting.vue b/src/page/newUser/setting.vue
index 2d773cf..456c4a1 100644
--- a/src/page/newUser/setting.vue
+++ b/src/page/newUser/setting.vue
@@ -10,6 +10,19 @@
     </div>
     <div style="width: 100%; height: 10px; background-color: #f8f8f8"></div>
 
+    <div class="jy" @click="handleGoToBankCard1()">
+      <div class="left_gn">
+        <div class="l_icon">
+          <!-- <img src="../../assets/img/yeb.png" alt /> -->
+        </div>
+        <div class="r_title">
+          <span>{{ $t("关于我们") }}</span>
+        </div>
+      </div>
+      <div class="right_gos">
+        <img src="../../assets/img/youjiantou.png" alt />
+      </div>
+    </div>
     <div class="jy" @click="handleGoToBankCard()">
       <div class="left_gn">
         <div class="l_icon">
@@ -65,25 +78,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 +125,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",
@@ -144,62 +141,19 @@
       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",
-        },
-      ],
     };
   },
-  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");
@@ -280,6 +234,7 @@
         // 判断是否登录
         this.$store.commit("dialogVisible", false);
         this.$store.state.userInfo = data.data;
+        document.title = 'Setting'
         this.userInfo = data.data;
       } else {
         this.$store.commit("dialogVisible", true);
@@ -298,8 +253,8 @@
     },
     handleOutLoginClick() {
       // 退出登录
-      MessageBox.confirm(this.$t("hj149") + "?", this.$t("hj165"), {
-        confirmButtonText: this.$t("hj161"),
+      MessageBox.confirm(this.$t("hj149"), this.$t(""), {
+        confirmButtonText: this.$t("qr"),
         cancelButtonText: this.$t("hj106"),
       })
         .then(() => {
@@ -328,6 +283,9 @@
     handleGoToBankCard() {
       this.$router.push("/bankCard");
     },
+    handleGoToBankCard1() {
+      this.$router.push("/bankCard1");
+    },
     async toRegister() {
       // 注销登陆
       window.localStorage.removeItem("USERTOKEN"); // 清空本地存储 USERTOKEN字段

--
Gitblit v1.9.3