|
@@ -121,6 +121,8 @@ interface FormProps {
|
|
|
* 渠道链接
|
|
|
*/
|
|
|
channel_code?: string;
|
|
|
+
|
|
|
+ code_phone?: string;
|
|
|
}
|
|
|
interface FormInitStateTypes extends FormProps {
|
|
|
mobile?: {
|
|
@@ -166,7 +168,7 @@ const FormComponent: FC<Props> = (props) => {
|
|
|
const { mobile } = values;
|
|
|
const newValue = {
|
|
|
...values,
|
|
|
- user_phone: mobile?.realValue,
|
|
|
+ user_phone: `${mobile?.preValue}${mobile?.realValue}`,
|
|
|
code_phone: mobile?.preValue,
|
|
|
};
|
|
|
|
|
@@ -235,12 +237,14 @@ const FormComponent: FC<Props> = (props) => {
|
|
|
registerApi(newValues)
|
|
|
.then(async (res) => {
|
|
|
if (res.code === 200) {
|
|
|
- loginHandler({ pwd: values.pwd, user_phone: values.user_phone }).then(
|
|
|
- () => {
|
|
|
- router.replace("/recharge");
|
|
|
- Toast.clear();
|
|
|
- }
|
|
|
- );
|
|
|
+ loginHandler({
|
|
|
+ pwd: values.pwd,
|
|
|
+ user_phone: values.user_phone,
|
|
|
+ code_phone: values.code_phone,
|
|
|
+ }).then(() => {
|
|
|
+ router.replace("/recharge");
|
|
|
+ Toast.clear();
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
.catch((error) => {
|
|
@@ -254,6 +258,7 @@ const FormComponent: FC<Props> = (props) => {
|
|
|
});
|
|
|
} else {
|
|
|
/// 登录
|
|
|
+ console.log(`🚀🚀🚀🚀🚀-> in index.tsx on 257`, values);
|
|
|
loginHandler(values).then(() => {
|
|
|
Toast.clear();
|
|
|
const redirect = searchParams.get("redirect")
|