From 9ddad348a549154e7b328f9d7dd9517d2abd330c Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Tue, 30 Sep 2025 09:47:25 +0800
Subject: [PATCH] 1
---
src/page/newUser/setting.vue | 182 ++++++++++++++++++++-------------------------
1 files changed, 82 insertions(+), 100 deletions(-)
diff --git a/src/page/newUser/setting.vue b/src/page/newUser/setting.vue
index 2d773cf..d5180a9 100644
--- a/src/page/newUser/setting.vue
+++ b/src/page/newUser/setting.vue
@@ -1,19 +1,38 @@
<template>
<div class="content">
- <div class="top_back">
+ <van-nav-bar :placeholder="true" :safe-area-inset-top="true" :title="$t('setting')" left-arrow
+ @click-left="$router.go(-1)">
+ </van-nav-bar>
+ <!-- <div class="top_back">
<div class="left_back_icon" @click="$router.go(-1)">
<img src="../../assets/img/zuojiantou.png" alt />
</div>
<div class="titles">
<span>{{ $t("setting") }}</span>
</div>
- </div>
+ </div> -->
<div style="width: 100%; height: 10px; background-color: #f8f8f8"></div>
+ <div class="jy" @click="handleGoToAuthentication()">
+ <div class="left_gn">
+ <div class="l_icon">
+ <van-icon name="manager" size=".8rem" />
+ </div>
+ <div class="r_title">
+ <span>{{ $t('rnv') }}</span>
+ </div>
+ </div>
+ <div class="right_gos">
+ <div class="right_gos_txt" v-if="userInfo.realName">
+ {{ $t("ysmrz") }}
+ </div>
+ <img v-else src="../../assets/img/youjiantou.png" alt />
+ </div>
+ </div>
<div class="jy" @click="handleGoToBankCard()">
<div class="left_gn">
<div class="l_icon">
- <!-- <img src="../../assets/img/yeb.png" alt /> -->
+ <van-icon name="card" size=".8rem" />
</div>
<div class="r_title">
<span>{{ $t("hj147") }}</span>
@@ -26,7 +45,7 @@
<div class="jy" @click="goToSettings()">
<div class="left_gn">
<div class="l_icon">
- <!-- <img src="../../assets/img/yeb.png" alt /> -->
+ <van-icon name="lock" size=".8rem" />
</div>
<div class="r_title">
<span>{{ $t("hj144") }}</span>
@@ -36,27 +55,24 @@
<img src="../../assets/img/youjiantou.png" alt />
</div>
</div>
-
- <div class="jy" @click="handleGoToAuthentication()">
+ <!-- <div class="jy" @click="handleGoToBankCard1()">
<div class="left_gn">
<div class="l_icon">
- <!-- <img src="../../assets/img/yeb.png" alt /> -->
+ <van-icon name="friends" size=".8rem" />
</div>
<div class="r_title">
- <span>{{ $t("hj146") }}</span>
+ <span>{{ $t("关于我们") }}</span>
</div>
</div>
<div class="right_gos">
- <div class="right_gos_txt" v-if="userInfo.realName">
- {{ $t("ysmrz") }}
- </div>
- <img v-else src="../../assets/img/youjiantou.png" alt />
+ <img src="../../assets/img/youjiantou.png" alt />
</div>
- </div>
-
+ </div> -->
<div class="jy" @click="clicklang()">
<div class="left_gn">
- <div class="l_icon"></div>
+ <div class="l_icon">
+ <img src="../../assets/img/语言切换.png" alt />
+ </div>
<div class="r_title">
<span>{{ $t("yy") }}</span>
</div>
@@ -65,25 +81,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 +128,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",
@@ -143,63 +143,20 @@
cirNewPassword: "", // 确认新密码
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",
- },
- ],
+ language: ""
};
},
- 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 +237,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,14 +256,14 @@
},
handleOutLoginClick() {
// 退出登录
- MessageBox.confirm(this.$t("hj149") + "?", this.$t("hj165"), {
- confirmButtonText: this.$t("hj161"),
- cancelButtonText: this.$t("hj106"),
+ MessageBox.confirm(this.$t("hj149"), this.$t(""), {
+ confirmButtonText: this.$t("qr"),
+ cancelButtonText: this.$t("hj106")
})
.then(() => {
this.toRegister();
})
- .catch(() => {});
+ .catch(() => { });
},
goToSettings() {
// 每次打开dialog 清空密码数据
@@ -326,7 +284,11 @@
this.$router.push("/download");
},
handleGoToBankCard() {
- this.$router.push("/bankCard");
+ // this.$router.push("/bankCard");
+ this.$router.push("/banklist");
+ },
+ handleGoToBankCard1() {
+ this.$router.push("/bankCard1");
},
async toRegister() {
// 注销登陆
@@ -359,7 +321,7 @@
if (this.newPassword === this.cirNewPassword) {
let opts = {
oldPwd: this.oldPassword,
- newPwd: this.newPassword,
+ newPwd: this.newPassword
};
let data = await api.changePassword(opts);
if (data.status === 0) {
@@ -369,7 +331,7 @@
this.settingDialog = false;
Notify({
type: "success",
- message: this.$t("密码修改成功"),
+ message: this.$t("密码修改成功")
});
this.toRegister();
} else {
@@ -385,12 +347,31 @@
// 支持
navigator.vibrate([55]);
}
- },
- },
+ }
+ }
};
</script>
<style scoped lang="less">
+@green: #c4d600;
+
+/deep/ .van-nav-bar__content {
+ height: 65px;
+}
+
+/deep/ .van-nav-bar__title {
+ font-family: "DINPro";
+ width: 100%;
+ height: 1.17333rem;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-style: normal;
+ font-weight: 700;
+ font-size: 0.48rem;
+ color: #14181f;
+}
+
.right_gos_txt {
margin-right: 15px;
}
@@ -439,7 +420,7 @@
width: 100%;
height: 1.3rem;
border-radius: 0.15rem;
- background: #2d6ae9;
+ background: @green;
color: #fff;
font-size: 0.4615rem;
margin-top: 0.5rem;
@@ -479,15 +460,15 @@
}
.btn_s_box {
- border: none;
- background: #409eff;
- color: #fff;
+ border: @green solid 0.01em;
+ background: #fff;
+ color: @green;
height: 70px;
width: 100%;
line-height: 70px;
font-size: 16px;
text-align: center;
- border-radius: 15px;
+ border-radius: 5px;
font-weight: 600;
margin: 40px 20px 0 20px;
}
@@ -522,10 +503,11 @@
display: flex;
justify-content: center;
align-items: center;
+ padding-left: 0.4rem;
img {
- width: 0.5041rem;
- height: 0.5041rem;
+ width: .8rem;
+ height: .8rem;
}
}
@@ -536,7 +518,7 @@
align-items: center;
font-size: 0.4046rem;
color: #404040;
- padding-left: 0.4rem;
+ padding-left: 0.2rem;
span {
font-weight: 600;
@@ -624,7 +606,7 @@
display: flex;
background-color: #fff;
- > div {
+ >div {
width: 10%;
height: 100%;
display: flex;
--
Gitblit v1.9.3