|
|
@@ -40,6 +40,7 @@
|
|
|
.method-get { background: #e8f5e9; color: #2e7d32; }
|
|
|
.method-post { background: #e3f2fd; color: #1565c0; }
|
|
|
.method-put { background: #fff3e0; color: #e65100; }
|
|
|
+ .method-patch { background: #fff8e1; color: #f9a825; }
|
|
|
.method-delete { background: #fce4ec; color: #c62828; }
|
|
|
.section-title .path { font-family: Consolas, Monaco, monospace; color: #555; font-size: 15px; }
|
|
|
.section-title .auth-tag { font-size: 12px; padding: 3px 8px; border-radius: 3px; margin-left: auto; }
|
|
|
@@ -234,6 +235,9 @@
|
|
|
<div class="module-tab" data-module="platform-config">11.平台配置</div>
|
|
|
<div class="module-tab" data-module="search-record">12.搜索记录</div>
|
|
|
<div class="module-tab" data-module="platform-session">13.平台会话</div>
|
|
|
+ <div class="module-tab" data-module="content">14.内容配置</div>
|
|
|
+ <div class="module-tab" data-module="procurement-ledger">15.采购台账</div>
|
|
|
+ <div class="module-tab" data-module="purchase-intent">16.跳转购买记录</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 运营侧模块标签栏 -->
|
|
|
@@ -681,6 +685,9 @@ function renderModule(module) {
|
|
|
case 'platform-config': html = renderPlatformConfigModule(); break;
|
|
|
case 'search-record': html = renderSearchRecordModule(); break;
|
|
|
case 'platform-session': html = renderPlatformSessionModule(); break;
|
|
|
+ case 'content': html = renderContentModule(); break;
|
|
|
+ case 'procurement-ledger': html = renderProcurementLedgerModule(); break;
|
|
|
+ case 'purchase-intent': html = renderPurchaseIntentModule(); break;
|
|
|
// 运营侧模块
|
|
|
case 'admin-membership': html = renderAdminMembershipModule(); break;
|
|
|
case 'admin-invite': html = renderAdminInviteModule(); break;
|
|
|
@@ -1185,6 +1192,82 @@ const FIELD_DESC = {
|
|
|
['searchLog', 'Object/null', '搜索日志(仅详情接口返回,列表接口为null)']
|
|
|
],
|
|
|
|
|
|
+ 'contentHelp': [
|
|
|
+ ['title', 'String', '帮助标题(如:智价云(药店版)帮助)'],
|
|
|
+ ['faqs', 'Array', '常见问题列表'],
|
|
|
+ ['faqs[].q', 'String', '问题(如:小程序和桌面版有什么区别?)'],
|
|
|
+ ['faqs[].a', 'String', '答案说明'],
|
|
|
+ ['compliance', 'String', '合规声明(数据来源于绑定的B2B平台账号)']
|
|
|
+ ],
|
|
|
+
|
|
|
+ 'contentDownload': [
|
|
|
+ ['windowsUrl', 'String', 'Windows桌面客户端下载链接'],
|
|
|
+ ['officialSiteUrl', 'String', '官方网站地址'],
|
|
|
+ ['version', 'String', '当前版本号(如:1.0.0)'],
|
|
|
+ ['releaseNotes', 'String', '版本发布说明']
|
|
|
+ ],
|
|
|
+
|
|
|
+ 'procurementLedger': [
|
|
|
+ ['id', 'Long', '台账记录ID'],
|
|
|
+ ['userId', 'Long', '用户ID'],
|
|
|
+ ['intentId', 'Long', '关联的跳转购买记录ID(可为null)'],
|
|
|
+ ['queryId', 'Long', '关联的查询记录ID(可为null)'],
|
|
|
+ ['drugName', 'String', '药品名称'],
|
|
|
+ ['spec', 'String', '规格'],
|
|
|
+ ['qty', 'BigDecimal', '采购数量'],
|
|
|
+ ['unitPrice', 'BigDecimal', '单价'],
|
|
|
+ ['total', 'BigDecimal', '总价'],
|
|
|
+ ['platform', 'String', '采购平台'],
|
|
|
+ ['orderNote', 'String', '订单备注'],
|
|
|
+ ['status', 'String', '状态(ordered/received/cancelled)'],
|
|
|
+ ['createTime', 'DateTime', '创建时间'],
|
|
|
+ ['updateTime', 'DateTime', '更新时间']
|
|
|
+ ],
|
|
|
+
|
|
|
+ 'purchaseIntent': [
|
|
|
+ ['id', 'Long', '记录ID'],
|
|
|
+ ['userId', 'Long', '用户ID'],
|
|
|
+ ['queryId', 'Long', '关联查询记录ID(可为null)'],
|
|
|
+ ['drugName', 'String', '药品名称'],
|
|
|
+ ['spec', 'String', '规格'],
|
|
|
+ ['manufacturer', 'String', '厂家'],
|
|
|
+ ['platformCode', 'String', '平台代码(如:yaoshibang)'],
|
|
|
+ ['platformName', 'String', '平台名称(如:药师帮)'],
|
|
|
+ ['referencePrice', 'BigDecimal', '参考价格'],
|
|
|
+ ['externalUrl', 'String', '外部跳转链接'],
|
|
|
+ ['sourceClient', 'String', '来源客户端(WINDOWS/ANDROID/MINIAPP)'],
|
|
|
+ ['createTime', 'DateTime', '创建时间']
|
|
|
+ ],
|
|
|
+
|
|
|
+ 'userMe': [
|
|
|
+ ['user', 'Object', '用户基本信息'],
|
|
|
+ ['gate', 'Object', '准入信息(入驻审核状态等)'],
|
|
|
+ ['quota', 'Object', '配额信息(爬虫次数、关注数等)'],
|
|
|
+ ['platforms', 'Array', '已绑定的平台账号列表']
|
|
|
+ ],
|
|
|
+
|
|
|
+ 'dashboard': [
|
|
|
+ ['membership', 'Object', '会员状态摘要'],
|
|
|
+ ['quota', 'Object', '配额使用摘要'],
|
|
|
+ ['watchlistCount', 'Integer', '关注药品数量'],
|
|
|
+ ['orderCount', 'Integer', '订单数量']
|
|
|
+ ],
|
|
|
+
|
|
|
+ 'membershipUser': [
|
|
|
+ ['userId', 'Long', '用户ID'],
|
|
|
+ ['phone', 'String', '手机号'],
|
|
|
+ ['nickname', 'String', '昵称'],
|
|
|
+ ['level', 'String', '会员等级(PLUS/PRO/ULTRA)'],
|
|
|
+ ['membershipExpireAt', 'DateTime', '会员到期时间'],
|
|
|
+ ['membershipDaysRemaining', 'Integer', '会员剩余天数'],
|
|
|
+ ['source', 'String', '会员来源']
|
|
|
+ ],
|
|
|
+
|
|
|
+ 'adminActivityInviteRetroactive': [
|
|
|
+ ['processedCount', 'Integer', '已处理的邀请关系数量'],
|
|
|
+ ['grantedCount', 'Integer', '成功补发奖励的数量'],
|
|
|
+ ['skippedCount', 'Integer', '跳过的数量(已发放或不满足条件)']
|
|
|
+ ],
|
|
|
|
|
|
};
|
|
|
|
|
|
@@ -1329,7 +1412,26 @@ function renderAuthModule() {
|
|
|
<div style="margin-top:-8px;margin-bottom:14px;">
|
|
|
<button class="btn btn-primary btn-sm" onclick="sendCodeToField('auth-change-phone-newPhone','change_phone')">发送验证码到新手机</button>
|
|
|
<span style="font-size:11px;color:#888;margin-left:8px;">开发环境固定验证码: 123456</span>
|
|
|
- </div>`;
|
|
|
+ </div>
|
|
|
+ ${testSection('auth-miniapp-login', '小程序统一登录', 'POST', 'post', '/api/auth/wechat/miniapp/login', '公开', 'auth-public',
|
|
|
+ [{label:'小程序授权码(jsCode)', name:'jsCode', placeholder:'wx.login()返回的code', default:'test_miniapp_code'},
|
|
|
+ {label:'手机号授权码(phoneCode,可选)', name:'phoneCode', placeholder:'getPhoneNumber返回的code', default:''},
|
|
|
+ {label:'邀请码(inviteCode,可选)', name:'inviteCode', placeholder:'ABC123', default:''},
|
|
|
+ {label:'设备类型(deviceType)', name:'deviceType', placeholder:'MINIAPP', default:'MINIAPP'}], true, 'loginResponse', '小程序统一登录,自动处理"小程序老/新用户×当前系统老/新用户"四种场景,任一端不存在该用户则自动注册')}
|
|
|
+ ${testSection('auth-miniapp-bind-phone', '小程序绑定手机号', 'POST', 'post', '/api/auth/wechat/miniapp/bind-phone', '公开', 'auth-public',
|
|
|
+ [{label:'临时令牌(tempToken)', name:'tempToken', placeholder:'登录时返回的tempToken', default:''},
|
|
|
+ {label:'手机号授权码(phoneCode)', name:'phoneCode', placeholder:'getPhoneNumber返回的code', default:''},
|
|
|
+ {label:'邀请码(inviteCode,可选)', name:'inviteCode', placeholder:'ABC123', default:''}], true, 'loginResponse', '当统一登录返回needBindPhone=true时调用,使用getPhoneNumber按钮返回的code完成手机号绑定')}
|
|
|
+ ${testSection('auth-register', '小程序独立注册', 'POST', 'post', '/api/auth/register', '需认证', 'auth-required',
|
|
|
+ [{label:'临时令牌(tempToken)', name:'tempToken', placeholder:'登录时返回的tempToken', default:''},
|
|
|
+ {label:'邀请码(inviteCode,可选)', name:'inviteCode', placeholder:'ABC123', default:''},
|
|
|
+ {label:'药店名称(pharmacyName)', name:'pharmacyName', placeholder:'仁爱大药房', default:'测试大药房'},
|
|
|
+ {label:'省份(province)', name:'province', placeholder:'广东省', default:'广东省'},
|
|
|
+ {label:'城市(city)', name:'city', placeholder:'深圳市', default:'深圳市'},
|
|
|
+ {label:'区(district)', name:'district', placeholder:'南山区', default:'南山区'}], true, 'loginResponse', '微信授权手机号后,如果isRegistered=false,前端跳转注册页,用户填写药店信息后调用此接口完成注册')}
|
|
|
+ ${testSection('auth-logout', '登出', 'POST', 'post', '/api/auth/logout', '需认证', 'auth-required', null, false, null, '登出当前用户,清空RefreshToken,使Token对失效')}
|
|
|
+ ${testSection('auth-user-me', '聚合用户信息', 'GET', 'get', '/api/auth/user/me', '需认证', 'auth-required', null, true, 'userMe', '聚合用户信息(user+gate+quota+platforms),一次请求获取首页所需全部数据')}
|
|
|
+ ${testSection('auth-dashboard', '首页概览统计', 'GET', 'get', '/api/auth/user/dashboard', '需认证', 'auth-required', null, true, 'dashboard', '首页概览统计:会员状态、配额使用、关注数、订单数等')}`;
|
|
|
}
|
|
|
|
|
|
function renderCrawlerModule() {
|
|
|
@@ -1463,7 +1565,17 @@ function renderPaymentModule() {
|
|
|
${testSection('payment-anxin-notify-card-change', '安心付卡变更通知', 'POST', 'post', '/api/payment/anxin/notify/card-change?card_id=MOCK_CARD_xxx&change_type=AUDIT&status=EFFECTIVE', '公开', 'auth-public',
|
|
|
[{label:'卡模板ID(card_id)', name:'card_id', placeholder:'创建卡模板后返回', default:''},
|
|
|
{label:'变更类型(change_type)', name:'change_type', placeholder:'AUDIT/STATUS_CHANGE', default:'AUDIT'},
|
|
|
- {label:'新状态(status)', name:'status', placeholder:'PENDING/EFFECTIVE/INVALID/FROZEN', default:'EFFECTIVE'}], true, null, '安心付卡模板审核结果通知。支付宝在卡模板审核通过/驳回/冻结/解冻时发送。mock模式直接更新本地状态')}`;
|
|
|
+ {label:'新状态(status)', name:'status', placeholder:'PENDING/EFFECTIVE/INVALID/FROZEN', default:'EFFECTIVE'}], true, null, '安心付卡模板审核结果通知。支付宝在卡模板审核通过/驳回/冻结/解冻时发送。mock模式直接更新本地状态')}
|
|
|
+ ${testSection('payment-wechat-openid', '微信小程序获取OpenId', 'POST', 'post', '/api/payment/wechat/openid', '公开', 'auth-public',
|
|
|
+ [{label:'小程序授权码(jsCode)', name:'jsCode', placeholder:'wx.login()返回的code', default:'test_js_code'}], true, null, '小程序端调用wx.login()获取jsCode后提交到此接口换取openId。获取到的openId用于后续创建支付订单时传入channel=WECHAT_MINIAPP。公开接口无需登录')}
|
|
|
+ ${testSection('payment-alipay-gateway', '支付宝应用网关', 'POST', 'post', '/api/payment/alipay/gateway', '公开', 'auth-public',
|
|
|
+ [{label:'消息类型(msg_method)', name:'msg_method', placeholder:'alipay.trade.refund.depositback.completed', default:'alipay.open.auth.userauth.cancelled'},
|
|
|
+ {label:'应用ID(app_id)', name:'app_id', placeholder:'支付宝应用ID', default:'2021...'}], false, null, '支付宝应用网关入口,接收支付宝主动推送的异步消息(退款、投诉、账单等)。服务端持久化到t_alipay_callback_record表并返回success,避免支付宝重试')}
|
|
|
+ ${testSection('payment-alipay-auth-callback', '支付宝授权回调', 'GET', 'get', '/api/payment/alipay/auth-callback?auth_code=test_auth_code&app_id=2021...&source=alipay', '公开', 'auth-public',
|
|
|
+ [{label:'授权码(auth_code)', name:'auth_code', placeholder:'支付宝授权码', default:'test_auth_code'},
|
|
|
+ {label:'应用ID(app_id)', name:'app_id', placeholder:'支付宝应用ID', default:'2021...'},
|
|
|
+ {label:'来源(source)', name:'source', placeholder:'alipay', default:'alipay'},
|
|
|
+ {label:'状态(state)', name:'state', placeholder:'自定义state', default:''}], false, null, '支付宝OAuth授权回调入口。用户在支付宝完成授权后重定向到此地址,携带auth_code、app_id、source等参数。服务端持久化到t_alipay_callback_record表并返回成功页面')}`;
|
|
|
}
|
|
|
|
|
|
function renderUploadModule() {
|
|
|
@@ -1616,6 +1728,67 @@ function renderPlatformSessionModule() {
|
|
|
[{label:'平台代码(platformCode)', name:'platformCode', placeholder:'yiyaocheng', default:'yiyaocheng'}], false, null, '删除某个平台的远端会话(幂等,不存在也返回成功)')}`;
|
|
|
}
|
|
|
|
|
|
+function renderContentModule() {
|
|
|
+ return `
|
|
|
+ <div class="batch-buttons">
|
|
|
+ <button class="btn btn-warning btn-sm" onclick="runContentTests()">运行全部内容配置测试</button>
|
|
|
+ </div>
|
|
|
+ ${testSection('content-help', '帮助与FAQ', 'GET', 'get', '/api/content/help', '公开', 'auth-public', null, true, 'contentHelp', '获取帮助文档与常见问题解答,包含小程序与桌面版区别、入驻流程、查价条件、会员升级说明')}
|
|
|
+ ${testSection('content-download', '桌面下载链接', 'GET', 'get', '/api/content/download', '公开', 'auth-public', null, true, 'contentDownload', '获取桌面客户端下载链接、官网地址、版本号与发布说明')}`;
|
|
|
+}
|
|
|
+
|
|
|
+function renderProcurementLedgerModule() {
|
|
|
+ return `
|
|
|
+ <div class="batch-buttons">
|
|
|
+ <button class="btn btn-warning btn-sm" onclick="runProcurementLedgerTests()">运行全部采购台账测试</button>
|
|
|
+ </div>
|
|
|
+ ${testSection('pl-list', '采购台账列表', 'GET', 'get', '/api/procurement-ledgers?page=1&pageSize=20', '需认证', 'auth-required',
|
|
|
+ [{label:'页码(page)', name:'page', placeholder:'1', default:'1'},
|
|
|
+ {label:'每页条数(pageSize)', name:'pageSize', placeholder:'20', default:'20'}], true, 'procurementLedger', '分页查询当前用户的手动采购台账记录')}
|
|
|
+ ${testSection('pl-create', '创建采购台账', 'POST', 'post', '/api/procurement-ledgers', '需认证', 'auth-required',
|
|
|
+ [{label:'意向ID(intentId,可选)', name:'intentId', placeholder:'1', default:''},
|
|
|
+ {label:'查询ID(queryId,可选)', name:'queryId', placeholder:'1', default:''},
|
|
|
+ {label:'药品名称(drugName)', name:'drugName', placeholder:'阿莫西林胶囊', default:'阿莫西林胶囊'},
|
|
|
+ {label:'规格(spec)', name:'spec', placeholder:'0.25g×24片', default:'0.25g×24片'},
|
|
|
+ {label:'数量(qty)', name:'qty', placeholder:'10', default:'10'},
|
|
|
+ {label:'单价(unitPrice)', name:'unitPrice', placeholder:'12.50', default:'12.50'},
|
|
|
+ {label:'总价(total)', name:'total', placeholder:'125.00', default:'125.00'},
|
|
|
+ {label:'平台(platform)', name:'platform', placeholder:'yaoshibang', default:'yaoshibang'},
|
|
|
+ {label:'订单备注(orderNote)', name:'orderNote', placeholder:'加急', default:''},
|
|
|
+ {label:'状态(status)', name:'status', placeholder:'ordered/received/cancelled', default:'ordered'}], true, 'procurementLedger', '手动录入采购台账记录,关联跳转购买记录或查询记录')}
|
|
|
+ ${testSection('pl-update', '更新采购台账', 'PATCH', 'patch', '/api/procurement-ledgers/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'台账ID(id)', name:'id', placeholder:'1', default:'1'},
|
|
|
+ {label:'状态(status)', name:'status', placeholder:'ordered/received/cancelled', default:'received'},
|
|
|
+ {label:'数量(qty)', name:'qty', placeholder:'10', default:'10'},
|
|
|
+ {label:'单价(unitPrice)', name:'unitPrice', placeholder:'12.50', default:'12.50'},
|
|
|
+ {label:'总价(total)', name:'total', placeholder:'125.00', default:'125.00'},
|
|
|
+ {label:'订单备注(orderNote)', name:'orderNote', placeholder:'已到货', default:''}], true, 'procurementLedger', '更新采购台账的状态、数量、价格等信息')}
|
|
|
+ ${testSection('pl-delete', '删除采购台账', 'DELETE', 'delete', '/api/procurement-ledgers/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'台账ID(id)', name:'id', placeholder:'1', default:'1'}], false, null, '删除指定的采购台账记录')}`;
|
|
|
+}
|
|
|
+
|
|
|
+function renderPurchaseIntentModule() {
|
|
|
+ return `
|
|
|
+ <div class="batch-buttons">
|
|
|
+ <button class="btn btn-warning btn-sm" onclick="runPurchaseIntentTests()">运行全部跳转购买记录测试</button>
|
|
|
+ </div>
|
|
|
+ ${testSection('pi-list', '跳转购买记录列表', 'GET', 'get', '/api/purchase-intents?page=1&pageSize=20', '需认证', 'auth-required',
|
|
|
+ [{label:'页码(page)', name:'page', placeholder:'1', default:'1'},
|
|
|
+ {label:'每页条数(pageSize)', name:'pageSize', placeholder:'20', default:'20'}], true, 'purchaseIntent', '分页查询当前用户的跳转购买记录,供小程序只读展示')}
|
|
|
+ ${testSection('pi-detail', '跳转购买详情', 'GET', 'get', '/api/purchase-intents/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'记录ID(id)', name:'id', placeholder:'1', default:'1'}], true, 'purchaseIntent', '查询单条跳转购买记录详情')}
|
|
|
+ ${testSection('pi-create', '写入跳转购买记录', 'POST', 'post', '/api/purchase-intents', '需认证', 'auth-required',
|
|
|
+ [{label:'查询ID(queryId,可选)', name:'queryId', placeholder:'1', default:''},
|
|
|
+ {label:'药品名称(drugName)', name:'drugName', placeholder:'阿莫西林胶囊', default:'阿莫西林胶囊'},
|
|
|
+ {label:'规格(spec)', name:'spec', placeholder:'0.25g×24片', default:'0.25g×24片'},
|
|
|
+ {label:'厂家(manufacturer)', name:'manufacturer', placeholder:'石药集团', default:''},
|
|
|
+ {label:'平台代码(platformCode)', name:'platformCode', placeholder:'yaoshibang', default:'yaoshibang'},
|
|
|
+ {label:'平台名称(platformName)', name:'platformName', placeholder:'药师帮', default:'药师帮'},
|
|
|
+ {label:'参考价(referencePrice)', name:'referencePrice', placeholder:'12.50', default:'12.50'},
|
|
|
+ {label:'外链(externalUrl)', name:'externalUrl', placeholder:'https://...', default:''},
|
|
|
+ {label:'来源客户端(sourceClient)', name:'sourceClient', placeholder:'WINDOWS/ANDROID/MINIAPP', default:'WINDOWS'}], true, 'purchaseIntent', '桌面端/Android调用,记录用户跳转到B2B平台购买药品的行为')}`;
|
|
|
+}
|
|
|
+
|
|
|
// ==================== 运营侧模块 ====================
|
|
|
function renderAdminMembershipModule() {
|
|
|
return `
|
|
|
@@ -1625,7 +1798,12 @@ function renderAdminMembershipModule() {
|
|
|
{label:'会员等级(level)', name:'level', placeholder:'PLUS/PRO/ULTRA', default:'PRO'},
|
|
|
{label:'来源(source)', name:'source', placeholder:'ADMIN_GRANT', default:'ADMIN_GRANT'},
|
|
|
{label:'备注(remark)', name:'remark', placeholder:'运营发放', default:'测试发放'}], false, 'membership', '运营/超管给用户发放或调整会员等级')}
|
|
|
- ${testSection('admin-membership-list', '会员记录列表', 'GET', 'get', '/api/admin/membership/memberships?page=1&size=10', '需认证', 'auth-required', null, true, 'membership', '分页查询会员发放记录')}`;
|
|
|
+ ${testSection('admin-membership-list', '会员记录列表', 'GET', 'get', '/api/admin/membership/memberships?page=1&size=10', '需认证', 'auth-required', null, true, 'membership', '分页查询会员发放记录')}
|
|
|
+ ${testSection('admin-membership-users', '会员用户快照列表', 'GET', 'get', '/api/admin/membership/users?page=1&size=20&phone=138&level=PRO', '需认证', 'auth-required',
|
|
|
+ [{label:'页码(page)', name:'page', placeholder:'1', default:'1'},
|
|
|
+ {label:'每页条数(size)', name:'size', placeholder:'20', default:'20'},
|
|
|
+ {label:'手机号(phone)', name:'phone', placeholder:'138', default:''},
|
|
|
+ {label:'会员等级(level)', name:'level', placeholder:'PLUS/PRO/ULTRA', default:''}], true, 'membershipUser', '会员用户快照列表(用户维度,每用户一行),支持按手机号和等级筛选')}`;
|
|
|
}
|
|
|
|
|
|
function renderAdminInviteModule() {
|
|
|
@@ -1633,6 +1811,21 @@ function renderAdminInviteModule() {
|
|
|
<div class="batch-buttons"><button class="btn btn-warning btn-sm" onclick="runAdminInviteTests()">运行全部邀请管理测试</button></div>
|
|
|
${testSection('admin-invite-config', '邀请配置查询', 'GET', 'get', '/api/admin/invite/config', '需认证', 'auth-required', null, true, 'inviteConfig', '获取当前激活的邀请配置')}
|
|
|
${testSection('admin-invite-configs', '全部邀请配置', 'GET', 'get', '/api/admin/invite/configs', '需认证', 'auth-required', null, true, 'inviteConfig', '获取所有邀请配置历史记录')}
|
|
|
+ ${testSection('admin-invite-config-by-id', '按ID查询邀请配置', 'GET', 'get', '/api/admin/invite/config/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'配置ID(id)', name:'id', placeholder:'1', default:'1'}], true, 'inviteConfig', '根据ID获取指定邀请配置详情')}
|
|
|
+ ${testSection('admin-invite-config-create', '创建邀请配置', 'POST', 'post', '/api/admin/invite/config', '需认证', 'auth-required',
|
|
|
+ [{label:'奖励月数(rewardMonths)', name:'rewardMonths', placeholder:'1', default:'1'},
|
|
|
+ {label:'总邀请上限(maxTotalInvites)', name:'maxTotalInvites', placeholder:'30', default:'30'},
|
|
|
+ {label:'日奖励上限(maxDailyReward)', name:'maxDailyReward', placeholder:'50', default:'50'},
|
|
|
+ {label:'状态(status)', name:'status', placeholder:'0停用/1启用', default:'1'}], false, 'inviteConfig', '创建新的邀请配置记录')}
|
|
|
+ ${testSection('admin-invite-config-update-by-id', '按ID更新邀请配置', 'PUT', 'put', '/api/admin/invite/config/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'配置ID(id)', name:'id', placeholder:'1', default:'1'},
|
|
|
+ {label:'奖励月数(rewardMonths)', name:'rewardMonths', placeholder:'1', default:'1'},
|
|
|
+ {label:'总邀请上限(maxTotalInvites)', name:'maxTotalInvites', placeholder:'30', default:'30'},
|
|
|
+ {label:'日奖励上限(maxDailyReward)', name:'maxDailyReward', placeholder:'50', default:'50'},
|
|
|
+ {label:'状态(status)', name:'status', placeholder:'0停用/1启用', default:'1'}], false, 'inviteConfig', '更新指定ID的邀请配置')}
|
|
|
+ ${testSection('admin-invite-config-delete', '删除邀请配置', 'DELETE', 'delete', '/api/admin/invite/config/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'配置ID(id)', name:'id', placeholder:'1', default:'1'}], false, null, '删除指定的邀请配置记录')}
|
|
|
${testSection('admin-invite-config-update', '更新邀请配置', 'PUT', 'put', '/api/admin/invite/config', '需认证', 'auth-required',
|
|
|
[
|
|
|
{label:'奖励月数(rewardMonths)', name:'rewardMonths', placeholder:'1', default:'1'},
|
|
|
@@ -1771,7 +1964,30 @@ function renderAdminUserModule() {
|
|
|
${testSection('admin-user-kick', '强制踢出用户', 'POST', 'post', '/api/admin/users/{userId}/kick', '需认证', 'auth-required',
|
|
|
[{label:'用户ID(userId)', name:'userId', placeholder:'1', default:'1'}], false, null, '强制踢出前端用户:递增tokenVersion+清空RefreshToken')}
|
|
|
${testSection('admin-admin-kick', '强制踢出管理员', 'POST', 'post', '/api/admin/admins/{adminId}/kick', '需认证', 'auth-required',
|
|
|
- [{label:'管理员ID(adminId)', name:'adminId', placeholder:'100', default:'100'}], false, null, '强制踢出管理员:递增tokenVersion+清空RefreshToken')}`;
|
|
|
+ [{label:'管理员ID(adminId)', name:'adminId', placeholder:'100', default:'100'}], false, null, '强制踢出管理员:递增tokenVersion+清空RefreshToken')}
|
|
|
+ ${testSection('admin-auth-login', '管理员登录', 'POST', 'post', '/api/admin/auth/login', '公开', 'auth-public',
|
|
|
+ [{label:'账号(username/phone)', name:'username', placeholder:'手机号或用户名', default:'13800138000'},
|
|
|
+ {label:'密码(password)', name:'password', placeholder:'管理员密码', default:'123456'}], true, 'loginResponse', '管理员密码登录,支持username或phone字段传账号。返回与用户侧相同的LoginResponse结构')}
|
|
|
+ ${testSection('admin-admins-detail', '管理员详情', 'GET', 'get', '/api/admin/admins/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'管理员ID(id)', name:'id', placeholder:'100', default:'100'}], true, null, '查询单个管理员详情(t_admin表)')}
|
|
|
+ ${testSection('admin-admins-create', '创建管理员', 'POST', 'post', '/api/admin/admins', '需认证', 'auth-required',
|
|
|
+ [{label:'用户名(username)', name:'username', placeholder:'admin001', default:'admin001'},
|
|
|
+ {label:'密码(password)', name:'password', placeholder:'初始密码', default:'123456'},
|
|
|
+ {label:'手机号(phone)', name:'phone', placeholder:'13800138000', default:'13800138000'},
|
|
|
+ {label:'角色(role)', name:'role', placeholder:'ADMIN/SUPER_ADMIN', default:'ADMIN'}], true, null, '创建管理员账号(写入t_admin表),角色可选ADMIN或SUPER_ADMIN')}
|
|
|
+ ${testSection('admin-admins-update', '更新管理员', 'PUT', 'put', '/api/admin/admins/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'管理员ID(id)', name:'id', placeholder:'100', default:'100'},
|
|
|
+ {label:'用户名(username)', name:'username', placeholder:'admin001', default:'admin001'},
|
|
|
+ {label:'密码(password)', name:'password', placeholder:'新密码(留空不改)', default:''},
|
|
|
+ {label:'手机号(phone)', name:'phone', placeholder:'13800138000', default:'13800138000'},
|
|
|
+ {label:'角色(role)', name:'role', placeholder:'ADMIN/SUPER_ADMIN', default:'ADMIN'}], true, null, '更新管理员账号信息')}
|
|
|
+ ${testSection('admin-admins-delete', '禁用管理员', 'DELETE', 'delete', '/api/admin/admins/{id}', '需认证', 'auth-required',
|
|
|
+ [{label:'管理员ID(id)', name:'id', placeholder:'100', default:'100'}], false, null, '禁用管理员账号(软删除,标记为不可用)')}
|
|
|
+ ${testSection('admin-admins-reset-pwd', '重置管理员密码', 'PUT', 'put', '/api/admin/admins/{id}/password', '需认证', 'auth-required',
|
|
|
+ [{label:'管理员ID(id)', name:'id', placeholder:'100', default:'100'}], false, null, '超管重置指定管理员密码,返回新随机密码')}
|
|
|
+ ${testSection('admin-admins-change-pwd', '修改自己的密码', 'PUT', 'put', '/api/admin/admins/password', '需认证', 'auth-required',
|
|
|
+ [{label:'旧密码(oldPassword)', name:'oldPassword', placeholder:'当前密码', default:''},
|
|
|
+ {label:'新密码(newPassword)', name:'newPassword', placeholder:'新密码', default:'Abc123456'}], false, null, '管理员修改自己的登录密码')}`;
|
|
|
}
|
|
|
|
|
|
function renderAdminAuditModule() {
|
|
|
@@ -1795,7 +2011,7 @@ function getSectionsInModule(modulePrefix) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-const USER_MODULES = ['auth','crawler','invite','coupon','membership','payment','upload','search','platform-account','business-license','platform-config','search-record','platform-session','watchlist','trial-quota'];
|
|
|
+const USER_MODULES = ['auth','crawler','invite','coupon','membership','payment','upload','search','platform-account','business-license','platform-config','search-record','platform-session','watchlist','trial-quota','content','procurement-ledger','purchase-intent'];
|
|
|
const ADMIN_MODULES = ['admin-membership','admin-invite','admin-crawler','admin-coupon','admin-license','admin-payment','admin-anxin','admin-trial-quota','admin-user','admin-audit','upload'];
|
|
|
|
|
|
function countTestsInCurrentPanel() {
|
|
|
@@ -1973,6 +2189,9 @@ function runPlatformConfigTests() { runBatchTests('pc'); }
|
|
|
function runSearchRecordTests() { runBatchTests('sr'); }
|
|
|
function runPlatformSessionTests() { runBatchTests('ps'); }function runWatchlistTests() { runBatchTests('watchlist'); }
|
|
|
function runTrialQuotaTests() { runBatchTests('trial-quota'); }
|
|
|
+function runContentTests() { runBatchTests('content'); }
|
|
|
+function runProcurementLedgerTests() { runBatchTests('pl'); }
|
|
|
+function runPurchaseIntentTests() { runBatchTests('pi'); }
|
|
|
// 运营侧快捷批量运行
|
|
|
function runAdminMembershipTests() { runBatchTests('admin-membership'); }
|
|
|
function runAdminInviteTests() { runBatchTests('admin-invite'); }
|
|
|
@@ -2092,4 +2311,4 @@ window.addEventListener('DOMContentLoaded', () => {
|
|
|
});
|
|
|
</script>
|
|
|
</body>
|
|
|
-</html>
|
|
|
+</html>
|