zzzz
2024-04-10 66d132b96fd30abf1d75bed49ff176a52b4101ee
src/page/newUser/setting.vue
@@ -65,9 +65,21 @@
        <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'">
    <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>
@@ -113,20 +125,10 @@
<script>
  import * as api from "@/axios/api";
  import {
    Toast,
    MessageBox
  } from "mint-ui";
  import {
    isNull,
    pwdReg
  } from "@/utils/utils";
  import {
    mapMutations
  } from "vuex";
  import {
    Notify
  } from "vant";
import { Toast, MessageBox } from "mint-ui";
import { isNull, pwdReg } from "@/utils/utils";
import { mapMutations } from "vuex";
import { Notify } from "vant";
  export default {
    name: "newUser",
@@ -142,7 +144,8 @@
        userInfo: [],
        onlineService: "",
        language: "",
        actions: [{
      actions: [
        {
            text: "English",
            icon: require("@/assets/ico/english.png"),
            lang: "zh-CN",
@@ -150,12 +153,12 @@
          {
            text: "हिंदी",
            icon: require("@/assets/ico/india.png"),
            lang: "en"
          lang: "en",
          },
          {
            text: "한국인",
            icon: require("@/assets/ico/india.png"),
            lang: "hy"
          lang: "hy",
          },
          {
            text: "ภาษาไทย",
@@ -171,7 +174,7 @@
          {
            text: "繁体中文",
            icon: require("@/assets/ico/tw.png"),
            lang: "tw"
          lang: "tw",
          },
        ],
      };
@@ -179,13 +182,9 @@
    components: {},
    created() {
      this.getUserInfo();
      this.language = window.localStorage.getItem("language");
      console.log(window.localStorage.getItem("language"));
      if (this.language == "zh-CN") {
        this.language = "English";
      } else {
        this.language = "हिंदी";
      }
    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"]),
@@ -370,9 +369,9 @@
              this.settingDialog = false;
              Notify({
                type: "success",
                message: this.$t("密码修改成功")
              message: this.$t("密码修改成功"),
              });
              this.toRegister()
            this.toRegister();
            } else {
              Toast(data.msg);
              this.settingDialog = false;