From 97e1eae42b41551ac461ebf3aab606d6351da44a Mon Sep 17 00:00:00 2001 From: wangyi <3432649580@qq.com> Date: Wed, 29 Oct 2025 16:32:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/start/login.js | 30 +++++++++++++++++++++++++ pages/deepMate/deepMate.vue | 3 +++ pages/start/Registration/Registration.vue | 1 + pages/start/recoverPassword/recoverPassword.vue | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/api/start/login.js b/api/start/login.js index aecf0cf..1329acd 100644 --- a/api/start/login.js +++ b/api/start/login.js @@ -67,6 +67,36 @@ export const registerApi = (data) => { }) } + + +/** + * 忘记密码校验验证码 + */ + +export const verifyCodeApi = (data) => { + return http({ + method: 'POST', + url: '/UserLogin/verifyCode', + data: data, + }) +} + + + +/** + * 忘记密码输入新的验证吗 + */ + +export const forgetApi = (data) => { + return http({ + method: 'POST', + url: '/UserLogin/forget', + data: data, + }) +} + + + /** * 修改密码 * diff --git a/pages/deepMate/deepMate.vue b/pages/deepMate/deepMate.vue index 7ca432a..78c5456 100644 --- a/pages/deepMate/deepMate.vue +++ b/pages/deepMate/deepMate.vue @@ -926,7 +926,10 @@ async function itemClick(item) { isTyping: false, isThinking: false, }; + + onDrawerBackClick() messages.value.push(botMsg); + } } diff --git a/pages/start/Registration/Registration.vue b/pages/start/Registration/Registration.vue index fc07232..1e919e1 100644 --- a/pages/start/Registration/Registration.vue +++ b/pages/start/Registration/Registration.vue @@ -198,6 +198,7 @@ import { SendPhoneCodeApi, } from "../../../api/start/login"; import { useDeviceStore} from "../../../stores/modules/deviceInfo" +import { useUserStore} from "../../../stores/modules/userInfo" const type = ref(""); const email = ref(""); diff --git a/pages/start/recoverPassword/recoverPassword.vue b/pages/start/recoverPassword/recoverPassword.vue index 1bdca81..b4628f0 100644 --- a/pages/start/recoverPassword/recoverPassword.vue +++ b/pages/start/recoverPassword/recoverPassword.vue @@ -235,7 +235,7 @@ import countryList from "../login/list"; import footerBar from "../../../components/footerBar"; import uniPopup from "../../../uni_modules/uni-popup/components/uni-popup/uni-popup.vue"; import { verificationPhone, verificationEmail } from "../login/verification"; -import { SendEmailCodeApi, SendPhoneCodeApi } from "../../../api/start/login"; +import { SendEmailCodeApi, SendPhoneCodeApi,verifyCodeApi,forgetApi } from "../../../api/start/login"; const type = ref(""); const email = ref(""); From 76299f4d8a093502a3bf96d4e4c47d17ccf8e138 Mon Sep 17 00:00:00 2001 From: wangyi <3432649580@qq.com> Date: Wed, 29 Oct 2025 17:06:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=BF=98=E8=AE=B0?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/start/login.js | 2 +- pages/deepMate/deepMate.vue | 7 ++ pages/start/recoverPassword/recoverPassword.vue | 95 ++++++++++++++++++++++--- 3 files changed, 92 insertions(+), 12 deletions(-) diff --git a/api/start/login.js b/api/start/login.js index 1329acd..699a30f 100644 --- a/api/start/login.js +++ b/api/start/login.js @@ -84,7 +84,7 @@ export const verifyCodeApi = (data) => { /** - * 忘记密码输入新的验证吗 + * 忘记密码输入新的密码 */ export const forgetApi = (data) => { diff --git a/pages/deepMate/deepMate.vue b/pages/deepMate/deepMate.vue index 78c5456..c5e7665 100644 --- a/pages/deepMate/deepMate.vue +++ b/pages/deepMate/deepMate.vue @@ -297,6 +297,13 @@ import { postHistory, postHistoryDetail, } from "../../api/deepMate/deepMate"; + + + +const renderer = new marked.Renderer(); +renderer.heading = function(text, level) { + return `

${text}

`; +}; // 设置 marked 选项 marked.setOptions({ renderer: new marked.Renderer(), diff --git a/pages/start/recoverPassword/recoverPassword.vue b/pages/start/recoverPassword/recoverPassword.vue index b4628f0..97530c5 100644 --- a/pages/start/recoverPassword/recoverPassword.vue +++ b/pages/start/recoverPassword/recoverPassword.vue @@ -209,10 +209,10 @@ - 已有账号? - 登录 - - + 已有账号? + 登录 + @@ -235,7 +235,12 @@ import countryList from "../login/list"; import footerBar from "../../../components/footerBar"; import uniPopup from "../../../uni_modules/uni-popup/components/uni-popup/uni-popup.vue"; import { verificationPhone, verificationEmail } from "../login/verification"; -import { SendEmailCodeApi, SendPhoneCodeApi,verifyCodeApi,forgetApi } from "../../../api/start/login"; +import { + SendEmailCodeApi, + SendPhoneCodeApi, + verifyCodeApi, + forgetApi, +} from "../../../api/start/login"; const type = ref(""); const email = ref(""); @@ -254,6 +259,7 @@ const verifyCode = ref(""); const isRecovering = ref(false); const newPasswordLookFirst = ref(false); const newPasswordLookSecond = ref(false); +const account = ref(""); // 使用从list.js导入的完整国家列表数据 const countries = ref( @@ -301,7 +307,7 @@ function switchPhone() { verifyCode.value = ""; } -function register() { +async function register() { if (isRecovering.value) { if (!newPasswordFirst.value || !newPasswordSecond.value) { uni.showToast({ @@ -319,6 +325,32 @@ function register() { return; } + const account = changeAccount(); + + const res = await forgetApi({ + account: account, + password: newPasswordSecond.value, + }); + + console.log("res", res); + + if (res.code !== 200) { + uni.showToast({ + title: res.message, + icon: "none", + }); + return; + } + + uni.showToast({ + title: res.message, + icon: "none", + }); + + uni.navigateTo({ + url: "/pages/start/login/login", + }); + // 密码逻辑 return; } @@ -384,13 +416,54 @@ function register() { console.log("登录:", email.value); } + const account = changeAccount(); + const loginType = changeLoginType(); + + const res = await verifyCodeApi({ + loginType: loginType, //登录方式EMAIL,PHONE + account: account, //登陆账号 手机号/邮箱 + verifyCode: verifyCode.value, + }); + + if (res.code !== 200) { + uni.showToast({ + title: res.message, + icon: "none", + }); + return; + } + isRecovering.value = !isRecovering.value; +} - // 如果已经同意,则继续登录流程 - // uni.showToast({ - // title: "登录成功", - // icon: "success", - // }); +// 请求账户 +function changeAccount() { + if (switchType.value === "User") { + account.value = deepChartID.value; + } + + if (switchType.value === "Phone") { + account.value = `${country.value}${phone.value}`; + } + if (switchType.value === "Email") { + account.value = email.value; + } + + return account.value; +} + +// 改变请求时的type +function changeLoginType() { + if (switchType.value === "User") { + return "DCCODE"; + } + + if (switchType.value === "Phone") { + return "PHONE"; + } + if (switchType.value === "Email") { + return "EMAIL"; + } } function goToLogin() { From 2dabe35ca4019a2a0a29ba8712363a32a553ef55 Mon Sep 17 00:00:00 2001 From: wangyi <3432649580@qq.com> Date: Wed, 29 Oct 2025 19:54:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BD=93=E8=BF=94=E5=9B=9E401=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=EF=BC=8C=E5=BC=B9=E5=87=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/deepExploration_header.vue | 2 ++ components/login-prompt.vue | 25 ++++++++++++++++++-- stores/index.js | 1 + stores/modules/login.js | 44 +++++++++++++++++++++++++++++++++++ utils/http.js | 13 +++++++++-- 5 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 stores/modules/login.js diff --git a/components/deepExploration_header.vue b/components/deepExploration_header.vue index daae53c..cddab00 100644 --- a/components/deepExploration_header.vue +++ b/components/deepExploration_header.vue @@ -72,6 +72,7 @@ {{ item.stockName }} ({{ item.stockCode }}) + ({{ item.stockCode }}) {{ formatTimeForHistory(item.createdTime) @@ -98,6 +99,7 @@ const props = defineProps({ }, }); const showHistoryDrawer = ref(false); +const modelType = ref(''); const drawerOffsetY = ref(0); // const handleHistory = () => { // showHistoryDrawer.value = true; diff --git a/components/login-prompt.vue b/components/login-prompt.vue index 4d302be..cb13c61 100644 --- a/components/login-prompt.vue +++ b/components/login-prompt.vue @@ -15,20 +15,40 @@