From d30a31e7c2a9acd08da8983e42e6fdf014707a04 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 26 九月 2025 15:39:47 +0800
Subject: [PATCH] 打包修改
---
src/pages_mine/pages/pwd/index.vue | 91 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/src/pages_mine/pages/pwd/index.vue b/src/pages_mine/pages/pwd/index.vue
new file mode 100644
index 0000000..d0a10c5
--- /dev/null
+++ b/src/pages_mine/pages/pwd/index.vue
@@ -0,0 +1,91 @@
+<template>
+ <view class="pwd-retrieve-container">
+ <uni-forms ref="form" :value="user" labelWidth="80px">
+ <uni-forms-item name="oldPassword" label="鏃у瘑鐮�">
+ <uni-easyinput type="password" v-model="user.oldPassword" placeholder="璇疯緭鍏ユ棫瀵嗙爜" />
+ </uni-forms-item>
+ <uni-forms-item name="newPassword" label="鏂板瘑鐮�">
+ <uni-easyinput type="password" v-model="user.newPassword" placeholder="璇疯緭鍏ユ柊瀵嗙爜" />
+ </uni-forms-item>
+ <uni-forms-item name="confirmPassword" label="纭瀵嗙爜">
+ <uni-easyinput type="password" v-model="user.confirmPassword" placeholder="璇风‘璁ゆ柊瀵嗙爜" />
+ </uni-forms-item>
+ <button type="primary" @click="submit">鎻愪氦</button>
+ </uni-forms>
+ </view>
+</template>
+
+<script>
+ import { updateUserPwd } from "@/api/system/user"
+
+ export default {
+ data() {
+ return {
+ user: {
+ oldPassword: undefined,
+ newPassword: undefined,
+ confirmPassword: undefined
+ },
+ rules: {
+ oldPassword: {
+ rules: [{
+ required: true,
+ errorMessage: '鏃у瘑鐮佷笉鑳戒负绌�'
+ }]
+ },
+ newPassword: {
+ rules: [{
+ required: true,
+ errorMessage: '鏂板瘑鐮佷笉鑳戒负绌�',
+ },
+ {
+ minLength: 6,
+ maxLength: 20,
+ errorMessage: '闀垮害鍦� 6 鍒� 20 涓瓧绗�'
+ }
+ ]
+ },
+ confirmPassword: {
+ rules: [{
+ required: true,
+ errorMessage: '纭瀵嗙爜涓嶈兘涓虹┖'
+ }, {
+ validateFunction: (rule, value, data) => data.newPassword === value,
+ errorMessage: '涓ゆ杈撳叆鐨勫瘑鐮佷笉涓�鑷�'
+ }
+ ]
+ }
+ }
+ }
+ },
+ onReady() {
+ this.$refs.form.setRules(this.rules)
+ },
+ methods: {
+ submit() {
+ this.$refs.form.validate().then(res => {
+ updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
+ uni.showToast({
+ title: '淇敼鎴愬姛',
+ mask: false,
+ duration: 1000
+ });
+ uni.navigateBack();
+ })
+
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #ffffff;
+ }
+
+ .pwd-retrieve-container {
+ padding-top: 36rpx;
+ padding: 15px;
+ }
+</style>
--
Gitblit v1.9.3