|
@@ -2,7 +2,7 @@ import { extend } from 'umi-request'
|
|
|
import { Toast } from 'vant'
|
|
|
import cleanDeep from 'clean-deep'
|
|
|
import { getRequestHostname, browser } from '/src/helpers/utils'
|
|
|
-import ApiRouter from '/src/api-router'
|
|
|
+// import ApiRouter from '/src/api-router'
|
|
|
import { postMessage } from './native-message'
|
|
|
|
|
|
export interface SearchInitParams {
|
|
@@ -28,12 +28,12 @@ const request = extend({
|
|
|
|
|
|
request.use(async (ctx, next) => {
|
|
|
const { url, options } = ctx.req
|
|
|
- const prefix = (options.prefix || '')
|
|
|
- const baseUrl: string = url.replace(prefix, '') || ''
|
|
|
- const linkUrl: string = (ApiRouter as any)[baseUrl]
|
|
|
- if (linkUrl) {
|
|
|
- ctx.req.url = prefix + linkUrl
|
|
|
- }
|
|
|
+ // const prefix = (options.prefix || '')
|
|
|
+ // const baseUrl: string = url.replace(prefix, '') || ''
|
|
|
+ // const linkUrl: string = (ApiRouter as any)[baseUrl]
|
|
|
+ // if (linkUrl) {
|
|
|
+ // ctx.req.url = prefix + linkUrl
|
|
|
+ // }
|
|
|
await next()
|
|
|
})
|
|
|
|