zhang 1 سال پیش
والد
کامیت
6fec8e81f4
1فایلهای تغییر یافته به همراه21 افزوده شده و 20 حذف شده
  1. 21 20
      pages/user/set/transaction.vue

+ 21 - 20
pages/user/set/transaction.vue

@@ -41,12 +41,12 @@ export default {
 		...mapState(['userInfo'])
 	},
 	onLoad() {
-		if(this.userInfo.phone == null){
-			this.account = '';
-		}else{
-			this.account = this.userInfo.phone;
-			this.show = false;
-		}
+		// if(this.userInfo.phone == null){
+		// 	this.account = '';
+		// }else{
+		// 	this.account = this.userInfo.phone;
+		// 	this.show = false;
+		// }
 		uni.setNavigationBarTitle({
 			title: this.$t("tab.b3"),
 		});
@@ -92,20 +92,21 @@ export default {
 		},
 	
 		confirm(e) {
-		    // 检查两次输入的新密码是否一致
-		    if (this.password === this.repeat) {
-		      // 发送请求或执行逻辑来修改密码
-		      // 根据具体需求进行操作
-		      console.log('密码修改成功');
-		      // 更新交易密码
-		      this.password = this.repeat;
-		      // 清空输入框
-		      this.password = '';
-		      this.repeat = '';
-		    } else {
-		      console.log('两次输入的密码不一致');
-		    }
-		  
+		  this.loding = true;
+		  Reset({
+		  	account: this.account,
+		  	captcha: this.captcha,
+		  	password: this.password,
+			repeat: this.repeat
+		  })
+		  	.then(({ data }) => {
+		  		this.loding = false;
+		  		this.$api.msg('修改成功');
+		  	})
+		  	.catch(err => {
+		  		this.loding = false;
+		  		console.log(err);
+		  	});
 		}
 	}
 };