@dcloudio/uni-app-x 0.7.121 → 0.7.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/README.md +87 -0
  2. package/package.json +1 -1
  3. package/types/dom2-internal/UniCommon.d.ts +7 -2
  4. package/types/dom2-internal/UniNativeDefines.d.ts +7 -2
  5. package/types/dom2-internal/UniTextLayout.d.ts +5 -0
  6. package/types/native/IUniElement.d.ts +253 -13
  7. package/types/native/UniAnimation.d.ts +63 -9
  8. package/types/page.d.ts +3 -3
  9. package/types/uni/uts-plugin-api/global.d.ts +8 -1
  10. package/types/uni/uts-plugin-api/index.d.ts +8 -1
  11. package/types/uni/uts-plugin-api/lib/uni-accelerometer/utssdk/global.d.ts +59 -0
  12. package/types/uni/uts-plugin-api/lib/uni-accelerometer/utssdk/index.d.ts +29 -0
  13. package/types/uni/uts-plugin-api/lib/uni-accelerometer/utssdk/interface.d.ts +430 -0
  14. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/global.d.ts +6 -0
  15. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/index.d.ts +3 -0
  16. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +339 -1294
  17. package/types/uni/uts-plugin-api/lib/uni-calendar/utssdk/global.d.ts +51 -0
  18. package/types/uni/uts-plugin-api/lib/uni-calendar/utssdk/index.d.ts +25 -0
  19. package/types/uni/uts-plugin-api/lib/uni-calendar/utssdk/interface.d.ts +969 -0
  20. package/types/uni/uts-plugin-api/lib/uni-canvas-dom2/utssdk/global.d.ts +0 -2
  21. package/types/uni/uts-plugin-api/lib/uni-canvas-dom2/utssdk/index.d.ts +0 -1
  22. package/types/uni/uts-plugin-api/lib/uni-canvas-dom2/utssdk/interface.d.ts +8 -559
  23. package/types/uni/uts-plugin-api/lib/uni-compass/utssdk/global.d.ts +59 -0
  24. package/types/uni/uts-plugin-api/lib/uni-compass/utssdk/index.d.ts +29 -0
  25. package/types/uni/uts-plugin-api/lib/uni-compass/utssdk/interface.d.ts +418 -0
  26. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +4 -2
  27. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +2 -1
  28. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +75 -23
  29. package/types/uni/uts-plugin-api/lib/uni-editor/utssdk/global.d.ts +2 -0
  30. package/types/uni/uts-plugin-api/lib/uni-editor/utssdk/index.d.ts +1 -0
  31. package/types/uni/uts-plugin-api/lib/uni-editor/utssdk/interface.d.ts +864 -110
  32. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +154 -20
  33. package/types/uni/uts-plugin-api/lib/uni-gyroscope/utssdk/global.d.ts +59 -0
  34. package/types/uni/uts-plugin-api/lib/uni-gyroscope/utssdk/index.d.ts +29 -0
  35. package/types/uni/uts-plugin-api/lib/uni-gyroscope/utssdk/interface.d.ts +437 -0
  36. package/types/uni/uts-plugin-api/lib/uni-memory/utssdk/global.d.ts +21 -0
  37. package/types/uni/uts-plugin-api/lib/uni-memory/utssdk/index.d.ts +10 -0
  38. package/types/uni/uts-plugin-api/lib/uni-memory/utssdk/interface.d.ts +178 -0
  39. package/types/uni/uts-plugin-api/lib/uni-memorywarning/utssdk/global.d.ts +21 -0
  40. package/types/uni/uts-plugin-api/lib/uni-memorywarning/utssdk/index.d.ts +10 -0
  41. package/types/uni/uts-plugin-api/lib/uni-memorywarning/utssdk/interface.d.ts +20 -0
  42. package/types/uni/uts-plugin-api/lib/uni-openLocation/utssdk/global.d.ts +23 -0
  43. package/types/uni/uts-plugin-api/lib/uni-openLocation/utssdk/index.d.ts +11 -0
  44. package/types/uni/uts-plugin-api/lib/uni-openLocation/utssdk/interface.d.ts +418 -0
  45. package/types/uni/uts-plugin-api/lib/uni-phoneContact/utssdk/global.d.ts +49 -0
  46. package/types/uni/uts-plugin-api/lib/uni-phoneContact/utssdk/index.d.ts +24 -0
  47. package/types/uni/{uts-plugin-component/lib/uni-addPhoneContact → uts-plugin-api/lib/uni-phoneContact}/utssdk/interface.d.ts +359 -226
  48. package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/global.d.ts +2 -0
  49. package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/index.d.ts +1 -0
  50. package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/interface.d.ts +83 -124
  51. package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/global.d.ts +6 -0
  52. package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/index.d.ts +3 -0
  53. package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/interface.d.ts +18 -6
  54. package/types/uni/uts-plugin-api/lib/uni-vibrate/utssdk/global.d.ts +49 -0
  55. package/types/uni/uts-plugin-api/lib/uni-vibrate/utssdk/index.d.ts +24 -0
  56. package/types/uni/uts-plugin-api/lib/uni-vibrate/utssdk/interface.d.ts +199 -0
  57. package/types/uni/uts-plugin-biz/global.d.ts +10 -0
  58. package/types/uni/uts-plugin-biz/index.d.ts +10 -0
  59. package/types/uni/uts-plugin-biz/lib/uni-accelerometer/utssdk/global.d.ts +59 -0
  60. package/types/uni/uts-plugin-biz/lib/uni-accelerometer/utssdk/index.d.ts +29 -0
  61. package/types/uni/uts-plugin-biz/lib/uni-accelerometer/utssdk/interface.d.ts +874 -0
  62. package/types/uni/uts-plugin-biz/lib/uni-ad-dom2/utssdk/global.d.ts +45 -0
  63. package/types/uni/uts-plugin-biz/lib/uni-ad-dom2/utssdk/index.d.ts +22 -0
  64. package/types/uni/uts-plugin-biz/lib/uni-ad-dom2/utssdk/interface.d.ts +732 -0
  65. package/types/uni/{uts-plugin-component → uts-plugin-biz}/lib/uni-authentication/utssdk/global.d.ts +6 -0
  66. package/types/uni/{uts-plugin-component → uts-plugin-biz}/lib/uni-authentication/utssdk/index.d.ts +3 -0
  67. package/types/uni/{uts-plugin-component → uts-plugin-biz}/lib/uni-authentication/utssdk/interface.d.ts +387 -371
  68. package/types/uni/uts-plugin-biz/lib/uni-calendar/utssdk/global.d.ts +51 -0
  69. package/types/uni/uts-plugin-biz/lib/uni-calendar/utssdk/index.d.ts +25 -0
  70. package/types/uni/uts-plugin-biz/lib/uni-calendar/utssdk/interface.d.ts +969 -0
  71. package/types/uni/uts-plugin-biz/lib/uni-compass/utssdk/global.d.ts +59 -0
  72. package/types/uni/uts-plugin-biz/lib/uni-compass/utssdk/index.d.ts +29 -0
  73. package/types/uni/uts-plugin-biz/lib/uni-compass/utssdk/interface.d.ts +418 -0
  74. package/types/uni/uts-plugin-biz/lib/uni-gyroscope/utssdk/global.d.ts +59 -0
  75. package/types/uni/uts-plugin-biz/lib/uni-gyroscope/utssdk/index.d.ts +29 -0
  76. package/types/uni/uts-plugin-biz/lib/uni-gyroscope/utssdk/interface.d.ts +437 -0
  77. package/types/uni/uts-plugin-biz/lib/uni-memory/utssdk/global.d.ts +21 -0
  78. package/types/uni/uts-plugin-biz/lib/uni-memory/utssdk/index.d.ts +10 -0
  79. package/types/uni/uts-plugin-biz/lib/uni-memory/utssdk/interface.d.ts +178 -0
  80. package/types/uni/uts-plugin-biz/lib/uni-memorywarning/utssdk/global.d.ts +21 -0
  81. package/types/uni/uts-plugin-biz/lib/uni-memorywarning/utssdk/index.d.ts +10 -0
  82. package/types/uni/uts-plugin-biz/lib/uni-memorywarning/utssdk/interface.d.ts +20 -0
  83. package/types/uni/uts-plugin-biz/lib/uni-phoneContact/utssdk/global.d.ts +49 -0
  84. package/types/uni/uts-plugin-biz/lib/uni-phoneContact/utssdk/index.d.ts +24 -0
  85. package/types/uni/uts-plugin-biz/lib/uni-phoneContact/utssdk/interface.d.ts +359 -0
  86. package/types/uni/{uts-plugin-component → uts-plugin-biz}/lib/uni-screenBrightness/utssdk/global.d.ts +6 -0
  87. package/types/uni/{uts-plugin-component → uts-plugin-biz}/lib/uni-screenBrightness/utssdk/index.d.ts +3 -0
  88. package/types/uni/{uts-plugin-component → uts-plugin-biz}/lib/uni-screenBrightness/utssdk/interface.d.ts +216 -207
  89. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +6 -1
  90. package/types/uni/uts-plugin-biz/lib/uni-vibrate/utssdk/global.d.ts +49 -0
  91. package/types/uni/uts-plugin-biz/lib/uni-vibrate/utssdk/index.d.ts +24 -0
  92. package/types/uni/uts-plugin-biz/lib/uni-vibrate/utssdk/interface.d.ts +201 -0
  93. package/types/uni/uts-plugin-component/global.d.ts +23 -105
  94. package/types/uni/uts-plugin-component/index.d.ts +23 -105
  95. package/types/uni/uts-plugin-component/lib/{uni-editor-global → uni-editor-editor-global}/utssdk/interface.d.ts +15 -4
  96. package/types/uni/uts-plugin-component/lib/uni-form-checkbox-global/utssdk/global.d.ts +9 -0
  97. package/types/uni/uts-plugin-component/lib/uni-form-checkbox-global/utssdk/index.d.ts +5 -0
  98. package/types/uni/uts-plugin-component/lib/uni-form-checkbox-global/utssdk/interface.d.ts +7 -0
  99. package/types/uni/uts-plugin-component/lib/uni-form-checkbox-group-global/utssdk/global.d.ts +9 -0
  100. package/types/uni/uts-plugin-component/lib/uni-form-checkbox-group-global/utssdk/index.d.ts +5 -0
  101. package/types/uni/uts-plugin-component/lib/uni-form-checkbox-group-global/utssdk/interface.d.ts +2 -0
  102. package/types/uni/uts-plugin-component/lib/uni-form-form-global/utssdk/global.d.ts +9 -0
  103. package/types/uni/uts-plugin-component/lib/{uni-page-container-global → uni-form-form-global}/utssdk/index.d.ts +1 -1
  104. package/types/uni/uts-plugin-component/lib/uni-form-form-global/utssdk/interface.d.ts +2 -0
  105. package/types/uni/uts-plugin-component/lib/uni-form-label-global/utssdk/global.d.ts +9 -0
  106. package/types/uni/uts-plugin-component/lib/{uni-getElementById → uni-form-label-global}/utssdk/index.d.ts +1 -1
  107. package/types/uni/uts-plugin-component/lib/uni-form-label-global/utssdk/interface.d.ts +2 -0
  108. package/types/uni/uts-plugin-component/lib/uni-form-picker-global/utssdk/global.d.ts +9 -0
  109. package/types/uni/uts-plugin-component/lib/uni-form-picker-global/utssdk/index.d.ts +5 -0
  110. package/types/uni/uts-plugin-component/lib/uni-form-picker-global/utssdk/interface.d.ts +2 -0
  111. package/types/uni/uts-plugin-component/lib/uni-form-picker-view-column-global/utssdk/global.d.ts +9 -0
  112. package/types/uni/uts-plugin-component/lib/uni-form-picker-view-column-global/utssdk/index.d.ts +5 -0
  113. package/types/uni/uts-plugin-component/lib/uni-form-picker-view-column-global/utssdk/interface.d.ts +2 -0
  114. package/types/uni/uts-plugin-component/lib/uni-form-picker-view-global/utssdk/global.d.ts +9 -0
  115. package/types/uni/uts-plugin-component/lib/{uni-base64ToArrayBuffer → uni-form-picker-view-global}/utssdk/index.d.ts +1 -1
  116. package/types/uni/uts-plugin-component/lib/uni-form-picker-view-global/utssdk/interface.d.ts +2 -0
  117. package/types/uni/uts-plugin-component/lib/uni-form-radio-global/utssdk/global.d.ts +9 -0
  118. package/types/uni/uts-plugin-component/lib/{uni-input → uni-form-radio-global}/utssdk/index.d.ts +1 -1
  119. package/types/uni/uts-plugin-component/lib/uni-form-radio-global/utssdk/interface.d.ts +7 -0
  120. package/types/uni/uts-plugin-component/lib/uni-form-radio-group-global/utssdk/global.d.ts +9 -0
  121. package/types/uni/uts-plugin-component/lib/{uni-arrayBufferToBase64 → uni-form-radio-group-global}/utssdk/index.d.ts +1 -1
  122. package/types/uni/uts-plugin-component/lib/uni-form-radio-group-global/utssdk/interface.d.ts +2 -0
  123. package/types/uni/uts-plugin-component/lib/uni-form-slider-global/utssdk/global.d.ts +13 -0
  124. package/types/uni/uts-plugin-component/lib/uni-form-slider-global/utssdk/index.d.ts +7 -0
  125. package/types/uni/uts-plugin-component/lib/uni-form-slider-global/utssdk/interface.d.ts +18 -0
  126. package/types/uni/uts-plugin-component/lib/uni-form-switch-global/utssdk/global.d.ts +9 -0
  127. package/types/uni/uts-plugin-component/lib/uni-form-switch-global/utssdk/index.d.ts +5 -0
  128. package/types/uni/uts-plugin-component/lib/uni-form-switch-global/utssdk/interface.d.ts +7 -0
  129. package/types/vue/LifeCycle.d.ts +2 -2
  130. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/global.d.ts +0 -25
  131. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/index.d.ts +0 -12
  132. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +0 -1767
  133. package/types/uni/uts-plugin-component/lib/uni-actionSheet/utssdk/global.d.ts +0 -29
  134. package/types/uni/uts-plugin-component/lib/uni-actionSheet/utssdk/index.d.ts +0 -14
  135. package/types/uni/uts-plugin-component/lib/uni-actionSheet/utssdk/interface.d.ts +0 -1673
  136. package/types/uni/uts-plugin-component/lib/uni-addPhoneContact/utssdk/global.d.ts +0 -25
  137. package/types/uni/uts-plugin-component/lib/uni-addPhoneContact/utssdk/index.d.ts +0 -12
  138. package/types/uni/uts-plugin-component/lib/uni-arrayBufferToBase64/utssdk/global.d.ts +0 -11
  139. package/types/uni/uts-plugin-component/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +0 -79
  140. package/types/uni/uts-plugin-component/lib/uni-base64ToArrayBuffer/utssdk/global.d.ts +0 -11
  141. package/types/uni/uts-plugin-component/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +0 -79
  142. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/global.d.ts +0 -55
  143. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/index.d.ts +0 -27
  144. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/interface.d.ts +0 -1330
  145. package/types/uni/uts-plugin-component/lib/uni-canvas/utssdk/global.d.ts +0 -25
  146. package/types/uni/uts-plugin-component/lib/uni-canvas/utssdk/index.d.ts +0 -12
  147. package/types/uni/uts-plugin-component/lib/uni-canvas/utssdk/interface.d.ts +0 -978
  148. package/types/uni/uts-plugin-component/lib/uni-canvas-dom2/utssdk/global.d.ts +0 -25
  149. package/types/uni/uts-plugin-component/lib/uni-canvas-dom2/utssdk/index.d.ts +0 -12
  150. package/types/uni/uts-plugin-component/lib/uni-canvas-dom2/utssdk/interface.d.ts +0 -978
  151. package/types/uni/uts-plugin-component/lib/uni-chooseLocation/utssdk/global.d.ts +0 -25
  152. package/types/uni/uts-plugin-component/lib/uni-chooseLocation/utssdk/index.d.ts +0 -12
  153. package/types/uni/uts-plugin-component/lib/uni-chooseLocation/utssdk/interface.d.ts +0 -423
  154. package/types/uni/uts-plugin-component/lib/uni-chooseMedia/utssdk/global.d.ts +0 -33
  155. package/types/uni/uts-plugin-component/lib/uni-chooseMedia/utssdk/index.d.ts +0 -16
  156. package/types/uni/uts-plugin-component/lib/uni-chooseMedia/utssdk/interface.d.ts +0 -499
  157. package/types/uni/uts-plugin-component/lib/uni-clipboard/utssdk/global.d.ts +0 -45
  158. package/types/uni/uts-plugin-component/lib/uni-clipboard/utssdk/index.d.ts +0 -22
  159. package/types/uni/uts-plugin-component/lib/uni-clipboard/utssdk/interface.d.ts +0 -217
  160. package/types/uni/uts-plugin-component/lib/uni-createInnerAudioContext/utssdk/global.d.ts +0 -33
  161. package/types/uni/uts-plugin-component/lib/uni-createInnerAudioContext/utssdk/index.d.ts +0 -16
  162. package/types/uni/uts-plugin-component/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +0 -3379
  163. package/types/uni/uts-plugin-component/lib/uni-createIntersectionObserver/utssdk/global.d.ts +0 -21
  164. package/types/uni/uts-plugin-component/lib/uni-createIntersectionObserver/utssdk/index.d.ts +0 -10
  165. package/types/uni/uts-plugin-component/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +0 -153
  166. package/types/uni/uts-plugin-component/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +0 -19
  167. package/types/uni/uts-plugin-component/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +0 -9
  168. package/types/uni/uts-plugin-component/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +0 -61
  169. package/types/uni/uts-plugin-component/lib/uni-createSelectorQuery/utssdk/global.d.ts +0 -21
  170. package/types/uni/uts-plugin-component/lib/uni-createSelectorQuery/utssdk/index.d.ts +0 -10
  171. package/types/uni/uts-plugin-component/lib/uni-createSelectorQuery/utssdk/interface.d.ts +0 -560
  172. package/types/uni/uts-plugin-component/lib/uni-createWebviewContext/utssdk/global.d.ts +0 -15
  173. package/types/uni/uts-plugin-component/lib/uni-createWebviewContext/utssdk/index.d.ts +0 -7
  174. package/types/uni/uts-plugin-component/lib/uni-createWebviewContext/utssdk/interface.d.ts +0 -214
  175. package/types/uni/uts-plugin-component/lib/uni-createWorker/utssdk/global.d.ts +0 -23
  176. package/types/uni/uts-plugin-component/lib/uni-createWorker/utssdk/index.d.ts +0 -11
  177. package/types/uni/uts-plugin-component/lib/uni-createWorker/utssdk/interface.d.ts +0 -158
  178. package/types/uni/uts-plugin-component/lib/uni-dialogPage/utssdk/global.d.ts +0 -27
  179. package/types/uni/uts-plugin-component/lib/uni-dialogPage/utssdk/index.d.ts +0 -13
  180. package/types/uni/uts-plugin-component/lib/uni-dialogPage/utssdk/interface.d.ts +0 -2303
  181. package/types/uni/uts-plugin-component/lib/uni-editor/utssdk/global.d.ts +0 -41
  182. package/types/uni/uts-plugin-component/lib/uni-editor/utssdk/index.d.ts +0 -20
  183. package/types/uni/uts-plugin-component/lib/uni-editor/utssdk/interface.d.ts +0 -909
  184. package/types/uni/uts-plugin-component/lib/uni-event/utssdk/global.d.ts +0 -17
  185. package/types/uni/uts-plugin-component/lib/uni-event/utssdk/index.d.ts +0 -8
  186. package/types/uni/uts-plugin-component/lib/uni-event/utssdk/interface.d.ts +0 -338
  187. package/types/uni/uts-plugin-component/lib/uni-exit/utssdk/global.d.ts +0 -27
  188. package/types/uni/uts-plugin-component/lib/uni-exit/utssdk/index.d.ts +0 -13
  189. package/types/uni/uts-plugin-component/lib/uni-exit/utssdk/interface.d.ts +0 -147
  190. package/types/uni/uts-plugin-component/lib/uni-file/utssdk/global.d.ts +0 -81
  191. package/types/uni/uts-plugin-component/lib/uni-file/utssdk/index.d.ts +0 -40
  192. package/types/uni/uts-plugin-component/lib/uni-file/utssdk/interface.d.ts +0 -397
  193. package/types/uni/uts-plugin-component/lib/uni-fileSystemManager/utssdk/global.d.ts +0 -151
  194. package/types/uni/uts-plugin-component/lib/uni-fileSystemManager/utssdk/index.d.ts +0 -75
  195. package/types/uni/uts-plugin-component/lib/uni-fileSystemManager/utssdk/interface.d.ts +0 -6428
  196. package/types/uni/uts-plugin-component/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +0 -11
  197. package/types/uni/uts-plugin-component/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +0 -5
  198. package/types/uni/uts-plugin-component/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +0 -37
  199. package/types/uni/uts-plugin-component/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +0 -13
  200. package/types/uni/uts-plugin-component/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +0 -6
  201. package/types/uni/uts-plugin-component/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +0 -620
  202. package/types/uni/uts-plugin-component/lib/uni-getAppBaseInfo/utssdk/global.d.ts +0 -15
  203. package/types/uni/uts-plugin-component/lib/uni-getAppBaseInfo/utssdk/index.d.ts +0 -7
  204. package/types/uni/uts-plugin-component/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +0 -2220
  205. package/types/uni/uts-plugin-component/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +0 -17
  206. package/types/uni/uts-plugin-component/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +0 -8
  207. package/types/uni/uts-plugin-component/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +0 -1406
  208. package/types/uni/uts-plugin-component/lib/uni-getDeviceInfo/utssdk/global.d.ts +0 -15
  209. package/types/uni/uts-plugin-component/lib/uni-getDeviceInfo/utssdk/index.d.ts +0 -7
  210. package/types/uni/uts-plugin-component/lib/uni-getDeviceInfo/utssdk/interface.d.ts +0 -1774
  211. package/types/uni/uts-plugin-component/lib/uni-getElementById/utssdk/global.d.ts +0 -11
  212. package/types/uni/uts-plugin-component/lib/uni-getElementById/utssdk/interface.d.ts +0 -83
  213. package/types/uni/uts-plugin-component/lib/uni-getEnterOptionsSync/utssdk/global.d.ts +0 -13
  214. package/types/uni/uts-plugin-component/lib/uni-getEnterOptionsSync/utssdk/index.d.ts +0 -6
  215. package/types/uni/uts-plugin-component/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +0 -833
  216. package/types/uni/uts-plugin-component/lib/uni-getLaunchOptionsSync/utssdk/global.d.ts +0 -13
  217. package/types/uni/uts-plugin-component/lib/uni-getLaunchOptionsSync/utssdk/index.d.ts +0 -6
  218. package/types/uni/uts-plugin-component/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +0 -836
  219. package/types/uni/uts-plugin-component/lib/uni-getLocation-tencent-uni1/utssdk/global.d.ts +0 -21
  220. package/types/uni/uts-plugin-component/lib/uni-getLocation-tencent-uni1/utssdk/index.d.ts +0 -11
  221. package/types/uni/uts-plugin-component/lib/uni-getLocation-tencent-uni1/utssdk/interface.d.ts +0 -736
  222. package/types/uni/uts-plugin-component/lib/uni-getNetworkType/utssdk/global.d.ts +0 -33
  223. package/types/uni/uts-plugin-component/lib/uni-getNetworkType/utssdk/index.d.ts +0 -16
  224. package/types/uni/uts-plugin-component/lib/uni-getNetworkType/utssdk/interface.d.ts +0 -420
  225. package/types/uni/uts-plugin-component/lib/uni-getPerformance/utssdk/global.d.ts +0 -23
  226. package/types/uni/uts-plugin-component/lib/uni-getPerformance/utssdk/index.d.ts +0 -11
  227. package/types/uni/uts-plugin-component/lib/uni-getPerformance/utssdk/interface.d.ts +0 -199
  228. package/types/uni/uts-plugin-component/lib/uni-getProvider/utssdk/global.d.ts +0 -37
  229. package/types/uni/uts-plugin-component/lib/uni-getProvider/utssdk/index.d.ts +0 -18
  230. package/types/uni/uts-plugin-component/lib/uni-getProvider/utssdk/interface.d.ts +0 -757
  231. package/types/uni/uts-plugin-component/lib/uni-getSystemInfo/utssdk/global.d.ts +0 -33
  232. package/types/uni/uts-plugin-component/lib/uni-getSystemInfo/utssdk/index.d.ts +0 -16
  233. package/types/uni/uts-plugin-component/lib/uni-getSystemInfo/utssdk/interface.d.ts +0 -6084
  234. package/types/uni/uts-plugin-component/lib/uni-getSystemSetting/utssdk/global.d.ts +0 -13
  235. package/types/uni/uts-plugin-component/lib/uni-getSystemSetting/utssdk/index.d.ts +0 -6
  236. package/types/uni/uts-plugin-component/lib/uni-getSystemSetting/utssdk/interface.d.ts +0 -508
  237. package/types/uni/uts-plugin-component/lib/uni-input/utssdk/global.d.ts +0 -9
  238. package/types/uni/uts-plugin-component/lib/uni-input/utssdk/interface.d.ts +0 -0
  239. package/types/uni/uts-plugin-component/lib/uni-installApk/utssdk/global.d.ts +0 -25
  240. package/types/uni/uts-plugin-component/lib/uni-installApk/utssdk/index.d.ts +0 -12
  241. package/types/uni/uts-plugin-component/lib/uni-installApk/utssdk/interface.d.ts +0 -125
  242. package/types/uni/uts-plugin-component/lib/uni-interceptor/utssdk/global.d.ts +0 -17
  243. package/types/uni/uts-plugin-component/lib/uni-interceptor/utssdk/index.d.ts +0 -8
  244. package/types/uni/uts-plugin-component/lib/uni-interceptor/utssdk/interface.d.ts +0 -171
  245. package/types/uni/uts-plugin-component/lib/uni-keyboard/utssdk/global.d.ts +0 -45
  246. package/types/uni/uts-plugin-component/lib/uni-keyboard/utssdk/index.d.ts +0 -22
  247. package/types/uni/uts-plugin-component/lib/uni-keyboard/utssdk/interface.d.ts +0 -693
  248. package/types/uni/uts-plugin-component/lib/uni-loadFontFace/utssdk/global.d.ts +0 -29
  249. package/types/uni/uts-plugin-component/lib/uni-loadFontFace/utssdk/index.d.ts +0 -14
  250. package/types/uni/uts-plugin-component/lib/uni-loadFontFace/utssdk/interface.d.ts +0 -603
  251. package/types/uni/uts-plugin-component/lib/uni-loading-global/utssdk/global.d.ts +0 -9
  252. package/types/uni/uts-plugin-component/lib/uni-loading-global/utssdk/index.d.ts +0 -5
  253. package/types/uni/uts-plugin-component/lib/uni-loading-global/utssdk/interface.d.ts +0 -5
  254. package/types/uni/uts-plugin-component/lib/uni-location/utssdk/global.d.ts +0 -61
  255. package/types/uni/uts-plugin-component/lib/uni-location/utssdk/index.d.ts +0 -30
  256. package/types/uni/uts-plugin-component/lib/uni-location/utssdk/interface.d.ts +0 -3443
  257. package/types/uni/uts-plugin-component/lib/uni-location-system/utssdk/global.d.ts +0 -9
  258. package/types/uni/uts-plugin-component/lib/uni-location-system/utssdk/index.d.ts +0 -5
  259. package/types/uni/uts-plugin-component/lib/uni-location-system/utssdk/interface.d.ts +0 -3
  260. package/types/uni/uts-plugin-component/lib/uni-location-tencent/utssdk/global.d.ts +0 -9
  261. package/types/uni/uts-plugin-component/lib/uni-location-tencent/utssdk/index.d.ts +0 -5
  262. package/types/uni/uts-plugin-component/lib/uni-location-tencent/utssdk/interface.d.ts +0 -3
  263. package/types/uni/uts-plugin-component/lib/uni-makePhoneCall/utssdk/global.d.ts +0 -29
  264. package/types/uni/uts-plugin-component/lib/uni-makePhoneCall/utssdk/index.d.ts +0 -14
  265. package/types/uni/uts-plugin-component/lib/uni-makePhoneCall/utssdk/interface.d.ts +0 -392
  266. package/types/uni/uts-plugin-component/lib/uni-media/utssdk/global.d.ts +0 -157
  267. package/types/uni/uts-plugin-component/lib/uni-media/utssdk/index.d.ts +0 -78
  268. package/types/uni/uts-plugin-component/lib/uni-media/utssdk/interface.d.ts +0 -5245
  269. package/types/uni/uts-plugin-component/lib/uni-modal/utssdk/global.d.ts +0 -39
  270. package/types/uni/uts-plugin-component/lib/uni-modal/utssdk/index.d.ts +0 -19
  271. package/types/uni/uts-plugin-component/lib/uni-modal/utssdk/interface.d.ts +0 -1743
  272. package/types/uni/uts-plugin-component/lib/uni-navigationBar/utssdk/global.d.ts +0 -69
  273. package/types/uni/uts-plugin-component/lib/uni-navigationBar/utssdk/index.d.ts +0 -34
  274. package/types/uni/uts-plugin-component/lib/uni-navigationBar/utssdk/interface.d.ts +0 -1047
  275. package/types/uni/uts-plugin-component/lib/uni-network/utssdk/global.d.ts +0 -109
  276. package/types/uni/uts-plugin-component/lib/uni-network/utssdk/index.d.ts +0 -54
  277. package/types/uni/uts-plugin-component/lib/uni-network/utssdk/interface.d.ts +0 -4462
  278. package/types/uni/uts-plugin-component/lib/uni-oauth/utssdk/global.d.ts +0 -71
  279. package/types/uni/uts-plugin-component/lib/uni-oauth/utssdk/index.d.ts +0 -35
  280. package/types/uni/uts-plugin-component/lib/uni-oauth/utssdk/interface.d.ts +0 -3031
  281. package/types/uni/uts-plugin-component/lib/uni-oauth-huawei/utssdk/global.d.ts +0 -9
  282. package/types/uni/uts-plugin-component/lib/uni-oauth-huawei/utssdk/index.d.ts +0 -5
  283. package/types/uni/uts-plugin-component/lib/uni-oauth-huawei/utssdk/interface.d.ts +0 -1
  284. package/types/uni/uts-plugin-component/lib/uni-oauth-weixin/utssdk/global.d.ts +0 -17
  285. package/types/uni/uts-plugin-component/lib/uni-oauth-weixin/utssdk/index.d.ts +0 -9
  286. package/types/uni/uts-plugin-component/lib/uni-oauth-weixin/utssdk/interface.d.ts +0 -48
  287. package/types/uni/uts-plugin-component/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +0 -25
  288. package/types/uni/uts-plugin-component/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +0 -12
  289. package/types/uni/uts-plugin-component/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +0 -256
  290. package/types/uni/uts-plugin-component/lib/uni-openDocument/utssdk/global.d.ts +0 -29
  291. package/types/uni/uts-plugin-component/lib/uni-openDocument/utssdk/index.d.ts +0 -14
  292. package/types/uni/uts-plugin-component/lib/uni-openDocument/utssdk/interface.d.ts +0 -823
  293. package/types/uni/uts-plugin-component/lib/uni-page-container-global/utssdk/global.d.ts +0 -9
  294. package/types/uni/uts-plugin-component/lib/uni-page-container-global/utssdk/interface.d.ts +0 -0
  295. package/types/uni/uts-plugin-component/lib/uni-pageScrollTo/utssdk/global.d.ts +0 -27
  296. package/types/uni/uts-plugin-component/lib/uni-pageScrollTo/utssdk/index.d.ts +0 -13
  297. package/types/uni/uts-plugin-component/lib/uni-pageScrollTo/utssdk/interface.d.ts +0 -618
  298. package/types/uni/uts-plugin-component/lib/uni-payment/utssdk/global.d.ts +0 -33
  299. package/types/uni/uts-plugin-component/lib/uni-payment/utssdk/index.d.ts +0 -16
  300. package/types/uni/uts-plugin-component/lib/uni-payment/utssdk/interface.d.ts +0 -856
  301. package/types/uni/uts-plugin-component/lib/uni-payment-alipay/utssdk/global.d.ts +0 -9
  302. package/types/uni/uts-plugin-component/lib/uni-payment-alipay/utssdk/index.d.ts +0 -5
  303. package/types/uni/uts-plugin-component/lib/uni-payment-alipay/utssdk/interface.d.ts +0 -3
  304. package/types/uni/uts-plugin-component/lib/uni-payment-huawei/utssdk/global.d.ts +0 -9
  305. package/types/uni/uts-plugin-component/lib/uni-payment-huawei/utssdk/index.d.ts +0 -5
  306. package/types/uni/uts-plugin-component/lib/uni-payment-huawei/utssdk/interface.d.ts +0 -1
  307. package/types/uni/uts-plugin-component/lib/uni-payment-wxpay/utssdk/global.d.ts +0 -9
  308. package/types/uni/uts-plugin-component/lib/uni-payment-wxpay/utssdk/index.d.ts +0 -5
  309. package/types/uni/uts-plugin-component/lib/uni-payment-wxpay/utssdk/interface.d.ts +0 -5
  310. package/types/uni/uts-plugin-component/lib/uni-previewImage/utssdk/global.d.ts +0 -47
  311. package/types/uni/uts-plugin-component/lib/uni-previewImage/utssdk/index.d.ts +0 -23
  312. package/types/uni/uts-plugin-component/lib/uni-previewImage/utssdk/interface.d.ts +0 -520
  313. package/types/uni/uts-plugin-component/lib/uni-privacy/utssdk/global.d.ts +0 -31
  314. package/types/uni/uts-plugin-component/lib/uni-privacy/utssdk/index.d.ts +0 -15
  315. package/types/uni/uts-plugin-component/lib/uni-privacy/utssdk/interface.d.ts +0 -568
  316. package/types/uni/uts-plugin-component/lib/uni-prompt/utssdk/global.d.ts +0 -33
  317. package/types/uni/uts-plugin-component/lib/uni-prompt/utssdk/index.d.ts +0 -16
  318. package/types/uni/uts-plugin-component/lib/uni-prompt/utssdk/interface.d.ts +0 -1693
  319. package/types/uni/uts-plugin-component/lib/uni-pullDownRefresh/utssdk/global.d.ts +0 -29
  320. package/types/uni/uts-plugin-component/lib/uni-pullDownRefresh/utssdk/index.d.ts +0 -14
  321. package/types/uni/uts-plugin-component/lib/uni-pullDownRefresh/utssdk/interface.d.ts +0 -191
  322. package/types/uni/uts-plugin-component/lib/uni-recorder/utssdk/global.d.ts +0 -21
  323. package/types/uni/uts-plugin-component/lib/uni-recorder/utssdk/index.d.ts +0 -10
  324. package/types/uni/uts-plugin-component/lib/uni-recorder/utssdk/interface.d.ts +0 -2999
  325. package/types/uni/uts-plugin-component/lib/uni-requestMerchantTransfer/utssdk/global.d.ts +0 -21
  326. package/types/uni/uts-plugin-component/lib/uni-requestMerchantTransfer/utssdk/index.d.ts +0 -10
  327. package/types/uni/uts-plugin-component/lib/uni-requestMerchantTransfer/utssdk/interface.d.ts +0 -713
  328. package/types/uni/uts-plugin-component/lib/uni-route/utssdk/global.d.ts +0 -59
  329. package/types/uni/uts-plugin-component/lib/uni-route/utssdk/index.d.ts +0 -29
  330. package/types/uni/uts-plugin-component/lib/uni-route/utssdk/interface.d.ts +0 -2731
  331. package/types/uni/uts-plugin-component/lib/uni-rpx2px/utssdk/global.d.ts +0 -11
  332. package/types/uni/uts-plugin-component/lib/uni-rpx2px/utssdk/index.d.ts +0 -5
  333. package/types/uni/uts-plugin-component/lib/uni-rpx2px/utssdk/interface.d.ts +0 -81
  334. package/types/uni/uts-plugin-component/lib/uni-scanCode/utssdk/global.d.ts +0 -25
  335. package/types/uni/uts-plugin-component/lib/uni-scanCode/utssdk/index.d.ts +0 -12
  336. package/types/uni/uts-plugin-component/lib/uni-scanCode/utssdk/interface.d.ts +0 -429
  337. package/types/uni/uts-plugin-component/lib/uni-share/utssdk/global.d.ts +0 -41
  338. package/types/uni/uts-plugin-component/lib/uni-share/utssdk/index.d.ts +0 -20
  339. package/types/uni/uts-plugin-component/lib/uni-share/utssdk/interface.d.ts +0 -1192
  340. package/types/uni/uts-plugin-component/lib/uni-share-weixin/utssdk/global.d.ts +0 -9
  341. package/types/uni/uts-plugin-component/lib/uni-share-weixin/utssdk/index.d.ts +0 -5
  342. package/types/uni/uts-plugin-component/lib/uni-share-weixin/utssdk/interface.d.ts +0 -5
  343. package/types/uni/uts-plugin-component/lib/uni-shareWithSystem/utssdk/global.d.ts +0 -27
  344. package/types/uni/uts-plugin-component/lib/uni-shareWithSystem/utssdk/index.d.ts +0 -13
  345. package/types/uni/uts-plugin-component/lib/uni-shareWithSystem/utssdk/interface.d.ts +0 -722
  346. package/types/uni/uts-plugin-component/lib/uni-showLoading/utssdk/global.d.ts +0 -55
  347. package/types/uni/uts-plugin-component/lib/uni-showLoading/utssdk/index.d.ts +0 -27
  348. package/types/uni/uts-plugin-component/lib/uni-showLoading/utssdk/interface.d.ts +0 -1617
  349. package/types/uni/uts-plugin-component/lib/uni-sse/utssdk/global.d.ts +0 -21
  350. package/types/uni/uts-plugin-component/lib/uni-sse/utssdk/index.d.ts +0 -10
  351. package/types/uni/uts-plugin-component/lib/uni-sse/utssdk/interface.d.ts +0 -330
  352. package/types/uni/uts-plugin-component/lib/uni-storage/utssdk/global.d.ts +0 -79
  353. package/types/uni/uts-plugin-component/lib/uni-storage/utssdk/index.d.ts +0 -39
  354. package/types/uni/uts-plugin-component/lib/uni-storage/utssdk/interface.d.ts +0 -1030
  355. package/types/uni/uts-plugin-component/lib/uni-tabBar/utssdk/global.d.ts +0 -149
  356. package/types/uni/uts-plugin-component/lib/uni-tabBar/utssdk/index.d.ts +0 -74
  357. package/types/uni/uts-plugin-component/lib/uni-tabBar/utssdk/interface.d.ts +0 -1221
  358. package/types/uni/uts-plugin-component/lib/uni-textarea/utssdk/global.d.ts +0 -9
  359. package/types/uni/uts-plugin-component/lib/uni-textarea/utssdk/index.d.ts +0 -5
  360. package/types/uni/uts-plugin-component/lib/uni-textarea/utssdk/interface.d.ts +0 -0
  361. package/types/uni/uts-plugin-component/lib/uni-theme/utssdk/global.d.ts +0 -53
  362. package/types/uni/uts-plugin-component/lib/uni-theme/utssdk/index.d.ts +0 -26
  363. package/types/uni/uts-plugin-component/lib/uni-theme/utssdk/interface.d.ts +0 -1141
  364. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +0 -47
  365. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +0 -23
  366. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +0 -926
  367. package/types/uni/uts-plugin-component/lib/uni-virtualPayment/utssdk/global.d.ts +0 -113
  368. package/types/uni/uts-plugin-component/lib/uni-virtualPayment/utssdk/index.d.ts +0 -56
  369. package/types/uni/uts-plugin-component/lib/uni-virtualPayment/utssdk/interface.d.ts +0 -1661
  370. package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/global.d.ts +0 -29
  371. package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/index.d.ts +0 -14
  372. package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/interface.d.ts +0 -452
  373. package/types/uni/uts-plugin-component/lib/uni-websocket/utssdk/global.d.ts +0 -59
  374. package/types/uni/uts-plugin-component/lib/uni-websocket/utssdk/index.d.ts +0 -29
  375. package/types/uni/uts-plugin-component/lib/uni-websocket/utssdk/interface.d.ts +0 -1939
  376. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/global.d.ts +0 -12
  377. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/index.d.ts +0 -1
  378. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +0 -917
  379. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/global.d.ts +0 -25
  380. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/index.d.ts +0 -11
  381. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +0 -1095
  382. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +0 -253
  383. /package/types/uni/uts-plugin-component/lib/{uni-camera-global → uni-camera-camera-global}/utssdk/global.d.ts +0 -0
  384. /package/types/uni/uts-plugin-component/lib/{uni-camera-global → uni-camera-camera-global}/utssdk/index.d.ts +0 -0
  385. /package/types/uni/uts-plugin-component/lib/{uni-camera-global → uni-camera-camera-global}/utssdk/interface.d.ts +0 -0
  386. /package/types/uni/uts-plugin-component/lib/{uni-editor-global → uni-editor-editor-global}/utssdk/global.d.ts +0 -0
  387. /package/types/uni/uts-plugin-component/lib/{uni-editor-global → uni-editor-editor-global}/utssdk/index.d.ts +0 -0
  388. /package/types/uni/uts-plugin-component/lib/{uni-form-global → uni-form-button-global}/utssdk/global.d.ts +0 -0
  389. /package/types/uni/uts-plugin-component/lib/{uni-form-global → uni-form-button-global}/utssdk/index.d.ts +0 -0
  390. /package/types/uni/uts-plugin-component/lib/{uni-form-global → uni-form-button-global}/utssdk/interface.d.ts +0 -0
  391. /package/types/uni/uts-plugin-component/lib/{uni-map-tencent-global → uni-map-tencent-map-global}/utssdk/global.d.ts +0 -0
  392. /package/types/uni/uts-plugin-component/lib/{uni-map-tencent-global → uni-map-tencent-map-global}/utssdk/index.d.ts +0 -0
  393. /package/types/uni/uts-plugin-component/lib/{uni-map-tencent-global → uni-map-tencent-map-global}/utssdk/interface.d.ts +0 -0
  394. /package/types/uni/uts-plugin-component/lib/{uni-match-media-global → uni-match-media-match-media-global}/utssdk/global.d.ts +0 -0
  395. /package/types/uni/uts-plugin-component/lib/{uni-match-media-global → uni-match-media-match-media-global}/utssdk/index.d.ts +0 -0
  396. /package/types/uni/uts-plugin-component/lib/{uni-match-media-global → uni-match-media-match-media-global}/utssdk/interface.d.ts +0 -0
  397. /package/types/uni/uts-plugin-component/lib/{uni-navigator-global → uni-navigator-navigator-global}/utssdk/global.d.ts +0 -0
  398. /package/types/uni/uts-plugin-component/lib/{uni-navigator-global → uni-navigator-navigator-global}/utssdk/index.d.ts +0 -0
  399. /package/types/uni/uts-plugin-component/lib/{uni-navigator-global → uni-navigator-navigator-global}/utssdk/interface.d.ts +0 -0
  400. /package/types/uni/uts-plugin-component/lib/{uni-barcode-scanning → uni-page-container-page-container-global}/utssdk/global.d.ts +0 -0
  401. /package/types/uni/uts-plugin-component/lib/{uni-barcode-scanning → uni-page-container-page-container-global}/utssdk/index.d.ts +0 -0
  402. /package/types/uni/uts-plugin-component/lib/{uni-barcode-scanning → uni-page-container-page-container-global}/utssdk/interface.d.ts +0 -0
  403. /package/types/uni/uts-plugin-component/lib/{uni-picker-global → uni-picker-picker-global}/utssdk/global.d.ts +0 -0
  404. /package/types/uni/uts-plugin-component/lib/{uni-picker-global → uni-picker-picker-global}/utssdk/index.d.ts +0 -0
  405. /package/types/uni/uts-plugin-component/lib/{uni-picker-global → uni-picker-picker-global}/utssdk/interface.d.ts +0 -0
  406. /package/types/uni/uts-plugin-component/lib/{uni-progress-global → uni-progress-progress-global}/utssdk/global.d.ts +0 -0
  407. /package/types/uni/uts-plugin-component/lib/{uni-progress-global → uni-progress-progress-global}/utssdk/index.d.ts +0 -0
  408. /package/types/uni/uts-plugin-component/lib/{uni-progress-global → uni-progress-progress-global}/utssdk/interface.d.ts +0 -0
  409. /package/types/uni/uts-plugin-component/lib/{uni-rich-text-global → uni-rich-text-rich-text-global}/utssdk/global.d.ts +0 -0
  410. /package/types/uni/uts-plugin-component/lib/{uni-rich-text-global → uni-rich-text-rich-text-global}/utssdk/index.d.ts +0 -0
  411. /package/types/uni/uts-plugin-component/lib/{uni-rich-text-global → uni-rich-text-rich-text-global}/utssdk/interface.d.ts +0 -0
  412. /package/types/uni/uts-plugin-component/lib/{uni-video-global → uni-video-video-global}/utssdk/global.d.ts +0 -0
  413. /package/types/uni/uts-plugin-component/lib/{uni-video-global → uni-video-video-global}/utssdk/index.d.ts +0 -0
  414. /package/types/uni/uts-plugin-component/lib/{uni-video-global → uni-video-video-global}/utssdk/interface.d.ts +0 -0
  415. /package/types/uni/uts-plugin-component/lib/{uni-web-view-global → uni-web-view-web-view-global}/utssdk/global.d.ts +0 -0
  416. /package/types/uni/uts-plugin-component/lib/{uni-web-view-global → uni-web-view-web-view-global}/utssdk/index.d.ts +0 -0
  417. /package/types/uni/uts-plugin-component/lib/{uni-web-view-global → uni-web-view-web-view-global}/utssdk/interface.d.ts +0 -0
@@ -1,4462 +0,0 @@
1
- export type Request<T> = (param: RequestOptions<T>) => RequestTask;
2
-
3
- /**
4
- * 网络请求参数
5
- */
6
- export type RequestOptions<T> = {
7
- /**
8
- * 开发者服务器接口地址
9
- *
10
- * @uniPlatform
11
- {
12
- "app": {
13
- "android": {
14
- "osVer": "5.0",
15
- "uniVer": "√",
16
- "uniUtsPlugin": "3.91",
17
- "unixVer": "3.91"
18
- },
19
- "ios": {
20
- "osVer": "12.0",
21
- "uniVer": "√",
22
- "uniUtsPlugin": "4.11",
23
- "unixVer": "4.11",
24
- "unixUtsPlugin": "4.11"
25
- },
26
- "harmony": {
27
- "osVer": "3.0",
28
- "uniVer": "4.23",
29
- "unixVer": "4.61",
30
- "unixVaporVer": "5.0"
31
- }
32
- },
33
- * "mp": {
34
- * "weixin": {
35
- * "hostVer": "√",
36
- * "uniVer": "√",
37
- * "unixVer": "4.41"
38
- * },
39
- * "alipay": {
40
- * "hostVer": "√",
41
- * "uniVer": "√",
42
- * "unixVer": "x"
43
- * },
44
- * "baidu": {
45
- * "hostVer": "√",
46
- * "uniVer": "√",
47
- * "unixVer": "x"
48
- * },
49
- * "toutiao": {
50
- * "hostVer": "√",
51
- * "uniVer": "√",
52
- * "unixVer": "x"
53
- * },
54
- * "lark": {
55
- * "hostVer": "√",
56
- * "uniVer": "√",
57
- * "unixVer": "x"
58
- * },
59
- * "qq": {
60
- * "hostVer": "√",
61
- * "uniVer": "√",
62
- * "unixVer": "x"
63
- * },
64
- * "kuaishou": {
65
- * "hostVer": "√",
66
- * "uniVer": "√",
67
- * "unixVer": "x"
68
- * },
69
- * "jd": {
70
- * "hostVer": "√",
71
- * "uniVer": "√",
72
- * "unixVer": "x"
73
- * }
74
- * },
75
- "web": {
76
- "uniVer": "√",
77
- "unixVer": "4.0"
78
- }
79
- }
80
- */
81
- url: string,
82
- /**
83
- * 请求的参数 在`app-android端,参数类型只能为`UTSJSONObject`或者`string`类型,app-android平台从 4.51版本开始支持ArrayBuffer, app-ios平台从 4.61版本开始支持ArrayBuffer
84
- * @type {RequestDataOptions}
85
- * @defaultValue null
86
- * @uniPlatform
87
- {
88
- "app": {
89
- "android": {
90
- "osVer": "5.0",
91
- "uniVer": "√",
92
- "uniUtsPlugin": "3.91",
93
- "unixVer": "3.91"
94
- },
95
- "ios": {
96
- "osVer": "12.0",
97
- "uniVer": "√",
98
- "uniUtsPlugin": "4.11",
99
- "unixVer": "4.11",
100
- "unixUtsPlugin": "4.11"
101
- },
102
- "harmony": {
103
- "osVer": "3.0",
104
- "uniVer": "4.23",
105
- "unixVer": "4.61",
106
- "unixVaporVer": "5.0"
107
- }
108
- },
109
- * "mp": {
110
- * "weixin": {
111
- * "hostVer": "√",
112
- * "uniVer": "√",
113
- * "unixVer": "4.41"
114
- * },
115
- * "alipay": {
116
- * "hostVer": "√",
117
- * "uniVer": "√",
118
- * "unixVer": "x"
119
- * },
120
- * "baidu": {
121
- * "hostVer": "√",
122
- * "uniVer": "√",
123
- * "unixVer": "x"
124
- * },
125
- * "toutiao": {
126
- * "hostVer": "√",
127
- * "uniVer": "√",
128
- * "unixVer": "x"
129
- * },
130
- * "lark": {
131
- * "hostVer": "√",
132
- * "uniVer": "√",
133
- * "unixVer": "x"
134
- * },
135
- * "qq": {
136
- * "hostVer": "√",
137
- * "uniVer": "√",
138
- * "unixVer": "x"
139
- * },
140
- * "kuaishou": {
141
- * "hostVer": "√",
142
- * "uniVer": "√",
143
- * "unixVer": "x"
144
- * },
145
- * "jd": {
146
- * "hostVer": "√",
147
- * "uniVer": "√",
148
- * "unixVer": "x"
149
- * }
150
- * },
151
- "web": {
152
- "uniVer": "√",
153
- "unixVer": "4.0"
154
- }
155
- }
156
- */
157
- data?: any | null,
158
- /**
159
- * 设置请求的 header,header 中不能设置 Referer
160
- * @defaultValue null
161
- * @uniPlatform
162
- {
163
- "app": {
164
- "android": {
165
- "osVer": "5.0",
166
- "uniVer": "√",
167
- "uniUtsPlugin": "3.91",
168
- "unixVer": "3.91"
169
- },
170
- "ios": {
171
- "osVer": "12.0",
172
- "uniVer": "√",
173
- "uniUtsPlugin": "4.11",
174
- "unixVer": "4.11",
175
- "unixUtsPlugin": "4.11"
176
- },
177
- "harmony": {
178
- "osVer": "3.0",
179
- "uniVer": "4.23",
180
- "unixVer": "4.61",
181
- "unixVaporVer": "5.0"
182
- }
183
- },
184
- * "mp": {
185
- * "weixin": {
186
- * "hostVer": "√",
187
- * "uniVer": "√",
188
- * "unixVer": "4.41"
189
- * },
190
- * "alipay": {
191
- * "hostVer": "√",
192
- * "uniVer": "√",
193
- * "unixVer": "x"
194
- * },
195
- * "baidu": {
196
- * "hostVer": "√",
197
- * "uniVer": "√",
198
- * "unixVer": "x"
199
- * },
200
- * "toutiao": {
201
- * "hostVer": "√",
202
- * "uniVer": "√",
203
- * "unixVer": "x"
204
- * },
205
- * "lark": {
206
- * "hostVer": "√",
207
- * "uniVer": "√",
208
- * "unixVer": "x"
209
- * },
210
- * "qq": {
211
- * "hostVer": "√",
212
- * "uniVer": "√",
213
- * "unixVer": "x"
214
- * },
215
- * "kuaishou": {
216
- * "hostVer": "√",
217
- * "uniVer": "√",
218
- * "unixVer": "x"
219
- * },
220
- * "jd": {
221
- * "hostVer": "√",
222
- * "uniVer": "√",
223
- * "unixVer": "x"
224
- * }
225
- * },
226
- "web": {
227
- "uniVer": "√",
228
- "unixVer": "4.0"
229
- }
230
- }
231
- */
232
- header?: UTSJSONObject | null,
233
- /**
234
- * 请求方法,如果设置的值不在取值范围内,会以GET方法进行请求。
235
- * @defaultValue "GET"
236
- * @uniPlatform
237
- {
238
- "app": {
239
- "android": {
240
- "osVer": "5.0",
241
- "uniVer": "√",
242
- "uniUtsPlugin": "3.91",
243
- "unixVer": "3.91"
244
- },
245
- "ios": {
246
- "osVer": "12.0",
247
- "uniVer": "√",
248
- "uniUtsPlugin": "4.11",
249
- "unixVer": "4.11",
250
- "unixUtsPlugin": "4.11"
251
- },
252
- "harmony": {
253
- "osVer": "3.0",
254
- "uniVer": "4.23",
255
- "unixVer": "4.61",
256
- "unixVaporVer": "5.0"
257
- }
258
- },
259
- * "mp": {
260
- * "weixin": {
261
- * "hostVer": "√",
262
- * "uniVer": "√",
263
- * "unixVer": "4.41"
264
- * },
265
- * "alipay": {
266
- * "hostVer": "√",
267
- * "uniVer": "√",
268
- * "unixVer": "x"
269
- * },
270
- * "baidu": {
271
- * "hostVer": "√",
272
- * "uniVer": "√",
273
- * "unixVer": "x"
274
- * },
275
- * "toutiao": {
276
- * "hostVer": "√",
277
- * "uniVer": "√",
278
- * "unixVer": "x"
279
- * },
280
- * "lark": {
281
- * "hostVer": "√",
282
- * "uniVer": "√",
283
- * "unixVer": "x"
284
- * },
285
- * "qq": {
286
- * "hostVer": "√",
287
- * "uniVer": "√",
288
- * "unixVer": "x"
289
- * },
290
- * "kuaishou": {
291
- * "hostVer": "√",
292
- * "uniVer": "√",
293
- * "unixVer": "x"
294
- * },
295
- * "jd": {
296
- * "hostVer": "√",
297
- * "uniVer": "√",
298
- * "unixVer": "x"
299
- * }
300
- * },
301
- "web": {
302
- "uniVer": "√",
303
- "unixVer": "4.0"
304
- }
305
- }
306
- */
307
- method?: RequestMethod | null,
308
- /**
309
- * 超时时间,单位 ms
310
- * @defaultValue 60000
311
- * @uniPlatform
312
- {
313
- "app": {
314
- "android": {
315
- "osVer": "5.0",
316
- "uniVer": "√",
317
- "uniUtsPlugin": "3.91",
318
- "unixVer": "3.91"
319
- },
320
- "ios": {
321
- "osVer": "12.0",
322
- "uniVer": "√",
323
- "uniUtsPlugin": "4.11",
324
- "unixVer": "4.11",
325
- "unixUtsPlugin": "4.11"
326
- }
327
- },
328
- * "mp": {
329
- * "weixin": {
330
- * "hostVer": "√",
331
- * "uniVer": "√",
332
- * "unixVer": "4.41"
333
- * },
334
- * "alipay": {
335
- * "hostVer": "√",
336
- * "uniVer": "√",
337
- * "unixVer": "x"
338
- * },
339
- * "baidu": {
340
- * "hostVer": "√",
341
- * "uniVer": "√",
342
- * "unixVer": "x"
343
- * },
344
- * "toutiao": {
345
- * "hostVer": "√",
346
- * "uniVer": "√",
347
- * "unixVer": "x"
348
- * },
349
- * "lark": {
350
- * "hostVer": "√",
351
- * "uniVer": "√",
352
- * "unixVer": "x"
353
- * },
354
- * "qq": {
355
- * "hostVer": "√",
356
- * "uniVer": "√",
357
- * "unixVer": "x"
358
- * },
359
- * "kuaishou": {
360
- * "hostVer": "√",
361
- * "uniVer": "√",
362
- * "unixVer": "x"
363
- * },
364
- * "jd": {
365
- * "hostVer": "√",
366
- * "uniVer": "√",
367
- * "unixVer": "x"
368
- * }
369
- * }
370
- }
371
- */
372
- timeout?: number | null,
373
- /**
374
- * 是否开启 Quic/h3 协议
375
- * `web` 端由服务端和浏览器共同决定是否启用 Quic/h3 协议,无需设置此参数
376
- * @defaultValue false
377
- * @uniPlatform
378
- {
379
- "app": {
380
- "android": {
381
- "osVer": "6.0",
382
- "uniVer": "x",
383
- "uniUtsPlugin": "5.0",
384
- "unixVer": "5.0"
385
- },
386
- "ios": {
387
- "osVer": "x",
388
- "uniVer": "x",
389
- "uniUtsPlugin": "x",
390
- "unixVer": "5.0",
391
- "unixUtsPlugin": "5.0"
392
- },
393
- "harmony": {
394
- "osVer": "3.0",
395
- "uniVer": "x",
396
- "uniUtsPlugin": "5.0",
397
- "unixVer": "5.0",
398
- "unixVaporVer": "5.0"
399
- }
400
- },
401
- * "mp": {
402
- * "weixin": {
403
- * "hostVer": "√",
404
- * "uniVer": "√",
405
- * "unixVer": "√"
406
- * },
407
- * "alipay": {
408
- * "hostVer": "x",
409
- * "uniVer": "x",
410
- * "unixVer": "x"
411
- * },
412
- * "baidu": {
413
- * "hostVer": "x",
414
- * "uniVer": "x",
415
- * "unixVer": "x"
416
- * },
417
- * "toutiao": {
418
- * "hostVer": "x",
419
- * "uniVer": "x",
420
- * "unixVer": "x"
421
- * },
422
- * "lark": {
423
- * "hostVer": "x",
424
- * "uniVer": "x",
425
- * "unixVer": "x"
426
- * },
427
- * "qq": {
428
- * "hostVer": "x",
429
- * "uniVer": "x",
430
- * "unixVer": "x"
431
- * },
432
- * "kuaishou": {
433
- * "hostVer": "x",
434
- * "uniVer": "x",
435
- * "unixVer": "x"
436
- * },
437
- * "jd": {
438
- * "hostVer": "x",
439
- * "uniVer": "x",
440
- * "unixVer": "x"
441
- * }
442
- * },
443
- * "web": {
444
- * "uniVer": "√",
445
- * "unixVer": "√"
446
- * }
447
- }
448
- */
449
- enableQuic?: boolean | null,
450
- /**
451
- * 如果设为 json,会对返回的数据进行一次 JSON.parse,非 json 不会进行 JSON.parse
452
- * @defaultValue "json"
453
- * @deprecated 不支持
454
- * @autodoc false
455
- */
456
- dataType?: string | null,
457
- /**
458
- * 设置响应的数据类型。
459
- *
460
- * @deprecated 不支持
461
- * @autodoc false
462
- */
463
- responseType?: string | null,
464
- /**
465
- * 验证 ssl 证书
466
- *
467
- * @deprecated 不支持
468
- * @autodoc false
469
- */
470
- sslVerify?: boolean | null,
471
- /**
472
- * 跨域请求时是否携带凭证(cookies)
473
- *
474
- * @uniPlatform
475
- {
476
- "app": {
477
- "android": {
478
- "osVer": "4.4",
479
- "uniVer": "√",
480
- "uniUtsPlugin": "x",
481
- "unixVer": "x"
482
- },
483
- "ios": {
484
- "osVer": "12.0",
485
- "uniVer": "√",
486
- "uniUtsPlugin": "x",
487
- "unixVer": "x",
488
- "unixUtsPlugin": "x"
489
- },
490
- "harmony": {
491
- "osVer": "x",
492
- "uniVer": "x",
493
- "unixVer": "x"
494
- }
495
- },
496
- * "mp": {
497
- * "weixin": {
498
- * "hostVer": "√",
499
- * "uniVer": "√",
500
- * "unixVer": "4.41"
501
- * },
502
- * "alipay": {
503
- * "hostVer": "√",
504
- * "uniVer": "√",
505
- * "unixVer": "x"
506
- * },
507
- * "baidu": {
508
- * "hostVer": "√",
509
- * "uniVer": "√",
510
- * "unixVer": "x"
511
- * },
512
- * "toutiao": {
513
- * "hostVer": "√",
514
- * "uniVer": "√",
515
- * "unixVer": "x"
516
- * },
517
- * "lark": {
518
- * "hostVer": "√",
519
- * "uniVer": "√",
520
- * "unixVer": "x"
521
- * },
522
- * "qq": {
523
- * "hostVer": "√",
524
- * "uniVer": "√",
525
- * "unixVer": "x"
526
- * },
527
- * "kuaishou": {
528
- * "hostVer": "√",
529
- * "uniVer": "√",
530
- * "unixVer": "x"
531
- * },
532
- * "jd": {
533
- * "hostVer": "√",
534
- * "uniVer": "√",
535
- * "unixVer": "x"
536
- * }
537
- * },
538
- "web": {
539
- "uniVer": "√",
540
- "unixVer": "4.0"
541
- }
542
- }
543
- */
544
- withCredentials?: boolean | null,
545
- /**
546
- * DNS解析时优先使用ipv4
547
- * @defaultValue false
548
- * @uniPlatform
549
- {
550
- "app": {
551
- "android": {
552
- "osVer": "5.0",
553
- "uniVer": "√",
554
- "uniUtsPlugin": "x",
555
- "unixVer": "x"
556
- },
557
- "ios": {
558
- "osVer": "12.0",
559
- "uniVer": "√",
560
- "uniUtsPlugin": "x",
561
- "unixVer": "x",
562
- "unixUtsPlugin": "x"
563
- },
564
- "harmony": {
565
- "osVer": "x",
566
- "uniVer": "x",
567
- "unixVer": "x"
568
- }
569
- },
570
- * "mp": {
571
- * "weixin": {
572
- * "hostVer": "√",
573
- * "uniVer": "√",
574
- * "unixVer": "4.41"
575
- * },
576
- * "alipay": {
577
- * "hostVer": "√",
578
- * "uniVer": "√",
579
- * "unixVer": "x"
580
- * },
581
- * "baidu": {
582
- * "hostVer": "√",
583
- * "uniVer": "√",
584
- * "unixVer": "x"
585
- * },
586
- * "toutiao": {
587
- * "hostVer": "√",
588
- * "uniVer": "√",
589
- * "unixVer": "x"
590
- * },
591
- * "lark": {
592
- * "hostVer": "√",
593
- * "uniVer": "√",
594
- * "unixVer": "x"
595
- * },
596
- * "qq": {
597
- * "hostVer": "√",
598
- * "uniVer": "√",
599
- * "unixVer": "x"
600
- * },
601
- * "kuaishou": {
602
- * "hostVer": "√",
603
- * "uniVer": "√",
604
- * "unixVer": "x"
605
- * },
606
- * "jd": {
607
- * "hostVer": "√",
608
- * "uniVer": "√",
609
- * "unixVer": "x"
610
- * }
611
- * },
612
- "web": {
613
- "uniVer": "x",
614
- "unixVer": "x"
615
- }
616
- }
617
- */
618
- firstIpv4?: boolean | null,
619
-
620
- /**
621
- * 开启 transfer-encoding chunked。
622
- * @uniPlatform
623
- * {
624
- * "app": {
625
- * "android": {
626
- * "osVer": "5.0",
627
- * "uniVer": "√",
628
- * "uniUtsPlugin": "4.71",
629
- * "unixVer": "4.71"
630
- * },
631
- * "ios": {
632
- * "osVer": "12.0",
633
- * "uniVer": "√",
634
- * "uniUtsPlugin": "4.71",
635
- * "unixVer": "4.71",
636
- * "unixUtsPlugin": "4.71"
637
- * },
638
- * "harmony": {
639
- * "osVer": "3.0",
640
- * "uniVer": "4.71",
641
- * "uniUtsPlugin": "4.71",
642
- * "unixVer": "4.71"
643
- * "unixUtsPlugin": "4.71"
644
- * },
645
- * },
646
- * "mp": {
647
- * "weixin": {
648
- * "hostVer": "√",
649
- * "uniVer": "√",
650
- * "unixVer": "4.41"
651
- * },
652
- * "alipay": {
653
- * "hostVer": "√",
654
- * "uniVer": "√",
655
- * "unixVer": "x"
656
- * },
657
- * "baidu": {
658
- * "hostVer": "√",
659
- * "uniVer": "√",
660
- * "unixVer": "x"
661
- * },
662
- * "toutiao": {
663
- * "hostVer": "√",
664
- * "uniVer": "√",
665
- * "unixVer": "x"
666
- * },
667
- * "lark": {
668
- * "hostVer": "√",
669
- * "uniVer": "√",
670
- * "unixVer": "x"
671
- * },
672
- * "qq": {
673
- * "hostVer": "√",
674
- * "uniVer": "√",
675
- * "unixVer": "x"
676
- * },
677
- * "kuaishou": {
678
- * "hostVer": "√",
679
- * "uniVer": "√",
680
- * "unixVer": "x"
681
- * },
682
- * "jd": {
683
- * "hostVer": "√",
684
- * "uniVer": "√",
685
- * "unixVer": "x"
686
- * }
687
- * },
688
- * "web": {
689
- * "uniVer": "√",
690
- * "unixVer": "4.71"
691
- * }
692
- * }
693
- */
694
- enableChunked?: boolean | null,
695
- /**
696
- * 网络请求成功回调。
697
- * @defaultValue null
698
- */
699
- success?: RequestSuccessCallback<T> | null,
700
- /**
701
- * 网络请求失败回调。
702
- * @defaultValue null
703
- */
704
- fail?: RequestFailCallback | null,
705
- /**
706
- * 网络请求完成回调,成功或者失败都会调用。
707
- * @defaultValue null
708
- */
709
- complete?: RequestCompleteCallback | null
710
- }
711
-
712
- export type RequestSuccess<T> = {
713
- /**
714
- * 开发者服务器返回的数据, app-android平台从 4.51版本开始支持ArrayBuffer, app-ios平台从 4.61版本开始支持ArrayBuffer
715
- * @type {RequestDataOptions}
716
- * @uniPlatform
717
- {
718
- "app": {
719
- "android": {
720
- "osVer": "5.0",
721
- "uniVer": "√",
722
- "uniUtsPlugin": "3.91",
723
- "unixVer": "3.91"
724
- },
725
- "ios": {
726
- "osVer": "12.0",
727
- "uniVer": "√",
728
- "uniUtsPlugin": "4.11",
729
- "unixVer": "4.11",
730
- "unixUtsPlugin": "4.11"
731
- },
732
- "harmony": {
733
- "osVer": "3.0",
734
- "uniVer": "4.23",
735
- "unixVer": "4.61",
736
- "unixVaporVer": "5.0"
737
- }
738
- },
739
- * "mp": {
740
- * "weixin": {
741
- * "hostVer": "√",
742
- * "uniVer": "√",
743
- * "unixVer": "4.41"
744
- * },
745
- * "alipay": {
746
- * "hostVer": "√",
747
- * "uniVer": "√",
748
- * "unixVer": "x"
749
- * },
750
- * "baidu": {
751
- * "hostVer": "√",
752
- * "uniVer": "√",
753
- * "unixVer": "x"
754
- * },
755
- * "toutiao": {
756
- * "hostVer": "√",
757
- * "uniVer": "√",
758
- * "unixVer": "x"
759
- * },
760
- * "lark": {
761
- * "hostVer": "√",
762
- * "uniVer": "√",
763
- * "unixVer": "x"
764
- * },
765
- * "qq": {
766
- * "hostVer": "√",
767
- * "uniVer": "√",
768
- * "unixVer": "x"
769
- * },
770
- * "kuaishou": {
771
- * "hostVer": "√",
772
- * "uniVer": "√",
773
- * "unixVer": "x"
774
- * },
775
- * "jd": {
776
- * "hostVer": "√",
777
- * "uniVer": "√",
778
- * "unixVer": "x"
779
- * }
780
- * },
781
- "web": {
782
- "uniVer": "√",
783
- "unixVer": "4.0"
784
- }
785
- }
786
- */
787
- data: T | null,
788
- /**
789
- * 开发者服务器返回的 HTTP 状态码
790
- * @uniPlatform
791
- {
792
- "app": {
793
- "android": {
794
- "osVer": "5.0",
795
- "uniVer": "√",
796
- "uniUtsPlugin": "3.91",
797
- "unixVer": "3.91"
798
- },
799
- "ios": {
800
- "osVer": "12.0",
801
- "uniVer": "√",
802
- "uniUtsPlugin": "4.11",
803
- "unixVer": "4.11",
804
- "unixUtsPlugin": "4.11"
805
- },
806
- "harmony": {
807
- "osVer": "3.0",
808
- "uniVer": "4.23",
809
- "unixVer": "4.61",
810
- "unixVaporVer": "5.0"
811
- }
812
- },
813
- * "mp": {
814
- * "weixin": {
815
- * "hostVer": "√",
816
- * "uniVer": "√",
817
- * "unixVer": "4.41"
818
- * },
819
- * "alipay": {
820
- * "hostVer": "√",
821
- * "uniVer": "√",
822
- * "unixVer": "x"
823
- * },
824
- * "baidu": {
825
- * "hostVer": "√",
826
- * "uniVer": "√",
827
- * "unixVer": "x"
828
- * },
829
- * "toutiao": {
830
- * "hostVer": "√",
831
- * "uniVer": "√",
832
- * "unixVer": "x"
833
- * },
834
- * "lark": {
835
- * "hostVer": "√",
836
- * "uniVer": "√",
837
- * "unixVer": "x"
838
- * },
839
- * "qq": {
840
- * "hostVer": "√",
841
- * "uniVer": "√",
842
- * "unixVer": "x"
843
- * },
844
- * "kuaishou": {
845
- * "hostVer": "√",
846
- * "uniVer": "√",
847
- * "unixVer": "x"
848
- * },
849
- * "jd": {
850
- * "hostVer": "√",
851
- * "uniVer": "√",
852
- * "unixVer": "x"
853
- * }
854
- * },
855
- "web": {
856
- "uniVer": "√",
857
- "unixVer": "4.0"
858
- }
859
- }
860
- */
861
- statusCode: number,
862
- /**
863
- * 开发者服务器返回的 HTTP Response Header
864
- * @uniPlatform
865
- {
866
- "app": {
867
- "android": {
868
- "osVer": "5.0",
869
- "uniVer": "√",
870
- "uniUtsPlugin": "3.91",
871
- "unixVer": "3.91"
872
- },
873
- "ios": {
874
- "osVer": "12.0",
875
- "uniVer": "√",
876
- "uniUtsPlugin": "4.11",
877
- "unixVer": "4.11",
878
- "unixUtsPlugin": "4.11"
879
- },
880
- "harmony": {
881
- "osVer": "3.0",
882
- "uniVer": "4.23",
883
- "unixVer": "4.61",
884
- "unixVaporVer": "5.0"
885
- }
886
- },
887
- * "mp": {
888
- * "weixin": {
889
- * "hostVer": "√",
890
- * "uniVer": "√",
891
- * "unixVer": "4.41"
892
- * },
893
- * "alipay": {
894
- * "hostVer": "√",
895
- * "uniVer": "√",
896
- * "unixVer": "x"
897
- * },
898
- * "baidu": {
899
- * "hostVer": "√",
900
- * "uniVer": "√",
901
- * "unixVer": "x"
902
- * },
903
- * "toutiao": {
904
- * "hostVer": "√",
905
- * "uniVer": "√",
906
- * "unixVer": "x"
907
- * },
908
- * "lark": {
909
- * "hostVer": "√",
910
- * "uniVer": "√",
911
- * "unixVer": "x"
912
- * },
913
- * "qq": {
914
- * "hostVer": "√",
915
- * "uniVer": "√",
916
- * "unixVer": "x"
917
- * },
918
- * "kuaishou": {
919
- * "hostVer": "√",
920
- * "uniVer": "√",
921
- * "unixVer": "x"
922
- * },
923
- * "jd": {
924
- * "hostVer": "√",
925
- * "uniVer": "√",
926
- * "unixVer": "x"
927
- * }
928
- * },
929
- "web": {
930
- "uniVer": "√",
931
- "unixVer": "4.0"
932
- }
933
- }
934
- */
935
- header: any,
936
- /**
937
- * 开发者服务器返回的 cookies,格式为字符串数组
938
- * @uniPlatform
939
- {
940
- "app": {
941
- "android": {
942
- "osVer": "5.0",
943
- "uniVer": "√",
944
- "uniUtsPlugin": "3.91",
945
- "unixVer": "3.91"
946
- },
947
- "ios": {
948
- "osVer": "12.0",
949
- "uniVer": "√",
950
- "uniUtsPlugin": "4.11",
951
- "unixVer": "4.11",
952
- "unixUtsPlugin": "4.11"
953
- },
954
- "harmony": {
955
- "osVer": "3.0",
956
- "uniVer": "4.23",
957
- "unixVer": "4.61",
958
- "unixVaporVer": "5.0"
959
- }
960
- },
961
- "web": {
962
- "uniVer": "x",
963
- "unixVer": "x"
964
- }
965
- }
966
- */
967
- cookies: Array<string>
968
- }
969
-
970
- /**
971
- * 请求方法
972
- */
973
- export type RequestMethod =
974
- /**
975
- * GET方法请求一个指定资源的表示形式,使用 GET 的请求应该只被用于获取数据。
976
- */
977
- "GET" |
978
- /**
979
- * POST方法用于将实体提交到指定的资源,通常导致在服务器上的状态变化或副作用。
980
- */
981
- "POST" |
982
- /**
983
- * PUT方法用有效载荷请求替换目标资源的所有当前表示。
984
- */
985
- "PUT" |
986
- /**
987
- * PATCH方法用于对资源应用部分修改。
988
- */
989
- "PATCH" |
990
- /**
991
- * DELETE方法删除指定的资源。
992
- */
993
- "DELETE" |
994
- /**
995
- * HEAD方法请求一个与GET请求的响应相同的响应,但没有响应体。
996
- */
997
- "HEAD" |
998
- /**
999
- * OPTIONS 方法用于描述目标资源的通信选项。
1000
- */
1001
- "OPTIONS";
1002
-
1003
- /**
1004
- * 错误码
1005
- */
1006
- export type RequestErrorCode =
1007
- /**
1008
- * 接口超时
1009
- */
1010
- 5 |
1011
- /**
1012
- * 服务端系统错误
1013
- */
1014
- 1000 |
1015
- /**
1016
- * json数据解析错误
1017
- */
1018
- 100001 |
1019
- /**
1020
- * 错误信息json解析失败
1021
- */
1022
- 100002 |
1023
- /**
1024
- * json解析类型转换失败
1025
- */
1026
- 100003 |
1027
- /**
1028
- * 网络中断
1029
- */
1030
- 600003 |
1031
- /**
1032
- * data参数类型不合法
1033
- */
1034
- 600008 |
1035
- /**
1036
- * URL格式不合法
1037
- */
1038
- 600009 |
1039
- /**
1040
- * request系统错误
1041
- */
1042
- 602001;
1043
-
1044
- /**
1045
- * 网络请求失败的错误回调参数
1046
- */
1047
- export interface RequestFail extends IUniError {
1048
- errCode: RequestErrorCode
1049
- };
1050
- export type RequestSuccessCallback<T> = (option: RequestSuccess<T>) => void;
1051
- export type RequestFailCallback = (option: RequestFail) => void;
1052
- export type RequestCompleteCallback = (option: any) => void;
1053
-
1054
- export type RequestTaskOnChunkReceivedListenerResult = {
1055
- /** 返回的chunk buffer
1056
- * @uniPlatform
1057
- * {
1058
- * "app": {
1059
- * "android": {
1060
- * "osVer": "5.0",
1061
- * "uniVer": "√",
1062
- * "uniUtsPlugin": "4.71",
1063
- * "unixVer": "4.71"
1064
- * },
1065
- * "ios": {
1066
- * "osVer": "12.0",
1067
- * "uniVer": "x",
1068
- * "uniUtsPlugin": "4.71",
1069
- * "unixVer": "4.71",
1070
- * "unixUtsPlugin": "4.71"
1071
- * },
1072
- * "harmony": {
1073
- * "osVer": "3.0",
1074
- * "uniVer": "4.71",
1075
- * "uniUtsPlugin": "4.71",
1076
- * "unixVer": "4.71"
1077
- * "unixUtsPlugin": "4.71"
1078
- * },
1079
- * },
1080
- * "mp": {
1081
- * "weixin": {
1082
- * "hostVer": "√",
1083
- * "uniVer": "√",
1084
- * "unixVer": "4.41"
1085
- * },
1086
- * "alipay": {
1087
- * "hostVer": "√",
1088
- * "uniVer": "√",
1089
- * "unixVer": "x"
1090
- * },
1091
- * "baidu": {
1092
- * "hostVer": "√",
1093
- * "uniVer": "√",
1094
- * "unixVer": "x"
1095
- * },
1096
- * "toutiao": {
1097
- * "hostVer": "√",
1098
- * "uniVer": "√",
1099
- * "unixVer": "x"
1100
- * },
1101
- * "lark": {
1102
- * "hostVer": "√",
1103
- * "uniVer": "√",
1104
- * "unixVer": "x"
1105
- * },
1106
- * "qq": {
1107
- * "hostVer": "√",
1108
- * "uniVer": "√",
1109
- * "unixVer": "x"
1110
- * },
1111
- * "kuaishou": {
1112
- * "hostVer": "√",
1113
- * "uniVer": "√",
1114
- * "unixVer": "x"
1115
- * },
1116
- * "jd": {
1117
- * "hostVer": "√",
1118
- * "uniVer": "√",
1119
- * "unixVer": "x"
1120
- * }
1121
- * },
1122
- * "web": {
1123
- * "uniVer": "√",
1124
- * "unixVer": "4.71"
1125
- * }
1126
- * }
1127
- */
1128
- data: ArrayBuffer
1129
- }
1130
- export type RequestTaskOnChunkReceivedCallback = (
1131
-
1132
- result: RequestTaskOnChunkReceivedListenerResult
1133
- ) => void
1134
-
1135
-
1136
- export type RequestTaskOnHeadersReceivedListenerResult = {
1137
- /** 开发者服务器返回的 cookies,格式为字符串数组
1138
- * @uniPlatform
1139
- * {
1140
- * "app": {
1141
- * "android": {
1142
- * "osVer": "5.0",
1143
- * "uniVer": "√",
1144
- * "uniUtsPlugin": "4.71",
1145
- * "unixVer": "4.71"
1146
- * },
1147
- * "ios": {
1148
- * "osVer": "12.0",
1149
- * "uniVer": "x",
1150
- * "uniUtsPlugin": "4.71",
1151
- * "unixVer": "4.71",
1152
- * "unixUtsPlugin": "4.71"
1153
- * },
1154
- * "harmony": {
1155
- * "osVer": "3.0",
1156
- * "uniVer": "4.71",
1157
- * "uniUtsPlugin": "4.71",
1158
- * "unixVer": "4.71"
1159
- * "unixUtsPlugin": "4.71"
1160
- * },
1161
- * },
1162
- * "mp": {
1163
- * "weixin": {
1164
- * "hostVer": "√",
1165
- * "uniVer": "√",
1166
- * "unixVer": "4.41"
1167
- * },
1168
- * "alipay": {
1169
- * "hostVer": "√",
1170
- * "uniVer": "√",
1171
- * "unixVer": "x"
1172
- * },
1173
- * "baidu": {
1174
- * "hostVer": "√",
1175
- * "uniVer": "√",
1176
- * "unixVer": "x"
1177
- * },
1178
- * "toutiao": {
1179
- * "hostVer": "√",
1180
- * "uniVer": "√",
1181
- * "unixVer": "x"
1182
- * },
1183
- * "lark": {
1184
- * "hostVer": "√",
1185
- * "uniVer": "√",
1186
- * "unixVer": "x"
1187
- * },
1188
- * "qq": {
1189
- * "hostVer": "√",
1190
- * "uniVer": "√",
1191
- * "unixVer": "x"
1192
- * },
1193
- * "kuaishou": {
1194
- * "hostVer": "√",
1195
- * "uniVer": "√",
1196
- * "unixVer": "x"
1197
- * },
1198
- * "jd": {
1199
- * "hostVer": "√",
1200
- * "uniVer": "√",
1201
- * "unixVer": "x"
1202
- * }
1203
- * },
1204
- * "web": {
1205
- * "uniVer": "√",
1206
- * "unixVer": "4.71"
1207
- * }
1208
- * }
1209
- */
1210
- cookies: string[]
1211
- /** 开发者服务器返回的 HTTP Response Header
1212
- * @uniPlatform
1213
- * {
1214
- * "app": {
1215
- * "android": {
1216
- * "osVer": "5.0",
1217
- * "uniVer": "√",
1218
- * "uniUtsPlugin": "4.71",
1219
- * "unixVer": "4.71"
1220
- * },
1221
- * "ios": {
1222
- * "osVer": "12.0",
1223
- * "uniVer": "x",
1224
- * "uniUtsPlugin": "4.71",
1225
- * "unixVer": "4.71",
1226
- * "unixUtsPlugin": "4.71"
1227
- * },
1228
- * "harmony": {
1229
- * "osVer": "3.0",
1230
- * "uniVer": "4.71",
1231
- * "uniUtsPlugin": "4.71",
1232
- * "unixVer": "4.71"
1233
- * "unixUtsPlugin": "4.71"
1234
- * },
1235
- * },
1236
- * "mp": {
1237
- * "weixin": {
1238
- * "hostVer": "√",
1239
- * "uniVer": "√",
1240
- * "unixVer": "4.41"
1241
- * },
1242
- * "alipay": {
1243
- * "hostVer": "√",
1244
- * "uniVer": "√",
1245
- * "unixVer": "x"
1246
- * },
1247
- * "baidu": {
1248
- * "hostVer": "√",
1249
- * "uniVer": "√",
1250
- * "unixVer": "x"
1251
- * },
1252
- * "toutiao": {
1253
- * "hostVer": "√",
1254
- * "uniVer": "√",
1255
- * "unixVer": "x"
1256
- * },
1257
- * "lark": {
1258
- * "hostVer": "√",
1259
- * "uniVer": "√",
1260
- * "unixVer": "x"
1261
- * },
1262
- * "qq": {
1263
- * "hostVer": "√",
1264
- * "uniVer": "√",
1265
- * "unixVer": "x"
1266
- * },
1267
- * "kuaishou": {
1268
- * "hostVer": "√",
1269
- * "uniVer": "√",
1270
- * "unixVer": "x"
1271
- * },
1272
- * "jd": {
1273
- * "hostVer": "√",
1274
- * "uniVer": "√",
1275
- * "unixVer": "x"
1276
- * }
1277
- * },
1278
- * "web": {
1279
- * "uniVer": "√",
1280
- * "unixVer": "4.71"
1281
- * }
1282
- * }
1283
- */
1284
- header: UTSJSONObject
1285
- /** 开发者服务器返回的 HTTP 状态码 (目前开发者工具上不会返回 statusCode 字段,可用真机查看该字段,后续将会支持)
1286
- * @uniPlatform
1287
- * {
1288
- * "app": {
1289
- * "android": {
1290
- * "osVer": "5.0",
1291
- * "uniVer": "√",
1292
- * "uniUtsPlugin": "4.71",
1293
- * "unixVer": "4.71"
1294
- * },
1295
- * "ios": {
1296
- * "osVer": "12.0",
1297
- * "uniVer": "x",
1298
- * "uniUtsPlugin": "4.71",
1299
- * "unixVer": "4.71",
1300
- * "unixUtsPlugin": "4.71"
1301
- * },
1302
- * "harmony": {
1303
- * "osVer": "3.0",
1304
- * "uniVer": "4.71",
1305
- * "uniUtsPlugin": "4.71",
1306
- * "unixVer": "4.71"
1307
- * "unixUtsPlugin": "4.71"
1308
- * },
1309
- * },
1310
- * "mp": {
1311
- * "weixin": {
1312
- * "hostVer": "√",
1313
- * "uniVer": "√",
1314
- * "unixVer": "4.41"
1315
- * },
1316
- * "alipay": {
1317
- * "hostVer": "√",
1318
- * "uniVer": "√",
1319
- * "unixVer": "x"
1320
- * },
1321
- * "baidu": {
1322
- * "hostVer": "√",
1323
- * "uniVer": "√",
1324
- * "unixVer": "x"
1325
- * },
1326
- * "toutiao": {
1327
- * "hostVer": "√",
1328
- * "uniVer": "√",
1329
- * "unixVer": "x"
1330
- * },
1331
- * "lark": {
1332
- * "hostVer": "√",
1333
- * "uniVer": "√",
1334
- * "unixVer": "x"
1335
- * },
1336
- * "qq": {
1337
- * "hostVer": "√",
1338
- * "uniVer": "√",
1339
- * "unixVer": "x"
1340
- * },
1341
- * "kuaishou": {
1342
- * "hostVer": "√",
1343
- * "uniVer": "√",
1344
- * "unixVer": "x"
1345
- * },
1346
- * "jd": {
1347
- * "hostVer": "√",
1348
- * "uniVer": "√",
1349
- * "unixVer": "x"
1350
- * }
1351
- * },
1352
- * "web": {
1353
- * "uniVer": "√",
1354
- * "unixVer": "4.71"
1355
- * }
1356
- * }
1357
- */
1358
- statusCode: number
1359
- }
1360
- /** HTTP Response Header 事件的监听函数 */
1361
- export type RequestTaskOnHeadersReceivedCallback = (
1362
- result: RequestTaskOnHeadersReceivedListenerResult
1363
- ) => void
1364
-
1365
- export interface RequestTask {
1366
- /**
1367
- * 中断网络请求。
1368
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/request.html
1369
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/request.html
1370
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/request.html
1371
- * @uniPlatform
1372
- {
1373
- "app": {
1374
- "android": {
1375
- "osVer": "5.0",
1376
- "uniVer": "√",
1377
- "uniUtsPlugin": "3.91",
1378
- "unixVer": "3.91"
1379
- },
1380
- "ios": {
1381
- "osVer": "12.0",
1382
- "uniVer": "√",
1383
- "uniUtsPlugin": "4.11",
1384
- "unixVer": "4.11",
1385
- "unixUtsPlugin": "4.11"
1386
- },
1387
- "harmony": {
1388
- "osVer": "3.0",
1389
- "uniVer": "4.23",
1390
- "unixVer": "4.61",
1391
- "unixVaporVer": "5.0"
1392
- }
1393
- },
1394
- * "mp": {
1395
- * "weixin": {
1396
- * "hostVer": "√",
1397
- * "uniVer": "√",
1398
- * "unixVer": "4.41"
1399
- * },
1400
- * "alipay": {
1401
- * "hostVer": "√",
1402
- * "uniVer": "√",
1403
- * "unixVer": "x"
1404
- * },
1405
- * "baidu": {
1406
- * "hostVer": "√",
1407
- * "uniVer": "√",
1408
- * "unixVer": "x"
1409
- * },
1410
- * "toutiao": {
1411
- * "hostVer": "√",
1412
- * "uniVer": "√",
1413
- * "unixVer": "x"
1414
- * },
1415
- * "lark": {
1416
- * "hostVer": "√",
1417
- * "uniVer": "√",
1418
- * "unixVer": "x"
1419
- * },
1420
- * "qq": {
1421
- * "hostVer": "√",
1422
- * "uniVer": "√",
1423
- * "unixVer": "x"
1424
- * },
1425
- * "kuaishou": {
1426
- * "hostVer": "√",
1427
- * "uniVer": "√",
1428
- * "unixVer": "x"
1429
- * },
1430
- * "jd": {
1431
- * "hostVer": "√",
1432
- * "uniVer": "√",
1433
- * "unixVer": "x"
1434
- * }
1435
- * },
1436
- "web": {
1437
- "uniVer": "√",
1438
- "unixVer": "4.0"
1439
- }
1440
- }
1441
- * @example
1442
- ```typescript
1443
- var requestTask = uni.request({
1444
- url: 'http://192.168.12.106:8080/postHalo', //仅为示例,并非真实接口地址。
1445
- complete: ()=> {}
1446
- });
1447
- requestTask.abort();
1448
- ```
1449
- */
1450
- abort(): void
1451
-
1452
- /**
1453
- * 监听 Transfer-Encoding Chunk Received 事件。
1454
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/request.html
1455
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/request.html
1456
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/request.html
1457
- * @uniPlatform
1458
- * {
1459
- * "app": {
1460
- * "android": {
1461
- * "osVer": "5.0",
1462
- * "uniVer": "√",
1463
- * "uniUtsPlugin": "4.71",
1464
- * "unixVer": "4.71"
1465
- * },
1466
- * "ios": {
1467
- * "osVer": "12.0",
1468
- * "uniVer": "x",
1469
- * "uniUtsPlugin": "4.71",
1470
- * "unixVer": "4.71",
1471
- * "unixUtsPlugin": "4.71"
1472
- * },
1473
- * "harmony": {
1474
- * "osVer": "3.0",
1475
- * "uniVer": "4.71",
1476
- * "uniUtsPlugin": "4.71",
1477
- * "unixVer": "4.71"
1478
- * "unixUtsPlugin": "4.71"
1479
- * },
1480
- * },
1481
- * "mp": {
1482
- * "weixin": {
1483
- * "hostVer": "√",
1484
- * "uniVer": "√",
1485
- * "unixVer": "4.41"
1486
- * },
1487
- * "alipay": {
1488
- * "hostVer": "√",
1489
- * "uniVer": "√",
1490
- * "unixVer": "x"
1491
- * },
1492
- * "baidu": {
1493
- * "hostVer": "√",
1494
- * "uniVer": "√",
1495
- * "unixVer": "x"
1496
- * },
1497
- * "toutiao": {
1498
- * "hostVer": "√",
1499
- * "uniVer": "√",
1500
- * "unixVer": "x"
1501
- * },
1502
- * "lark": {
1503
- * "hostVer": "√",
1504
- * "uniVer": "√",
1505
- * "unixVer": "x"
1506
- * },
1507
- * "qq": {
1508
- * "hostVer": "√",
1509
- * "uniVer": "√",
1510
- * "unixVer": "x"
1511
- * },
1512
- * "kuaishou": {
1513
- * "hostVer": "√",
1514
- * "uniVer": "√",
1515
- * "unixVer": "x"
1516
- * },
1517
- * "jd": {
1518
- * "hostVer": "√",
1519
- * "uniVer": "√",
1520
- * "unixVer": "x"
1521
- * }
1522
- * },
1523
- * "web": {
1524
- * "uniVer": "√",
1525
- * "unixVer": "4.71"
1526
- * }
1527
- * }
1528
- */
1529
- onChunkReceived(listener: RequestTaskOnChunkReceivedCallback): number
1530
-
1531
- /**
1532
- * 移除 Transfer-Encoding Chunk Received 事件的监听函数。
1533
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/request.html
1534
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/request.html
1535
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/request.html
1536
- * @uniPlatform
1537
- * {
1538
- * "app": {
1539
- * "android": {
1540
- * "osVer": "5.0",
1541
- * "uniVer": "√",
1542
- * "uniUtsPlugin": "4.71",
1543
- * "unixVer": "4.71"
1544
- * },
1545
- * "ios": {
1546
- * "osVer": "12.0",
1547
- * "uniVer": "x",
1548
- * "uniUtsPlugin": "4.71",
1549
- * "unixVer": "4.71",
1550
- * "unixUtsPlugin": "4.71"
1551
- * },
1552
- * "harmony": {
1553
- * "osVer": "3.0",
1554
- * "uniVer": "4.71",
1555
- * "uniUtsPlugin": "4.71",
1556
- * "unixVer": "4.71"
1557
- * "unixUtsPlugin": "4.71"
1558
- * },
1559
- * },
1560
- * "mp": {
1561
- * "weixin": {
1562
- * "hostVer": "√",
1563
- * "uniVer": "√",
1564
- * "unixVer": "4.41"
1565
- * },
1566
- * "alipay": {
1567
- * "hostVer": "√",
1568
- * "uniVer": "√",
1569
- * "unixVer": "x"
1570
- * },
1571
- * "baidu": {
1572
- * "hostVer": "√",
1573
- * "uniVer": "√",
1574
- * "unixVer": "x"
1575
- * },
1576
- * "toutiao": {
1577
- * "hostVer": "√",
1578
- * "uniVer": "√",
1579
- * "unixVer": "x"
1580
- * },
1581
- * "lark": {
1582
- * "hostVer": "√",
1583
- * "uniVer": "√",
1584
- * "unixVer": "x"
1585
- * },
1586
- * "qq": {
1587
- * "hostVer": "√",
1588
- * "uniVer": "√",
1589
- * "unixVer": "x"
1590
- * },
1591
- * "kuaishou": {
1592
- * "hostVer": "√",
1593
- * "uniVer": "√",
1594
- * "unixVer": "x"
1595
- * },
1596
- * "jd": {
1597
- * "hostVer": "√",
1598
- * "uniVer": "√",
1599
- * "unixVer": "x"
1600
- * }
1601
- * },
1602
- * "web": {
1603
- * "uniVer": "√",
1604
- * "unixVer": "4.71"
1605
- * }
1606
- * }
1607
- */
1608
- offChunkReceived(listener?: number | RequestTaskOnChunkReceivedCallback | null): void
1609
- /**
1610
- * 监听 HTTP Response Header 事件。
1611
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/request.html
1612
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/request.html
1613
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/request.html
1614
- * @uniPlatform
1615
- * {
1616
- * "app": {
1617
- * "android": {
1618
- * "osVer": "5.0",
1619
- * "uniVer": "√",
1620
- * "uniUtsPlugin": "4.71",
1621
- * "unixVer": "4.71"
1622
- * },
1623
- * "ios": {
1624
- * "osVer": "12.0",
1625
- * "uniVer": "x",
1626
- * "uniUtsPlugin": "4.71",
1627
- * "unixVer": "4.71",
1628
- * "unixUtsPlugin": "4.71"
1629
- * },
1630
- * "harmony": {
1631
- * "osVer": "3.0",
1632
- * "uniVer": "4.71",
1633
- * "uniUtsPlugin": "4.71",
1634
- * "unixVer": "4.71"
1635
- * "unixUtsPlugin": "4.71"
1636
- * },
1637
- * },
1638
- * "mp": {
1639
- * "weixin": {
1640
- * "hostVer": "√",
1641
- * "uniVer": "√",
1642
- * "unixVer": "4.41"
1643
- * },
1644
- * "alipay": {
1645
- * "hostVer": "√",
1646
- * "uniVer": "√",
1647
- * "unixVer": "x"
1648
- * },
1649
- * "baidu": {
1650
- * "hostVer": "√",
1651
- * "uniVer": "√",
1652
- * "unixVer": "x"
1653
- * },
1654
- * "toutiao": {
1655
- * "hostVer": "√",
1656
- * "uniVer": "√",
1657
- * "unixVer": "x"
1658
- * },
1659
- * "lark": {
1660
- * "hostVer": "√",
1661
- * "uniVer": "√",
1662
- * "unixVer": "x"
1663
- * },
1664
- * "qq": {
1665
- * "hostVer": "√",
1666
- * "uniVer": "√",
1667
- * "unixVer": "x"
1668
- * },
1669
- * "kuaishou": {
1670
- * "hostVer": "√",
1671
- * "uniVer": "√",
1672
- * "unixVer": "x"
1673
- * },
1674
- * "jd": {
1675
- * "hostVer": "√",
1676
- * "uniVer": "√",
1677
- * "unixVer": "x"
1678
- * }
1679
- * },
1680
- * "web": {
1681
- * "uniVer": "√",
1682
- * "unixVer": "4.71"
1683
- * }
1684
- * }
1685
- */
1686
- onHeadersReceived(listener: RequestTaskOnHeadersReceivedCallback): number
1687
-
1688
- /**
1689
- * 移除 HTTP Response Header 事件的监听函数。
1690
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/request.html
1691
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/request.html
1692
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/request.html
1693
- * @uniPlatform
1694
- * {
1695
- * "app": {
1696
- * "android": {
1697
- * "osVer": "5.0",
1698
- * "uniVer": "√",
1699
- * "uniUtsPlugin": "4.71",
1700
- * "unixVer": "4.71"
1701
- * },
1702
- * "ios": {
1703
- * "osVer": "12.0",
1704
- * "uniVer": "x",
1705
- * "uniUtsPlugin": "4.71",
1706
- * "unixVer": "4.71",
1707
- * "unixUtsPlugin": "4.71"
1708
- * },
1709
- * "harmony": {
1710
- * "osVer": "3.0",
1711
- * "uniVer": "4.71",
1712
- * "uniUtsPlugin": "4.71",
1713
- * "unixVer": "4.71"
1714
- * "unixUtsPlugin": "4.71"
1715
- * },
1716
- * },
1717
- * "mp": {
1718
- * "weixin": {
1719
- * "hostVer": "√",
1720
- * "uniVer": "√",
1721
- * "unixVer": "4.41"
1722
- * },
1723
- * "alipay": {
1724
- * "hostVer": "√",
1725
- * "uniVer": "√",
1726
- * "unixVer": "x"
1727
- * },
1728
- * "baidu": {
1729
- * "hostVer": "√",
1730
- * "uniVer": "√",
1731
- * "unixVer": "x"
1732
- * },
1733
- * "toutiao": {
1734
- * "hostVer": "√",
1735
- * "uniVer": "√",
1736
- * "unixVer": "x"
1737
- * },
1738
- * "lark": {
1739
- * "hostVer": "√",
1740
- * "uniVer": "√",
1741
- * "unixVer": "x"
1742
- * },
1743
- * "qq": {
1744
- * "hostVer": "√",
1745
- * "uniVer": "√",
1746
- * "unixVer": "x"
1747
- * },
1748
- * "kuaishou": {
1749
- * "hostVer": "√",
1750
- * "uniVer": "√",
1751
- * "unixVer": "x"
1752
- * },
1753
- * "jd": {
1754
- * "hostVer": "√",
1755
- * "uniVer": "√",
1756
- * "unixVer": "x"
1757
- * }
1758
- * },
1759
- * "web": {
1760
- * "uniVer": "√",
1761
- * "unixVer": "4.71"
1762
- * }
1763
- * }
1764
- */
1765
- offHeadersReceived(listener?: number | RequestTaskOnHeadersReceivedCallback | null): void
1766
- }
1767
-
1768
- //===============================上传==================================
1769
-
1770
-
1771
- export type UploadFile = (options: UploadFileOptions) => UploadTask;
1772
- export type UploadFileOptionFiles = {
1773
- /**
1774
- * multipart 提交时,表单的项目名,默认为 file,如果 name 不填或填的值相同,可能导致服务端读取文件时只能读取到一个文件。
1775
- * @defaultValue "file"
1776
- * @uniPlatform
1777
- {
1778
- "app": {
1779
- "android": {
1780
- "osVer": "5.0",
1781
- "uniVer": "√",
1782
- "uniUtsPlugin": "3.91",
1783
- "unixVer": "3.91"
1784
- },
1785
- "ios": {
1786
- "osVer": "12.0",
1787
- "uniVer": "√",
1788
- "uniUtsPlugin": "4.11",
1789
- "unixVer": "4.11",
1790
- "unixUtsPlugin": "4.11"
1791
- },
1792
- "harmony": {
1793
- "osVer": "3.0",
1794
- "uniVer": "4.23",
1795
- "unixVer": "4.61",
1796
- "unixVaporVer": "5.0"
1797
- }
1798
- },
1799
- * "mp": {
1800
- * "weixin": {
1801
- * "hostVer": "√",
1802
- * "uniVer": "√",
1803
- * "unixVer": "4.41"
1804
- * },
1805
- * "alipay": {
1806
- * "hostVer": "√",
1807
- * "uniVer": "√",
1808
- * "unixVer": "x"
1809
- * },
1810
- * "baidu": {
1811
- * "hostVer": "√",
1812
- * "uniVer": "√",
1813
- * "unixVer": "x"
1814
- * },
1815
- * "toutiao": {
1816
- * "hostVer": "√",
1817
- * "uniVer": "√",
1818
- * "unixVer": "x"
1819
- * },
1820
- * "lark": {
1821
- * "hostVer": "√",
1822
- * "uniVer": "√",
1823
- * "unixVer": "x"
1824
- * },
1825
- * "qq": {
1826
- * "hostVer": "√",
1827
- * "uniVer": "√",
1828
- * "unixVer": "x"
1829
- * },
1830
- * "kuaishou": {
1831
- * "hostVer": "√",
1832
- * "uniVer": "√",
1833
- * "unixVer": "x"
1834
- * },
1835
- * "jd": {
1836
- * "hostVer": "√",
1837
- * "uniVer": "√",
1838
- * "unixVer": "x"
1839
- * }
1840
- * },
1841
- "web": {
1842
- "uniVer": "√",
1843
- "unixVer": "4.0"
1844
- }
1845
- }
1846
- */
1847
- name?: string | null,
1848
- /**
1849
- * 要上传文件资源的路径
1850
- * @uniPlatform
1851
- {
1852
- "app": {
1853
- "android": {
1854
- "osVer": "5.0",
1855
- "uniVer": "√",
1856
- "uniUtsPlugin": "3.91",
1857
- "unixVer": "3.91"
1858
- },
1859
- "ios": {
1860
- "osVer": "12.0",
1861
- "uniVer": "√",
1862
- "uniUtsPlugin": "4.11",
1863
- "unixVer": "4.11",
1864
- "unixUtsPlugin": "4.11"
1865
- },
1866
- "harmony": {
1867
- "osVer": "3.0",
1868
- "uniVer": "4.23",
1869
- "unixVer": "4.61",
1870
- "unixVaporVer": "5.0"
1871
- }
1872
- },
1873
- * "mp": {
1874
- * "weixin": {
1875
- * "hostVer": "√",
1876
- * "uniVer": "√",
1877
- * "unixVer": "4.41"
1878
- * },
1879
- * "alipay": {
1880
- * "hostVer": "√",
1881
- * "uniVer": "√",
1882
- * "unixVer": "x"
1883
- * },
1884
- * "baidu": {
1885
- * "hostVer": "√",
1886
- * "uniVer": "√",
1887
- * "unixVer": "x"
1888
- * },
1889
- * "toutiao": {
1890
- * "hostVer": "√",
1891
- * "uniVer": "√",
1892
- * "unixVer": "x"
1893
- * },
1894
- * "lark": {
1895
- * "hostVer": "√",
1896
- * "uniVer": "√",
1897
- * "unixVer": "x"
1898
- * },
1899
- * "qq": {
1900
- * "hostVer": "√",
1901
- * "uniVer": "√",
1902
- * "unixVer": "x"
1903
- * },
1904
- * "kuaishou": {
1905
- * "hostVer": "√",
1906
- * "uniVer": "√",
1907
- * "unixVer": "x"
1908
- * },
1909
- * "jd": {
1910
- * "hostVer": "√",
1911
- * "uniVer": "√",
1912
- * "unixVer": "x"
1913
- * }
1914
- * },
1915
- "web": {
1916
- "uniVer": "x",
1917
- "unixVer": "x"
1918
- }
1919
- }
1920
- */
1921
- uri: string,
1922
- /**
1923
- * 要上传的文件对象
1924
- * @uniPlatform
1925
- {
1926
- "app": {
1927
- "android": {
1928
- "osVer": "5.0",
1929
- "uniVer": "√",
1930
- "uniUtsPlugin": "3.91",
1931
- "unixVer": "3.91"
1932
- },
1933
- "ios": {
1934
- "osVer": "12.0",
1935
- "uniVer": "√",
1936
- "uniUtsPlugin": "4.11",
1937
- "unixVer": "4.11",
1938
- "unixUtsPlugin": "4.11"
1939
- },
1940
- "harmony": {
1941
- "osVer": "x",
1942
- "uniVer": "x",
1943
- "unixVer": "x"
1944
- }
1945
- },
1946
- * "mp": {
1947
- * "weixin": {
1948
- * "hostVer": "√",
1949
- * "uniVer": "√",
1950
- * "unixVer": "4.41"
1951
- * },
1952
- * "alipay": {
1953
- * "hostVer": "√",
1954
- * "uniVer": "√",
1955
- * "unixVer": "x"
1956
- * },
1957
- * "baidu": {
1958
- * "hostVer": "√",
1959
- * "uniVer": "√",
1960
- * "unixVer": "x"
1961
- * },
1962
- * "toutiao": {
1963
- * "hostVer": "√",
1964
- * "uniVer": "√",
1965
- * "unixVer": "x"
1966
- * },
1967
- * "lark": {
1968
- * "hostVer": "√",
1969
- * "uniVer": "√",
1970
- * "unixVer": "x"
1971
- * },
1972
- * "qq": {
1973
- * "hostVer": "√",
1974
- * "uniVer": "√",
1975
- * "unixVer": "x"
1976
- * },
1977
- * "kuaishou": {
1978
- * "hostVer": "√",
1979
- * "uniVer": "√",
1980
- * "unixVer": "x"
1981
- * },
1982
- * "jd": {
1983
- * "hostVer": "√",
1984
- * "uniVer": "√",
1985
- * "unixVer": "x"
1986
- * }
1987
- * },
1988
- "web": {
1989
- "uniVer": "√",
1990
- "unixVer": "4.0"
1991
- }
1992
- }
1993
- */
1994
- file?: any | null
1995
- };
1996
- export type UploadFileSuccess = {
1997
- /**
1998
- * 开发者服务器返回的数据
1999
- * @uniPlatform
2000
- {
2001
- "app": {
2002
- "android": {
2003
- "osVer": "5.0",
2004
- "uniVer": "√",
2005
- "uniUtsPlugin": "3.91",
2006
- "unixVer": "3.91"
2007
- },
2008
- "ios": {
2009
- "osVer": "12.0",
2010
- "uniVer": "√",
2011
- "uniUtsPlugin": "4.11",
2012
- "unixVer": "4.11",
2013
- "unixUtsPlugin": "4.11"
2014
- },
2015
- "harmony": {
2016
- "osVer": "3.0",
2017
- "uniVer": "4.23",
2018
- "unixVer": "4.61",
2019
- "unixVaporVer": "5.0"
2020
- }
2021
- },
2022
- * "mp": {
2023
- * "weixin": {
2024
- * "hostVer": "√",
2025
- * "uniVer": "√",
2026
- * "unixVer": "4.41"
2027
- * },
2028
- * "alipay": {
2029
- * "hostVer": "√",
2030
- * "uniVer": "√",
2031
- * "unixVer": "x"
2032
- * },
2033
- * "baidu": {
2034
- * "hostVer": "√",
2035
- * "uniVer": "√",
2036
- * "unixVer": "x"
2037
- * },
2038
- * "toutiao": {
2039
- * "hostVer": "√",
2040
- * "uniVer": "√",
2041
- * "unixVer": "x"
2042
- * },
2043
- * "lark": {
2044
- * "hostVer": "√",
2045
- * "uniVer": "√",
2046
- * "unixVer": "x"
2047
- * },
2048
- * "qq": {
2049
- * "hostVer": "√",
2050
- * "uniVer": "√",
2051
- * "unixVer": "x"
2052
- * },
2053
- * "kuaishou": {
2054
- * "hostVer": "√",
2055
- * "uniVer": "√",
2056
- * "unixVer": "x"
2057
- * },
2058
- * "jd": {
2059
- * "hostVer": "√",
2060
- * "uniVer": "√",
2061
- * "unixVer": "x"
2062
- * }
2063
- * },
2064
- "web": {
2065
- "uniVer": "√",
2066
- "unixVer": "4.0"
2067
- }
2068
- }
2069
- */
2070
- data: string,
2071
- /**
2072
- * 开发者服务器返回的 HTTP 状态码
2073
- * @uniPlatform
2074
- {
2075
- "app": {
2076
- "android": {
2077
- "osVer": "5.0",
2078
- "uniVer": "√",
2079
- "uniUtsPlugin": "3.91",
2080
- "unixVer": "3.91"
2081
- },
2082
- "ios": {
2083
- "osVer": "12.0",
2084
- "uniVer": "√",
2085
- "uniUtsPlugin": "4.11",
2086
- "unixVer": "4.11",
2087
- "unixUtsPlugin": "4.11"
2088
- },
2089
- "harmony": {
2090
- "osVer": "3.0",
2091
- "uniVer": "4.23",
2092
- "unixVer": "4.61",
2093
- "unixVaporVer": "5.0"
2094
- }
2095
- },
2096
- * "mp": {
2097
- * "weixin": {
2098
- * "hostVer": "√",
2099
- * "uniVer": "√",
2100
- * "unixVer": "4.41"
2101
- * },
2102
- * "alipay": {
2103
- * "hostVer": "√",
2104
- * "uniVer": "√",
2105
- * "unixVer": "x"
2106
- * },
2107
- * "baidu": {
2108
- * "hostVer": "√",
2109
- * "uniVer": "√",
2110
- * "unixVer": "x"
2111
- * },
2112
- * "toutiao": {
2113
- * "hostVer": "√",
2114
- * "uniVer": "√",
2115
- * "unixVer": "x"
2116
- * },
2117
- * "lark": {
2118
- * "hostVer": "√",
2119
- * "uniVer": "√",
2120
- * "unixVer": "x"
2121
- * },
2122
- * "qq": {
2123
- * "hostVer": "√",
2124
- * "uniVer": "√",
2125
- * "unixVer": "x"
2126
- * },
2127
- * "kuaishou": {
2128
- * "hostVer": "√",
2129
- * "uniVer": "√",
2130
- * "unixVer": "x"
2131
- * },
2132
- * "jd": {
2133
- * "hostVer": "√",
2134
- * "uniVer": "√",
2135
- * "unixVer": "x"
2136
- * }
2137
- * },
2138
- "web": {
2139
- "uniVer": "√",
2140
- "unixVer": "4.0"
2141
- }
2142
- }
2143
- */
2144
- statusCode: number
2145
- };
2146
- export type UploadFileSuccessCallback = (result: UploadFileSuccess) => void;
2147
- /**
2148
- * 上传文件失败的错误回调参数
2149
- */
2150
- export interface UploadFileFail extends IUniError {
2151
- errCode: RequestErrorCode
2152
- };
2153
- export type UploadFileFailCallback = (result: UploadFileFail) => void;
2154
-
2155
- export type UploadFileCompleteCallback = (result: any) => void;
2156
- export type UploadFileOptions = {
2157
- /**
2158
- * 开发者服务器 url
2159
- * @uniPlatform
2160
- {
2161
- "app": {
2162
- "android": {
2163
- "osVer": "5.0",
2164
- "uniVer": "√",
2165
- "uniUtsPlugin": "3.91",
2166
- "unixVer": "3.91"
2167
- },
2168
- "ios": {
2169
- "osVer": "12.0",
2170
- "uniVer": "√",
2171
- "uniUtsPlugin": "4.11",
2172
- "unixVer": "4.11",
2173
- "unixUtsPlugin": "4.11"
2174
- },
2175
- "harmony": {
2176
- "osVer": "3.0",
2177
- "uniVer": "4.23",
2178
- "unixVer": "4.61",
2179
- "unixVaporVer": "5.0"
2180
- }
2181
- },
2182
- * "mp": {
2183
- * "weixin": {
2184
- * "hostVer": "√",
2185
- * "uniVer": "√",
2186
- * "unixVer": "4.41"
2187
- * },
2188
- * "alipay": {
2189
- * "hostVer": "√",
2190
- * "uniVer": "√",
2191
- * "unixVer": "x"
2192
- * },
2193
- * "baidu": {
2194
- * "hostVer": "√",
2195
- * "uniVer": "√",
2196
- * "unixVer": "x"
2197
- * },
2198
- * "toutiao": {
2199
- * "hostVer": "√",
2200
- * "uniVer": "√",
2201
- * "unixVer": "x"
2202
- * },
2203
- * "lark": {
2204
- * "hostVer": "√",
2205
- * "uniVer": "√",
2206
- * "unixVer": "x"
2207
- * },
2208
- * "qq": {
2209
- * "hostVer": "√",
2210
- * "uniVer": "√",
2211
- * "unixVer": "x"
2212
- * },
2213
- * "kuaishou": {
2214
- * "hostVer": "√",
2215
- * "uniVer": "√",
2216
- * "unixVer": "x"
2217
- * },
2218
- * "jd": {
2219
- * "hostVer": "√",
2220
- * "uniVer": "√",
2221
- * "unixVer": "x"
2222
- * }
2223
- * },
2224
- "web": {
2225
- "uniVer": "√",
2226
- "unixVer": "4.0"
2227
- }
2228
- }
2229
- */
2230
- url: string,
2231
- /**
2232
- * 要上传文件资源的路径, 支持uni.env
2233
- * @defaultValue null
2234
- * @uniPlatform
2235
- {
2236
- "app": {
2237
- "android": {
2238
- "osVer": "5.0",
2239
- "uniVer": "√",
2240
- "uniUtsPlugin": "3.91",
2241
- "unixVer": "3.91"
2242
- },
2243
- "ios": {
2244
- "osVer": "12.0",
2245
- "uniVer": "√",
2246
- "uniUtsPlugin": "4.11",
2247
- "unixVer": "4.11",
2248
- "unixUtsPlugin": "4.11"
2249
- },
2250
- "harmony": {
2251
- "osVer": "3.0",
2252
- "uniVer": "4.23",
2253
- "unixVer": "4.61",
2254
- "unixVaporVer": "5.0"
2255
- }
2256
- },
2257
- * "mp": {
2258
- * "weixin": {
2259
- * "hostVer": "√",
2260
- * "uniVer": "√",
2261
- * "unixVer": "4.41"
2262
- * },
2263
- * "alipay": {
2264
- * "hostVer": "√",
2265
- * "uniVer": "√",
2266
- * "unixVer": "x"
2267
- * },
2268
- * "baidu": {
2269
- * "hostVer": "√",
2270
- * "uniVer": "√",
2271
- * "unixVer": "x"
2272
- * },
2273
- * "toutiao": {
2274
- * "hostVer": "√",
2275
- * "uniVer": "√",
2276
- * "unixVer": "x"
2277
- * },
2278
- * "lark": {
2279
- * "hostVer": "√",
2280
- * "uniVer": "√",
2281
- * "unixVer": "x"
2282
- * },
2283
- * "qq": {
2284
- * "hostVer": "√",
2285
- * "uniVer": "√",
2286
- * "unixVer": "x"
2287
- * },
2288
- * "kuaishou": {
2289
- * "hostVer": "√",
2290
- * "uniVer": "√",
2291
- * "unixVer": "x"
2292
- * },
2293
- * "jd": {
2294
- * "hostVer": "√",
2295
- * "uniVer": "√",
2296
- * "unixVer": "x"
2297
- * }
2298
- * },
2299
- "web": {
2300
- "uniVer": "√",
2301
- "unixVer": "4.0"
2302
- }
2303
- }
2304
- */
2305
- filePath?: string | null,
2306
- /**
2307
- * 文件对应的 key , 开发者在服务器端通过这个 key 可以获取到文件二进制内容
2308
- * @defaultValue null
2309
- * @uniPlatform
2310
- {
2311
- "app": {
2312
- "android": {
2313
- "osVer": "5.0",
2314
- "uniVer": "√",
2315
- "uniUtsPlugin": "3.91",
2316
- "unixVer": "3.91"
2317
- },
2318
- "ios": {
2319
- "osVer": "12.0",
2320
- "uniVer": "√",
2321
- "uniUtsPlugin": "4.11",
2322
- "unixVer": "4.11",
2323
- "unixUtsPlugin": "4.11"
2324
- },
2325
- "harmony": {
2326
- "osVer": "3.0",
2327
- "uniVer": "4.23",
2328
- "unixVer": "4.61",
2329
- "unixVaporVer": "5.0"
2330
- }
2331
- },
2332
- * "mp": {
2333
- * "weixin": {
2334
- * "hostVer": "√",
2335
- * "uniVer": "√",
2336
- * "unixVer": "4.41"
2337
- * },
2338
- * "alipay": {
2339
- * "hostVer": "√",
2340
- * "uniVer": "√",
2341
- * "unixVer": "x"
2342
- * },
2343
- * "baidu": {
2344
- * "hostVer": "√",
2345
- * "uniVer": "√",
2346
- * "unixVer": "x"
2347
- * },
2348
- * "toutiao": {
2349
- * "hostVer": "√",
2350
- * "uniVer": "√",
2351
- * "unixVer": "x"
2352
- * },
2353
- * "lark": {
2354
- * "hostVer": "√",
2355
- * "uniVer": "√",
2356
- * "unixVer": "x"
2357
- * },
2358
- * "qq": {
2359
- * "hostVer": "√",
2360
- * "uniVer": "√",
2361
- * "unixVer": "x"
2362
- * },
2363
- * "kuaishou": {
2364
- * "hostVer": "√",
2365
- * "uniVer": "√",
2366
- * "unixVer": "x"
2367
- * },
2368
- * "jd": {
2369
- * "hostVer": "√",
2370
- * "uniVer": "√",
2371
- * "unixVer": "x"
2372
- * }
2373
- * },
2374
- "web": {
2375
- "uniVer": "√",
2376
- "unixVer": "4.0"
2377
- }
2378
- }
2379
- */
2380
- name?: string | null,
2381
- /**
2382
- * 需要上传的文件列表。
2383
- * @defaultValue null
2384
- * @uniPlatform
2385
- {
2386
- "app": {
2387
- "android": {
2388
- "osVer": "5.0",
2389
- "uniVer": "√",
2390
- "uniUtsPlugin": "3.91",
2391
- "unixVer": "3.91"
2392
- },
2393
- "ios": {
2394
- "osVer": "12.0",
2395
- "uniVer": "√",
2396
- "uniUtsPlugin": "4.11",
2397
- "unixVer": "4.11",
2398
- "unixUtsPlugin": "4.11"
2399
- },
2400
- "harmony": {
2401
- "osVer": "3.0",
2402
- "uniVer": "4.23",
2403
- "unixVer": "4.61",
2404
- "unixVaporVer": "5.0"
2405
- }
2406
- },
2407
- * "mp": {
2408
- * "weixin": {
2409
- * "hostVer": "√",
2410
- * "uniVer": "√",
2411
- * "unixVer": "4.41"
2412
- * },
2413
- * "alipay": {
2414
- * "hostVer": "√",
2415
- * "uniVer": "√",
2416
- * "unixVer": "x"
2417
- * },
2418
- * "baidu": {
2419
- * "hostVer": "√",
2420
- * "uniVer": "√",
2421
- * "unixVer": "x"
2422
- * },
2423
- * "toutiao": {
2424
- * "hostVer": "√",
2425
- * "uniVer": "√",
2426
- * "unixVer": "x"
2427
- * },
2428
- * "lark": {
2429
- * "hostVer": "√",
2430
- * "uniVer": "√",
2431
- * "unixVer": "x"
2432
- * },
2433
- * "qq": {
2434
- * "hostVer": "√",
2435
- * "uniVer": "√",
2436
- * "unixVer": "x"
2437
- * },
2438
- * "kuaishou": {
2439
- * "hostVer": "√",
2440
- * "uniVer": "√",
2441
- * "unixVer": "x"
2442
- * },
2443
- * "jd": {
2444
- * "hostVer": "√",
2445
- * "uniVer": "√",
2446
- * "unixVer": "x"
2447
- * }
2448
- * },
2449
- "web": {
2450
- "uniVer": "√",
2451
- "unixVer": "4.0"
2452
- }
2453
- }
2454
- */
2455
- files?: (UploadFileOptionFiles[]) | null,
2456
- /**
2457
- * HTTP 请求 Header, header 中不能设置 Referer
2458
- * @defaultValue null
2459
- * @uniPlatform
2460
- {
2461
- "app": {
2462
- "android": {
2463
- "osVer": "5.0",
2464
- "uniVer": "√",
2465
- "uniUtsPlugin": "3.91",
2466
- "unixVer": "3.91"
2467
- },
2468
- "ios": {
2469
- "osVer": "12.0",
2470
- "uniVer": "√",
2471
- "uniUtsPlugin": "4.11",
2472
- "unixVer": "4.11",
2473
- "unixUtsPlugin": "4.11"
2474
- },
2475
- "harmony": {
2476
- "osVer": "3.0",
2477
- "uniVer": "4.23",
2478
- "unixVer": "4.61",
2479
- "unixVaporVer": "5.0"
2480
- }
2481
- },
2482
- * "mp": {
2483
- * "weixin": {
2484
- * "hostVer": "√",
2485
- * "uniVer": "√",
2486
- * "unixVer": "4.41"
2487
- * },
2488
- * "alipay": {
2489
- * "hostVer": "√",
2490
- * "uniVer": "√",
2491
- * "unixVer": "x"
2492
- * },
2493
- * "baidu": {
2494
- * "hostVer": "√",
2495
- * "uniVer": "√",
2496
- * "unixVer": "x"
2497
- * },
2498
- * "toutiao": {
2499
- * "hostVer": "√",
2500
- * "uniVer": "√",
2501
- * "unixVer": "x"
2502
- * },
2503
- * "lark": {
2504
- * "hostVer": "√",
2505
- * "uniVer": "√",
2506
- * "unixVer": "x"
2507
- * },
2508
- * "qq": {
2509
- * "hostVer": "√",
2510
- * "uniVer": "√",
2511
- * "unixVer": "x"
2512
- * },
2513
- * "kuaishou": {
2514
- * "hostVer": "√",
2515
- * "uniVer": "√",
2516
- * "unixVer": "x"
2517
- * },
2518
- * "jd": {
2519
- * "hostVer": "√",
2520
- * "uniVer": "√",
2521
- * "unixVer": "x"
2522
- * }
2523
- * },
2524
- "web": {
2525
- "uniVer": "√",
2526
- "unixVer": "4.0"
2527
- }
2528
- }
2529
- */
2530
- header?: UTSJSONObject | null,
2531
- /**
2532
- * HTTP 请求中其他额外的 form data
2533
- * @defaultValue null
2534
- * @uniPlatform
2535
- {
2536
- "app": {
2537
- "android": {
2538
- "osVer": "5.0",
2539
- "uniVer": "√",
2540
- "uniUtsPlugin": "3.91",
2541
- "unixVer": "3.91"
2542
- },
2543
- "ios": {
2544
- "osVer": "12.0",
2545
- "uniVer": "√",
2546
- "uniUtsPlugin": "4.11",
2547
- "unixVer": "4.11",
2548
- "unixUtsPlugin": "4.11"
2549
- },
2550
- "harmony": {
2551
- "osVer": "3.0",
2552
- "uniVer": "4.23",
2553
- "unixVer": "4.61",
2554
- "unixVaporVer": "5.0"
2555
- }
2556
- },
2557
- * "mp": {
2558
- * "weixin": {
2559
- * "hostVer": "√",
2560
- * "uniVer": "√",
2561
- * "unixVer": "4.41"
2562
- * },
2563
- * "alipay": {
2564
- * "hostVer": "√",
2565
- * "uniVer": "√",
2566
- * "unixVer": "x"
2567
- * },
2568
- * "baidu": {
2569
- * "hostVer": "√",
2570
- * "uniVer": "√",
2571
- * "unixVer": "x"
2572
- * },
2573
- * "toutiao": {
2574
- * "hostVer": "√",
2575
- * "uniVer": "√",
2576
- * "unixVer": "x"
2577
- * },
2578
- * "lark": {
2579
- * "hostVer": "√",
2580
- * "uniVer": "√",
2581
- * "unixVer": "x"
2582
- * },
2583
- * "qq": {
2584
- * "hostVer": "√",
2585
- * "uniVer": "√",
2586
- * "unixVer": "x"
2587
- * },
2588
- * "kuaishou": {
2589
- * "hostVer": "√",
2590
- * "uniVer": "√",
2591
- * "unixVer": "x"
2592
- * },
2593
- * "jd": {
2594
- * "hostVer": "√",
2595
- * "uniVer": "√",
2596
- * "unixVer": "x"
2597
- * }
2598
- * },
2599
- "web": {
2600
- "uniVer": "√",
2601
- "unixVer": "4.0"
2602
- }
2603
- }
2604
- */
2605
- formData?: UTSJSONObject | null,
2606
- /**
2607
- * 超时时间,单位 ms
2608
- * @defaultValue 120000
2609
- * @uniPlatform
2610
- {
2611
- "app": {
2612
- "android": {
2613
- "osVer": "5.0",
2614
- "uniVer": "√",
2615
- "uniUtsPlugin": "3.91",
2616
- "unixVer": "3.91"
2617
- },
2618
- "ios": {
2619
- "osVer": "12.0",
2620
- "uniVer": "√",
2621
- "uniUtsPlugin": "4.11",
2622
- "unixVer": "4.11",
2623
- "unixUtsPlugin": "4.11"
2624
- },
2625
- "harmony": {
2626
- "osVer": "3.0",
2627
- "uniVer": "4.23",
2628
- "unixVer": "4.61",
2629
- "unixVaporVer": "5.0"
2630
- }
2631
- },
2632
- * "mp": {
2633
- * "weixin": {
2634
- * "hostVer": "√",
2635
- * "uniVer": "√",
2636
- * "unixVer": "4.41"
2637
- * },
2638
- * "alipay": {
2639
- * "hostVer": "√",
2640
- * "uniVer": "√",
2641
- * "unixVer": "x"
2642
- * },
2643
- * "baidu": {
2644
- * "hostVer": "√",
2645
- * "uniVer": "√",
2646
- * "unixVer": "x"
2647
- * },
2648
- * "toutiao": {
2649
- * "hostVer": "√",
2650
- * "uniVer": "√",
2651
- * "unixVer": "x"
2652
- * },
2653
- * "lark": {
2654
- * "hostVer": "√",
2655
- * "uniVer": "√",
2656
- * "unixVer": "x"
2657
- * },
2658
- * "qq": {
2659
- * "hostVer": "√",
2660
- * "uniVer": "√",
2661
- * "unixVer": "x"
2662
- * },
2663
- * "kuaishou": {
2664
- * "hostVer": "√",
2665
- * "uniVer": "√",
2666
- * "unixVer": "x"
2667
- * },
2668
- * "jd": {
2669
- * "hostVer": "√",
2670
- * "uniVer": "√",
2671
- * "unixVer": "x"
2672
- * }
2673
- * },
2674
- "web": {
2675
- "uniVer": "√",
2676
- "unixVer": "4.0"
2677
- }
2678
- }
2679
- */
2680
- timeout?: number | null,
2681
- /**
2682
- * 成功返回的回调函数
2683
- * @defaultValue null
2684
- */
2685
- success?: UploadFileSuccessCallback | null,
2686
- /**
2687
- * 失败的回调函数
2688
- * @defaultValue null
2689
- */
2690
- fail?: UploadFileFailCallback | null,
2691
- /**
2692
- * 结束的回调函数(调用成功、失败都会执行)
2693
- * @defaultValue null
2694
- */
2695
- complete?: UploadFileCompleteCallback | null
2696
- };
2697
- export type OnProgressUpdateResult = {
2698
- /**
2699
- * 上传进度百分比
2700
- * @uniPlatform
2701
- {
2702
- "app": {
2703
- "android": {
2704
- "osVer": "5.0",
2705
- "uniVer": "√",
2706
- "uniUtsPlugin": "3.91",
2707
- "unixVer": "3.91"
2708
- },
2709
- "ios": {
2710
- "osVer": "12.0",
2711
- "uniVer": "√",
2712
- "uniUtsPlugin": "4.11",
2713
- "unixVer": "4.11",
2714
- "unixUtsPlugin": "4.11"
2715
- },
2716
- "harmony": {
2717
- "osVer": "3.0",
2718
- "uniVer": "4.23",
2719
- "unixVer": "4.61",
2720
- "unixVaporVer": "5.0"
2721
- }
2722
- },
2723
- * "mp": {
2724
- * "weixin": {
2725
- * "hostVer": "√",
2726
- * "uniVer": "√",
2727
- * "unixVer": "4.41"
2728
- * },
2729
- * "alipay": {
2730
- * "hostVer": "√",
2731
- * "uniVer": "√",
2732
- * "unixVer": "x"
2733
- * },
2734
- * "baidu": {
2735
- * "hostVer": "√",
2736
- * "uniVer": "√",
2737
- * "unixVer": "x"
2738
- * },
2739
- * "toutiao": {
2740
- * "hostVer": "√",
2741
- * "uniVer": "√",
2742
- * "unixVer": "x"
2743
- * },
2744
- * "lark": {
2745
- * "hostVer": "√",
2746
- * "uniVer": "√",
2747
- * "unixVer": "x"
2748
- * },
2749
- * "qq": {
2750
- * "hostVer": "√",
2751
- * "uniVer": "√",
2752
- * "unixVer": "x"
2753
- * },
2754
- * "kuaishou": {
2755
- * "hostVer": "√",
2756
- * "uniVer": "√",
2757
- * "unixVer": "x"
2758
- * },
2759
- * "jd": {
2760
- * "hostVer": "√",
2761
- * "uniVer": "√",
2762
- * "unixVer": "x"
2763
- * }
2764
- * },
2765
- "web": {
2766
- "uniVer": "√",
2767
- "unixVer": "4.0"
2768
- }
2769
- }
2770
- */
2771
- progress: number,
2772
- /**
2773
- * 已经上传的数据长度,单位 Bytes
2774
- * @uniPlatform
2775
- {
2776
- "app": {
2777
- "android": {
2778
- "osVer": "5.0",
2779
- "uniVer": "√",
2780
- "uniUtsPlugin": "3.91",
2781
- "unixVer": "3.91"
2782
- },
2783
- "ios": {
2784
- "osVer": "12.0",
2785
- "uniVer": "√",
2786
- "uniUtsPlugin": "4.11",
2787
- "unixVer": "4.11",
2788
- "unixUtsPlugin": "4.11"
2789
- },
2790
- "harmony": {
2791
- "osVer": "3.0",
2792
- "uniVer": "4.23",
2793
- "unixVer": "4.61",
2794
- "unixVaporVer": "5.0"
2795
- }
2796
- },
2797
- * "mp": {
2798
- * "weixin": {
2799
- * "hostVer": "√",
2800
- * "uniVer": "√",
2801
- * "unixVer": "4.41"
2802
- * },
2803
- * "alipay": {
2804
- * "hostVer": "√",
2805
- * "uniVer": "√",
2806
- * "unixVer": "x"
2807
- * },
2808
- * "baidu": {
2809
- * "hostVer": "√",
2810
- * "uniVer": "√",
2811
- * "unixVer": "x"
2812
- * },
2813
- * "toutiao": {
2814
- * "hostVer": "√",
2815
- * "uniVer": "√",
2816
- * "unixVer": "x"
2817
- * },
2818
- * "lark": {
2819
- * "hostVer": "√",
2820
- * "uniVer": "√",
2821
- * "unixVer": "x"
2822
- * },
2823
- * "qq": {
2824
- * "hostVer": "√",
2825
- * "uniVer": "√",
2826
- * "unixVer": "x"
2827
- * },
2828
- * "kuaishou": {
2829
- * "hostVer": "√",
2830
- * "uniVer": "√",
2831
- * "unixVer": "x"
2832
- * },
2833
- * "jd": {
2834
- * "hostVer": "√",
2835
- * "uniVer": "√",
2836
- * "unixVer": "x"
2837
- * }
2838
- * },
2839
- "web": {
2840
- "uniVer": "√",
2841
- "unixVer": "4.0"
2842
- }
2843
- }
2844
- */
2845
- totalBytesSent: number,
2846
- /**
2847
- * 预期需要上传的数据总长度,单位 Bytes
2848
- * @uniPlatform
2849
- {
2850
- "app": {
2851
- "android": {
2852
- "osVer": "5.0",
2853
- "uniVer": "√",
2854
- "uniUtsPlugin": "3.91",
2855
- "unixVer": "3.91"
2856
- },
2857
- "ios": {
2858
- "osVer": "12.0",
2859
- "uniVer": "√",
2860
- "uniUtsPlugin": "4.11",
2861
- "unixVer": "4.11",
2862
- "unixUtsPlugin": "4.11"
2863
- },
2864
- "harmony": {
2865
- "osVer": "3.0",
2866
- "uniVer": "4.23",
2867
- "unixVer": "4.61",
2868
- "unixVaporVer": "5.0"
2869
- }
2870
- },
2871
- * "mp": {
2872
- * "weixin": {
2873
- * "hostVer": "√",
2874
- * "uniVer": "√",
2875
- * "unixVer": "4.41"
2876
- * },
2877
- * "alipay": {
2878
- * "hostVer": "√",
2879
- * "uniVer": "√",
2880
- * "unixVer": "x"
2881
- * },
2882
- * "baidu": {
2883
- * "hostVer": "√",
2884
- * "uniVer": "√",
2885
- * "unixVer": "x"
2886
- * },
2887
- * "toutiao": {
2888
- * "hostVer": "√",
2889
- * "uniVer": "√",
2890
- * "unixVer": "x"
2891
- * },
2892
- * "lark": {
2893
- * "hostVer": "√",
2894
- * "uniVer": "√",
2895
- * "unixVer": "x"
2896
- * },
2897
- * "qq": {
2898
- * "hostVer": "√",
2899
- * "uniVer": "√",
2900
- * "unixVer": "x"
2901
- * },
2902
- * "kuaishou": {
2903
- * "hostVer": "√",
2904
- * "uniVer": "√",
2905
- * "unixVer": "x"
2906
- * },
2907
- * "jd": {
2908
- * "hostVer": "√",
2909
- * "uniVer": "√",
2910
- * "unixVer": "x"
2911
- * }
2912
- * },
2913
- "web": {
2914
- "uniVer": "√",
2915
- "unixVer": "4.0"
2916
- }
2917
- }
2918
- */
2919
- totalBytesExpectedToSend: number
2920
- };
2921
-
2922
- export type UploadFileProgressUpdateCallback = (result: OnProgressUpdateResult) => void
2923
- export interface UploadTask {
2924
- /**
2925
- * 中断上传任务。
2926
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/network-file.html#uploadfile
2927
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/upload-file.html
2928
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/upload-file.html
2929
- * @uniPlatform
2930
- {
2931
- "app": {
2932
- "android": {
2933
- "osVer": "5.0",
2934
- "uniVer": "√",
2935
- "uniUtsPlugin": "3.91",
2936
- "unixVer": "3.91"
2937
- },
2938
- "ios": {
2939
- "osVer": "12.0",
2940
- "uniVer": "√",
2941
- "uniUtsPlugin": "4.11",
2942
- "unixVer": "4.11",
2943
- "unixUtsPlugin": "4.11"
2944
- },
2945
- "harmony": {
2946
- "osVer": "3.0",
2947
- "uniVer": "4.23",
2948
- "unixVer": "4.61",
2949
- "unixVaporVer": "5.0"
2950
- }
2951
- },
2952
- * "mp": {
2953
- * "weixin": {
2954
- * "hostVer": "√",
2955
- * "uniVer": "√",
2956
- * "unixVer": "4.41"
2957
- * },
2958
- * "alipay": {
2959
- * "hostVer": "√",
2960
- * "uniVer": "√",
2961
- * "unixVer": "x"
2962
- * },
2963
- * "baidu": {
2964
- * "hostVer": "√",
2965
- * "uniVer": "√",
2966
- * "unixVer": "x"
2967
- * },
2968
- * "toutiao": {
2969
- * "hostVer": "√",
2970
- * "uniVer": "√",
2971
- * "unixVer": "x"
2972
- * },
2973
- * "lark": {
2974
- * "hostVer": "√",
2975
- * "uniVer": "√",
2976
- * "unixVer": "x"
2977
- * },
2978
- * "qq": {
2979
- * "hostVer": "√",
2980
- * "uniVer": "√",
2981
- * "unixVer": "x"
2982
- * },
2983
- * "kuaishou": {
2984
- * "hostVer": "√",
2985
- * "uniVer": "√",
2986
- * "unixVer": "x"
2987
- * },
2988
- * "jd": {
2989
- * "hostVer": "√",
2990
- * "uniVer": "√",
2991
- * "unixVer": "x"
2992
- * }
2993
- * },
2994
- "web": {
2995
- "uniVer": "√",
2996
- "unixVer": "4.0"
2997
- }
2998
- }
2999
- * @example
3000
- ```typescript
3001
- var uploadTask = uni.uploadFile({
3002
- url: 'http://192.168.12.106:8080/uploadFile', //仅为示例,并非真实接口地址。
3003
- complete: ()=> {}
3004
- });
3005
- uploadTask.abort();
3006
- ```
3007
- */
3008
- abort(): void,
3009
- /**
3010
- * 监听上传进度变化。
3011
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/network-file.html#uploadfile
3012
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/upload-file.html
3013
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/upload-file.html
3014
- * @uniPlatform
3015
- {
3016
- "app": {
3017
- "android": {
3018
- "osVer": "5.0",
3019
- "uniVer": "√",
3020
- "uniUtsPlugin": "3.91",
3021
- "unixVer": "3.91"
3022
- },
3023
- "ios": {
3024
- "osVer": "12.0",
3025
- "uniVer": "√",
3026
- "uniUtsPlugin": "4.11",
3027
- "unixVer": "4.11",
3028
- "unixUtsPlugin": "4.11"
3029
- },
3030
- "harmony": {
3031
- "osVer": "3.0",
3032
- "uniVer": "4.23",
3033
- "unixVer": "4.61",
3034
- "unixVaporVer": "5.0"
3035
- }
3036
- },
3037
- * "mp": {
3038
- * "weixin": {
3039
- * "hostVer": "√",
3040
- * "uniVer": "√",
3041
- * "unixVer": "4.41"
3042
- * },
3043
- * "alipay": {
3044
- * "hostVer": "√",
3045
- * "uniVer": "√",
3046
- * "unixVer": "x"
3047
- * },
3048
- * "baidu": {
3049
- * "hostVer": "√",
3050
- * "uniVer": "√",
3051
- * "unixVer": "x"
3052
- * },
3053
- * "toutiao": {
3054
- * "hostVer": "√",
3055
- * "uniVer": "√",
3056
- * "unixVer": "x"
3057
- * },
3058
- * "lark": {
3059
- * "hostVer": "√",
3060
- * "uniVer": "√",
3061
- * "unixVer": "x"
3062
- * },
3063
- * "qq": {
3064
- * "hostVer": "√",
3065
- * "uniVer": "√",
3066
- * "unixVer": "x"
3067
- * },
3068
- * "kuaishou": {
3069
- * "hostVer": "√",
3070
- * "uniVer": "√",
3071
- * "unixVer": "x"
3072
- * },
3073
- * "jd": {
3074
- * "hostVer": "√",
3075
- * "uniVer": "√",
3076
- * "unixVer": "x"
3077
- * }
3078
- * },
3079
- "web": {
3080
- "uniVer": "√",
3081
- "unixVer": "4.0"
3082
- }
3083
- }
3084
- * @example
3085
- ```typescript
3086
- uploadTask.onProgressUpdate((res) => {
3087
- console.log('上传进度' + res.progress);
3088
- console.log('已经上传的数据长度' + res.totalBytesSent);
3089
- console.log('预期需要上传的数据总长度' + res.totalBytesExpectedToSend);
3090
- });
3091
- ```
3092
- */
3093
- onProgressUpdate(callback: UploadFileProgressUpdateCallback): void,
3094
- };
3095
-
3096
- //===============================下载==================================
3097
-
3098
- export type DownloadFile = (options: DownloadFileOptions) => DownloadTask;
3099
- export type DownloadFileSuccess = {
3100
- /**
3101
- * 临时文件路径,下载后的文件会存储到一个临时文件
3102
- * @uniPlatform
3103
- {
3104
- "app": {
3105
- "android": {
3106
- "osVer": "5.0",
3107
- "uniVer": "√",
3108
- "uniUtsPlugin": "3.91",
3109
- "unixVer": "3.91"
3110
- },
3111
- "ios": {
3112
- "osVer": "12.0",
3113
- "uniVer": "√",
3114
- "uniUtsPlugin": "4.11",
3115
- "unixVer": "4.11",
3116
- "unixUtsPlugin": "4.11"
3117
- },
3118
- "harmony": {
3119
- "osVer": "3.0",
3120
- "uniVer": "4.23",
3121
- "unixVer": "4.61",
3122
- "unixVaporVer": "5.0"
3123
- }
3124
- },
3125
- * "mp": {
3126
- * "weixin": {
3127
- * "hostVer": "√",
3128
- * "uniVer": "√",
3129
- * "unixVer": "4.41"
3130
- * },
3131
- * "alipay": {
3132
- * "hostVer": "√",
3133
- * "uniVer": "√",
3134
- * "unixVer": "x"
3135
- * },
3136
- * "baidu": {
3137
- * "hostVer": "√",
3138
- * "uniVer": "√",
3139
- * "unixVer": "x"
3140
- * },
3141
- * "toutiao": {
3142
- * "hostVer": "√",
3143
- * "uniVer": "√",
3144
- * "unixVer": "x"
3145
- * },
3146
- * "lark": {
3147
- * "hostVer": "√",
3148
- * "uniVer": "√",
3149
- * "unixVer": "x"
3150
- * },
3151
- * "qq": {
3152
- * "hostVer": "√",
3153
- * "uniVer": "√",
3154
- * "unixVer": "x"
3155
- * },
3156
- * "kuaishou": {
3157
- * "hostVer": "√",
3158
- * "uniVer": "√",
3159
- * "unixVer": "x"
3160
- * },
3161
- * "jd": {
3162
- * "hostVer": "√",
3163
- * "uniVer": "√",
3164
- * "unixVer": "x"
3165
- * }
3166
- * },
3167
- "web": {
3168
- "uniVer": "√",
3169
- "unixVer": "4.0"
3170
- }
3171
- }
3172
- */
3173
- tempFilePath: string,
3174
- /**
3175
- * 开发者服务器返回的 HTTP 状态码
3176
- * @uniPlatform
3177
- {
3178
- "app": {
3179
- "android": {
3180
- "osVer": "5.0",
3181
- "uniVer": "√",
3182
- "uniUtsPlugin": "3.91",
3183
- "unixVer": "3.91"
3184
- },
3185
- "ios": {
3186
- "osVer": "12.0",
3187
- "uniVer": "√",
3188
- "uniUtsPlugin": "4.11",
3189
- "unixVer": "4.11",
3190
- "unixUtsPlugin": "4.11"
3191
- },
3192
- "harmony": {
3193
- "osVer": "3.0",
3194
- "uniVer": "4.23",
3195
- "unixVer": "4.61",
3196
- "unixVaporVer": "5.0"
3197
- }
3198
- },
3199
- * "mp": {
3200
- * "weixin": {
3201
- * "hostVer": "√",
3202
- * "uniVer": "√",
3203
- * "unixVer": "4.41"
3204
- * },
3205
- * "alipay": {
3206
- * "hostVer": "√",
3207
- * "uniVer": "√",
3208
- * "unixVer": "x"
3209
- * },
3210
- * "baidu": {
3211
- * "hostVer": "√",
3212
- * "uniVer": "√",
3213
- * "unixVer": "x"
3214
- * },
3215
- * "toutiao": {
3216
- * "hostVer": "√",
3217
- * "uniVer": "√",
3218
- * "unixVer": "x"
3219
- * },
3220
- * "lark": {
3221
- * "hostVer": "√",
3222
- * "uniVer": "√",
3223
- * "unixVer": "x"
3224
- * },
3225
- * "qq": {
3226
- * "hostVer": "√",
3227
- * "uniVer": "√",
3228
- * "unixVer": "x"
3229
- * },
3230
- * "kuaishou": {
3231
- * "hostVer": "√",
3232
- * "uniVer": "√",
3233
- * "unixVer": "x"
3234
- * },
3235
- * "jd": {
3236
- * "hostVer": "√",
3237
- * "uniVer": "√",
3238
- * "unixVer": "x"
3239
- * }
3240
- * },
3241
- "web": {
3242
- "uniVer": "√",
3243
- "unixVer": "4.0"
3244
- }
3245
- }
3246
- */
3247
- statusCode: number
3248
- };
3249
- export type DownloadFileSuccessCallback = (result: DownloadFileSuccess) => void;
3250
- /**
3251
- * 下载文件失败的错误回调参数
3252
- */
3253
- export interface DownloadFileFail extends IUniError {
3254
- errCode: RequestErrorCode
3255
- };
3256
- export type DownloadFileFailCallback = (result: DownloadFileFail) => void;
3257
- export type DownloadFileComplete = any;
3258
- export type DownloadFileCompleteCallback = (result: DownloadFileComplete) => void;
3259
- export type DownloadFileOptions = {
3260
- /**
3261
- * 下载资源的 url
3262
- * @uniPlatform
3263
- {
3264
- "app": {
3265
- "android": {
3266
- "osVer": "5.0",
3267
- "uniVer": "√",
3268
- "uniUtsPlugin": "3.91",
3269
- "unixVer": "3.91"
3270
- },
3271
- "ios": {
3272
- "osVer": "12.0",
3273
- "uniVer": "√",
3274
- "uniUtsPlugin": "4.11",
3275
- "unixVer": "4.11",
3276
- "unixUtsPlugin": "4.11"
3277
- },
3278
- "harmony": {
3279
- "osVer": "3.0",
3280
- "uniVer": "4.23",
3281
- "unixVer": "4.61",
3282
- "unixVaporVer": "5.0"
3283
- }
3284
- },
3285
- * "mp": {
3286
- * "weixin": {
3287
- * "hostVer": "√",
3288
- * "uniVer": "√",
3289
- * "unixVer": "4.41"
3290
- * },
3291
- * "alipay": {
3292
- * "hostVer": "√",
3293
- * "uniVer": "√",
3294
- * "unixVer": "x"
3295
- * },
3296
- * "baidu": {
3297
- * "hostVer": "√",
3298
- * "uniVer": "√",
3299
- * "unixVer": "x"
3300
- * },
3301
- * "toutiao": {
3302
- * "hostVer": "√",
3303
- * "uniVer": "√",
3304
- * "unixVer": "x"
3305
- * },
3306
- * "lark": {
3307
- * "hostVer": "√",
3308
- * "uniVer": "√",
3309
- * "unixVer": "x"
3310
- * },
3311
- * "qq": {
3312
- * "hostVer": "√",
3313
- * "uniVer": "√",
3314
- * "unixVer": "x"
3315
- * },
3316
- * "kuaishou": {
3317
- * "hostVer": "√",
3318
- * "uniVer": "√",
3319
- * "unixVer": "x"
3320
- * },
3321
- * "jd": {
3322
- * "hostVer": "√",
3323
- * "uniVer": "√",
3324
- * "unixVer": "x"
3325
- * }
3326
- * },
3327
- "web": {
3328
- "uniVer": "√",
3329
- "unixVer": "4.0"
3330
- }
3331
- }
3332
- */
3333
- url: string,
3334
- /**
3335
- * HTTP 请求 Header,header 中不能设置 Referer
3336
- * @defaultValue null
3337
- * @uniPlatform
3338
- {
3339
- "app": {
3340
- "android": {
3341
- "osVer": "5.0",
3342
- "uniVer": "√",
3343
- "uniUtsPlugin": "3.91",
3344
- "unixVer": "3.91"
3345
- },
3346
- "ios": {
3347
- "osVer": "12.0",
3348
- "uniVer": "√",
3349
- "uniUtsPlugin": "4.11",
3350
- "unixVer": "4.11",
3351
- "unixUtsPlugin": "4.11"
3352
- }
3353
- },
3354
- * "mp": {
3355
- * "weixin": {
3356
- * "hostVer": "√",
3357
- * "uniVer": "√",
3358
- * "unixVer": "4.41"
3359
- * },
3360
- * "alipay": {
3361
- * "hostVer": "√",
3362
- * "uniVer": "√",
3363
- * "unixVer": "x"
3364
- * },
3365
- * "baidu": {
3366
- * "hostVer": "√",
3367
- * "uniVer": "√",
3368
- * "unixVer": "x"
3369
- * },
3370
- * "toutiao": {
3371
- * "hostVer": "√",
3372
- * "uniVer": "√",
3373
- * "unixVer": "x"
3374
- * },
3375
- * "lark": {
3376
- * "hostVer": "√",
3377
- * "uniVer": "√",
3378
- * "unixVer": "x"
3379
- * },
3380
- * "qq": {
3381
- * "hostVer": "√",
3382
- * "uniVer": "√",
3383
- * "unixVer": "x"
3384
- * },
3385
- * "kuaishou": {
3386
- * "hostVer": "√",
3387
- * "uniVer": "√",
3388
- * "unixVer": "x"
3389
- * },
3390
- * "jd": {
3391
- * "hostVer": "√",
3392
- * "uniVer": "√",
3393
- * "unixVer": "x"
3394
- * }
3395
- * }
3396
- }
3397
- */
3398
- header?: UTSJSONObject | null,
3399
- /**
3400
- * 指定文件下载路径
3401
- * 支持相对路径与绝对路径,例:
3402
- * `/imgs/pic.png`、`/storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/temp/imgs/pic.png`
3403
- * 并且支持指定下载目录,例:
3404
- * `/imgs/`
3405
- * 支持uni.env的平台兼容性:Android自3.9开始支持uni.env,iOS自4.13开始支持uni.env
3406
- * @defaultValue null
3407
- * @uniPlatform
3408
- {
3409
- "app": {
3410
- "android": {
3411
- "osVer": "5.0",
3412
- "uniVer": "√",
3413
- "uniUtsPlugin": "3.91",
3414
- "unixVer": "3.91"
3415
- },
3416
- "ios": {
3417
- "osVer": "12.0",
3418
- "uniVer": "√",
3419
- "uniUtsPlugin": "4.11",
3420
- "unixVer": "4.11",
3421
- "unixUtsPlugin": "4.11"
3422
- },
3423
- "harmony": {
3424
- "osVer": "3.0",
3425
- "uniVer": "4.23",
3426
- "unixVer": "4.61",
3427
- "unixVaporVer": "5.0"
3428
- }
3429
- },
3430
- * "mp": {
3431
- * "weixin": {
3432
- * "hostVer": "√",
3433
- * "uniVer": "√",
3434
- * "unixVer": "4.41"
3435
- * },
3436
- * "alipay": {
3437
- * "hostVer": "√",
3438
- * "uniVer": "√",
3439
- * "unixVer": "x"
3440
- * },
3441
- * "baidu": {
3442
- * "hostVer": "√",
3443
- * "uniVer": "√",
3444
- * "unixVer": "x"
3445
- * },
3446
- * "toutiao": {
3447
- * "hostVer": "√",
3448
- * "uniVer": "√",
3449
- * "unixVer": "x"
3450
- * },
3451
- * "lark": {
3452
- * "hostVer": "√",
3453
- * "uniVer": "√",
3454
- * "unixVer": "x"
3455
- * },
3456
- * "qq": {
3457
- * "hostVer": "√",
3458
- * "uniVer": "√",
3459
- * "unixVer": "x"
3460
- * },
3461
- * "kuaishou": {
3462
- * "hostVer": "√",
3463
- * "uniVer": "√",
3464
- * "unixVer": "x"
3465
- * },
3466
- * "jd": {
3467
- * "hostVer": "√",
3468
- * "uniVer": "√",
3469
- * "unixVer": "x"
3470
- * }
3471
- * },
3472
- "web": {
3473
- "uniVer": "√",
3474
- "unixVer": "4.0"
3475
- }
3476
- }
3477
- */
3478
- filePath?: string | null,
3479
- /**
3480
- * 超时时间,单位 ms
3481
- * @defaultValue 120000
3482
- * @uniPlatform
3483
- {
3484
- "app": {
3485
- "android": {
3486
- "osVer": "5.0",
3487
- "uniVer": "√",
3488
- "uniUtsPlugin": "3.91",
3489
- "unixVer": "3.91"
3490
- },
3491
- "ios": {
3492
- "osVer": "12.0",
3493
- "uniVer": "√",
3494
- "uniUtsPlugin": "4.11",
3495
- "unixVer": "4.11",
3496
- "unixUtsPlugin": "4.11"
3497
- },
3498
- "harmony": {
3499
- "osVer": "3.0",
3500
- "uniVer": "4.23",
3501
- "unixVer": "4.61",
3502
- "unixVaporVer": "5.0"
3503
- }
3504
- },
3505
- * "mp": {
3506
- * "weixin": {
3507
- * "hostVer": "√",
3508
- * "uniVer": "√",
3509
- * "unixVer": "4.41"
3510
- * },
3511
- * "alipay": {
3512
- * "hostVer": "√",
3513
- * "uniVer": "√",
3514
- * "unixVer": "x"
3515
- * },
3516
- * "baidu": {
3517
- * "hostVer": "√",
3518
- * "uniVer": "√",
3519
- * "unixVer": "x"
3520
- * },
3521
- * "toutiao": {
3522
- * "hostVer": "√",
3523
- * "uniVer": "√",
3524
- * "unixVer": "x"
3525
- * },
3526
- * "lark": {
3527
- * "hostVer": "√",
3528
- * "uniVer": "√",
3529
- * "unixVer": "x"
3530
- * },
3531
- * "qq": {
3532
- * "hostVer": "√",
3533
- * "uniVer": "√",
3534
- * "unixVer": "x"
3535
- * },
3536
- * "kuaishou": {
3537
- * "hostVer": "√",
3538
- * "uniVer": "√",
3539
- * "unixVer": "x"
3540
- * },
3541
- * "jd": {
3542
- * "hostVer": "√",
3543
- * "uniVer": "√",
3544
- * "unixVer": "x"
3545
- * }
3546
- * },
3547
- "web": {
3548
- "uniVer": "√",
3549
- "unixVer": "4.0"
3550
- }
3551
- }
3552
- */
3553
- timeout?: number | null,
3554
- /**
3555
- * 下载成功后以 tempFilePath 的形式传给页面,res = {tempFilePath: '文件的临时路径'}
3556
- * @defaultValue null
3557
- */
3558
- success?: DownloadFileSuccessCallback | null,
3559
- /**
3560
- * 失败的回调函数
3561
- * @defaultValue null
3562
- */
3563
- fail?: DownloadFileFailCallback | null,
3564
- /**
3565
- * 结束的回调函数(调用成功、失败都会执行)
3566
- * @defaultValue null
3567
- */
3568
- complete?: DownloadFileCompleteCallback | null
3569
- };
3570
- export type OnProgressDownloadResult = {
3571
- /**
3572
- * 下载进度百分比
3573
- * @uniPlatform
3574
- {
3575
- "app": {
3576
- "android": {
3577
- "osVer": "5.0",
3578
- "uniVer": "√",
3579
- "uniUtsPlugin": "3.91",
3580
- "unixVer": "3.91"
3581
- },
3582
- "ios": {
3583
- "osVer": "12.0",
3584
- "uniVer": "√",
3585
- "uniUtsPlugin": "4.11",
3586
- "unixVer": "4.11",
3587
- "unixUtsPlugin": "4.11"
3588
- },
3589
- "harmony": {
3590
- "osVer": "3.0",
3591
- "uniVer": "4.23",
3592
- "unixVer": "4.61",
3593
- "unixVaporVer": "5.0"
3594
- }
3595
- },
3596
- * "mp": {
3597
- * "weixin": {
3598
- * "hostVer": "√",
3599
- * "uniVer": "√",
3600
- * "unixVer": "4.41"
3601
- * },
3602
- * "alipay": {
3603
- * "hostVer": "√",
3604
- * "uniVer": "√",
3605
- * "unixVer": "x"
3606
- * },
3607
- * "baidu": {
3608
- * "hostVer": "√",
3609
- * "uniVer": "√",
3610
- * "unixVer": "x"
3611
- * },
3612
- * "toutiao": {
3613
- * "hostVer": "√",
3614
- * "uniVer": "√",
3615
- * "unixVer": "x"
3616
- * },
3617
- * "lark": {
3618
- * "hostVer": "√",
3619
- * "uniVer": "√",
3620
- * "unixVer": "x"
3621
- * },
3622
- * "qq": {
3623
- * "hostVer": "√",
3624
- * "uniVer": "√",
3625
- * "unixVer": "x"
3626
- * },
3627
- * "kuaishou": {
3628
- * "hostVer": "√",
3629
- * "uniVer": "√",
3630
- * "unixVer": "x"
3631
- * },
3632
- * "jd": {
3633
- * "hostVer": "√",
3634
- * "uniVer": "√",
3635
- * "unixVer": "x"
3636
- * }
3637
- * },
3638
- "web": {
3639
- "uniVer": "√",
3640
- "unixVer": "4.0"
3641
- }
3642
- }
3643
- */
3644
- progress: number,
3645
- /**
3646
- * 已经下载的数据长度,单位 Bytes
3647
- * @uniPlatform
3648
- {
3649
- "app": {
3650
- "android": {
3651
- "osVer": "5.0",
3652
- "uniVer": "√",
3653
- "uniUtsPlugin": "3.91",
3654
- "unixVer": "3.91"
3655
- },
3656
- "ios": {
3657
- "osVer": "12.0",
3658
- "uniVer": "√",
3659
- "uniUtsPlugin": "4.11",
3660
- "unixVer": "4.11",
3661
- "unixUtsPlugin": "4.11"
3662
- },
3663
- "harmony": {
3664
- "osVer": "3.0",
3665
- "uniVer": "4.23",
3666
- "unixVer": "4.61",
3667
- "unixVaporVer": "5.0"
3668
- }
3669
- },
3670
- * "mp": {
3671
- * "weixin": {
3672
- * "hostVer": "√",
3673
- * "uniVer": "√",
3674
- * "unixVer": "4.41"
3675
- * },
3676
- * "alipay": {
3677
- * "hostVer": "√",
3678
- * "uniVer": "√",
3679
- * "unixVer": "x"
3680
- * },
3681
- * "baidu": {
3682
- * "hostVer": "√",
3683
- * "uniVer": "√",
3684
- * "unixVer": "x"
3685
- * },
3686
- * "toutiao": {
3687
- * "hostVer": "√",
3688
- * "uniVer": "√",
3689
- * "unixVer": "x"
3690
- * },
3691
- * "lark": {
3692
- * "hostVer": "√",
3693
- * "uniVer": "√",
3694
- * "unixVer": "x"
3695
- * },
3696
- * "qq": {
3697
- * "hostVer": "√",
3698
- * "uniVer": "√",
3699
- * "unixVer": "x"
3700
- * },
3701
- * "kuaishou": {
3702
- * "hostVer": "√",
3703
- * "uniVer": "√",
3704
- * "unixVer": "x"
3705
- * },
3706
- * "jd": {
3707
- * "hostVer": "√",
3708
- * "uniVer": "√",
3709
- * "unixVer": "x"
3710
- * }
3711
- * },
3712
- "web": {
3713
- "uniVer": "√",
3714
- "unixVer": "4.0"
3715
- }
3716
- }
3717
- */
3718
- totalBytesWritten: number,
3719
- /**
3720
- * 预期需要下载的数据总长度,单位 Bytes
3721
- * @uniPlatform
3722
- {
3723
- "app": {
3724
- "android": {
3725
- "osVer": "5.0",
3726
- "uniVer": "√",
3727
- "uniUtsPlugin": "3.91",
3728
- "unixVer": "3.91"
3729
- },
3730
- "ios": {
3731
- "osVer": "12.0",
3732
- "uniVer": "√",
3733
- "uniUtsPlugin": "4.11",
3734
- "unixVer": "4.11",
3735
- "unixUtsPlugin": "4.11"
3736
- },
3737
- "harmony": {
3738
- "osVer": "3.0",
3739
- "uniVer": "4.23",
3740
- "unixVer": "4.61",
3741
- "unixVaporVer": "5.0"
3742
- }
3743
- },
3744
- * "mp": {
3745
- * "weixin": {
3746
- * "hostVer": "√",
3747
- * "uniVer": "√",
3748
- * "unixVer": "4.41"
3749
- * },
3750
- * "alipay": {
3751
- * "hostVer": "√",
3752
- * "uniVer": "√",
3753
- * "unixVer": "x"
3754
- * },
3755
- * "baidu": {
3756
- * "hostVer": "√",
3757
- * "uniVer": "√",
3758
- * "unixVer": "x"
3759
- * },
3760
- * "toutiao": {
3761
- * "hostVer": "√",
3762
- * "uniVer": "√",
3763
- * "unixVer": "x"
3764
- * },
3765
- * "lark": {
3766
- * "hostVer": "√",
3767
- * "uniVer": "√",
3768
- * "unixVer": "x"
3769
- * },
3770
- * "qq": {
3771
- * "hostVer": "√",
3772
- * "uniVer": "√",
3773
- * "unixVer": "x"
3774
- * },
3775
- * "kuaishou": {
3776
- * "hostVer": "√",
3777
- * "uniVer": "√",
3778
- * "unixVer": "x"
3779
- * },
3780
- * "jd": {
3781
- * "hostVer": "√",
3782
- * "uniVer": "√",
3783
- * "unixVer": "x"
3784
- * }
3785
- * },
3786
- "web": {
3787
- "uniVer": "√",
3788
- "unixVer": "4.0"
3789
- }
3790
- }
3791
- */
3792
- totalBytesExpectedToWrite: number
3793
- };
3794
- export type DownloadFileProgressUpdateCallback = (result: OnProgressDownloadResult) => void;
3795
- export interface DownloadTask {
3796
- /**
3797
- * 中断下载任务
3798
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/network-file.html#downloadfile
3799
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/download-file.html
3800
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/download-file.html
3801
- * @uniPlatform
3802
- {
3803
- "app": {
3804
- "android": {
3805
- "osVer": "5.0",
3806
- "uniVer": "√",
3807
- "uniUtsPlugin": "3.91",
3808
- "unixVer": "3.91"
3809
- },
3810
- "ios": {
3811
- "osVer": "12.0",
3812
- "uniVer": "√",
3813
- "uniUtsPlugin": "4.11",
3814
- "unixVer": "4.11",
3815
- "unixUtsPlugin": "4.11"
3816
- },
3817
- "harmony": {
3818
- "osVer": "3.0",
3819
- "uniVer": "4.23",
3820
- "unixVer": "4.61",
3821
- "unixVaporVer": "5.0"
3822
- }
3823
- },
3824
- * "mp": {
3825
- * "weixin": {
3826
- * "hostVer": "√",
3827
- * "uniVer": "√",
3828
- * "unixVer": "4.41"
3829
- * },
3830
- * "alipay": {
3831
- * "hostVer": "√",
3832
- * "uniVer": "√",
3833
- * "unixVer": "x"
3834
- * },
3835
- * "baidu": {
3836
- * "hostVer": "√",
3837
- * "uniVer": "√",
3838
- * "unixVer": "x"
3839
- * },
3840
- * "toutiao": {
3841
- * "hostVer": "√",
3842
- * "uniVer": "√",
3843
- * "unixVer": "x"
3844
- * },
3845
- * "lark": {
3846
- * "hostVer": "√",
3847
- * "uniVer": "√",
3848
- * "unixVer": "x"
3849
- * },
3850
- * "qq": {
3851
- * "hostVer": "√",
3852
- * "uniVer": "√",
3853
- * "unixVer": "x"
3854
- * },
3855
- * "kuaishou": {
3856
- * "hostVer": "√",
3857
- * "uniVer": "√",
3858
- * "unixVer": "x"
3859
- * },
3860
- * "jd": {
3861
- * "hostVer": "√",
3862
- * "uniVer": "√",
3863
- * "unixVer": "x"
3864
- * }
3865
- * },
3866
- "web": {
3867
- "uniVer": "√",
3868
- "unixVer": "4.0"
3869
- }
3870
- }
3871
- * @example
3872
- ```typescript
3873
- var downloadTask = uni.downloadFile({
3874
- url: 'https://www.example.com/file/test', //仅为示例,并非真实接口地址。
3875
- complete: ()=> {}
3876
- });
3877
- downloadTask.abort();
3878
- ```
3879
- */
3880
- abort(): void,
3881
- /**
3882
- * 监听下载进度变化。
3883
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/network-file.html#downloadfile
3884
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/download-file.html
3885
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/download-file.html
3886
- * @uniPlatform
3887
- {
3888
- "app": {
3889
- "android": {
3890
- "osVer": "5.0",
3891
- "uniVer": "√",
3892
- "uniUtsPlugin": "3.91",
3893
- "unixVer": "3.91"
3894
- },
3895
- "ios": {
3896
- "osVer": "12.0",
3897
- "uniVer": "√",
3898
- "uniUtsPlugin": "4.11",
3899
- "unixVer": "4.11",
3900
- "unixUtsPlugin": "4.11"
3901
- },
3902
- "harmony": {
3903
- "osVer": "3.0",
3904
- "uniVer": "4.23",
3905
- "unixVer": "4.61",
3906
- "unixVaporVer": "5.0"
3907
- }
3908
- },
3909
- * "mp": {
3910
- * "weixin": {
3911
- * "hostVer": "√",
3912
- * "uniVer": "√",
3913
- * "unixVer": "4.41"
3914
- * },
3915
- * "alipay": {
3916
- * "hostVer": "√",
3917
- * "uniVer": "√",
3918
- * "unixVer": "x"
3919
- * },
3920
- * "baidu": {
3921
- * "hostVer": "√",
3922
- * "uniVer": "√",
3923
- * "unixVer": "x"
3924
- * },
3925
- * "toutiao": {
3926
- * "hostVer": "√",
3927
- * "uniVer": "√",
3928
- * "unixVer": "x"
3929
- * },
3930
- * "lark": {
3931
- * "hostVer": "√",
3932
- * "uniVer": "√",
3933
- * "unixVer": "x"
3934
- * },
3935
- * "qq": {
3936
- * "hostVer": "√",
3937
- * "uniVer": "√",
3938
- * "unixVer": "x"
3939
- * },
3940
- * "kuaishou": {
3941
- * "hostVer": "√",
3942
- * "uniVer": "√",
3943
- * "unixVer": "x"
3944
- * },
3945
- * "jd": {
3946
- * "hostVer": "√",
3947
- * "uniVer": "√",
3948
- * "unixVer": "x"
3949
- * }
3950
- * },
3951
- "web": {
3952
- "uniVer": "√",
3953
- "unixVer": "4.0"
3954
- }
3955
- }
3956
- * @example
3957
- ```typescript
3958
- downloadTask.onProgressUpdate((res) => {
3959
- console.log('下载进度' + res.progress);
3960
- console.log('已经下载的数据长度' + res.totalBytesWritten);
3961
- console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
3962
- });
3963
- ```
3964
- */
3965
- onProgressUpdate(callback: DownloadFileProgressUpdateCallback): void,
3966
- };
3967
-
3968
- export type ConfigMTLS = (options: ConfigMTLSOptions) => void;
3969
- export type Certificate = {
3970
- /**
3971
- * 对应请求的域名(注意:不要协议部分)
3972
- */
3973
- host: string,
3974
- /**
3975
- * 客户端证书(服务器端需要验证客户端证书时需要配置此项,格式要求请参考下面的证书格式说明,注意 iOS 平台客户端证书只支持 .p12 类型的证书。HarmonyOS Next 上是证书路径 [文档](https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-http-V5#clientcert11))
3976
- */
3977
- client?: string | null,
3978
- /**
3979
- * 客户端证书对应的密码(客户端证书存在时必须配置此项。HarmonyOS Next 上是证书秘钥的密码 [文档](https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-http-V5#clientcert11))
3980
- */
3981
- clientPassword?: string | null,
3982
- /**
3983
- * 证书秘钥的路径,只支持 HarmonyOS Next
3984
- *
3985
- * @uniPlatform
3986
- {
3987
- "app": {
3988
- "android": {
3989
- "osVer": "x",
3990
- "uniVer": "x",
3991
- "unixVer": "x"
3992
- },
3993
- "ios": {
3994
- "osVer": "x",
3995
- "uniVer": "x",
3996
- "unixVer": "x"
3997
- },
3998
- "harmony": {
3999
- "osVer": "3.0",
4000
- "uniVer": "4.23",
4001
- "unixVer": "4.61",
4002
- "unixVaporVer": "5.0"
4003
- }
4004
- },
4005
- "web": {
4006
- "uniVer": "x",
4007
- "unixVer": "x"
4008
- }
4009
- }
4010
- */
4011
- keyPath?: string | null,
4012
- /**
4013
- * 服务器端证书(客户端需要对服务器端证书做校验时需要配置此项,格式要求请参考下面的证书格式说明,注意 iOS 平台服务器端证书只支持 .cer 类型的证书。HarmonyOS Next 不支持)
4014
- *
4015
- * @uniPlatform {
4016
- {
4017
- "app": {
4018
- "android": {
4019
- "osVer": "4.4",
4020
- "uniVer": "3.2.7",
4021
- "unixVer": "x"
4022
- },
4023
- "ios": {
4024
- "osVer": "10.0",
4025
- "uniVer": "3.2.7",
4026
- "unixVer": "x"
4027
- },
4028
- "harmony": {
4029
- "osVer": "x",
4030
- "uniVer": "x",
4031
- "unixVer": "x"
4032
- }
4033
- },
4034
- "web": {
4035
- "uniVer": "x",
4036
- "unixVer": "x"
4037
- }
4038
- }
4039
- */
4040
- server?: (string[]) | null
4041
- };
4042
- export type ConfigMTLSSuccess = {
4043
- /**
4044
- * 成功返回 0,失败返回相应 code 码
4045
- */
4046
- code: number
4047
- };
4048
- export type ConfigMTLSSuccessCallback = (result: ConfigMTLSSuccess) => void;
4049
- export type ConfigMTLSFail = {
4050
- /**
4051
- * 成功返回 0,失败返回相应 code 码
4052
- */
4053
- code: number
4054
- };
4055
- export type ConfigMTLSFailCallback = (result: ConfigMTLSFail) => void;
4056
- export type ConfigMTLSComplete = any;
4057
- export type ConfigMTLSCompleteCallback = (result: ConfigMTLSComplete) => void;
4058
- export type ConfigMTLSOptions = {
4059
- /**
4060
- * 资源url
4061
- */
4062
- certificates: Certificate[],
4063
- /**
4064
- * 成功返回的回调函数
4065
- */
4066
- success?: ConfigMTLSSuccessCallback | null,
4067
- /**
4068
- * 失败的回调函数
4069
- */
4070
- fail?: ConfigMTLSFailCallback | null,
4071
- /**
4072
- * 结束的回调函数(调用成功、失败都会执行)
4073
- */
4074
- complete?: ConfigMTLSCompleteCallback | null
4075
- }
4076
- // export type PrefetchDNSNetAddress = {
4077
- // /** 地址 */
4078
- // address: string
4079
- // /** IP类型 */
4080
- // family: 'IPv4' | 'IPv6'
4081
- // /** 端口 */
4082
- // port: number
4083
- // }
4084
- // export type PrefetchDNSSuccess = PrefetchDNSNetAddress[]
4085
-
4086
- // export type PrefetchDNSFail = {
4087
- // /** 错误码 */
4088
- // code: number,
4089
- // }
4090
- // export type PrefetchDNSOptions = {
4091
- // /** 域名 */
4092
- // domain: string
4093
- // /**
4094
- // * 成功的回调函数
4095
- // */
4096
- // success?: (result: PrefetchDNSSuccess) => void
4097
- // /**
4098
- // * 失败的回调函数
4099
- // */
4100
- // fail?: (result: PrefetchDNSFail) => void
4101
- // /**
4102
- // * 结束的回调函数(调用成功、失败都会执行)
4103
- // */
4104
- // complete?: (result: any) => void
4105
- // }
4106
- // export type PrefetchDNS = (options: PrefetchDNSOptions) => void;
4107
-
4108
- export interface Uni {
4109
- /**
4110
- * 发起网络请求。
4111
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/request.html
4112
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/request.html
4113
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/request.html
4114
- * @inline
4115
- * @reified
4116
- * @uniPlatform
4117
- {
4118
- "app": {
4119
- "android": {
4120
- "osVer": "4.4",
4121
- "uniVer": "√",
4122
- "uniUtsPlugin": "3.91",
4123
- "unixVer": "3.91"
4124
- },
4125
- "ios": {
4126
- "osVer": "12.0",
4127
- "uniVer": "√",
4128
- "uniUtsPlugin": "4.11",
4129
- "unixVer": "4.11",
4130
- "unixUtsPlugin": "4.11"
4131
- },
4132
- "harmony": {
4133
- "osVer": "3.0",
4134
- "uniVer": "4.23",
4135
- "unixVer": "4.61",
4136
- "unixVaporVer": "5.0"
4137
- }
4138
- },
4139
- * "mp": {
4140
- * "weixin": {
4141
- * "hostVer": "√",
4142
- * "uniVer": "√",
4143
- * "unixVer": "4.41"
4144
- * },
4145
- * "alipay": {
4146
- * "hostVer": "√",
4147
- * "uniVer": "√",
4148
- * "unixVer": "x"
4149
- * },
4150
- * "baidu": {
4151
- * "hostVer": "√",
4152
- * "uniVer": "√",
4153
- * "unixVer": "x"
4154
- * },
4155
- * "toutiao": {
4156
- * "hostVer": "√",
4157
- * "uniVer": "√",
4158
- * "unixVer": "x"
4159
- * },
4160
- * "lark": {
4161
- * "hostVer": "√",
4162
- * "uniVer": "√",
4163
- * "unixVer": "x"
4164
- * },
4165
- * "qq": {
4166
- * "hostVer": "√",
4167
- * "uniVer": "√",
4168
- * "unixVer": "x"
4169
- * },
4170
- * "kuaishou": {
4171
- * "hostVer": "√",
4172
- * "uniVer": "√",
4173
- * "unixVer": "x"
4174
- * },
4175
- * "jd": {
4176
- * "hostVer": "√",
4177
- * "uniVer": "√",
4178
- * "unixVer": "x"
4179
- * }
4180
- * },
4181
- "web": {
4182
- "uniVer": "√",
4183
- "unixVer": "4.0"
4184
- }
4185
- }
4186
- * @example
4187
- ```typescript
4188
- uni.request({
4189
- url: "http://192.168.12.106:8080/postHalo",
4190
- dataType: "json",
4191
- responseType: "json",
4192
- method: "POST",
4193
- data: {
4194
- platform: "ios",
4195
- },
4196
- // header: {
4197
- // "Content-Type": "application/json",
4198
- // },
4199
- timeout: 6000,
4200
- sslVerify: false,
4201
- withCredentials: false,
4202
- firstIpv4: false,
4203
- success(res) {
4204
- console.log("success :", res.data);
4205
- },
4206
- fail(e) {
4207
- console.log(e);
4208
- },
4209
- complete(res) {
4210
- console.log("complete :", res);
4211
- },
4212
- });
4213
- ```
4214
- */
4215
- request<T>(param: RequestOptions<T>): RequestTask;
4216
- /**
4217
- * 将本地资源上传到开发者服务器。
4218
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/network-file.html#uploadfile
4219
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/upload-file.html
4220
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/upload-file.html
4221
- * @uniPlatform
4222
- {
4223
- "app": {
4224
- "android": {
4225
- "osVer": "4.4",
4226
- "uniVer": "√",
4227
- "uniUtsPlugin": "3.91",
4228
- "unixVer": "3.91"
4229
- },
4230
- "ios": {
4231
- "osVer": "12.0",
4232
- "uniVer": "√",
4233
- "uniUtsPlugin": "x",
4234
- "unixVer": "4.11",
4235
- "unixUtsPlugin": "4.11"
4236
- },
4237
- "harmony": {
4238
- "osVer": "3.0",
4239
- "uniVer": "4.23",
4240
- "unixVer": "4.61",
4241
- "unixVaporVer": "5.0"
4242
- }
4243
- },
4244
- * "mp": {
4245
- * "weixin": {
4246
- * "hostVer": "√",
4247
- * "uniVer": "√",
4248
- * "unixVer": "4.41"
4249
- * },
4250
- * "alipay": {
4251
- * "hostVer": "√",
4252
- * "uniVer": "√",
4253
- * "unixVer": "x"
4254
- * },
4255
- * "baidu": {
4256
- * "hostVer": "√",
4257
- * "uniVer": "√",
4258
- * "unixVer": "x"
4259
- * },
4260
- * "toutiao": {
4261
- * "hostVer": "√",
4262
- * "uniVer": "√",
4263
- * "unixVer": "x"
4264
- * },
4265
- * "lark": {
4266
- * "hostVer": "√",
4267
- * "uniVer": "√",
4268
- * "unixVer": "x"
4269
- * },
4270
- * "qq": {
4271
- * "hostVer": "√",
4272
- * "uniVer": "√",
4273
- * "unixVer": "x"
4274
- * },
4275
- * "kuaishou": {
4276
- * "hostVer": "√",
4277
- * "uniVer": "√",
4278
- * "unixVer": "x"
4279
- * },
4280
- * "jd": {
4281
- * "hostVer": "√",
4282
- * "uniVer": "√",
4283
- * "unixVer": "x"
4284
- * }
4285
- * },
4286
- "web": {
4287
- "uniVer": "√",
4288
- "unixVer": "4.0"
4289
- }
4290
- }
4291
- * @example
4292
- ```typescript
4293
- uni.uploadFile({
4294
- url: 'http://192.168.12.106:8080/uploadFile', //仅为示例,非真实的接口地址
4295
- filePath: "/static/logo.png",
4296
- name: 'file',
4297
- formData: {
4298
- 'user': 'test'
4299
- },
4300
- success: (uploadFileRes) => {
4301
- console.log(uploadFileRes.data);
4302
- }
4303
- });
4304
- ```
4305
- */
4306
- uploadFile(options: UploadFileOptions): UploadTask;
4307
- /**
4308
- * 下载文件资源到本地,客户端直接发起一个 HTTP GET 请求,返回文件的本地临时路径。
4309
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/network-file.html#downloadfile
4310
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/download-file.html
4311
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/download-file.html
4312
- * @uniPlatform
4313
- {
4314
- "app": {
4315
- "android": {
4316
- "osVer": "4.4",
4317
- "uniVer": "√",
4318
- "uniUtsPlugin": "3.91",
4319
- "unixVer": "3.91"
4320
- },
4321
- "ios": {
4322
- "osVer": "12.0",
4323
- "uniVer": "√",
4324
- "uniUtsPlugin": "x",
4325
- "unixVer": "4.11",
4326
- "unixUtsPlugin": "4.11"
4327
- },
4328
- "harmony": {
4329
- "osVer": "3.0",
4330
- "uniVer": "4.23",
4331
- "unixVer": "4.61",
4332
- "unixVaporVer": "5.0"
4333
- }
4334
- },
4335
- * "mp": {
4336
- * "weixin": {
4337
- * "hostVer": "√",
4338
- * "uniVer": "√",
4339
- * "unixVer": "4.41"
4340
- * },
4341
- * "alipay": {
4342
- * "hostVer": "√",
4343
- * "uniVer": "√",
4344
- * "unixVer": "x"
4345
- * },
4346
- * "baidu": {
4347
- * "hostVer": "√",
4348
- * "uniVer": "√",
4349
- * "unixVer": "x"
4350
- * },
4351
- * "toutiao": {
4352
- * "hostVer": "√",
4353
- * "uniVer": "√",
4354
- * "unixVer": "x"
4355
- * },
4356
- * "lark": {
4357
- * "hostVer": "√",
4358
- * "uniVer": "√",
4359
- * "unixVer": "x"
4360
- * },
4361
- * "qq": {
4362
- * "hostVer": "√",
4363
- * "uniVer": "√",
4364
- * "unixVer": "x"
4365
- * },
4366
- * "kuaishou": {
4367
- * "hostVer": "√",
4368
- * "uniVer": "√",
4369
- * "unixVer": "x"
4370
- * },
4371
- * "jd": {
4372
- * "hostVer": "√",
4373
- * "uniVer": "√",
4374
- * "unixVer": "x"
4375
- * }
4376
- * },
4377
- "web": {
4378
- "uniVer": "√",
4379
- "unixVer": "4.0"
4380
- }
4381
- }
4382
- * @example
4383
- ```typescript
4384
- uni.downloadFile({
4385
- url: "http://192.168.12.106:8080/downloadfile",
4386
- success(e) {
4387
- console.log("success111 :", e);
4388
- }
4389
- });
4390
- ```
4391
- */
4392
- downloadFile(options: DownloadFileOptions): DownloadTask;
4393
- /**
4394
- * 配置自签名证书
4395
- *
4396
- * @tutorial https://uniapp.dcloud.net.cn/api/request/request.html#configmtls
4397
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/request/request.html#configmtls
4398
- *
4399
- * @uniPlatform
4400
- {
4401
- "app": {
4402
- "android": {
4403
- "osVer": "4.4",
4404
- "uniVer": "3.2.7",
4405
- "uniUtsPlugin": "x",
4406
- "unixVer": "x"
4407
- },
4408
- "ios": {
4409
- "osVer": "10.0",
4410
- "uniVer": "3.2.7",
4411
- "uniUtsPlugin": "x",
4412
- "unixVer": "x",
4413
- "unixUtsPlugin": "x"
4414
- },
4415
- "harmony": {
4416
- "osVer": "3.0",
4417
- "uniVer": "4.31",
4418
- "unixVer": "4.61",
4419
- "unixVaporVer": "5.0"
4420
- }
4421
- },
4422
- "web": {
4423
- "uniVer": "x",
4424
- "unixVer": "x"
4425
- }
4426
- }
4427
- */
4428
- configMTLS(options: ConfigMTLSOptions): void;
4429
-
4430
- /**
4431
- * DNS 预解析域名
4432
- * @param options
4433
- * @uniPlatform
4434
- * {
4435
- * "app": {
4436
- * "android": {
4437
- * "osVer": "4.4",
4438
- * "uniVer": "3.2.7",
4439
- * "uniUtsPlugin": "x",
4440
- * "unixVer": "x"
4441
- * },
4442
- * "ios": {
4443
- * "osVer": "10.0",
4444
- * "uniVer": "3.2.7",
4445
- * "uniUtsPlugin": "x",
4446
- * "unixVer": "x",
4447
- * "unixUtsPlugin": "x"
4448
- * },
4449
- * "harmony": {
4450
- * "osVer": "3.0",
4451
- * "uniVer": "5.0",
4452
- * "unixVer": "5.0"
4453
- * }
4454
- * },
4455
- * "web": {
4456
- * "uniVer": "x",
4457
- * "unixVer": "x"
4458
- * }
4459
- * }
4460
- */
4461
- // prefetchDNS(options: PrefetchDNSOptions): void;
4462
- }