| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358 |
- 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}`,
- method: 'put',
- data
- })
- }
- export function deleteUser(id) {
- return request({
- url: `/api/admin/users/${id}`,
- method: 'delete'
- })
- }
- 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}`,
- method: 'put',
- data
- })
- }
- export function deleteFamily(id) {
- return request({
- url: `/api/admin/families/${id}`,
- method: 'delete'
- })
- }
- 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}`,
- method: 'put',
- data
- })
- }
- export function deleteTaskTemplate(id) {
- return request({
- url: `/api/admin/task-templates/${id}`,
- method: 'delete'
- })
- }
- // 孩子管理
- 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}`,
- method: 'put',
- data
- })
- }
- export function deleteChild(id) {
- return request({
- url: `/api/admin/children/${id}`,
- method: 'delete'
- })
- }
- 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}`,
- method: 'delete'
- })
- }
- export function updateRewardTemplate(id, data) {
- return request({
- url: `/api/admin/rewards/templates/${id}`,
- method: 'put',
- 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',
- method: 'get',
- params
- })
- }
- // 获取待处理列表(家长)
- export function getPendingWishes(familyId) {
- return request({
- url: '/api/wishes/pending',
- method: 'get',
- params: { familyId }
- })
- }
- // 获取心愿详情
- export function getWishDetail(id) {
- return request({
- url: `/api/wishes/${id}`,
- method: 'get'
- })
- }
- // 家长定价
- export function setWishPrice(id, pointsRequired) {
- return request({
- url: `/api/wishes/${id}/set-price`,
- method: 'put',
- data: { pointsRequired }
- })
- }
- // 家长拒绝心愿
- export function rejectWish(id, reason) {
- return request({
- url: `/api/wishes/${id}/reject`,
- method: 'put',
- data: { reason }
- })
- }
- // 家长审批兑换
- export function approveWishExchange(id, approved, reason) {
- return request({
- url: `/api/wishes/${id}/approve-exchange`,
- method: 'put',
- data: { approved, reason }
- })
- }
- // 家长标记已购买
- export function markWishFulfilled(id) {
- return request({
- url: `/api/wishes/${id}/fulfill`,
- method: 'put'
- })
- }
- // 取消心愿
- export function deleteWish(id, reason) {
- return request({
- url: `/api/wishes/${id}`,
- method: 'delete',
- 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}`,
- method: 'delete'
- })
- }
- // 获取指定家庭的任务列表
- 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 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: 'delete'
- })
- }
- // ========== 分佣裂变系统 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 getEducationSystems() {
- return request({
- url: '/api/admin/education-systems/list',
- method: 'post'
- })
- }
- export function getAllEducationSystems() {
- return request({
- url: '/api/admin/education-systems/all',
- method: 'post'
- })
- }
- export function createEducationSystem(data) {
- return request({
- url: '/api/admin/education-systems/create',
- method: 'post',
- data
- })
- }
- export function updateEducationSystem(data) {
- return request({
- url: '/api/admin/education-systems/update',
- method: 'post',
- data
- })
- }
- export function deleteEducationSystem(id) {
- return request({
- url: '/api/admin/education-systems/delete',
- method: 'post',
- data: { id }
- })
- }
- // ========== 星座配置管理 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 }
- })
- }
- // 结算管理
- 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
- })
- }
- // ========== 家庭会员订阅管理 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: 'get'
- })
- }
- 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 getPpointProductList(params) {
- return request({
- url: '/api/admin/ppoint/products',
- method: 'post',
- data: params
- })
- }
- export function updateProductPpoint(data) {
- return request({
- url: '/api/admin/ppoint/update',
- method: 'post',
- data
- })
- }
- // ========== 推广等级配置 (R0-R4) API ==========
- export function getPromotionTierConfig() {
- return request({
- url: '/api/admin/promotion/config',
- method: 'get'
- })
- }
- export function updatePromotionTierConfig(data) {
- return request({
- url: '/api/admin/promotion/config/update',
- method: 'post',
- data
- })
- }
- // ========== 佣金配置 API ==========
- export function getCommissionConfig() {
- return request({
- url: '/api/admin/commission/config',
- method: 'get'
- })
- }
- export function updateCommissionConfig(data) {
- return request({
- url: '/api/admin/commission/config/update',
- method: 'post',
- data
- })
- }
|