From c41133d536b49eb7011efc5eb06d3d0b9e429079 Mon Sep 17 00:00:00 2001
From: lishiwei <3230787218@qq.com>
Date: Mon, 1 Jun 2026 15:33:07 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20app=E9=A6=96=E6=AC=A1=E7=99=BB=E5=BD=95?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/index.js | 1 +
package-lock.json | 12 ++
pages.json | 6 +
.../login/change-password/change-password.vue | 113 ++++++++++++++++++
pages/login/login.vue | 9 +-
utils/aes_secret.js | 2 +-
6 files changed, 141 insertions(+), 2 deletions(-)
create mode 100644 pages/login/change-password/change-password.vue
diff --git a/api/index.js b/api/index.js
index e617290..bc8b7c6 100644
--- a/api/index.js
+++ b/api/index.js
@@ -71,6 +71,7 @@ export const getVersion = (params) => post("/app/versionmanagerReg/getVersion",
export const setFeedbackUpload = (params) => upload("/app/feedback/upload", params) //反馈问题附件
export const setFeedbackAdd = (params) => post("/app/feedback/add", params) //反馈问题提交
export const setUpdatePassword = (params) => post("/app/user/editUserPwd", params) //修改密码
+export const changePasswordFirstLogin = (params) => post("/sys/changePasswordFirstLogin", params) // 首次登录修改密码
export const getAnnouncementNoticeList = (params) => post("/app/noticeregulatory/list", params) //公告通知列表
export const getPlatformReminderList = (params) => post("/app/service/notice/list", params) //平台提醒列表
export const getAnnouncementNoticeDetail = (params) => post("/app/noticeregulatory/goEdit", params) //公告通知详情
diff --git a/package-lock.json b/package-lock.json
index b5e82dd..1e519c0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,6 +10,7 @@
"license": "ISC",
"dependencies": {
"crypto-js": "^4.2.0",
+ "dayjs": "^1.11.13",
"uview-ui": "^2.0.35",
"vue": "^2.6.14",
"vuex-persistedstate": "^3.2.1"
@@ -40,6 +41,12 @@
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
"license": "MIT"
},
+ "node_modules/dayjs": {
+ "version": "1.11.21",
+ "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.21.tgz",
+ "integrity": "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==",
+ "license": "MIT"
+ },
"node_modules/deepmerge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
@@ -112,6 +119,11 @@
"resolved": "https://mirrors.huaweicloud.com/repository/npm/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
+ "dayjs": {
+ "version": "1.11.21",
+ "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.21.tgz",
+ "integrity": "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA=="
+ },
"deepmerge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
diff --git a/pages.json b/pages.json
index 5d80598..e290f8c 100644
--- a/pages.json
+++ b/pages.json
@@ -25,6 +25,12 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/login/change-password/change-password",
+ "style": {
+ "navigationBarTitleText": "首次登录修改密码"
+ }
+ },
{
"path": "pages/super-hot/index/index",
"style": {
diff --git a/pages/login/change-password/change-password.vue b/pages/login/change-password/change-password.vue
new file mode 100644
index 0000000..9864079
--- /dev/null
+++ b/pages/login/change-password/change-password.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 22545c6..5feecdf 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -93,12 +93,19 @@ export default {
return;
}
- const { token } = await submitLogin({
+ const { token, firstLogin } = await submitLogin({
username: encrypt(this.form.userName),
password: encrypt(this.form.userPwd)
});
uni.setStorageSync('token', token);
uni.setStorageSync('tokenTime', dayjs().format("YYYY-MM-DD HH:mm:ss"));
+ if (firstLogin === 1) {
+ uni.$u.route({
+ url: '/pages/login/change-password/change-password',
+ type: 'reLaunch'
+ });
+ return;
+ }
const { user } = await getUserInfo();
await this.$store.dispatch('setUserInfo', user);
await this.$store.dispatch('setfilePath', '');
diff --git a/utils/aes_secret.js b/utils/aes_secret.js
index 4c7c9ac..9245d69 100644
--- a/utils/aes_secret.js
+++ b/utils/aes_secret.js
@@ -35,7 +35,7 @@ function decryptAes(params) {
const key = CryptoJS.enc.Utf8.parse("fa4e0fae59534676"); // 16 bytes key for AES
- const bytes = CryptoJS.AES.decrypt(params.info, key, {
+ const bytes = CryptoJS.AES.decrypt(params.encryptData, key, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
});