This commit is contained in:
2025-04-29 19:43:06 +08:00
parent dfb552b7ed
commit ff17e84aed
26 changed files with 530 additions and 260 deletions

View File

@@ -1,7 +1,9 @@
import merchant from './merchant.js';
import system from './system.js';
import admin from './admin.js';
const Api = {
merchant: {...merchant},
system: {...system},
admin: {...admin},
}

157
src/api/merchant.js Normal file
View File

@@ -0,0 +1,157 @@
import request from "../utils/request.js";
import Method from "./Method.js";
const merchant = {
sendSms: async (mobile) => {
return request({
url: '/index/login/sendSms',
method: Method.POST,
data: {mobile},
});
},
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
});
},
}
export default merchant;

View File

@@ -43,7 +43,20 @@ const system = {
'Content-Type': 'multipart/form-data; boundary=--------------------------611824495457697861278283'
}
});
}
},
uploadFile2: async (file) => {
const formData = new FormData();
formData.append('file', file);
return request({
UN_AES: true,
url: '/index/upload/upload',
method: Method.POST,
data: formData,
headers: {
'Content-Type': 'multipart/form-data; boundary=--------------------------611824495457697861278283'
}
});
},
}
export default system;