From 6be28040e74e1ff7764478174a9b5d706fe4fc39 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 31 五月 2024 11:40:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 h5/pages/changePassword/changePassword.vue |   48 +++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/h5/pages/changePassword/changePassword.vue b/h5/pages/changePassword/changePassword.vue
index af61ae5..0533847 100644
--- a/h5/pages/changePassword/changePassword.vue
+++ b/h5/pages/changePassword/changePassword.vue
@@ -7,7 +7,7 @@
 					<text>*</text>
 				</view>
 				<view class="list_item_content">
-					<input type="number" maxlength="11" placeholder="璇疯緭鍏ユ棫瀵嗙爜" placeholder-style="color: #999999;" />
+					<input type="password" v-model="param.oldPwd" :maxlength="32" placeholder="璇疯緭鍏ユ棫瀵嗙爜" placeholder-style="color: #999999;" />
 				</view>
 			</view>
 			<view class="list_item">
@@ -16,7 +16,7 @@
 					<text>*</text>
 				</view>
 				<view class="list_item_content">
-					<input type="number" maxlength="11" placeholder="璇疯緭鍏�6-18浣嶆暟瀛椼�佸瓧姣嶇粍鍚�" placeholder-style="color: #999999;" />
+					<input type="password" v-model="param.newPwd" :maxlength="32" placeholder="璇疯緭鍏�6-18浣嶆暟瀛椼�佸瓧姣嶇粍鍚�" placeholder-style="color: #999999;" />
 				</view>
 			</view>
 			<view class="list_item">
@@ -25,7 +25,7 @@
 					<text>*</text>
 				</view>
 				<view class="list_item_content">
-					<input type="number" maxlength="11" placeholder="璇峰啀杈撲竴娆℃柊瀵嗙爜" placeholder-style="color: #999999;" />
+					<input type="password" v-model="param.newPwdTemp" :maxlength="32" placeholder="璇峰啀杈撲竴娆℃柊瀵嗙爜" placeholder-style="color: #999999;" />
 				</view>
 			</view>
 		</view>
@@ -34,17 +34,55 @@
 			<text>濡傚瘑鐮侀仐蹇橈紝璇疯仈绯诲洯鍖虹郴缁熺鐞嗗憳閲嶇疆</text>
 		</view>
 		<view class="footer-box">
-			<view class="submit-button">鎻愪氦</view>
+			<view class="submit-button" @click="onSubmit">鎻愪氦</view>
 		</view>
 	</view>
 </template>
 
 <script>
+import { uploadPassword } from '@/api'
 	export default {
 		data() {
 			return {
-				
+				param: {}
 			};
+		},
+		methods: {
+			onSubmit() {
+      const { param } = this
+      if (!param.oldPwd) return uni.showToast({
+        title: '鏃у瘑鐮佷笉鑳戒负绌�',
+        icon: 'none'
+      })
+      if (!param.newPwd) return uni.showToast({
+        title: '鏂板瘑鐮佷笉鑳戒负绌�',
+        icon: 'none'
+      })
+      if (!param.newPwdTemp) return uni.showToast({
+        title: '纭瀵嗙爜涓嶈兘涓虹┖',
+        icon: 'none'
+      })
+      if (param.newPwdTemp != param.newPwd) return uni.showToast({
+        title: '涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�',
+        icon: 'none'
+      })
+      uploadPassword({
+        ...param
+      }).then(res => {
+        if (res && res.code == 200) {
+          setTimeout(() => {
+            uni.showToast({
+              title: '瀵嗙爜淇敼鎴愬姛,璇烽噸鏂扮櫥褰�',
+              icon: 'success',
+              duration: 2000
+            })
+          })
+          uni.redirectTo({
+            url: "/pages/staffLogin/login"
+          })
+        }
+      })
+    }
 		}
 	}
 </script>

--
Gitblit v1.9.3