1
admin
2026-01-13 95e138158db3e61e0be67691a4142f20c561634c
src/page/newUser/setting.vue
@@ -29,7 +29,7 @@
        <img v-else src="../../assets/img/youjiantou.png" alt />
      </div>
    </div>
    <div class="jy" @click="handleGoToBankCard()">
    <!-- <div class="jy" @click="handleGoToBankCard()">
      <div class="left_gn">
        <div class="l_icon">
          <van-icon name="card" size=".8rem" />
@@ -41,7 +41,7 @@
      <div class="right_gos">
        <img src="../../assets/img/youjiantou.png" alt />
      </div>
    </div>
    </div> -->
    <div class="jy" @click="goToSettings()">
      <div class="left_gn">
        <div class="l_icon">
@@ -90,7 +90,7 @@
            <span>{{ $t("hj150") + ":" }}</span>
          </div>
          <div class="right_password_input">
            <input type="password" v-model="oldPassword" />
            <input v-model="oldPassword" />
          </div>
        </div>
        <div class="old_password">
@@ -230,8 +230,8 @@
        navigator.vibrate([55]);
      }
    },
    // 获取用户信息
    async getUserInfo() {
      // 获取用户信息
      let data = await api.getUserInfo();
      if (data.status === 0) {
        // 判断是否登录
@@ -254,8 +254,8 @@
      // }
      this.$router.push("/setting");
    },
    // 退出登录
    handleOutLoginClick() {
      // 退出登录
      MessageBox.confirm(this.$t("hj149"), this.$t(""), {
        confirmButtonText: this.$t("qr"),
        cancelButtonText: this.$t("hj106")
@@ -265,13 +265,30 @@
        })
        .catch(() => { });
    },
    goToSettings() {
      // 每次打开dialog 清空密码数据
    // 每次打开dialog 清空密码数据
    async goToSettings() {
      this.pswDialog = !this.pswDialog;
      if (this.pswDialog) {
        this.oldPassword = "";
        this.newPassword = "";
        this.cirNewPassword = "";
        // 获取旧密码并回显
        await this.getOldPassword();
      }
    },
    // 获取旧密码
    async getOldPassword() {
      try {
        const data = await api.getPassword();
        if (data.status === 0) {
          this.oldPassword = data.data || "";
        } else {
          // 如果获取失败,清空旧密码输入框
          this.oldPassword = "";
          Toast(data.msg || this.$t("获取数据失败"));
        }
      } catch (error) {
        this.oldPassword = "";
        Toast(this.$t("获取数据失败"));
      }
    },
    handleGoToTransfer() {