From fa2f172812de8344fa22c4ef088ea2a67257a0d3 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 05 九月 2023 10:21:17 +0800
Subject: [PATCH] Merge branch 'dev' of http://139.186.142.91:10010/r/productDev/dmMes into dev
---
minipro_standard/pages/changePassword/changePassword.vue | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/minipro_standard/pages/changePassword/changePassword.vue b/minipro_standard/pages/changePassword/changePassword.vue
index a975dd8..311f0d2 100644
--- a/minipro_standard/pages/changePassword/changePassword.vue
+++ b/minipro_standard/pages/changePassword/changePassword.vue
@@ -25,7 +25,7 @@
</view>
</view>
<view class="password_footer">
- <button v-preventReClick class="password_footer_submit">
+ <button class="password_footer_submit" @click="submit">
<text>瀹屾垚</text>
</button>
</view>
@@ -33,6 +33,7 @@
</template>
<script>
+ import { updatePwd } from '@/util/api/PersonalAPI'
export default {
data() {
return {
@@ -42,6 +43,38 @@
confirmPassword: ''
}
};
+ },
+ methods: {
+ // 蹇樿瀵嗙爜
+ forgotPassword() {
+
+ },
+ // 鎻愪氦淇敼
+ submit() {
+ if (!this.form.originalPassword) {
+ uni.showToast({ title: '鍘熷瘑鐮佷笉鑳戒负绌�', icon: 'none', duration: 2000 });
+ } else if (!this.form.newPassword) {
+ uni.showToast({ title: '鏂板瘑鐮佷笉鑳戒负绌�', icon: 'none', duration: 2000 });
+ } else if (!/^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{6,}$/.test(this.form.newPassword)) {
+ uni.showToast({ title: '瀵嗙爜鏍煎紡涓嶆纭�', icon: 'none', duration: 2000 });
+ } else if (!this.form.confirmPassword) {
+ uni.showToast({ title: '纭瀵嗙爜涓嶈兘涓虹┖', icon: 'none', duration: 2000 });
+ } else if (this.form.newPassword !== this.form.confirmPassword) {
+ uni.showToast({ title: '涓ゆ杈撳叆鐨勫瘑鐮佷笉涓�鑷�', icon: 'none', duration: 2000 });
+ } else {
+ updatePwd({
+ newPwd: this.form.newPassword,
+ oldPwd: this.form.originalPassword
+ }).then(res => {
+ if (res.code === 200) {
+ uni.showToast({ title: '淇敼鎴愬姛', icon: 'success', duration: 2000, mask: true });
+ setTimeout(() => {
+ uni.navigateBack({ delta: 1 });
+ }, 2000)
+ }
+ })
+ }
+ }
}
}
</script>
--
Gitblit v1.9.3