docs: 更新优惠券相关文档- 新增优惠券API集成文档

- 新增优惠券卡片对齐修复文档
- 新增优惠券状态显示调试文档
- 新增优惠券组件警告修复文档- 更新用ShopInfo Hook字段迁移文档
- 更新Arguments关键字修复文档
This commit is contained in:
2025-08-15 01:52:36 +08:00
parent dc87f644c9
commit 1b24a611a8
50 changed files with 6530 additions and 595 deletions

View File

@@ -1,5 +1,5 @@
import request from '@/utils/request-legacy';
import type { ApiResult } from '@/api/index';
import type { ApiResult } from '@/api';
import type {
LoginParam,
LoginResult,
@@ -70,71 +70,3 @@ export async function sendSmsCaptcha(data: LoginParam) {
}
return Promise.reject(new Error(res.message));
}
export async function getOpenId(data: any){
const res = request.post<ApiResult<LoginResult>>(
SERVER_API_URL + '/wx-login/getOpenId',
data
);
if (res.code === 0) {
return res.data;
}
return Promise.reject(new Error(res.message));
}
export async function loginByOpenId(data:any){
const res = request.post<ApiResult<LoginResult>>(
SERVER_API_URL + '/wx-login/loginByOpenId',
data
);
if (res.code === 0) {
return res.data;
}
return Promise.reject(new Error(res.message));
}
/**
* 登录
*/
export async function remoteLogin(data: LoginParam) {
const res = await request.post<ApiResult<LoginResult>>(
'https://open.gxwebsoft.com/api/login',
data
);
if (res.code === 0) {
// setToken(res.data.data?.access_token, data.remember);
return res.message;
}
return Promise.reject(new Error(res.message));
}
/**
* 获取企业微信登录链接
*/
export async function getWxWorkQrConnect(data: any) {
const res = await request.post<ApiResult<unknown>>(
'/wx-work',
data
);
if (res.code === 0 && res.data) {
return res.data;
}
return Promise.reject(new Error(res.message));
}
export async function loginMpWxMobile(data: {
refereeId: number;
gradeId: number;
code: any;
sceneType: string;
comments: string;
encryptedData: any;
tenantId: string;
iv: any;
notVerifyPhone: boolean
}) {
const res = request.post<ApiResult<unknown>>(SERVER_API_URL + '/wx-login/loginByMpWxPhone', data);
if (res.code === 0) {
return res.data;
}
return Promise.reject(new Error(res.message));
}