2025-04-29 19:43:06 +08:00
|
|
|
import request from "../utils/request.js";
|
|
|
|
|
import Method from "./Method.js";
|
|
|
|
|
|
|
|
|
|
const merchant = {
|
2025-04-30 16:43:52 +08:00
|
|
|
sendSms: async (mobile, type) => {
|
2025-04-29 19:43:06 +08:00
|
|
|
return request({
|
|
|
|
|
url: '/index/login/sendSms',
|
|
|
|
|
method: Method.POST,
|
2025-04-30 16:43:52 +08:00
|
|
|
data: {
|
|
|
|
|
mobile,
|
|
|
|
|
type
|
|
|
|
|
},
|
2025-04-29 19:43:06 +08:00
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
register: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/login/register',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
login: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/login/login',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getMenu: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/getMenu',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getPlatformList: async () => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getPlatformList',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getMaterialType: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getMaterialType',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getProvince: async () => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getProvince',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getSettlementAfter: async () => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getSettlementAfter',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getChooseContent: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getChooseContent',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getNumberOfReleases: async () => {
|
|
|
|
|
return Promise.resolve({
|
|
|
|
|
data: [
|
|
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
name: '一次'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
name: '两次'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 3,
|
|
|
|
|
name: '三次'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 4,
|
|
|
|
|
name: '四次'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 5,
|
|
|
|
|
name: '五次'
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getPublicationDuration: async () => {
|
|
|
|
|
return Promise.resolve({
|
|
|
|
|
data: [
|
|
|
|
|
{
|
|
|
|
|
id: 5,
|
|
|
|
|
name: '5分钟'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 10,
|
|
|
|
|
name: '10分钟'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 20,
|
|
|
|
|
name: '20分钟'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 30,
|
|
|
|
|
name: '30分钟'
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
createTask: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/createTask',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getTaskPlatformList: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getPlatformList',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getTaskStatusList: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getStatusList',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getTaskList: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getTaskList',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addWithdrawal: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/addWithdrawal',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getWithdrawalList: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/getWithdrawalList',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
2025-04-30 10:02:22 +08:00
|
|
|
getBusinessInfo: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/getInfo',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
rechargeOrderQR: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/rechargeOrder',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
2025-04-30 16:43:52 +08:00
|
|
|
saveNickname: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/saveNickname',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
saveMobile: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/saveMobile',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
saveWechat: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/saveWechat',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
savePassword: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/savePassword',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
saveAvatar: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/business/saveAvatar',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getTaskChildrenList: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getTaskChildrenList',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
2025-05-09 14:57:18 +08:00
|
|
|
getMaterialList: async (id) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/getMaterialList',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: {id}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addMaterial: async (data) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/addMaterial',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
delMaterial: async (id) => {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/index/task/delMaterial',
|
|
|
|
|
method: Method.POST,
|
|
|
|
|
data: {id}
|
|
|
|
|
});
|
|
|
|
|
},
|
2025-04-29 19:43:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default merchant;
|