zzzz
2024-04-10 66d132b96fd30abf1d75bed49ff176a52b4101ee
src/page/newUser/setting.vue
@@ -37,18 +37,6 @@
      </div>
    </div>
    <!--       <div class="jy" @click="handleGoToTransfer()">
         <div class="left_gn">
            <div class="l_icon">
            </div>
            <div class="r_title">
               <span>{{ $t('hj145') }}</span>
            </div>
         </div>
         <div class="right_gos">
            <img src="../../assets/img/youjiantou.png" alt />
         </div>
      </div> -->
    <div class="jy" @click="handleGoToAuthentication()">
      <div class="left_gn">
        <div class="l_icon">
@@ -65,32 +53,7 @@
        <img v-else src="../../assets/img/youjiantou.png" alt />
      </div>
    </div>
    <!--
      <div class="jy" @click="subclick()">
         <div class="left_gn">
            <div class="l_icon">
            </div>
            <div class="r_title">
               <span>{{ $t('subdk') }}</span>
            </div>
         </div>
         <div class="right_gos">
            <img src="../../assets/img/youjiantou.png" alt />
         </div>
      </div>
      <div class="jy" @click="yebclick()">
         <div class="left_gn">
            <div class="l_icon">
            </div>
            <div class="r_title">
               <span>{{ $t('yeb') }}</span>
            </div>
         </div>
         <div class="right_gos">
            <img src="../../assets/img/youjiantou.png" alt />
         </div>
      </div> -->
    <div class="jy" @click="clicklang()">
      <div class="left_gn">
        <div class="l_icon"></div>
@@ -164,6 +127,8 @@
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";
export default {
  name: "newUser",
@@ -185,8 +150,16 @@
          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: "en",
        },
        {
          text: "한국인",
          icon: require("@/assets/ico/india.png"),
          lang: "hy",
        },
        {
          text: "ภาษาไทย",
          icon: require("@/assets/ico/india.png"),
@@ -198,22 +171,24 @@
          lang: "ry",
        },
        { text: "繁体中文", icon: require("@/assets/ico/tw.png"), lang: "tw" },
        {
          text: "繁体中文",
          icon: require("@/assets/ico/tw.png"),
          lang: "tw",
        },
      ],
    };
  },
  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"]),
    popClose() {
      this.settingDialog = false;
    },
@@ -273,17 +248,9 @@
      }
    },
    goWall() {
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
        return;
      }
      this.$router.push("/wallet");
    },
    gotoa(e) {
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
        return;
      }
      if (e == 0) {
        this.$router.push("/wallet");
      } else if (e == 1) {
@@ -301,10 +268,6 @@
    handleZh() {
      this.selectUserFlag = !this.selectUserFlag;
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
        return;
      }
      if (navigator.vibrate) {
        // 支持
        navigator.vibrate([55]);
@@ -345,10 +308,6 @@
        .catch(() => {});
    },
    goToSettings() {
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
        return;
      }
      // 每次打开dialog 清空密码数据
      this.pswDialog = !this.pswDialog;
      if (this.pswDialog) {
@@ -358,31 +317,15 @@
      }
    },
    handleGoToTransfer() {
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
        return;
      }
      this.$router.push("/transfers");
    },
    handleGoToAuthentication() {
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
        return;
      }
      this.$router.push("/authentications");
    },
    handleGoToAuthenticationaz() {
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
        return;
      }
      this.$router.push("/download");
    },
    handleGoToBankCard() {
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
        return;
      }
      this.$router.push("/bankCard");
    },
    async toRegister() {
@@ -392,6 +335,7 @@
      let data = await api.logout();
      if (data.status === 0) {
        // Toast(data.msg)
        this.undataToken(null);
        this.$router.push("/login");
      } else {
        Toast(data.msg);
@@ -420,8 +364,14 @@
          let data = await api.changePassword(opts);
          if (data.status === 0) {
            this.changeLoginPsdBox = false;
            Toast(data.msg);
            this.pswDialog = false;
            this.settingDialog = false;
            Notify({
              type: "success",
              message: this.$t("密码修改成功"),
            });
            this.toRegister();
          } else {
            Toast(data.msg);
            this.settingDialog = false;
@@ -444,6 +394,7 @@
.right_gos_txt {
  margin-right: 15px;
}
.setting_content {
  width: 100%;
  height: 5rem;
@@ -501,6 +452,7 @@
    }
  }
}
.lang_box_txta {
  width: 100%;
  height: 100px;
@@ -508,6 +460,7 @@
  line-height: 100px;
  border-bottom: 1px solid #ecf5ff;
}
.lang_box_txt {
  width: 100%;
  height: 100px;
@@ -516,6 +469,7 @@
  border-bottom: 1px solid #ecf5ff;
  color: #2196f3;
}
.lang_box {
  width: 100%;
  display: flex;
@@ -523,6 +477,7 @@
  align-items: center;
  flex-direction: column;
}
.btn_s_box {
  border: none;
  background: #409eff;
@@ -536,12 +491,14 @@
  font-weight: 600;
  margin: 40px 20px 0 20px;
}
.btn_s {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.jy {
  width: 100%;
  height: 1.5rem;
@@ -600,6 +557,7 @@
    }
  }
}
body {
  background-color: #f8f8f8;
}
@@ -665,6 +623,7 @@
    height: 2rem;
    display: flex;
    background-color: #fff;
    > div {
      width: 10%;
      height: 100%;
@@ -694,4 +653,4 @@
    }
  }
}
</style>
</style>