diff --git a/apps/storefront/src/pages/login/Login.tsx b/apps/storefront/src/pages/login/Login.tsx index 178995ff..3a56d55c 100644 --- a/apps/storefront/src/pages/login/Login.tsx +++ b/apps/storefront/src/pages/login/Login.tsx @@ -24,6 +24,7 @@ import { B3SStorage, getCurrentCustomerInfo, logoutSession, + snackbar, storeHash, } from '@/utils' @@ -295,7 +296,7 @@ export default function Login(props: RegisteredProps) { } } } catch (error) { - console.log(error) + snackbar.error(b3Lang('login.loginTipInfo.accountincorrect')) } } setLoading(false) diff --git a/apps/storefront/src/shared/service/bc/graphql/login.ts b/apps/storefront/src/shared/service/bc/graphql/login.ts index e6a85f1d..109dfe04 100644 --- a/apps/storefront/src/shared/service/bc/graphql/login.ts +++ b/apps/storefront/src/shared/service/bc/graphql/login.ts @@ -47,12 +47,18 @@ const getB2bLogin = `mutation Login($loginData: UserLoginType!) { } } }` - -export const b2bLogin = (variables: LoginData): Promise => - B3Request.graphqlB2B({ - query: getB2bLogin, - variables, - }) +// customMessage: field used to determine whether to use a custom message +export const b2bLogin = ( + variables: LoginData, + customMessage = true +): Promise => + B3Request.graphqlB2B( + { + query: getB2bLogin, + variables, + }, + customMessage + ) export const bcLogin = (data: CustomFieldItems): CustomFieldItems => B3Request.graphqlBC({