4 files modified
1 files added
| New file |
| | |
| | | <template> |
| | | <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> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | /* |
| | | *name onChange |
| | | *回应外面 |
| | | * |
| | | * */ |
| | | export default { |
| | | data() { |
| | | return { |
| | | settingDialog: false, |
| | | language: "", |
| | | // 多语言配置 |
| | | actions: [ |
| | | { |
| | | text: "English", |
| | | icon: require("@/assets/ico/english.png"), |
| | | lang: "en", |
| | | }, |
| | | { |
| | | text: "繁体中文", |
| | | icon: require("@/assets/ico/tw.png"), |
| | | lang: "zh-TW", |
| | | }, |
| | | { text: "हिंदी", icon: require("@/assets/ico/india.png"), lang: "hi" }, |
| | | { text: "한국인", icon: require("@/assets/ico/india.png"), lang: "ko" }, |
| | | { |
| | | text: "ภาษาไทย", |
| | | icon: require("@/assets/ico/india.png"), |
| | | lang: "th", |
| | | }, |
| | | { |
| | | text: "日本語にほんご", |
| | | icon: require("@/assets/ico/india.png"), |
| | | lang: "ja", |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$emit( |
| | | "onChange", |
| | | this.getText(window.localStorage.getItem("language") || "zh-CN") |
| | | ); |
| | | }, |
| | | methods: { |
| | | getText(val) { |
| | | let arr = this.actions.filter((item) => item.lang === val); |
| | | return arr[0].text; |
| | | }, |
| | | qkclick(e) { |
| | | this.settingDialog = false; |
| | | window.localStorage.setItem("language", e.lang); |
| | | this.$i18n.locale = e.lang; |
| | | this.$emit("onChange", e.text); |
| | | }, |
| | | popClose() { |
| | | this.settingDialog = false; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .lang_box_txta { |
| | | width: 100%; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | border-bottom: 1px solid #ecf5ff; |
| | | } |
| | | .lang_box_txt { |
| | | width: 100%; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | border-bottom: 1px solid #ecf5ff; |
| | | color: #2196f3; |
| | | } |
| | | .lang_box { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | } |
| | | .btn_s_box { |
| | | border: none; |
| | | background: #409eff; |
| | | color: #fff; |
| | | height: 70px; |
| | | width: 100%; |
| | | line-height: 70px; |
| | | font-size: 16px; |
| | | text-align: center; |
| | | border-radius: 15px; |
| | | font-weight: 600; |
| | | margin: 40px 20px 0 20px; |
| | | } |
| | | </style> |
| | |
| | | <div class="name">{{ $t("hj245") }}</div> |
| | | </div> |
| | | </li> |
| | | <li @click="settingDialog = true"> |
| | | <li @click="$refs.language.settingDialog = true"> |
| | | <div class="links"> |
| | | <div class="icon"> |
| | | <img |
| | |
| | | </li> |
| | | </ul> |
| | | <!-- 多语言弹框 --> |
| | | <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" /> |
| | | </div> |
| | | <div class="fg"></div> |
| | | <div class="new-stock"> |
| | |
| | | import xiazai from "@/assets/img/xiazai.png"; |
| | | import GoToLogin from "@/page/home/components/GoLogin.vue"; |
| | | import { MessageBox } from "mint-ui"; |
| | | import Language from "@/components/Language/index.vue"; |
| | | export default { |
| | | components: { |
| | | HomeList, |
| | | AllList, |
| | | GoToLogin, |
| | | Echart, |
| | | Language, |
| | | }, |
| | | // onlineService |
| | | props: {}, |
| | |
| | | type: 2, |
| | | }, |
| | | ], |
| | | settingDialog: false, |
| | | // 多语言配置 |
| | | actions: [ |
| | | { |
| | | text: "English", |
| | | icon: require("@/assets/ico/english.png"), |
| | | lang: "en", |
| | | }, |
| | | { text: "繁体中文", icon: require("@/assets/ico/tw.png"), lang: "zh-TW" }, |
| | | { text: "हिंदी", icon: require("@/assets/ico/india.png"), lang: "hi" }, |
| | | { text: "한국인", icon: require("@/assets/ico/india.png"), lang: "ko" }, |
| | | { |
| | | text: "ภาษาไทย", |
| | | icon: require("@/assets/ico/india.png"), |
| | | lang: "th", |
| | | }, |
| | | { |
| | | text: "日本語にほんご", |
| | | icon: require("@/assets/ico/india.png"), |
| | | lang: "ja", |
| | | }, |
| | | ], |
| | | |
| | | // 公告 icon 地址 |
| | | Announcement, |
| | | close: true, |
| | |
| | | aRouter() { |
| | | window.open(this.onlineService); |
| | | }, |
| | | qkclick(e) { |
| | | this.settingDialog = false; |
| | | window.localStorage.setItem("language", e.lang); |
| | | this.$i18n.locale = e.lang; |
| | | this.language = e.text; |
| | | }, |
| | | popClose() { |
| | | this.settingDialog = false; |
| | | }, |
| | | |
| | | getdialog() { |
| | | MessageBox.confirm(this.$t("hj252"), this.$t("hj165"), { |
| | | confirmButtonText: this.$t("hj161"), |
| | |
| | | }) |
| | | .then(async () => {}) |
| | | .catch(() => {}); |
| | | // MessageBox.confirm('老号被盗请勿转账,请认准新tg:@BEINL2', this.$t('hj165'), { |
| | | // confirmButtonText: this.$t('hj161'), |
| | | // cancelButtonText: this.$t('hj106'), |
| | | // }).then(async () => { |
| | | |
| | | // }).catch(() => { |
| | | |
| | | // }); |
| | | }, |
| | | onSelect(e) { |
| | | this.$i18n.locale = e.lang; |
| | |
| | | font-weight: 500; |
| | | line-height: 0.64rem; |
| | | } |
| | | } |
| | | .lang_box_txta { |
| | | width: 100%; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | border-bottom: 1px solid #ecf5ff; |
| | | } |
| | | .lang_box_txt { |
| | | width: 100%; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | border-bottom: 1px solid #ecf5ff; |
| | | color: #2196f3; |
| | | } |
| | | .lang_box { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | } |
| | | .btn_s_box { |
| | | border: none; |
| | | background: #409eff; |
| | | color: #fff; |
| | | height: 70px; |
| | | width: 100%; |
| | | line-height: 70px; |
| | | font-size: 16px; |
| | | text-align: center; |
| | | border-radius: 15px; |
| | | font-weight: 600; |
| | | margin: 40px 20px 0 20px; |
| | | } |
| | | // /deep/ .van-popup { |
| | | // overflow-y: auto; |
| | |
| | | <van-col span="8"> |
| | | <div> |
| | | {{ $t("hj313") }} |
| | | </div></van-col |
| | | > |
| | | <van-col span="10" |
| | | ><div style="text-align: right"> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="10"> |
| | | <div style="text-align: right"> |
| | | {{ $t("hj314") }} |
| | | </div></van-col |
| | | > |
| | | </div> |
| | | </van-col> |
| | | <van-col span="6"> |
| | | <div style="text-align: right"> |
| | | {{ $t("hj315") }} |
| | | </div></van-col |
| | | > |
| | | </div> |
| | | </van-col> |
| | | </van-row> |
| | | </div> |
| | | |
| | |
| | | return { |
| | | tabsList: [ |
| | | { title: this.$t("hj61"), key: "" }, |
| | | { title: this.$t("hj61"), key: "" }, |
| | | // { title: this.$t("hj61"), key: "" }, |
| | | // { title: this.$t("数字货币"), key: "1", name: "SZHB" }, |
| | | { title: this.$t("马股"), key: "MAS", name: "MAS" }, |
| | | { title: this.$t("美股"), key: "US", name: "US" }, |
| | |
| | | <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"> |
| | |
| | | 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", |
| | |
| | | userInfo: [], |
| | | onlineService: "", |
| | | language: "", |
| | | actions: [ |
| | | { |
| | | text: "English", |
| | | icon: require("@/assets/ico/english.png"), |
| | | lang: "en", |
| | | }, |
| | | { |
| | | text: "繁体中文", |
| | | icon: require("@/assets/ico/tw.png"), |
| | | lang: "zh-TW", |
| | | }, |
| | | { text: "हिंदी", icon: require("@/assets/ico/india.png"), lang: "hi" }, |
| | | { text: "한국인", icon: require("@/assets/ico/india.png"), lang: "ko" }, |
| | | { |
| | | text: "ภาษาไทย", |
| | | icon: require("@/assets/ico/india.png"), |
| | | lang: "th", |
| | | }, |
| | | { |
| | | text: "日本語にほんご", |
| | | icon: require("@/assets/ico/india.png"), |
| | | lang: "ja", |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | 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"); |