feat: 初始化
This commit is contained in:
30
services/user/completeInfo.ts
Normal file
30
services/user/completeInfo.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import { request } from '@/utils/request.ts';
|
||||
|
||||
export function sendCodePersonal() {
|
||||
return request({ url: '/api/app/personal/sendCode', method: 'POST' });
|
||||
}
|
||||
|
||||
export function verifyEmail(data: Record<string, any>) {
|
||||
return request({ url: '/api/app/personal/saveVerifyEmail', method: 'POST', data });
|
||||
}
|
||||
|
||||
export function getAuthVoucher() {
|
||||
return request({ url: '/api/app/personal/getAuthVoucher', method: 'GET' });
|
||||
}
|
||||
|
||||
export function getAuthAddress() {
|
||||
return request({ url: '/api/app/personal/getAuthAddress', method: 'GET' });
|
||||
}
|
||||
|
||||
export function saveVoucher(data: Record<string, any>) {
|
||||
return request({ url: '/api/app/personal/saveVoucher', method: 'POST', data });
|
||||
}
|
||||
export function saveBank(data: Record<string, any>) {
|
||||
return request({ url: '/api/saleH5/personal/saveSalePersonalBank', method: 'POST', data });
|
||||
}
|
||||
export function changeLoginPwd(data: Record<string, any>) {
|
||||
return request({ url: '/api/saleH5/login/editPassword', method: 'POST', data });
|
||||
}
|
||||
export function sendBankMail(data: Record<string, any>) {
|
||||
return request({ url: '/api/app/personal/sendBankMail', method: 'POST', data });
|
||||
}
|
40
services/user/forgotPassword.ts
Normal file
40
services/user/forgotPassword.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import { request } from '@/utils/request.ts';
|
||||
|
||||
export interface SendCodeParams {
|
||||
email: string;
|
||||
qcc_language: string;
|
||||
}
|
||||
export function sendCode(data: SendCodeParams) {
|
||||
return request({ url: '/api/app/register/sendCode', method: 'POST', data });
|
||||
}
|
||||
|
||||
export interface CheckCodeParams {
|
||||
email: string;
|
||||
qcc_language: string;
|
||||
code: string;
|
||||
}
|
||||
export function checkCode(data: CheckCodeParams) {
|
||||
return request({ url: '/api/app/register/checkCode', method: 'POST', data });
|
||||
}
|
||||
|
||||
export interface SaveNewPwdParams {
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email: string;
|
||||
/**
|
||||
* 新密码
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* 语言
|
||||
*/
|
||||
qcc_language: string;
|
||||
/**
|
||||
* 签名值
|
||||
*/
|
||||
sign: string;
|
||||
}
|
||||
export function saveNewPwd(data: SaveNewPwdParams) {
|
||||
return request({ url: '/api/app/register/saveNewPwd', method: 'POST', data });
|
||||
}
|
143
services/user/loginAndRegister.ts
Normal file
143
services/user/loginAndRegister.ts
Normal file
@ -0,0 +1,143 @@
|
||||
import { UserLanguage } from '../../utils/const';
|
||||
import { LocaleType } from '@/types/common';
|
||||
import { User } from '@/types/user';
|
||||
import { request } from '@/utils/request.ts';
|
||||
|
||||
export interface loginParams {
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
user_code: string;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* 语言
|
||||
*/
|
||||
qcc_language: string;
|
||||
uuid?: string;
|
||||
}
|
||||
interface loginResponse {
|
||||
/**
|
||||
* 用户当前语言
|
||||
*/
|
||||
loginUserLanguage: string;
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
loginUser: User;
|
||||
/**
|
||||
* 用户爱好语言
|
||||
*/
|
||||
loveMap: LocaleType;
|
||||
/**
|
||||
* 用户代表处语言
|
||||
*/
|
||||
applyLanguage: LocaleType;
|
||||
/**
|
||||
* 用户token
|
||||
*/
|
||||
token: string;
|
||||
}
|
||||
export function login(data: loginParams) {
|
||||
data.qcc_language = UserLanguage;
|
||||
return request<loginResponse>({ url: '/api/saleH5/login/saleLogin', method: 'POST', data });
|
||||
}
|
||||
|
||||
export function preLogin(data: loginParams) {
|
||||
data.qcc_language = UserLanguage;
|
||||
return request<loginResponse>({ url: '/api/saleH5/login/preLogin', method: 'POST', data });
|
||||
}
|
||||
export function getCaptchaImage() {
|
||||
return request({ url: '/api/captchaImage', method: 'GET' });
|
||||
}
|
||||
|
||||
export interface registerParams {
|
||||
/**
|
||||
* 国家id
|
||||
*/
|
||||
country: string;
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email: string;
|
||||
/**
|
||||
* 姓氏
|
||||
*/
|
||||
first_name: string;
|
||||
/**
|
||||
* 语言
|
||||
*/
|
||||
language: string;
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
last_name: string;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
password: string;
|
||||
}
|
||||
interface registerResponse {
|
||||
/**
|
||||
* 用户当前语言
|
||||
*/
|
||||
loginUserLanguage: string;
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
loginUser: User;
|
||||
/**
|
||||
* 用户爱好语言
|
||||
*/
|
||||
loveMap: LocaleType;
|
||||
/**
|
||||
* 用户代表处语言
|
||||
*/
|
||||
applyLanguage: LocaleType;
|
||||
/**
|
||||
* 用户token
|
||||
*/
|
||||
token: string;
|
||||
}
|
||||
export function register(data: registerParams) {
|
||||
data.language = UserLanguage;
|
||||
return request<registerResponse>({ url: '/api/app/register/appRegister', method: 'POST', data });
|
||||
}
|
||||
|
||||
export function logout() {
|
||||
return request({ url: '/api/app/login/logout', method: 'POST' });
|
||||
}
|
||||
|
||||
export function getEmailByUUid(data:{}){
|
||||
return request({ url: '/api/saleH5/login/getEmailByUUid', method: 'GET', data });
|
||||
}
|
||||
|
||||
export function sendBindingCode(data:{}){
|
||||
return request({ url: '/api/saleH5/login/sendBindingCode', method: 'GET', data });
|
||||
}
|
||||
|
||||
export function checkCode(data:{}){
|
||||
return request({ url: '/api/saleH5/login/checkCode', method: 'GET', data });
|
||||
}
|
||||
|
||||
export function authQRCode(data:{}){
|
||||
return request({
|
||||
url: '/api/saleH5/login/auth_qr_code',
|
||||
method: 'GET',
|
||||
responseType: 'arraybuffer',
|
||||
data });
|
||||
}
|
||||
|
||||
export function authKey(data:{}){
|
||||
return request({ url: '/api/saleH5/login/auth_key', method: 'GET', data });
|
||||
}
|
||||
|
||||
export function authBindVerification(data:{}){
|
||||
return request({ url: '/api/saleH5/login/auth_bind_verification', method: 'POST', data });
|
||||
}
|
BIN
services/user/wallet.png
Normal file
BIN
services/user/wallet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user