From a847ae93fda0a55dadbfecad5982d040f2927e6a Mon Sep 17 00:00:00 2001 From: maqian Date: Wed, 15 Oct 2025 17:54:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=B7=BB=E5=8A=A0=E5=8D=83?= =?UTF-8?q?=E4=BA=BA=E5=8D=83=E7=A0=81=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/sp-login/index.weapp.js | 14 ++++++++++++++ src/subpages/auth/login.js | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/components/sp-login/index.weapp.js b/src/components/sp-login/index.weapp.js index 0ddefbb63..6a9f2ae9f 100644 --- a/src/components/sp-login/index.weapp.js +++ b/src/components/sp-login/index.weapp.js @@ -86,6 +86,7 @@ function SpLogin(props, ref) { // const { uid } = entryLaunch.getLaunchParams() const { uid, dtid } = Taro.getStorageSync(SG_ROUTER_PARAMS) const { gu_user_id, gu } = Taro.getStorageSync(SG_GUIDE_PARAMS) + const { source_id, monitor_id, latest_source_id, latest_monitor_id } = Taro.getStorageSync('sourceInfo') // 千人千码参数 if (uid) { // 分销绑定 params['uid'] = uid @@ -110,6 +111,19 @@ function SpLogin(props, ref) { params['work_userid'] = work_userid } + if (source_id) { + params['source_id'] = source_id + } + if (monitor_id) { + params['monitor_id'] = monitor_id + } + if (latest_source_id) { + params['latest_source_id'] = latest_source_id + } + if (latest_monitor_id) { + params['latest_monitor_id'] = latest_monitor_id + } + try { const { token, is_new } = await api.wx.newlogin(params) if (token) { diff --git a/src/subpages/auth/login.js b/src/subpages/auth/login.js index 5eccd98a0..b233940df 100644 --- a/src/subpages/auth/login.js +++ b/src/subpages/auth/login.js @@ -110,6 +110,7 @@ export default class Login extends Component { } async handleSubmit() { + const { source_id, monitor_id, latest_source_id, latest_monitor_id } = Taro.getStorageSync('sourceInfo') // 千人千码参数 const { redirect } = this.$instance.router.params const { loginType } = this.state const { mobile, password, vcode } = this.state.info @@ -145,6 +146,19 @@ export default class Login extends Component { params['auth_type'] = 'local' + if (source_id) { + params['source_id'] = source_id + } + if (monitor_id) { + params['monitor_id'] = monitor_id + } + if (latest_source_id) { + params['latest_source_id'] = latest_source_id + } + if (latest_monitor_id) { + params['latest_monitor_id'] = latest_monitor_id + } + try { const { token, error_message } = await api.wx.newloginh5(params)