feat: get phone

This commit is contained in:
eleanor.mao
2025-04-02 22:53:55 +08:00
parent d25187c9c8
commit 77a33989c4
7 changed files with 52 additions and 29 deletions

View File

@ -1,6 +1,7 @@
import Taro from '@tarojs/taro';
export const isDev = () => process.env.NODE_ENV === 'development';
// export const isDev = () => true;
export const isIPhone = (() => {
const info = Taro.getSystemInfoSync();

View File

@ -8,3 +8,9 @@ export const postCertification = async (data: ICertificationRequest) => {
await requestUserInfo();
return result;
};
export const getPhone = async(code: string): Promise<{phoneNumber: string}> => {
const result = await http.post<{ code :string }>(API.GET_PHONE, { data: {code} });
return result;
}