From c85ab99aa28039a74d8011e0866919e4e6fe9a73 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Thu, 29 May 2025 10:00:37 +0800
Subject: [PATCH] style

---
 src/views/my/center.vue |  122 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 117 insertions(+), 5 deletions(-)

diff --git a/src/views/my/center.vue b/src/views/my/center.vue
index d04acf0..6eda357 100644
--- a/src/views/my/center.vue
+++ b/src/views/my/center.vue
@@ -65,7 +65,12 @@
             </i>
             <div data-v-1a056e44="" class="plane-item__content">高級認證</div>
             <div data-v-1a056e44="" class="plane-item__opt">
-              <!----><!----><!----><span data-v-1a056e44="">未認證</span>
+              <!----><!----><!----><span
+                data-v-1a056e44=""
+                @click="isFyc(users.kyc_status)"
+              >
+                {{ $t(`message.user.${statusMap[users.kyc_status]}`) }}</span
+              >
             </div>
           </div>
           <div data-v-1a056e44="" class="plane-item">
@@ -121,7 +126,7 @@
             </i>
             <div data-v-1a056e44="" class="plane-item__content">郵箱</div>
             <div data-v-1a056e44="" class="plane-item__email">
-              jennifer88425@gmail.com
+              {{ users.email }}
             </div>
           </div>
         </section>
@@ -147,7 +152,15 @@
               </svg>
             </i>
             <div data-v-1a056e44="" class="plane-item__content">登錄密碼</div>
-            <div data-v-1a056e44="" class="plane-item__opt">修改</div>
+            <div
+              data-v-1a056e44=""
+              class="plane-item__opt"
+              @click="
+                $router.push('/my/change-password/1', { query: { type: 1 } })
+              "
+            >
+              修改
+            </div>
           </div>
           <div data-v-1a056e44="" class="plane-item">
             <i
@@ -175,11 +188,25 @@
               </svg>
             </i>
             <div data-v-1a056e44="" class="plane-item__content">資金密碼</div>
-            <div data-v-1a056e44="" class="plane-item__opt">修改</div>
+            <div
+              data-v-1a056e44=""
+              class="plane-item__opt"
+              @click="
+                $router.push('/my/change-password/2', { query: { type: 2 } })
+              "
+            >
+              修改
+            </div>
           </div>
         </section>
         <section data-v-1a056e44="" class="page-bottom">
-          <button data-v-1a056e44="" class="page-bottom__btn">退出登錄</button>
+          <button
+            data-v-1a056e44=""
+            class="page-bottom__btn"
+            @click="gotoRoute"
+          >
+            退出登錄
+          </button>
         </section>
       </section>
     </div>
@@ -187,6 +214,91 @@
   <footerView></footerView>
 </template>
 
+<script setup>
+import { removeStorage } from "@/utils";
+import Axios from "@/api/login.js";
+import { ref } from "vue";
+import Axios2 from "@/api/my.js";
+import { onMounted } from "vue";
+
+onMounted(() => {
+  getUserInfo();
+});
+
+const gotoRoute = (item) => {
+  const { urlPath, urlQuery } = item || {};
+  if (!urlPath) {
+    return;
+  }
+  if (urlPath.includes("loginOut")) {
+    Axios.loginOut().then((res) => {
+      if (res.code == "0") {
+        store.resetUserInfo();
+        removeStorage("spToken");
+        removeStorage("username");
+        router.push("/");
+        return;
+      }
+    });
+    return;
+  }
+  let route = urlPath;
+  if (urlQuery) {
+    route = {
+      path: urlPath,
+      query: urlQuery,
+    };
+  }
+  router.push(route);
+};
+
+const isFyc = (kyc_status) => {
+  // 0已申请未审核=未绑定 ,1审核中 ,2 审核通过,3审核未通过
+  if (kyc_status == 0) {
+    router.push("/my/advance-auth");
+  } else if (kyc_status == 1) {
+    // ElMessage.warning("您的认证正在审核中,请耐心等待");
+  } else if (kyc_status == 2) {
+    // ElMessage.success("您已完成高级认证");
+  } else if (kyc_status == 3) {
+    ElMessage.error("您的高级认证未通过,请重新申请");
+    router.push("/my/advance-auth");
+  }
+};
+// 获取用户信息
+
+let users = ref({});
+// ("0已申请未审核=未绑定 ,1审核中 ,2 审核通过,3审核未通过")
+const statusMap = ref([
+  "weibangding",
+  "shenhezhong",
+  "yirenzheng",
+  "shenheweitongguo",
+]);
+const getUserInfo = () => {
+  Axios2.getUserInfo().then((res) => {
+    users.value = res.data || {};
+    console.log(users, "users");
+    // this.googleverif = googleverif;
+    // this.emailverif = emailverif;
+    // this.phoneverif = phoneverif;
+    // this.identityverif = identityverif;
+    // this.advancedverif = advancedverif;
+    // this.kyc_status = kyc_status;
+
+    //邮箱和手机事情打*显示的
+    // if (res.data.email) {
+    //   let arremail = res.data.email.split("@");
+    //   users.email = res.data.email.substring(0, 3) + "*****" + "@" + arremail[1];
+    // }
+
+    // if (phone) {
+    //   users.phone = res.data.phone.replace(phone.substr(3, 4), "****");
+    // }
+  });
+};
+</script>
+
 <style scoped>
 .router-view {
   flex: 1;

--
Gitblit v1.9.3