提交
This commit is contained in:
1 parent
a0da6427ef
commit
86694f739f
471 files changed
+62075
-44805
No files matched your search
@@ -2,7 +2,7 @@
|
||||
* 报销/备用金模块 HTTP(bx 信封:code === 0)
|
||||
* 对齐 bx-mobile/src/api/bxClient.ts
|
||||
*/
|
||||
import { API_BASE, TOKEN_KEY, REFRESH_TOKEN_KEY, USER_INFO_KEY } from '@/config/api'
|
||||
import { TOKEN_KEY, REFRESH_TOKEN_KEY, USER_INFO_KEY, resolveApiBase } from '@/config/api'
|
||||
|
||||
const BX_COLLECTION_ROOT = /^\/(reimburses|advances|payments|workflows|expense-items)$/
|
||||
|
||||
@@ -65,7 +65,7 @@ export function bxRequest(options = {}) {
|
||||
const rawUrl = `${path}${query}`
|
||||
const url = rawUrl.startsWith('http')
|
||||
? rawUrl
|
||||
: `${API_BASE}${rawUrl.startsWith('/') ? rawUrl : `/${rawUrl}`}`
|
||||
: `${resolveApiBase()}${rawUrl.startsWith('/') ? rawUrl : `/${rawUrl}`}`
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
@@ -124,7 +124,7 @@ export function bxUploadFile(filePath, opts = {}) {
|
||||
biz_type: opts.bizType || '',
|
||||
biz_id: opts.bizId != null && opts.bizId !== '' ? opts.bizId : 0
|
||||
})
|
||||
const url = `${API_BASE}/attachments/upload${query}`
|
||||
const url = `${resolveApiBase()}/attachments/upload${query}`
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
@@ -192,7 +192,7 @@ export function bxUploadInvoice(opts = {}) {
|
||||
if (opts.targetUserId != null && opts.targetUserId !== '') {
|
||||
formData.targetUserId = String(opts.targetUserId)
|
||||
}
|
||||
const url = `${API_BASE}/invoices`
|
||||
const url = `${resolveApiBase()}/invoices`
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
|
||||
Reference in new issue
Block a user