注册添加千人千码参数

This commit is contained in:
maqian
2025-10-15 17:54:01 +08:00
parent 16cafaf091
commit a847ae93fd
2 changed files with 28 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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)