From 3ed2cb78a690b64c3b2646d35e1500081186dfa3 Mon Sep 17 00:00:00 2001
From: huzheng12 <52150713+huzheng12@users.noreply.github.com>
Date: Mon, 06 May 2024 00:21:32 +0800
Subject: [PATCH] first commit

---
 src/page/register/setFond.vue |  153 ++++++++++++++++++++++++++++----------------------
 1 files changed, 85 insertions(+), 68 deletions(-)

diff --git a/src/page/register/setFond.vue b/src/page/register/setFond.vue
index 31855ef..7595523 100644
--- a/src/page/register/setFond.vue
+++ b/src/page/register/setFond.vue
@@ -1,93 +1,110 @@
 <template>
-    <div class="setFond">
-        <div class="header">
-            <div @click="$router.go(-1)"><img src="../../assets/image/assets-center/left-arrow.png" alt=""
-                    class="w-14 h-27" /></div>
-            <!-- <div class="textColor" @click="$router.push('/identity')">{{ $t('跳过') }}</div> -->
-        </div>
-        <div class="content">
-            <div class="title textColor">{{ $t('设置资金密码') }}</div>
-            <ExInput :label="$t('密码')" :placeholderText="$t('资金密码(6位数字)')" v-model="password" typeText="password" />
-            <ExInput :label="$t('确认密码')" :placeholderText="$t('请确认密码')" v-model="repassword" typeText="password" />
-            <div class="btn btnMain" @click="submit">{{ $t('确定') }}</div>
-        </div>
+  <div class="setFond">
+    <div class="header">
+      <div @click="$router.go(-1)">
+        <img
+          src="../../assets/image/assets-center/left-arrow.png"
+          alt=""
+          class="w-14 h-27"
+        />
+      </div>
+      <!-- <div class="textColor" @click="$router.push('/identity')">{{ $t('跳过') }}</div> -->
     </div>
+    <div class="content">
+      <div class="title textColor">{{ $t("设置资金密码") }}</div>
+      <ExInput
+        :label="$t('密码')"
+        :placeholderText="$t('资金密码(6位数字)')"
+        v-model="password"
+        typeText="password"
+      />
+      <ExInput
+        :label="$t('确认密码')"
+        :placeholderText="$t('请确认密码')"
+        v-model="repassword"
+        typeText="password"
+      />
+      <div class="btn btnMain" @click="submit">{{ $t("确定") }}</div>
+    </div>
+  </div>
 </template>
 
 <script>
 import ExInput from "@/components/ex-input";
 import Axios from "@/API/userCenter.js";
 export default {
-    props: {
-
+  props: {},
+  components: {
+    ExInput,
+  },
+  data() {
+    return {
+      password: "",
+      repassword: "",
+    };
+  },
+  methods: {
+    setSafewordReg() {
+      Axios.setSafewordReg({
+        safeword: this.repassword,
+      })
+        .then((res) => {
+          this.$toast(this.$t("绑定成功"));
+          this.$router.push("/identity");
+        })
+        .catch((error) => {
+          if (error.code === "ECONNABORTED") {
+            this.$toast(this.$t("网络超时!"));
+          } else if (error.msg !== undefined) {
+            this.$toast(this.$t(error.msg));
+          }
+        });
     },
-    components: {
-        ExInput
+    submit() {
+      if (this.password.length < 6 || this.repassword.length < 6) {
+        this.$toast(this.$t("资金密码(6位数字)"));
+        return false;
+      }
+      if (this.password !== this.repassword) {
+        this.$toast(this.$t("密码不一致"));
+        return false;
+      }
+      this.setSafewordReg();
     },
-    data() {
-        return {
-            password: '',
-            repassword:''
-        }
-    },
-    methods: {
-        setSafewordReg() {
-            Axios.setSafewordReg({
-                safeword: this.repassword
-            }).then((res) => {
-                this.$toast(this.$t('绑定成功'));
-                this.$router.push('/identity')
-            }).catch((error) => {
-                if(error.code === 'ECONNABORTED'){this.$toast(this.$t('网络超时!'));}
-                else if(error.msg !== undefined){this.$toast(this.$t(error.msg));}    
-            });
-        },
-        submit(){
-            if (this.password.length < 6 || this.repassword.length<6){
-                this.$toast(this.$t('资金密码(6位数字)'))
-                return false
-            }
-            if (this.password !== this.repassword){
-                this.$toast(this.$t('密码不一致'))
-                return false
-            }
-            this.setSafewordReg()
-        }
-    }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-
 .setFond {
-    width: 100%;
-    box-sizing: border-box;
-    font-size: 26px;
-    padding: 0 32px;
+  width: 100%;
+  box-sizing: border-box;
+  font-size: 26px;
+  padding: 0 32px;
 }
 
 .header {
-    display: flex;
-    justify-content: space-between;
-    padding: 0 26px;
-    font-size: 28px;
-    height: 100px;
-    line-height: 100px;
+  display: flex;
+  justify-content: space-between;
+  padding: 0 26px;
+  font-size: 28px;
+  height: 100px;
+  line-height: 100px;
 }
 
 .title {
-    font-weight: 700;
-    font-size: 52px;
-    margin-top: 50px;
-    margin-bottom: 60px;
+  font-weight: 700;
+  font-size: 52px;
+  margin-top: 50px;
+  margin-bottom: 60px;
 }
 
 .btn {
-    color: #fff;
-    height: 88px;
-    line-height: 88px;
-    text-align: center;
-    font-size: 32px;
-    border-radius: 10px;
+  color: #fff;
+  height: 88px;
+  line-height: 88px;
+  text-align: center;
+  font-size: 32px;
+  border-radius: 10px;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3