93 lines
1.9 KiB
JavaScript
93 lines
1.9 KiB
JavaScript
import http from '../utils/http';
|
|
import config from '../config/config';
|
|
|
|
/**
|
|
* 登录/注册同一个接口
|
|
* @author Seven
|
|
* @data 2025-1-28
|
|
* @param number // 验证码
|
|
* @returns { }
|
|
* @see https://mall.gpxscs.cn/mobile/account/login/doMerchSmsRegisterAndLogin
|
|
*/
|
|
|
|
export function GetLogin(params) {
|
|
return new Promise((resolve, reject) => {
|
|
http({
|
|
url: '/account/login/doMerchSmsRegisterAndLogin',
|
|
method: 'post',
|
|
data: params,
|
|
})
|
|
.then((res) => {
|
|
resolve(res);
|
|
})
|
|
.catch((e) => reject(console.warn(e)));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 获取验证码
|
|
* @author Seven
|
|
* @data 2025-1-6
|
|
* @returns { }
|
|
* @see https://mall.gpxscs.cn/mobile/account/login/sendVerifyCode
|
|
*/
|
|
|
|
export function GetSmsCode(params) {
|
|
params.isFilter = true;
|
|
return new Promise((resolve, reject) => {
|
|
http({
|
|
url: '/account/login/sendVerifyCode',
|
|
method: 'post',
|
|
data: params,
|
|
})
|
|
.then((res) => {
|
|
resolve(res);
|
|
})
|
|
.catch((e) => reject(console.warn(e)));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 账号密码登录
|
|
* @author Seven
|
|
* @data 2025-1-6
|
|
* @returns { }
|
|
* @see https://mall.gpxscs.cn/api/admin/account/account-user-base/doLogin
|
|
*/
|
|
|
|
export function GetAccountLogin(params) {
|
|
return new Promise((resolve, reject) => {
|
|
http({
|
|
url: '/account/account-user-base/doLogin',
|
|
method: 'post',
|
|
params,
|
|
baseURL: config.adminApi,
|
|
})
|
|
.then((res) => {
|
|
resolve(res);
|
|
})
|
|
.catch((e) => reject(console.warn(e)));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 获取图形验证码
|
|
* @author Seven
|
|
* @data 2025-1-6
|
|
* @returns { }
|
|
* @see https://mall.gpxscs.cn/api/admin/shop/shop-base-config/image
|
|
*/
|
|
|
|
export function GetVerifyCode(params) {
|
|
return new Promise((resolve, reject) => {
|
|
http({
|
|
url: '/shop/shop-base-config/image',
|
|
method: 'GET',
|
|
params,
|
|
baseURL: config.adminApi,
|
|
}).then((res) => {
|
|
resolve(res);
|
|
});
|
|
});
|
|
}
|