| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202 |
- 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: {}
- })
- }
- // ========== 商品管理 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 }
- })
- }
|