Procházet zdrojové kódy

Merge branch 'base'

feige996 před 10 měsíci
rodič
revize
cdb47c2a84
3 změnil soubory, kde provedl 6453 přidání a 2190 odebrání
  1. 2 2
      package.json
  2. 6443 2188
      pnpm-lock.yaml
  3. 8 0
      src/utils/http.ts

+ 2 - 2
package.json

@@ -1,7 +1,7 @@
 {
   "name": "unibest",
   "type": "commonjs",
-  "version": "2.12.1",
+  "version": "2.12.2",
   "description": "unibest - 最好的 uniapp 开发模板",
   "update-time": "2025-05-28",
   "author": {
@@ -116,7 +116,7 @@
     "vue": "^3.4.21",
     "vue-i18n": "9.1.9",
     "wot-design-uni": "^1.9.1",
-    "z-paging": "^2.8.4"
+    "z-paging": "2.8.7"
   },
   "devDependencies": {
     "@commitlint/cli": "^19.8.1",

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 6443 - 2188
pnpm-lock.yaml


+ 8 - 0
src/utils/http.ts

@@ -53,12 +53,14 @@ export const httpGet = <T>(
   url: string,
   query?: Record<string, any>,
   header?: Record<string, any>,
+  options?: Partial<CustomRequestOptions>,
 ) => {
   return http<T>({
     url,
     query,
     method: 'GET',
     header,
+    ...options,
   })
 }
 
@@ -75,6 +77,7 @@ export const httpPost = <T>(
   data?: Record<string, any>,
   query?: Record<string, any>,
   header?: Record<string, any>,
+  options?: Partial<CustomRequestOptions>,
 ) => {
   return http<T>({
     url,
@@ -82,6 +85,7 @@ export const httpPost = <T>(
     data,
     method: 'POST',
     header,
+    ...options,
   })
 }
 /**
@@ -92,6 +96,7 @@ export const httpPut = <T>(
   data?: Record<string, any>,
   query?: Record<string, any>,
   header?: Record<string, any>,
+  options?: Partial<CustomRequestOptions>,
 ) => {
   return http<T>({
     url,
@@ -99,6 +104,7 @@ export const httpPut = <T>(
     query,
     method: 'PUT',
     header,
+    ...options,
   })
 }
 
@@ -109,12 +115,14 @@ export const httpDelete = <T>(
   url: string,
   query?: Record<string, any>,
   header?: Record<string, any>,
+  options?: Partial<CustomRequestOptions>,
 ) => {
   return http<T>({
     url,
     query,
     method: 'DELETE',
     header,
+    ...options,
   })
 }