This commit is contained in:
2026-08-04 09:05:01 +08:00
parent 2d38c90d1c
commit 198101c42c
7 changed files with 305 additions and 113 deletions
@@ -27,7 +27,8 @@ test('supports tenant profile updates and authenticated qualification downloads'
assert.match(source, /url\.startsWith\('\/merchant\/v1\/files\/qualifications\/'\)/)
assert.match(storeSource, /await updateTenantProfile/)
assert.match(source, /url: '\/merchant\/v1\/iam\/tenant\/qualifications\/submit-review'/)
assert.match(source, /data\.append\('qualificationType', qualificationType\)/)
assert.match(source, /params: \{ qualificationType, certificateNo, replace \}/)
assert.doesNotMatch(source, /data\.append\('qualificationType'/)
assert.match(source, /'SUPERSEDED'/)
assert.match(storeSource, /normalizeQualificationStatus\(item\.status\)/)
})
@@ -9,6 +9,7 @@ export interface MerchantTenantProfile {
tenantName: string
status: MerchantTenantStatus
legalName: string
legalRepresentative: string
unifiedSocialCreditCode: string | null
contactName: string
contactPhone: string
@@ -18,6 +19,7 @@ export interface MerchantTenantProfile {
export interface UpdateMerchantTenantProfileRequest {
tenantName: string
legalName: string
legalRepresentative: string
contactName: string
contactPhone: string
contactEmail: string
@@ -151,10 +153,12 @@ export function uploadMerchantQualification(
) {
const data = new FormData()
data.append('file', file)
data.append('qualificationType', qualificationType)
if (certificateNo) data.append('certificateNo', certificateNo)
data.append('replace', String(replace))
return apiRequest<QualificationUploadResult>({ method: 'POST', url: '/merchant/v1/files/qualifications', data })
return apiRequest<QualificationUploadResult>({
method: 'POST',
url: '/merchant/v1/files/qualifications',
params: { qualificationType, certificateNo, replace },
data,
})
}
export function submitTenantQualificationReview() {