| | |
| | | <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> |
| | |
| | | |
| | | <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", |
| | |
| | | userInfo: [], |
| | | onlineService: "", |
| | | language: "", |
| | | actions: [{ |
| | | actions: [ |
| | | { |
| | | text: "English", |
| | | icon: require("@/assets/ico/english.png"), |
| | | lang: "zh-CN", |
| | |
| | | { |
| | | text: "हिंदी", |
| | | icon: require("@/assets/ico/india.png"), |
| | | lang: "en" |
| | | lang: "en", |
| | | }, |
| | | { |
| | | text: "한국인", |
| | | icon: require("@/assets/ico/india.png"), |
| | | lang: "hy" |
| | | lang: "hy", |
| | | }, |
| | | { |
| | | text: "ภาษาไทย", |
| | |
| | | { |
| | | text: "繁体中文", |
| | | icon: require("@/assets/ico/tw.png"), |
| | | lang: "tw" |
| | | 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"]), |
| | |
| | | this.settingDialog = false; |
| | | Notify({ |
| | | type: "success", |
| | | message: this.$t("密码修改成功") |
| | | message: this.$t("密码修改成功"), |
| | | }); |
| | | this.toRegister() |
| | | this.toRegister(); |
| | | } else { |
| | | Toast(data.msg); |
| | | this.settingDialog = false; |