diff --git a/api/auth.ts b/api/auth.ts index 2215adf..8af9668 100644 --- a/api/auth.ts +++ b/api/auth.ts @@ -1,6 +1,6 @@ import { APP_CONFIG } from '@/config'; import { HttpStatusError, httpRequest, toFormUrlEncoded } from '@/utils/http'; -import { postForm } from '@/utils/request'; +import { get, postForm } from '@/utils/request'; export interface LoginResponse { code: number | string; @@ -58,6 +58,8 @@ export interface BindMobileResponse { code: number | string; msg?: string; data?: { + token?: string; + expires_in?: number; code?: string; msg?: string; mobile?: string; @@ -76,3 +78,22 @@ export const bindMobile = (encryptedData: string) => { platform: resolveLoginPlatform() }); }; + +export interface OpenInfoResult { + code: number | string; + msg?: string; + data?: { + user?: { + user_id?: number | string; + user_name?: string; + avatar?: string; + }; + open?: { + user_id?: number | string; + open_id?: number | string; + }; + }; +} + +/** 当前登录用户信息;有 user_id 视为已绑定过手机号/账号资料 */ +export const fetchOpenInfo = () => get('user/v1/open.info'); diff --git a/config/index.ts b/config/index.ts index f3d581f..261ce4e 100644 --- a/config/index.ts +++ b/config/index.ts @@ -1,17 +1,20 @@ // #ifdef MP-ALIPAY -const APP_ID = '123019'; +// const APP_ID = '123019'; +const APP_ID = '12317'; // #endif // #ifdef MP-WEIXIN -const APP_ID = '123018'; +// const APP_ID = '123018'; +const APP_ID = '12316'; // #endif // #ifndef MP-WEIXIN // #ifndef MP-ALIPAY -const APP_ID = '123018'; +// const APP_ID = '123018'; +const APP_ID = '12316'; // #endif // #endif export const APP_CONFIG = { - API_BASE_URL: 'https://dev.api.leapy.cn', + API_BASE_URL: 'https://api.leapy.cn', APP_ID, RESOURCE_URL: 'https://resource.leapy.cn/staff/', PROPERTY_IMG_URL: 'https://resource.leapy.cn/', diff --git a/pages/mine/score-records.vue b/pages/mine/score-records.vue index f53910f..ba02235 100644 --- a/pages/mine/score-records.vue +++ b/pages/mine/score-records.vue @@ -22,13 +22,14 @@ - + + 没有更多了