| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210 |
- 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 }
- })
- }
- // ========== 商品配送与履约 API ==========
- export function vendorConfirmOrder(orderNo) {
- return request({
- url: '/api/product/order/vendor-confirm',
- method: 'post',
- data: { orderNo }
- })
- }
- // ===== 线上服务配置(批量接口,路由 /api/product/delivery-config/*)=====
- export function listDeliveryServicePersons(productId) {
- return request({
- url: '/api/product/delivery-config/service-person/list',
- method: 'post',
- data: { productId }
- })
- }
- export function saveDeliveryServicePersons(productId, persons) {
- return request({
- url: '/api/product/delivery-config/service-person/save',
- method: 'post',
- data: { productId, persons }
- })
- }
- export function listDeliveryOnlineSlots(productId) {
- return request({
- url: '/api/product/delivery-config/online-slot/list',
- method: 'post',
- data: { productId }
- })
- }
- export function saveDeliveryOnlineSlots(productId, slots) {
- return request({
- url: '/api/product/delivery-config/online-slot/save',
- method: 'post',
- data: { productId, slots }
- })
- }
- // 家庭管理
- 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 setMemberAdminRole(familyId, memberId, isAdmin) {
- return request({
- url: `/api/admin/families/${familyId}/members/set-admin`,
- method: 'post',
- data: { memberId, isAdmin }
- })
- }
- // 任务模板管理
- 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 getPendingReviewTasks(params) {
- return request({
- url: '/api/admin/tasks/pending-review',
- method: 'post',
- data: params || {}
- })
- }
- export function reviewAdminTask(taskId, data) {
- return request({
- url: `/api/admin/tasks/${taskId}/review`,
- method: 'post',
- data
- })
- }
- // 奖励管理
- 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: {}
- })
- }
- export function getTrafficAnalytics() {
- return request({
- url: '/api/stats/traffic',
- 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 batchShelveProduct(productIds, shelve) {
- return request({
- url: '/api/admin/product/batch-shelve',
- method: 'post',
- data: { productIds, shelve }
- })
- }
- 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 }
- })
- }
- export function copyProduct(id) {
- return request({
- url: '/api/admin/product/copy',
- method: 'post',
- data: { productId: id }
- })
- }
- export function getGrowthArchiveProduct(productId) {
- return request({
- url: '/api/admin/growth-archive-product/detail',
- method: 'post',
- data: { productId }
- })
- }
- export function saveGrowthArchiveProduct(data) {
- return request({
- url: '/api/admin/growth-archive-product/save',
- method: 'post',
- data
- })
- }
- // ========== 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 linkedProductList(params) {
- return request({
- url: '/api/admin/product/linked/list',
- method: 'post',
- data: params
- })
- }
- 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 }
- })
- }
- export function saveProductGiftRule(productId, status, levelCode) {
- return request({
- url: '/api/admin/product-gift-rule/save',
- method: 'post',
- data: { productId, status, levelCode }
- })
- }
- export function listProductGiftRules(productId) {
- return request({
- url: '/api/admin/product-gift-rule/list',
- method: 'post',
- data: { productId }
- })
- }
- export function saveProductGift(data) {
- return request({
- url: '/api/admin/product-gift/save',
- method: 'post',
- data
- })
- }
- export function getProductGiftList(productId) {
- return request({
- url: '/api/admin/product-gift/list',
- method: 'post',
- data: { productId }
- })
- }
- export function listMembershipLevels() {
- return request({
- url: '/api/membership/levels',
- method: 'post'
- })
- }
- export function updateMembershipLevel(data) {
- return request({
- url: '/api/admin/membership/level/update',
- method: 'post',
- data
- })
- }
- export function updateMembershipUser(data) {
- return request({
- url: '/api/admin/membership/user-update',
- method: 'post',
- data
- })
- }
- // ========== 分类管理 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, extra) {
- return request({
- url: '/api/admin/product/order/ship',
- method: 'post',
- data: { orderNo, trackingNumber, expressCompany, ...extra }
- })
- }
- 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 getUnlockGateList(params) {
- return request({
- url: '/api/admin/unlock-gates/list',
- method: 'post',
- data: params || {}
- })
- }
- export function saveUnlockGate(data) {
- return request({
- url: '/api/admin/unlock-gates/save',
- method: 'post',
- data
- })
- }
- export function deleteUnlockGate(id) {
- return request({
- url: '/api/admin/unlock-gates/delete',
- method: 'post',
- data: { id }
- })
- }
- export function sortUnlockGates(sortList) {
- return request({
- url: '/api/admin/unlock-gates/sort',
- method: 'post',
- data: sortList
- })
- }
- export function toggleUnlockGate(id, enabled) {
- return request({
- url: '/api/admin/unlock-gates/toggle',
- method: 'post',
- data: { id, enabled }
- })
- }
- export function resetFamilyGates(familyId) {
- return request({
- url: '/api/admin/unlock-gates/reset-family',
- method: 'post',
- data: { familyId }
- })
- }
- export function getFamilyGateProgress(familyId) {
- return request({
- url: '/api/admin/unlock-gates/family-progress',
- method: 'post',
- data: { familyId }
- })
- }
- // ========== 佣金推荐系统 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 listInnatePortraitConfigs() {
- return request({
- url: '/api/admin/innate-portrait-config/list',
- method: 'post'
- })
- }
- export function updateInnatePortraitConfig(data) {
- return request({
- url: '/api/admin/innate-portrait-config/update',
- method: 'post',
- data
- })
- }
- export function invalidateInnatePortraitScores() {
- return request({
- url: '/api/admin/innate-portrait-config/invalidate',
- method: 'post'
- })
- }
- // ========== 数字能量详细配置 API ==========
- export function listNumSoulDetailConfigs(data) {
- return request({
- url: '/api/admin/numsoul-detail-config/list',
- method: 'post',
- data
- })
- }
- export function createNumSoulDetailConfig(data) {
- return request({
- url: '/api/admin/numsoul-detail-config/create',
- method: 'post',
- data
- })
- }
- export function updateNumSoulDetailConfig(data) {
- return request({
- url: '/api/admin/numsoul-detail-config/update',
- method: 'post',
- data
- })
- }
- export function deleteNumSoulDetailConfig(id) {
- return request({
- url: '/api/admin/numsoul-detail-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'
- })
- }
- // ========== 虚拟服务商团队管理 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
- })
- }
- // 电商供应商管理(已合并至供应商体系,接口指向 /api/admin/supply-system)
- // 保留旧函数名但指向新接口,避免前端报错
- export function getEcomSupplierList(params) {
- return request({
- url: '/api/admin/supply-system/list',
- method: 'post',
- data: params
- })
- }
- export function saveEcomSupplier(data) {
- return request({
- url: '/api/admin/supply-system/create',
- method: 'post',
- data
- })
- }
- export function updateEcomSupplier(data) {
- return request({
- url: '/api/admin/supply-system/update',
- method: 'post',
- data
- })
- }
- export function deleteEcomSupplier(id) {
- return request({
- url: '/api/admin/supply-system/toggle-status',
- method: 'post',
- data: { id }
- })
- }
- export function getAllSuppliers() {
- return request({
- url: '/api/admin/supplier/all',
- method: 'post'
- })
- }
- // ===== 家庭收益管理 =====
- 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 || '' }
- })
- }
- // ===== 测评待分配规划师 =====
- export function getPendingAssessmentList(params) {
- return request({
- url: '/api/admin/assessment/pending-list',
- method: 'post',
- data: params || {}
- })
- }
- export function getAvailableGuides() {
- return request({
- url: '/api/admin/assessment/available-guides',
- method: 'post',
- data: {}
- })
- }
- export function assignGuide(appointmentId, guideId) {
- return request({
- url: '/api/admin/assessment/assign-guide',
- method: 'post',
- data: { appointmentId, guideId }
- })
- }
- // ===== 测评订单管理 =====
- export function getAssessmentOrderList(params) {
- return request({
- url: '/api/admin/assessment/orders',
- method: 'post',
- data: params || {}
- })
- }
- export function changeAssessmentGuide(orderId, guideId) {
- return request({
- url: '/api/admin/assessment/change-guide',
- method: 'post',
- data: { orderId, guideId }
- })
- }
- // ========== 库存管理 API ==========
- export function createInboundOrder(data) {
- return request({
- url: '/api/admin/inventory/inbound/create',
- method: 'post',
- data
- })
- }
- export function getInboundOrderList(params) {
- return request({
- url: '/api/admin/inventory/inbound/list',
- method: 'post',
- data: params
- })
- }
- export function getInboundOrderDetail(id) {
- return request({
- url: '/api/admin/inventory/inbound/detail',
- method: 'post',
- data: { id }
- })
- }
- export function confirmInbound(id) {
- return request({
- url: '/api/admin/inventory/inbound/confirm',
- method: 'post',
- data: { id }
- })
- }
- export function cancelInbound(id) {
- return request({
- url: '/api/admin/inventory/inbound/cancel',
- method: 'post',
- data: { id }
- })
- }
- export function getInventoryTransactions(params) {
- return request({
- url: '/api/admin/inventory/transactions/list',
- method: 'post',
- data: params
- })
- }
- export function createCountingRecord(data) {
- return request({
- url: '/api/admin/inventory/counting/create',
- method: 'post',
- data
- })
- }
- export function confirmCounting(id) {
- return request({
- url: '/api/admin/inventory/counting/confirm',
- method: 'post',
- data: { id }
- })
- }
- export function getCountingList(params) {
- return request({
- url: '/api/admin/inventory/counting/list',
- method: 'post',
- data: params
- })
- }
- export function getStockAlerts() {
- return request({
- url: '/api/admin/inventory/alert/list',
- method: 'post'
- })
- }
- export function getProductStock(productId) {
- return request({
- url: '/api/admin/inventory/product/stock',
- method: 'post',
- data: { productId }
- })
- }
- export function saveBundleItems(bundleProductId, items) {
- return request({
- url: '/api/admin/inventory/bundle/items',
- method: 'post',
- data: { bundleProductId, items }
- })
- }
- export function getBundleItems(bundleProductId) {
- return request({
- url: '/api/admin/inventory/bundle/items/list',
- method: 'post',
- data: { bundleProductId }
- })
- }
- export function checkBundleStock(bundleProductId, quantity) {
- return request({
- url: '/api/admin/inventory/bundle/check-stock',
- method: 'post',
- data: { bundleProductId, quantity }
- })
- }
- export function createManualOutbound(data) {
- return request({
- url: '/api/admin/inventory/outbound/create',
- method: 'post',
- data
- })
- }
- export function getManualOutboundList(params) {
- return request({
- url: '/api/admin/inventory/outbound/list',
- method: 'post',
- data: params
- })
- }
- export function getFamilyMemberList(params) {
- return request({
- url: '/api/family/member/list',
- method: 'post',
- data: params
- })
- }
- export function updateOrderExpress(data) {
- return request({
- url: '/api/admin/product/order/update-express',
- method: 'post',
- data
- })
- }
- // ========== 健康报告代上传 ==========
- export function proxyParseReport(data) {
- const formData = new FormData()
- formData.append('file', data.file)
- formData.append('familyId', data.familyId)
- if (data.subjectId) formData.append('subjectId', data.subjectId)
- if (data.note) formData.append('note', data.note)
- return request({
- url: '/api/health/report/proxy-parse',
- method: 'post',
- data: formData,
- headers: { 'Content-Type': 'multipart/form-data' }
- })
- }
- export function proxyConfirmReport(data) {
- return request({
- url: '/api/health/report/proxy-confirm',
- method: 'post',
- data
- })
- }
- export function listHealthReports(params) {
- return request({
- url: '/api/health/report/list',
- method: 'post',
- data: params
- })
- }
- export function adminListHealthReports(params) {
- return request({
- url: '/api/health/report/admin-list',
- method: 'post',
- data: params
- })
- }
- export function getHealthReportDetail(reportId) {
- return request({
- url: '/api/health/report/detail',
- method: 'post',
- data: { reportId }
- })
- }
- export function archiveReport(reportId) {
- return request({
- url: '/api/health/report/archive',
- method: 'post',
- data: { reportId }
- })
- }
- export function archiveReportsBatch(reportIds) {
- return request({
- url: '/api/health/report/archive-batch',
- method: 'post',
- data: { reportIds }
- })
- }
- export function editHealthReport(data) {
- return request({
- url: '/api/health/report/edit',
- method: 'post',
- data
- })
- }
- export function reassignHealthReport(data) {
- return request({
- url: '/api/health/report/reassign',
- method: 'post',
- data
- })
- }
- export function getUnlinkedReports(data) {
- return request({
- url: '/api/health/report/unlinked',
- method: 'post',
- data
- })
- }
- // ===== CF值(平台积分)管理 =====
- export function getCfValueBalance(data) {
- return request({
- url: '/api/admin/cf-value/balance',
- method: 'post',
- data
- })
- }
- export function getCfValueLogs(data) {
- return request({
- url: '/api/admin/cf-value/logs',
- method: 'post',
- data
- })
- }
- export function getCfValueAllBalances(data) {
- return request({
- url: '/api/admin/cf-value/all-balances',
- method: 'post',
- data
- })
- }
- // 获取已入驻的服务商列表(用于商品编辑下拉选择)
- export function getApprovedGuides() {
- return request({
- url: '/api/admin/guide/guides/approved',
- method: 'post'
- })
- }
- // 用户画像管理
- export function getProfile(memberId) {
- return request({
- url: '/api/admin/profile/get',
- method: 'post',
- data: { memberId }
- })
- }
- export function getProfileTrend(memberId, days) {
- return request({
- url: '/api/admin/profile/trend',
- method: 'post',
- data: { memberId, days: days || 30 }
- })
- }
- // ========== 引导配置 API ==========
- export function getGuideConfig() {
- return request({
- url: '/api/admin/guide-config/get',
- method: 'post'
- })
- }
- export function saveGuideConfig(configValue) {
- return request({
- url: '/api/admin/guide-config/save',
- method: 'post',
- data: { configValue }
- })
- }
|