commit message
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import http from '@/utils/http'
|
||||
|
||||
/*
|
||||
* 获取小程序列表
|
||||
* */
|
||||
export const ApiAppList = () => {
|
||||
return http.get('/min-programs?is_enable=1')
|
||||
}
|
||||
|
||||
export const ApiMaterialCate = () => {
|
||||
return http.get('/materials-cate')
|
||||
}
|
||||
// 批量删除
|
||||
export const ApiDelMaterial = (data: any) => {
|
||||
return http.post('/material-upload-del', data)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import http from '@/utils/http'
|
||||
|
||||
// 获取系统设置
|
||||
export const ApiGetSet = () => {
|
||||
return http.get('/config')
|
||||
}
|
||||
|
||||
/*
|
||||
* 获取图片验证码
|
||||
* */
|
||||
export const ApiGetImgCaptcha = () => {
|
||||
return http.get('/captcha/image')
|
||||
}
|
||||
|
||||
/*
|
||||
* 获取短信验证码
|
||||
* */
|
||||
export const ApiGetSmsCaptcha = (data: any) => {
|
||||
return http.post('/captcha/sms', data)
|
||||
}
|
||||
|
||||
// 设置 type: base基础配置
|
||||
export const ApiGetSetByType = (type: string) => {
|
||||
return http.get(`/config/${type}`)
|
||||
}
|
||||
// 设置 type: base基础配置
|
||||
export const ApiSaveSetByType = (type: string, data: any) => {
|
||||
return http.put(`/config/${type}`, data)
|
||||
}
|
||||
|
||||
export const ApiLinkList = () => {
|
||||
return http.get(`/link-list/`)
|
||||
}
|
||||
|
||||
// 获取链接详情.
|
||||
export const ApiLinkDetail = (id: any) => {
|
||||
return http.get(`/links/${id}`)
|
||||
}
|
||||
// 修改落地 小程序禁用
|
||||
export const ApiLinkFixApp = (id: any, data: any) => {
|
||||
return http.put(`/min-programs/${id}`, data)
|
||||
}
|
||||
|
||||
export const ApiRenewalLink = (data: any) => {
|
||||
return http.post('/link-renewal', data)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import http from '@/utils/http'
|
||||
|
||||
|
||||
export const ApiDomainEnableList = () => {
|
||||
return http.get('/domains?enable=1')
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import http from '@/utils/http'
|
||||
|
||||
// 获取概况总数据
|
||||
export const ApiAllData = (type: any) => {
|
||||
return http.get<any>(`/home?type=${type}`)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import http from '@/utils/http'
|
||||
|
||||
// 修改代理状态
|
||||
export const EditAgentStatus = (id: any, status: Boolean) => {
|
||||
return http.put<any, any>(`/users/${id}`, {
|
||||
status
|
||||
})
|
||||
}
|
||||
// 修改logo 和微信二维码
|
||||
export const EditAgentLogo = (data: any) => {
|
||||
return http.put<any, any>(`/userinfo`, data)
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import http from '@/utils/http'
|
||||
|
||||
/**
|
||||
* 购买VIP. type 1:立即生效 2:顺延生效
|
||||
*/
|
||||
export const ApiPayVip = (vip_id: number, type: string) => {
|
||||
return http.post('/buy-vip', { vip_id, type })
|
||||
}
|
||||
|
||||
/**
|
||||
* 积分记录.
|
||||
*/
|
||||
export const ApiCreditLog = (page: number, pageSize: number) => {
|
||||
return http.get('/credit-logs?page=' + page + '&pageSize=' + pageSize)
|
||||
}
|
||||
|
||||
/**
|
||||
* 佣金记录.
|
||||
*/
|
||||
export const ApiCommissionLog = (page: number, pageSize: number) => {
|
||||
return http.get('/commission-logs?page=' + page + '&pageSize=' + pageSize)
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值积分.
|
||||
*/
|
||||
export const ApiRechargeCredit = (amount: string) => {
|
||||
return http.post('/buy-credit', { amount })
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现.
|
||||
*/
|
||||
export const ApiApplyWithdraw = (data: any) => {
|
||||
return http.post('/apply-withdraw', data)
|
||||
}
|
||||
|
||||
// 邀请记录
|
||||
export const ApiInviteLog = (page: number, pageSize: number) => {
|
||||
return http.get('/agent-invite?page=' + page + '&pageSize=' + pageSize)
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
import http from '@/utils/http'
|
||||
/*
|
||||
* 获取vip套餐
|
||||
* */
|
||||
|
||||
export const ApiVipList = () => {
|
||||
return http.get('/vip-packages')
|
||||
}
|
||||
export const ApiAgentList = () => {
|
||||
return http.get('/agent-packages')
|
||||
}
|
||||
|
||||
/*
|
||||
* 同意提现申请
|
||||
* @param id
|
||||
* */
|
||||
export const ApiAgreeApply = (id: any) => {
|
||||
return http.post(`/withdraws-confirm/${id}`)
|
||||
}
|
||||
|
||||
/*
|
||||
* 拒绝提现申请
|
||||
* @param id
|
||||
* */
|
||||
export const ApiRejectApply = (id: any) => {
|
||||
return http.post(`/withdraws-reject/${id}`)
|
||||
}
|
||||
|
||||
// 代理商等级列表
|
||||
export const ApiLevelList = () => {
|
||||
return http.get('/agent-level')
|
||||
}
|
||||
|
||||
// 卡密修改
|
||||
export const ApiCardFix = (id: any, data: any) => {
|
||||
return http.put(`/cards/${id}`, data)
|
||||
}
|
||||
|
||||
export const getAgentTree = () => {
|
||||
return http.get('/agent-tree')
|
||||
}
|
||||
export const getNotify = () => {
|
||||
return http.get('/notice')
|
||||
}
|
||||
export const editNotify = (data:any) => {
|
||||
return http.put('/notice',data)
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import type { ILoginRequest, ILoginResponse, IUserInfoResponse } from '@/models/user'
|
||||
import http from '@/utils/http'
|
||||
|
||||
/**
|
||||
* 登录.
|
||||
* @param data
|
||||
* @constructor
|
||||
*/
|
||||
export const ApiLogin = (data: ILoginRequest) => {
|
||||
return http.post<ILoginResponse, ILoginRequest>('/login', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息.
|
||||
* @constructor
|
||||
*/
|
||||
export const ApiUserInfo = () => {
|
||||
return http.get<IUserInfoResponse>('/userinfo')
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册.
|
||||
*/
|
||||
export const ApiRegister = (data: any) => {
|
||||
return http.post('/register', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码.
|
||||
*/
|
||||
export const ApiResetPassword = (data: any) => {
|
||||
return http.post('/reset-password', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码.
|
||||
*/
|
||||
export const ApiChangePassword = (data: any) => {
|
||||
return http.post('/change-password', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 兑换卡密码.
|
||||
*/
|
||||
export const ApiConsumeCard = (secret: string) => {
|
||||
return http.post('/consume-card', { secret })
|
||||
}
|
||||
export const ApiUserFix = (id: any, data: any) => {
|
||||
return http.put(`/users/${id}`, data)
|
||||
}
|
||||
Reference in New Issue
Block a user