绑定电话

This commit is contained in:
lyp 2025-04-21 16:44:29 +08:00
parent d542525986
commit ff15832ac3
2 changed files with 9 additions and 5 deletions

View File

@ -5,7 +5,10 @@ import {
useSelector,
} from 'react-redux'
import { operatorBaseUrl } from '../../util/AjaxUtils.ts'
import {
// operatorBaseUrl,
copyBaseUrl
} from '../../util/AjaxUtils.ts'
import {
getCode,
// checkPhone,
@ -159,7 +162,7 @@ export default function Head() {
// lyp
const [form] = Form.useForm<any>();
const [isUpdateWxUsernamePhone, setIsUpdateWxUsernamePhone] = useState(false); // 绑定手机号号弹窗
const [userId, setUserId] = useState(''); // 验证码ID
// const [userId, setUserId] = useState(''); // 验证码ID
// const submit = async (phone: string, code: string) => {
// try {
// const formData = new URLSearchParams();
@ -261,7 +264,8 @@ export default function Head() {
verificationCode: values.smsCode,
})
// console.log(res);
window.location.href = `${operatorBaseUrl}/operator/oauth/wx/update/login?userId=${userId}&code=${res.data}`
// window.location.href = `${operatorBaseUrl}/operator/oauth/wx/update/login?userId=${userId}&code=${res.data}`
window.location.href = `${copyBaseUrl}/copyright/route/user/wx/update-login?code=${res.data}`
} catch (error: any) {
setPhoneLoading(false)
@ -1003,7 +1007,7 @@ export default function Head() {
// getLength()
reloadUser(messageApi, globalDispatchContext).then((data) => {
// console.log('嘎嘎嘎哈哈', data);
setUserId(data.userId)
// setUserId(data.userId)
if (data.isUpdateWxUsernamePhone == 1) {
// if (data.isUpdateWxUsernamePhone != 1) {
setIsUpdateWxUsernamePhone(true);

View File

@ -23,7 +23,7 @@ export const WebSocketBaseUrl: string = `ws://${host}:7025/copyright`;
axios.defaults.baseURL = `${copyBaseUrl}/copyright`;
// export const DevUserId: string = '80d3365e-0597-4988-979e-18ef1c3ec671'; // 18634604067
export const DevUserId: string = '77690f3e-ec2e-4417-b3af-25acc13c8ecb';
export const DevUserId: string = '2339d51f-f6cf-4f93-92dd-56c372dfbe36';
// export const DevUserId: string = '6fb8e783-243c-4eec-8d98-c9b1c8aeaa00'; // 15042810561 密码123456
// export const DevUserId: string = 'c2438eb8-2685-49a9-bf02-5111a5192d96'; // 18647109157
// export const DevUserId: string = '';