|
|
@@ -266,17 +266,17 @@ export class LoginModalComponent {
|
|
|
this.errorMsg = '';
|
|
|
|
|
|
try {
|
|
|
- const resp = await fetch(`${API_HOST}/api/fmode/mobile`, {
|
|
|
+ const resp = await fetch(`${API_HOST}/api/apig/message`, {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
|
'X-Parse-Application-Id': APP_ID
|
|
|
},
|
|
|
- body: JSON.stringify({ mobile: this.phone })
|
|
|
+ body: JSON.stringify({ mobile: this.phone, company: 'E4KpGvTEto' })
|
|
|
});
|
|
|
const result = await resp.json();
|
|
|
- if (result.error) {
|
|
|
- throw new Error(result.error);
|
|
|
+ if (result.code !== 1) {
|
|
|
+ throw new Error(result.data?.msg || result.error || '发送失败');
|
|
|
}
|
|
|
// 开始倒计时
|
|
|
this.countdown.set(60);
|
|
|
@@ -313,7 +313,7 @@ export class LoginModalComponent {
|
|
|
console.log('[Login] loginMobile result:', result);
|
|
|
|
|
|
if (result.code !== 200 || !result.data?.token) {
|
|
|
- throw new Error(result.message || result.error || '验证码错误或已过期');
|
|
|
+ throw new Error(result.mess || result.message || result.error || '验证码错误或已过期');
|
|
|
}
|
|
|
|
|
|
const sessionToken = result.data.token;
|