| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597 |
- import request from '@/utils/request'
- // 用户管理
- export function getUserList(params) {
- return request({
- url: '/api/admin/users',
- method: 'post',
- data: params
- })
- }
- export function getUserDetail(id) {
- return request({
- url: `/api/admin/users/${id}`,
- method: 'post'
- })
- }
- export function updateUser(id, data) {
- return request({
- url: `/api/admin/users/${id}/update`,
- method: 'post',
- data
- })
- }
- export function deleteUser(id) {
- return request({
- url: `/api/admin/users/${id}/delete`,
- method: 'post'
- })
- }
- export function resetUserPassword(id, password) {
- return request({
- url: `/api/admin/users/${id}/reset-password`,
- method: 'post',
- data: { password }
- })
- }
- // 家庭管理
- export function getFamilyList(params) {
- return request({
- url: '/api/admin/families',
- method: 'post',
- data: params
- })
- }
- export function getFamilyDetail(id) {
- return request({
- url: `/api/admin/families/${id}`,
- method: 'post'
- })
- }
- export function updateFamily(id, data) {
- return request({
- url: `/api/admin/families/${id}/update`,
- method: 'post',
- data
- })
- }
- export function deleteFamily(id) {
- return request({
- url: `/api/admin/families/${id}/delete`,
- method: 'post'
- })
- }
- export function getFamilyMembers(id) {
- return request({
- url: `/api/admin/families/${id}/members`,
- method: 'post'
- })
- }
- // 任务模板管理
- export function getTaskTemplateList(params) {
- return request({
- url: '/api/admin/task-templates',
- method: 'post',
- data: params
- })
- }
- export function createTaskTemplate(data) {
- return request({
- url: '/api/admin/task-templates/create',
- method: 'post',
- data
- })
- }
- export function updateTaskTemplate(id, data) {
- return request({
- url: `/api/admin/task-templates/${id}/update`,
- method: 'post',
- data
- })
- }
- export function deleteTaskTemplate(id) {
- return request({
- url: `/api/admin/task-templates/${id}/delete`,
- method: 'post'
- })
- }
- // 孩子管理
- export function getChildrenList(params) {
- return request({
- url: '/api/admin/children',
- method: 'post',
- data: params
- })
- }
- export function getChildDetail(id) {
- return request({
- url: `/api/admin/children/${id}`,
- method: 'post'
- })
- }
- export function updateChild(id, data) {
- return request({
- url: `/api/admin/children/${id}/update`,
- method: 'post',
- data
- })
- }
- export function deleteChild(id) {
- return request({
- url: `/api/admin/children/${id}/delete`,
- method: 'post'
- })
- }
- export function adjustChildPoints(id, data) {
- return request({
- url: `/api/admin/children/${id}/adjust-points`,
- method: 'post',
- data
- })
- }
- // 任务管理
- export function getTasksList(params) {
- return request({
- url: '/api/admin/tasks',
- method: 'post',
- data: params
- })
- }
- export function getTaskStats() {
- return request({
- url: '/api/admin/tasks/stats',
- method: 'post'
- })
- }
- // 奖励管理
- export function getRewardsList(params) {
- return request({
- url: '/api/admin/rewards',
- method: 'post',
- data: params
- })
- }
- export function getRewardTemplates() {
- return request({
- url: '/api/admin/rewards/templates',
- method: 'post'
- })
- }
- export function createRewardTemplate(data) {
- return request({
- url: '/api/admin/rewards/create',
- method: 'post',
- data
- })
- }
- export function deleteRewardTemplate(id) {
- return request({
- url: `/api/admin/rewards/templates/${id}/delete`,
- method: 'post'
- })
- }
- export function updateRewardTemplate(id, data) {
- return request({
- url: `/api/admin/rewards/templates/${id}/update`,
- method: 'post',
- data
- })
- }
- export function approveReward(id, data) {
- return request({
- url: `/api/admin/rewards/${id}/approve`,
- method: 'post',
- data
- })
- }
- // 积分管理
- export function getPointsLogs(params) {
- return request({
- url: '/api/admin/points/logs',
- method: 'post',
- data: params
- })
- }
- export function getPointsStats() {
- return request({
- url: '/api/admin/points/stats',
- method: 'post'
- })
- }
- // ========== 心愿管理 API(新版) ==========
- // 获取心愿列表
- export function getWishesList(params) {
- return request({
- url: '/api/wishes/list',
- method: 'post',
- data: params
- })
- }
- // 获取待处理列表(家长)
- export function getPendingWishes(familyId) {
- return request({
- url: '/api/wishes/pending',
- method: 'post',
- data: { familyId }
- })
- }
- // 获取心愿详情
- export function getWishDetail(id) {
- return request({
- url: `/api/wishes/${id}`,
- method: 'post'
- })
- }
- // 家长定价
- export function setWishPrice(id, pointsRequired) {
- return request({
- url: `/api/wishes/${id}/set-price`,
- method: 'post',
- data: { pointsRequired }
- })
- }
- // 家长拒绝心愿
- export function rejectWish(id, reason) {
- return request({
- url: `/api/wishes/${id}/reject`,
- method: 'post',
- data: { reason }
- })
- }
- // 家长审批兑换
- export function approveWishExchange(id, approved, reason) {
- return request({
- url: `/api/wishes/${id}/approve-exchange`,
- method: 'post',
- data: { approved, reason }
- })
- }
- // 家长标记已购买
- export function markWishFulfilled(id) {
- return request({
- url: `/api/wishes/${id}/fulfill`,
- method: 'post'
- })
- }
- // 取消心愿
- export function deleteWish(id, reason) {
- return request({
- url: `/api/wishes/${id}/cancel`,
- method: 'post',
- data: { reason }
- })
- }
- // ========== 成长规划师相关 API ==========
- // 获取成长规划师关联的家庭列表
- export function getTeacherFamilies() {
- return request({
- url: '/api/admin/teacher/families',
- method: 'post'
- })
- }
- // 获取成长规划师发布的任务模板
- export function getTeacherTaskTemplates() {
- return request({
- url: '/api/admin/teacher/task-templates',
- method: 'post'
- })
- }
- // 成长规划师创建任务模板
- export function createTeacherTaskTemplate(data) {
- return request({
- url: '/api/admin/teacher/task-templates/create',
- method: 'post',
- data
- })
- }
- // 成长规划师删除任务模板
- export function deleteTeacherTaskTemplate(id) {
- return request({
- url: `/api/admin/teacher/task-templates/${id}/delete`,
- method: 'post'
- })
- }
- // 获取指定家庭的任务列表
- export function getTeacherFamilyTasks(familyId, params) {
- return request({
- url: `/api/admin/teacher/families/${familyId}/tasks`,
- method: 'post',
- data: params
- })
- }
- // 获取指定家庭的奖励列表
- export function getTeacherFamilyRewards(familyId, params) {
- return request({
- url: `/api/admin/teacher/families/${familyId}/rewards`,
- method: 'post',
- data: params
- })
- }
- // ========== 成长规划师审核 API ==========
- // 获取成长规划师审核列表
- export function getGuideApplications(params) {
- return request({
- url: '/api/admin/guide/applications',
- method: 'post',
- data: params
- })
- }
- // 通过成长规划师审核
- export function approveGuide(userId) {
- return request({
- url: `/api/admin/guide/approve/${userId}`,
- method: 'post'
- })
- }
- // 拒绝成长规划师审核
- export function rejectGuide(userId, reason) {
- return request({
- url: `/api/admin/guide/reject/${userId}`,
- method: 'post',
- data: { reason }
- })
- }
- // 获取营养师审核列表
- export function getNutritionistApplications(params) {
- return request({
- url: '/api/admin/nutritionist/applications',
- method: 'post',
- data: params
- })
- }
- // 通过营养师审核
- export function approveNutritionist(userId) {
- return request({
- url: `/api/admin/nutritionist/approve/${userId}`,
- method: 'post'
- })
- }
- // 拒绝营养师审核
- export function rejectNutritionist(userId, reason) {
- return request({
- url: `/api/admin/nutritionist/reject/${userId}`,
- method: 'post',
- data: { reason }
- })
- }
- // 获取待审核营养师数量
- export function getPendingNutritionistCount() {
- return request({
- url: '/api/admin/nutritionist/pending-count',
- method: 'post'
- })
- }
- // 获取待审核成长规划师数量
- export function getPendingGuideCount() {
- return request({
- url: '/api/admin/guide/pending-count',
- method: 'post'
- })
- }
- export function getPendingPackageCount() {
- return request({
- url: '/api/admin/package/pending-count',
- method: 'post'
- })
- }
- // 管理员个人信息
- export function updateAdminInfo(data) {
- return request({
- url: '/api/admin-auth/update-info',
- method: 'post',
- data
- })
- }
- // ========== 管理后台仪表盘汇总 API ==========
- export function getDashboardStats() {
- return request({
- url: '/api/stats/dashboard',
- method: 'post'
- })
- }
- export function getDashboardOverview() {
- return request({
- url: '/api/stats/overview',
- method: 'post'
- })
- }
- export function getRevenueStats() {
- return request({
- url: '/api/stats/revenue',
- method: 'post'
- })
- }
- export function getMembershipStats() {
- return request({
- url: '/api/stats/membership',
- method: 'post'
- })
- }
- export function getTrendStats() {
- return request({
- url: '/api/stats/trend',
- method: 'post',
- data: {}
- })
- }
- // ========== 商品管理 API ==========
- export function getProductList(params) {
- return request({
- url: '/api/admin/product/list',
- method: 'post',
- data: params
- })
- }
- export function reviewProduct(productId, data) {
- return request({
- url: '/api/admin/product/review',
- method: 'post',
- data: { productId, ...data }
- })
- }
- export function shelveProduct(productId, data) {
- return request({
- url: '/api/admin/product/shelve',
- method: 'post',
- data: { productId, ...data }
- })
- }
- export function getProduct(id) {
- return request({
- url: '/api/admin/product/detail',
- method: 'post',
- data: { productId: id }
- })
- }
- export function createProduct(data) {
- return request({
- url: '/api/admin/product/create',
- method: 'post',
- data
- })
- }
- export function updateProduct(data) {
- return request({
- url: '/api/admin/product/update',
- method: 'post',
- data
- })
- }
- export function deleteProduct(id) {
- return request({
- url: '/api/admin/product/delete',
- method: 'post',
- data: { productId: id }
- })
- }
- // ========== SKU 管理 API ==========
- export function getProductSkuList(productId) {
- return request({
- url: '/api/admin/product/sku/list',
- method: 'post',
- data: { productId }
- })
- }
- export function createProductSku(data) {
- return request({
- url: '/api/admin/product/sku/create',
- method: 'post',
- data
- })
- }
- export function updateProductSku(data) {
- return request({
- url: '/api/admin/product/sku/update',
- method: 'post',
- data
- })
- }
- export function deleteProductSku(id) {
- return request({
- url: '/api/admin/product/sku/delete',
- method: 'post',
- data: { id }
- })
- }
- // ========== 购买信息采集 API ==========
- export function getPredefinedPurchaseFields() {
- return request({
- url: '/api/admin/product/purchase_fields/predefined',
- method: 'post'
- })
- }
- export function getProductPurchaseFields(productId) {
- return request({
- url: '/api/admin/product/purchase_fields/list',
- method: 'post',
- data: { productId }
- })
- }
- export function saveProductPurchaseFields(productId, fields) {
- return request({
- url: '/api/admin/product/purchase_fields/save',
- method: 'post',
- data: { productId, fields }
- })
- }
- // ========== 分类管理 API ==========
- export function getCategoryTree(includeDisabled) {
- return request({
- url: '/api/admin/shop/category/tree',
- method: 'post',
- data: { includeDisabled }
- })
- }
- export function createCategory(data) {
- return request({
- url: '/api/admin/shop/category/create',
- method: 'post',
- data
- })
- }
- export function updateCategory(data) {
- return request({
- url: '/api/admin/shop/category/update',
- method: 'post',
- data
- })
- }
- export function deleteCategory(id) {
- return request({
- url: '/api/admin/shop/category/delete',
- method: 'post',
- data: { id }
- })
- }
- export function toggleCategory(id) {
- return request({
- url: '/api/admin/shop/category/toggle',
- method: 'post',
- data: { id }
- })
- }
- // ========== 订单管理 API ==========
- export function getOrderList(params) {
- return request({
- url: '/api/admin/product/order/list',
- method: 'post',
- data: params
- })
- }
- export function getOrderDetail(orderNo) {
- return request({
- url: '/api/admin/product/order/detail',
- method: 'post',
- data: { orderNo }
- })
- }
- export function shipOrder(orderNo, trackingNumber, expressCompany) {
- return request({
- url: '/api/admin/product/order/ship',
- method: 'post',
- data: { orderNo, trackingNumber, expressCompany }
- })
- }
- export function closeOrder(orderNo) {
- return request({
- url: '/api/admin/product/order/close',
- method: 'post',
- data: { orderNo }
- })
- }
- export function approveRefund(orderNo) {
- return request({
- url: '/api/admin/product/order/refund/approve',
- method: 'post',
- data: { orderNo }
- })
- }
- export function rejectRefund(orderNo, reason) {
- return request({
- url: '/api/admin/product/order/refund/reject',
- method: 'post',
- data: { orderNo, reason }
- })
- }
- // ========== 系统配置 API ==========
- export function getSysConfigList(params) {
- return request({
- url: '/api/admin/config/list',
- method: 'post',
- data: params
- })
- }
- export function createSysConfig(data) {
- return request({
- url: '/api/admin/config/update',
- method: 'post',
- data: { configKey: data.configKey, configValue: data.configValue }
- })
- }
- export function updateSysConfig(id, data) {
- return request({
- url: '/api/admin/config/update',
- method: 'post',
- data: { configKey: data.configKey, configValue: data.configValue }
- })
- }
- export function deleteSysConfig(id) {
- return request({
- url: `/api/admin/config/delete/${id}`,
- method: 'post'
- })
- }
- // ========== 佣金推荐系统 API ==========
- export function getWithdrawalList(params) {
- return request({
- url: '/api/admin/commission/withdrawals',
- method: 'post',
- data: params
- })
- }
- export function auditWithdrawal(requestId, status, remark) {
- return request({
- url: '/api/admin/commission/audit',
- method: 'post',
- data: { requestId, status, remark }
- })
- }
- export function updateProductProfitRate(productId, profitRate) {
- return request({
- url: '/api/admin/commission/update-profit-rate',
- method: 'post',
- data: { productId, profitRate }
- })
- }
- // ========== 星座配置管理 API ==========
- export function listZodiacConfigs() {
- return request({
- url: '/api/admin/zodiac-config/list',
- method: 'post'
- })
- }
- export function createZodiacConfig(data) {
- return request({
- url: '/api/admin/zodiac-config/create',
- method: 'post',
- data
- })
- }
- export function updateZodiacConfig(data) {
- return request({
- url: '/api/admin/zodiac-config/update',
- method: 'post',
- data
- })
- }
- export function deleteZodiacConfig(id) {
- return request({
- url: '/api/admin/zodiac-config/delete',
- method: 'post',
- data: { id }
- })
- }
- // ========== 八字配置管理 API ==========
- export function listBaziConfigs() {
- return request({
- url: '/api/admin/bazi-config/list',
- method: 'post'
- })
- }
- export function createBaziConfig(data) {
- return request({
- url: '/api/admin/bazi-config/create',
- method: 'post',
- data
- })
- }
- export function updateBaziConfig(data) {
- return request({
- url: '/api/admin/bazi-config/update',
- method: 'post',
- data
- })
- }
- export function deleteBaziConfig(id) {
- return request({
- url: '/api/admin/bazi-config/delete',
- method: 'post',
- data: { id }
- })
- }
- // ========== 血型配置管理 API ==========
- export function listBloodTypeConfigs() {
- return request({
- url: '/api/admin/blood-type-config/list',
- method: 'post'
- })
- }
- export function createBloodTypeConfig(data) {
- return request({
- url: '/api/admin/blood-type-config/create',
- method: 'post',
- data
- })
- }
- export function updateBloodTypeConfig(data) {
- return request({
- url: '/api/admin/blood-type-config/update',
- method: 'post',
- data
- })
- }
- export function deleteBloodTypeConfig(id) {
- return request({
- url: '/api/admin/blood-type-config/delete',
- method: 'post',
- data: { id }
- })
- }
- // ========== 服务器运行状态 ==========
- export function getSystemHealth() {
- return request({
- url: '/api/system/health',
- method: 'post'
- })
- }
- // 关系类型管理
- export function listRelationshipTypes() {
- return request({
- url: '/api/admin/relationship-type/list',
- method: 'post'
- })
- }
- export function saveRelationshipType(data) {
- return request({
- url: '/api/admin/relationship-type/save',
- method: 'post',
- data
- })
- }
- export function deleteRelationshipType(id) {
- return request({
- url: '/api/admin/relationship-type/delete',
- method: 'post',
- data: { id }
- })
- }
- // ========== 虚拟服务商团队管理 API ==========
- export function listVirtualTeams(params) {
- return request({
- url: '/api/admin/virtual-team/list',
- method: 'post',
- data: params
- })
- }
- export function createVirtualTeam(data) {
- return request({
- url: '/api/admin/virtual-team/create',
- method: 'post',
- data
- })
- }
- export function updateVirtualTeam(data) {
- return request({
- url: '/api/admin/virtual-team/update',
- method: 'post',
- data
- })
- }
- export function toggleVirtualTeam(id) {
- return request({
- url: '/api/admin/virtual-team/toggle',
- method: 'post',
- data: { id }
- })
- }
- export function getVirtualTeamMembers(systemId) {
- return request({
- url: '/api/admin/virtual-team/members',
- method: 'post',
- data: { systemId }
- })
- }
- export function addVirtualTeamMember(data) {
- return request({
- url: '/api/admin/virtual-team/add-member',
- method: 'post',
- data
- })
- }
- export function removeVirtualTeamMember(id) {
- return request({
- url: '/api/admin/virtual-team/remove-member',
- method: 'post',
- data: { id }
- })
- }
- export function updateVirtualTeamMember(data) {
- return request({
- url: '/api/admin/virtual-team/update-member',
- method: 'post',
- data
- })
- }
- export function getVirtualTeamTree(systemId) {
- return request({
- url: '/api/admin/virtual-team/tree',
- method: 'post',
- data: { systemId }
- })
- }
- export function searchUsers(params) {
- return request({
- url: '/api/admin/user/search',
- method: 'post',
- data: params
- })
- }
- // ========== 情绪告警管理 API ==========
- export function getEmotionAlertList(params) {
- return request({
- url: '/api/mind/alert/admin/list',
- method: 'post',
- data: params
- })
- }
- export function resolveEmotionAlert(alertId) {
- return request({
- url: '/api/mind/alert/resolve',
- method: 'post',
- data: { alertId, source: 'checkin' }
- })
- }
- // ========== 食材管理 API ==========
- export function getFoodList(params) {
- return request({
- url: '/api/admin/foods/list',
- method: 'post',
- data: params
- })
- }
- export function createFood(data) {
- return request({
- url: '/api/admin/foods/create',
- method: 'post',
- data
- })
- }
- export function updateFood(data) {
- return request({
- url: '/api/admin/foods/update',
- method: 'post',
- data
- })
- }
- export function deleteFood(id) {
- return request({
- url: '/api/admin/foods/delete',
- method: 'post',
- data: { id }
- })
- }
- export function getFoodDetail(id) {
- return request({
- url: '/api/admin/foods/detail',
- method: 'post',
- data: { id }
- })
- }
- export function saveFoodMonths(id, months) {
- return request({
- url: '/api/admin/foods/saveMonths',
- method: 'post',
- data: { id, months }
- })
- }
- // 供应商体系管理
- export function getSupplySystemList(params) {
- return request({
- url: '/api/admin/supply-system/list',
- method: 'post',
- data: params || {}
- })
- }
- export function getSupplySystemDetail(id) {
- return request({
- url: '/api/admin/supply-system/detail',
- method: 'post',
- data: { id }
- })
- }
- export function createSupplySystem(data) {
- return request({
- url: '/api/admin/supply-system/create',
- method: 'post',
- data
- })
- }
- export function updateSupplySystem(data) {
- return request({
- url: '/api/admin/supply-system/update',
- method: 'post',
- data
- })
- }
- export function toggleSupplySystemStatus(id) {
- return request({
- url: '/api/admin/supply-system/toggle-status',
- method: 'post',
- data: { id }
- })
- }
- export function listAllSupplySystems() {
- return request({
- url: '/api/admin/supply-system/list-all',
- method: 'post'
- })
- }
- export function getSupplySystemMembers(systemId) {
- return request({
- url: '/api/admin/supply-system/member/list',
- method: 'post',
- data: { systemId }
- })
- }
- export function addSupplySystemMember(systemId, userId) {
- return request({
- url: '/api/admin/supply-system/member/add',
- method: 'post',
- data: { systemId, userId }
- })
- }
- export function removeSupplySystemMember(memberId) {
- return request({
- url: '/api/admin/supply-system/member/remove',
- method: 'post',
- data: { memberId }
- })
- }
- export function changeSupplySystemMemberRole(memberId, role) {
- return request({
- url: '/api/admin/supply-system/member/change-role',
- method: 'post',
- data: { memberId, role }
- })
- }
- // ========== 供应商产品管理 API (supplier_admin) ==========
- export function getMySupplySystem() {
- return request({
- url: '/api/admin/supply-system/my-system',
- method: 'post'
- })
- }
- export function getSupplierProductList(params) {
- return request({
- url: '/api/admin/supplier/product/list',
- method: 'post',
- data: params
- })
- }
- export function createSupplierProduct(data) {
- return request({
- url: '/api/admin/supplier/product/create',
- method: 'post',
- data
- })
- }
- export function updateSupplierProduct(data) {
- return request({
- url: '/api/admin/supplier/product/update',
- method: 'post',
- data
- })
- }
- export function getSupplierProductDetail(id) {
- return request({
- url: '/api/admin/supplier/product/detail',
- method: 'post',
- data: { productId: id }
- })
- }
- export function deleteSupplierProduct(id) {
- return request({
- url: '/api/admin/supplier/product/delete',
- method: 'post',
- data: { productId: id }
- })
- }
- export function shelveSupplierProduct(productId, shelve) {
- return request({
- url: '/api/admin/supplier/product/shelve',
- method: 'post',
- data: { productId, shelve }
- })
- }
- // 结算管理
- export function getSupplySettlementList(params) {
- return request({
- url: '/api/admin/supply-settlement/list',
- method: 'post',
- data: params || {}
- })
- }
- export function getSupplySettlementDetail(id) {
- return request({
- url: '/api/admin/supply-settlement/detail',
- method: 'post',
- data: { id }
- })
- }
- export function getSupplySettlementDetailItems(settlementId) {
- return request({
- url: '/api/admin/supply-settlement/detail-items',
- method: 'post',
- data: { settlementId }
- })
- }
- export function createSupplySettlement(systemId, periodStart, periodEnd, remark) {
- return request({
- url: '/api/admin/supply-settlement/create',
- method: 'post',
- data: { systemId, periodStart, periodEnd, remark }
- })
- }
- export function confirmSupplySettlement(id) {
- return request({
- url: '/api/admin/supply-settlement/confirm',
- method: 'post',
- data: { id }
- })
- }
- // ========== 供应商管理 (supplier_admin) ==========
- export function getSupplyManageList(params) {
- return request({
- url: '/api/admin/supply-manage/list',
- method: 'post',
- data: params
- })
- }
- export function getSupplyManageDetail(params) {
- return request({
- url: '/api/admin/supply-manage/detail',
- method: 'post',
- data: params
- })
- }
- export function createSupplyManage(params) {
- return request({
- url: '/api/admin/supply-manage/create',
- method: 'post',
- data: params
- })
- }
- export function updateSupplyManage(params) {
- return request({
- url: '/api/admin/supply-manage/update',
- method: 'post',
- data: params
- })
- }
- export function deleteSupplyManage(params) {
- return request({
- url: '/api/admin/supply-manage/delete',
- method: 'post',
- data: params
- })
- }
- export function addSupplierRole(params) {
- return request({
- url: '/api/admin/supply-manage/add-role',
- method: 'post',
- data: params
- })
- }
- export function removeSupplierRole(params) {
- return request({
- url: '/api/admin/supply-manage/remove-role',
- method: 'post',
- data: params
- })
- }
- export function adjustSupplyTier(params) {
- return request({
- url: '/api/admin/supply-manage/adjust-tier',
- method: 'post',
- data: params
- })
- }
- // 供应商层级关系管理
- export function getSupplyHierarchyTree(systemId) {
- return request({
- url: '/api/admin/supply-hierarchy/tree',
- method: 'post',
- data: { systemId }
- })
- }
- export function setSupplyHierarchy(data) {
- return request({
- url: '/api/admin/supply-hierarchy/set',
- method: 'post',
- data
- })
- }
- export function removeSupplyHierarchy(data) {
- return request({
- url: '/api/admin/supply-hierarchy/remove',
- method: 'post',
- data
- })
- }
- export function getSupplyHierarchyDirectChildren(data) {
- return request({
- url: '/api/admin/supply-hierarchy/direct-children',
- method: 'post',
- data
- })
- }
- export function getSupplyHierarchyAllChildren(data) {
- return request({
- url: '/api/admin/supply-hierarchy/all-children',
- method: 'post',
- data
- })
- }
- export function getSupplyHierarchyParent(data) {
- return request({
- url: '/api/admin/supply-hierarchy/parent',
- method: 'post',
- data
- })
- }
- export function getSupplyHierarchyParentChain(data) {
- return request({
- url: '/api/admin/supply-hierarchy/parent-chain',
- method: 'post',
- data
- })
- }
- export function getSupplyHierarchyMy(data) {
- return request({
- url: '/api/admin/supply-hierarchy/my',
- method: 'post',
- data
- })
- }
- export function getSupplyHierarchyChangeRequests(data) {
- return request({
- url: '/api/admin/supply-hierarchy/change-requests',
- method: 'post',
- data
- })
- }
- export function applySupplyHierarchyChange(data) {
- return request({
- url: '/api/admin/supply-hierarchy/change/apply',
- method: 'post',
- data
- })
- }
- export function reviewSupplyHierarchyChange(data) {
- return request({
- url: '/api/admin/supply-hierarchy/change/review',
- method: 'post',
- data
- })
- }
- // ========== 家庭会员订阅管理 API ==========
- export function getSubscriptionList(params) {
- return request({
- url: '/api/admin/subscription/list',
- method: 'post',
- data: params
- })
- }
- export function activateSubscription(data) {
- return request({
- url: '/api/admin/subscription/activate',
- method: 'post',
- data
- })
- }
- export function cancelSubscriptionAdmin(data) {
- return request({
- url: '/api/admin/subscription/cancel',
- method: 'post',
- data
- })
- }
- export function getBenefitConfig() {
- return request({
- url: '/api/admin/subscription/benefits',
- method: 'post'
- })
- }
- export function updateBenefitConfig(data) {
- return request({
- url: '/api/admin/subscription/benefits/update',
- method: 'post',
- data
- })
- }
- // ========== 推广等级配置 API ==========
- export function getPromotionTierList(params) {
- return request({
- url: '/api/admin/promotion/tier/list',
- method: 'post',
- data: params
- })
- }
- export function adjustPromotionTier(data) {
- return request({
- url: '/api/admin/promotion/tier/adjust',
- method: 'post',
- data
- })
- }
- // ========== 佣金/返利记录 API ==========
- export function getCommissionRecords(params) {
- return request({
- url: '/api/admin/commission/records',
- method: 'post',
- data: params
- })
- }
- export function settleCommission(data) {
- return request({
- url: '/api/admin/commission/settle',
- method: 'post',
- data
- })
- }
- export function refundCommission(data) {
- return request({
- url: '/api/admin/commission/refund',
- method: 'post',
- data
- })
- }
- // ========== 产品 P 点配置 API ==========
- export function getProductPpointList(params) {
- return request({
- url: '/api/admin/product-ppoint/list',
- method: 'post',
- data: params
- })
- }
- export function saveProductPpoint(data) {
- return request({
- url: '/api/admin/product-ppoint/save',
- method: 'post',
- data
- })
- }
- export function deleteProductPpoint(data) {
- return request({
- url: '/api/admin/product-ppoint/delete',
- method: 'post',
- data
- })
- }
- export function getProductPpointByProduct(data) {
- return request({
- url: '/api/admin/product-ppoint/by-product',
- method: 'post',
- data
- })
- }
- // ========== 推广等级配置 (R0-R4) API ==========
- export function getPromotionTierConfig() {
- return request({
- url: '/api/admin/promotion/config',
- method: 'post'
- })
- }
- export function updatePromotionTierConfig(data) {
- return request({
- url: '/api/admin/promotion/config/update',
- method: 'post',
- data
- })
- }
- // ========== 待退款管理 API ==========
- export function getPendingRefundList(params) {
- return request({
- url: '/api/admin/commission/refunds/pending',
- method: 'post',
- data: params
- })
- }
- export function getPendingRefundSummary() {
- return request({
- url: '/api/admin/commission/refunds/summary',
- method: 'post'
- })
- }
- export function cancelPendingRefund(params) {
- return request({
- url: '/api/admin/commission/refunds/cancel',
- method: 'post',
- data: params
- })
- }
- // ========== 佣金配置 API ==========
- export function getCommissionConfig() {
- return request({
- url: '/api/admin/commission/config',
- method: 'post'
- })
- }
- export function updateCommissionConfig(data) {
- return request({
- url: '/api/admin/commission/config/update',
- method: 'post',
- data
- })
- }
- // 电商供应商管理
- export function getEcomSupplierList(params) {
- return request({
- url: '/api/admin/supplier/list',
- method: 'post',
- data: params
- })
- }
- export function saveEcomSupplier(data) {
- return request({
- url: '/api/admin/supplier/save',
- method: 'post',
- data
- })
- }
- export function updateEcomSupplier(data) {
- return request({
- url: '/api/admin/supplier/update',
- method: 'post',
- data
- })
- }
- export function deleteEcomSupplier(id) {
- return request({
- url: '/api/admin/supplier/delete',
- method: 'post',
- data: { id }
- })
- }
- // ===== 家庭收益管理 =====
- export function getFamilyEarningsList() {
- return request({
- url: '/api/admin/earnings/families',
- method: 'post',
- data: {}
- })
- }
- export function getFamilyEarningsDetail(familyId) {
- return request({
- url: '/api/admin/earnings/family/' + familyId + '/summary',
- method: 'post',
- data: { familyId: familyId }
- })
- }
- export function getFamilyEarningsRecords(familyId, type) {
- return request({
- url: '/api/admin/earnings/family/' + familyId + '/records',
- method: 'post',
- data: { familyId: familyId, type: type || '' }
- })
- }
|