From d5f572496c5fb12fec2fe346b847bf58331299c9 Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期三, 17 七月 2024 15:56:51 +0800
Subject: [PATCH] 1

---
 src/pages/changePassword/changePassword.vue |   66 ++++++++++++++------------------
 1 files changed, 29 insertions(+), 37 deletions(-)

diff --git a/src/pages/changePassword/changePassword.vue b/src/pages/changePassword/changePassword.vue
index f09b69d..8eaf491 100644
--- a/src/pages/changePassword/changePassword.vue
+++ b/src/pages/changePassword/changePassword.vue
@@ -5,8 +5,8 @@
         class="Ttop flex flex-center flex-wrap"
         style="flex-direction: column"
       >
-        <view class=""></view>
-        <view class="" ref="Rtop">
+        <view ></view>
+        <view  ref="Rtop">
           <text class="login"></text>
           <text
             style="
@@ -16,7 +16,7 @@
               font-family: cursive;
               font-weight: bold;
             "
-            >涓浗鍖诲浜虹墿鐭ヨ瘑搴�</text
+            >涓浗鍘嗕唬鍖诲浜虹墿鐭ヨ瘑搴�</text
           >
         </view>
         <view></view>
@@ -30,21 +30,24 @@
             justify-content: space-between;
             margin-bottom: 0.47rem;
             align-items: center;
+            padding-top: 0.6rem;
           "
         >
-          <!-- <view class="" style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">鐢ㄦ埛娉ㄥ唽</view> -->
+          <!-- <view  style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">鐢ㄦ埛娉ㄥ唽</view> -->
           <view class="LoginBg"></view>
           <view
-            class=""
             @click="BacktoLogin"
             style="
               cursor: pointer;
               font-size: 0.14rem;
               color: #244a7b;
               font-weight: normal;
+              position: absolute;
+              left: 0.1rem;
+              top: 0.1rem;
             "
           >
-            杩斿洖
+            < 杩斿洖
           </view>
         </view>
         <el-form
@@ -230,25 +233,29 @@
       // 涔︾睄鏁版嵁
       listData: [
         {
-          name: "涓尰浜虹墿鏁版嵁搴�",
+          name: "鍘嗕唬浜虹墿",
           id: 1
         },
         {
-          name: "涓栧尰鍖诲鏁版嵁搴�",
+          name: "瀹跺浼犳壙",
           id: 2
         },
         {
-          name: "涓尰瀛︽湳娴佹淳",
+          name: "瀛︽湳娴佹淳",
+          id: 6
+        },
+        {
+          name: "瀛︽湳鍥捐氨",
           id: 3
         },
         {
-          name: "涓尰鍦板煙鍖昏氨",
+          name: "鍦板煙鍥捐氨",
           id: 4
         },
-        {
-          name: "涓尰鍖讳簨鍒跺害",
-          id: 5
-        }
+        // {
+        //   name: "涓尰鍖讳簨鍒跺害",
+        //   id: 5
+        // }
       ]
     };
   },
@@ -264,50 +271,35 @@
     this.getElementWidth();
   },
   methods: {
-    // 杩斿洖鐧诲綍
     BacktoLogin() {
-      // uni.redirectTo({
-      // 	url: '/pages/Login/Login'
-      // })
-      uni.navigateBack();
+      this.$router.go(-1);
     },
     getElementWidth() {
       this.$nextTick(() => {
         var width = this.$refs.Rtop.$el.clientWidth;
         this.Rtop1 = width + 50;
-        console.log("Element width:", width);
       });
     },
     // 蹇樿瀵嗙爜
-    async Login2(formName) {
+    Login2(formName) {
       let Obj = {
         username: this.amendDataPass.loginID,
         password: encryptAES(this.amendDataPass.rawPass),
         newPassword: encryptAES(this.amendDataPass.newPass)
       };
-      console.log(Obj);
-      this.$refs[formName].validate(async (valid) => {
+      this.$refs[formName].validate((valid) => {
         if (valid) {
           // alert('submit!鎴愬姛');
-          await getchangePassword(Obj).then((res) => {
-            // console.log(res,'淇敼瀵嗙爜鎴愬姛');
+          getchangePassword(Obj).then((res) => {
             if (res.success == true) {
-              uni.showToast({
-                title: res.object,
-                icon: "none"
+              this.$message.success('淇敼鎴愬姛');
+              uni.navigateTo({
+                url: "/pages/Login/Login"
               });
-              uni.navigateBack();
-              console.log("淇敼鎴愬姛", res);
             } else {
-              uni.showToast({
-                title: res.errorText,
-                icon: "none"
-              });
+              this.$message.error(res.errorText);
             }
           });
-          // uni.redirectTo({ encryptAES
-          // 	url: '/pages/Login/Login'
-          // })
         } else {
           console.log("error submit!!澶辫触");
           return false;

--
Gitblit v1.9.1