justsolutionsWeb — 后端 API 调用清单

前端:justsolutions-web v1.2.0 · Angular 16 · Angular CLI 16.2.14

基于源码静态分析(src/app 下所有 *.ts)整理。共 14 个后端端点。

1. 调用架构概览

所有业务 API 调用都收口在统一的 HttpServicesrc/app/services/http.service.ts):

例外:支付跳转直接 location.href 重定向到 QFPay 外部网关(见第 6 节),不经过 HttpService

1.1 环境与基地址配置

环境文件apis.url(API 基地址)apis.amlUrl(AML 门户来源)apis.test
environment.ts(本地默认)https://api-aml.iconsz.comhttps://aml.iconsz.comtrue
environment.dev.tshttps://api-aml.iconsz.comhttps://aml.iconsz.comtrue
environment.prod.tshttps://api.justsolutions.aihttps://aml.justsolutions.aifalse

2. 调用清单(按端点汇总)

#方法端点(相对 apis.url用途前端方法所在文件
1POST /connect/token?__tenant=2C OAuth 取 access token getToken() aml-query.service.ts
2GET /api/aml/ConsumerPortal/GetPrice/{inputCode} 查询消费者查询价格 getPrice() aml-query.service.ts
3POST /api/amlPortal/customer/CreateFeedback 提交联系表单反馈 sendContactEmailAndReturnFeedback() contact.service.ts
4POST /api/aml/emailQueue/CreateEmailQueue 发送通知邮件(管理员 + 用户回执两次调用) sendContactEmail() / sendContactByReturnEmail() contact.service.ts
5POST /api/amlPortal/plan/portal/GetPlanList 获取套餐列表(基础/jQ/加人/KYC) getAllPlanList() plan.service.ts
6POST /api/amlPortal/Order/portal/GetEditionList 获取系统定义的 edition(所属行业)列表 getEditionList() plan.service.ts
7POST /api/amlPortal/Order/getCategoryByTypes 获取国家/地区列表(typeCodes: ['COUNTRY'] getCountryList() plan.service.ts
8GET /api/identity/users/SearchUserByCodeAndType/{userCode}/true 校验优惠码/代理商是否存在 getAgentor() plan.service.ts
9POST /api/amlPortal/Order/portal/queryRenewableTenant 查询可续费租户 queryTenant() plan.service.ts
10POST /api/amlPortal/Order/portal/ExistsByOrganizationBRCI 校验商业登记号(BR)/公司编号(CI)是否已存在 checkBRCI() plan.service.ts
11POST /api/amlPortal/customer/portal/CheckEmailExists/{email} 校验管理员邮箱是否已存在 checkEmailExist() plan.service.ts
12POST /api/amlPortal/Order/portal/CreateOrder 新租户下单 createOrder() plan.service.ts
13POST /api/amlPortal/Order/portal/TenantRenewal 租户续费下单 tenantRenewal() plan.service.ts
14POST /api/amlPortal/Order/portal/PaymentWebhook 支付完成回调(作为 notify_url 传给 QFPay,由其服务端回调,非前端直接调用 plan4.component.ts

3. 鉴权(OAuth Token)

端点 1POST /connect/token?__tenant=2C

Body(x-www-form-urlencoded,硬编码凭证):

字段
grant_typepassword
response_typetoken
usernamecustomer1
password1qaz@WSX
scopeFX
client_idcustomer1_client
client_secret1qaz@WSX

⚠️ 用户名/密码/client secret 以明文硬编码在前端源码中(aml-query.service.ts:47-51),属于公开网站内置的固定访客凭证。

4. AML 查询模块(aml-query)

端点 2GET /api/aml/ConsumerPortal/GetPrice/{inputCode}

aml-query/pages/result/result.component.ts(评估报告页)当前使用本地 mock 数据 / Math.random() 生成风险评估结果,PDF 下载指向 assets/sample-report.pdfapiIntegration() 弹窗里的 api.credit-risk.example.com 等仅为示例文案,不是真实后端调用

5. 联系我们模块(contact)

调用方:contact/pages/contact/contact.component.ts 提交表单时触发。

6. 套餐与下单模块(plans / Order)

PlanService 集中了套餐查询、校验与下单接口。各端点的页面调用关系:

端点调用页面
getAllPlanList()端点 5plans.component.ts(进入套餐页 / 收到父窗口 postMessage 后)
getEditionList()端点 6plans.component.tsplan3.component.ts
getCountryList()端点 7plans.component.tsplan3.component.ts
getAgentor()端点 8plan3.component.ts(输入优惠码校验)
queryTenant()端点 9plan1.component.tsplan3.component.ts(续费选租户)
checkBRCI()端点 10plan3.component.ts
checkEmailExist()端点 11plan1.component.tsplan3.component.ts
createOrder()端点 12plan4.component.tstype === 'new'
tenantRenewal()端点 13plan4.component.tstype === 'renew'

关键请求体

6.1 支付跳转(QFPay 外部网关,不经过 HttpService)

位置:plan4.component.tspayFn()。下单成功(createOrder/tenantRenewal 返回 code === 0)后:

主要参数:

参数
appcodeenvironment.qfpay.appcode(固定值)
goods_name下单返回的 planName
out_trade_no下单返回的 orderCode
paysourceremotepay_checkout
return_url{baseUrl}/plans-plus/payment-success
failed_url{baseUrl}/plans-plus/payment-failure
notify_url{apis.url}/api/amlPortal/Order/portal/PaymentWebhook(端点 14,QFPay 服务端回调后端)
txamtapis.test ? 10 : planPrice * 100(单位:分)
txcurrcdHKD
signsha256(<排序后的参数串> + api_key)

7. 端点前缀分布

前缀含义涉及端点
/connect/*OpenIddict/IdentityServer OAuth端点 1
/api/aml/*AML 主模块(消费者查询、邮件队列)端点 2、4
/api/amlPortal/*AML 门户模块(客户、套餐、订单)端点 3、5、6、7、9、10、11、12、13、14
/api/identity/*ABP Identity(用户)端点 8

8. 速查 · 典型流程(按调用次序)