shaogen1995 2 年之前
父節點
當前提交
0b6f5ad460
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. 4 1
      houtai/src/pages/Layout/index.tsx
  2. 1 1
      houtai/src/utils/storage.ts

+ 4 - 1
houtai/src/pages/Layout/index.tsx

@@ -401,7 +401,10 @@ function Layout() {
           <Form.Item
             label="新密码"
             name="newPassword"
-            rules={[{ required: true, message: "不能为空!" }]}
+            rules={[
+              { required: true, message: "不能为空!" },
+              { min: 6, max: 15, message: "密码长度为6-15个字符!" },
+            ]}
           >
             <Input.Password
               maxLength={15}

+ 1 - 1
houtai/src/utils/storage.ts

@@ -1,7 +1,7 @@
 // ------------------------------------token的本地存储------------------------------------
 
 // 用户 Token 的本地缓存键名,自己定义
-const TOKEN_KEY = 'YPZZBWG_USER_INFO'
+const TOKEN_KEY = 'YPZZBWG_HT_USER_INFO'
 
 /**
  * 从本地缓存中获取 Token 信息