From d61d8e67a16545357abe71cb40a8fb46ea1af6e4 Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 15 Jul 2026 15:54:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/auth.ts | 23 ++++++++++- config/index.ts | 11 ++++-- pages/mine/score-records.vue | 14 +++++-- pages/pay/pay.vue | 76 +++++++++++++++++++++++++++++++----- pages/records/index.vue | 15 +++++-- 5 files changed, 117 insertions(+), 22 deletions(-) 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 @@ - + + 没有更多了