@dcloudio/uni-app-x 0.7.59 → 0.7.61

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 (224) hide show
  1. package/package.json +2 -2
  2. package/types/app.d.ts +24 -9
  3. package/types/native/IUniElement.d.ts +1 -3
  4. package/types/native/UniCustomElement.d.ts +2 -2
  5. package/types/native/UniFormControl.d.ts +1 -1
  6. package/types/native/UniInputChangeEvent.d.ts +31 -0
  7. package/types/native/UniPage.d.ts +10 -2
  8. package/types/native/UniSwiperAnimationFinishEvent.d.ts +1 -0
  9. package/types/native/UniSwiperChangeEvent.d.ts +1 -0
  10. package/types/native/WebViewStyles.d.ts +1 -1
  11. package/types/native/global.d.ts +14 -0
  12. package/types/native/index.d.ts +1 -0
  13. package/types/page.d.ts +134 -22
  14. package/types/uni/uni-camera-global.d.ts +4 -0
  15. package/types/uni/uni-camera.d.ts +10 -9
  16. package/types/uni/uts-plugin-api/global.d.ts +1 -0
  17. package/types/uni/uts-plugin-api/index.d.ts +1 -0
  18. package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/interface.d.ts +77 -433
  19. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +3 -2
  20. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +3 -2
  21. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +9 -6
  22. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +3 -2
  23. package/types/uni/uts-plugin-api/lib/uni-chooseLocation/utssdk/interface.d.ts +2 -0
  24. package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/interface.d.ts +4 -4
  25. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +10 -8
  26. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/global.d.ts +16 -0
  27. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/index.d.ts +8 -0
  28. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +569 -139
  29. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +3 -2
  30. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +2 -2
  31. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +2 -2
  32. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +7 -6
  33. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +22 -37
  34. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +12 -16
  35. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +5 -3
  36. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +5 -0
  37. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +34 -15
  38. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +3 -1
  39. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +2 -2
  40. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +32 -61
  41. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +45 -80
  42. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +5 -3
  43. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +2 -2
  44. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +13 -11
  45. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +16 -15
  46. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +12 -10
  47. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +1 -1
  48. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +88 -4
  49. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +54 -7
  50. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +2 -2
  51. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/interface.d.ts +1 -1
  52. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +4 -4
  53. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +246 -236
  54. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +5 -5
  55. package/types/uni/uts-plugin-api/lib/uni-location/utssdk/global.d.ts +38 -0
  56. package/types/uni/uts-plugin-api/lib/uni-location/utssdk/index.d.ts +19 -0
  57. package/types/uni/uts-plugin-api/lib/uni-location/utssdk/interface.d.ts +1783 -107
  58. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +16 -20
  59. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +209 -451
  60. package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/interface.d.ts +80 -698
  61. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +10 -8
  62. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +474 -184
  63. package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/global.d.ts +4 -0
  64. package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/index.d.ts +2 -0
  65. package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +755 -405
  66. package/types/uni/uts-plugin-api/lib/uni-oauth-weixin/utssdk/global.d.ts +16 -0
  67. package/types/uni/uts-plugin-api/lib/uni-oauth-weixin/utssdk/index.d.ts +8 -0
  68. package/types/uni/uts-plugin-api/lib/uni-oauth-weixin/utssdk/interface.d.ts +40 -0
  69. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +10 -15
  70. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +116 -124
  71. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +2 -2
  72. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +11 -11
  73. package/types/uni/uts-plugin-api/lib/uni-previewImage/utssdk/interface.d.ts +5 -5
  74. package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/interface.d.ts +25 -26
  75. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +54 -84
  76. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +4 -4
  77. package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/interface.d.ts +71 -89
  78. package/types/uni/uts-plugin-api/lib/uni-requestMerchantTransfer/utssdk/interface.d.ts +3 -0
  79. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +10 -10
  80. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +2 -2
  81. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +300 -6
  82. package/types/uni/uts-plugin-api/lib/uni-share/utssdk/global.d.ts +4 -0
  83. package/types/uni/uts-plugin-api/lib/uni-share/utssdk/index.d.ts +2 -0
  84. package/types/uni/uts-plugin-api/lib/uni-share/utssdk/interface.d.ts +347 -10
  85. package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/interface.d.ts +3 -1
  86. package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/interface.d.ts +3 -1
  87. package/types/uni/uts-plugin-api/lib/uni-sse/utssdk/interface.d.ts +25 -33
  88. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +20 -20
  89. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +18 -18
  90. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +0 -2
  91. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +0 -1
  92. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +70 -82
  93. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +6 -5
  94. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +49 -72
  95. package/types/uni/uts-plugin-biz/global.d.ts +11 -0
  96. package/types/uni/uts-plugin-biz/index.d.ts +11 -0
  97. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +60 -3
  98. package/types/uni/uts-plugin-biz/lib/uni-facialVerify/utssdk/interface.d.ts +6 -0
  99. package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/global.d.ts +52 -0
  100. package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/index.d.ts +25 -0
  101. package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/interface.d.ts +445 -0
  102. package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/global.d.ts +48 -0
  103. package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/index.d.ts +23 -0
  104. package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/interface.d.ts +138 -0
  105. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +28 -12
  106. package/types/uni/uts-plugin-biz/lib/uni-push-fcm/utssdk/global.d.ts +8 -0
  107. package/types/uni/uts-plugin-biz/lib/uni-push-fcm/utssdk/index.d.ts +4 -0
  108. package/types/uni/uts-plugin-biz/lib/uni-push-fcm/utssdk/interface.d.ts +0 -0
  109. package/types/uni/uts-plugin-biz/lib/uni-push-gp/utssdk/global.d.ts +8 -0
  110. package/types/uni/uts-plugin-biz/lib/uni-push-gp/utssdk/index.d.ts +4 -0
  111. package/types/uni/uts-plugin-biz/lib/uni-push-gp/utssdk/interface.d.ts +0 -0
  112. package/types/uni/uts-plugin-biz/lib/uni-push-hms/utssdk/global.d.ts +8 -0
  113. package/types/uni/uts-plugin-biz/lib/uni-push-hms/utssdk/index.d.ts +4 -0
  114. package/types/uni/uts-plugin-biz/lib/uni-push-hms/utssdk/interface.d.ts +0 -0
  115. package/types/uni/uts-plugin-biz/lib/uni-push-honor/utssdk/global.d.ts +8 -0
  116. package/types/uni/uts-plugin-biz/lib/uni-push-honor/utssdk/index.d.ts +4 -0
  117. package/types/uni/uts-plugin-biz/lib/uni-push-honor/utssdk/interface.d.ts +0 -0
  118. package/types/uni/uts-plugin-biz/lib/uni-push-mainland/utssdk/global.d.ts +8 -0
  119. package/types/uni/uts-plugin-biz/lib/uni-push-mainland/utssdk/index.d.ts +4 -0
  120. package/types/uni/uts-plugin-biz/lib/uni-push-mainland/utssdk/interface.d.ts +0 -0
  121. package/types/uni/uts-plugin-biz/lib/uni-push-meizu/utssdk/global.d.ts +8 -0
  122. package/types/uni/uts-plugin-biz/lib/uni-push-meizu/utssdk/index.d.ts +4 -0
  123. package/types/uni/uts-plugin-biz/lib/uni-push-meizu/utssdk/interface.d.ts +0 -0
  124. package/types/uni/uts-plugin-biz/lib/uni-push-oppo/utssdk/global.d.ts +8 -0
  125. package/types/uni/uts-plugin-biz/lib/uni-push-oppo/utssdk/index.d.ts +4 -0
  126. package/types/uni/uts-plugin-biz/lib/uni-push-oppo/utssdk/interface.d.ts +0 -0
  127. package/types/uni/uts-plugin-biz/lib/uni-push-vivo/utssdk/global.d.ts +18 -0
  128. package/types/uni/uts-plugin-biz/lib/uni-push-vivo/utssdk/index.d.ts +9 -0
  129. package/types/uni/uts-plugin-biz/lib/uni-push-vivo/utssdk/interface.d.ts +45 -0
  130. package/types/uni/uts-plugin-biz/lib/uni-push-xiaomi/utssdk/global.d.ts +8 -0
  131. package/types/uni/uts-plugin-biz/lib/uni-push-xiaomi/utssdk/index.d.ts +4 -0
  132. package/types/uni/uts-plugin-biz/lib/uni-push-xiaomi/utssdk/interface.d.ts +0 -0
  133. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +21 -16
  134. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/global.d.ts +16 -2
  135. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/index.d.ts +8 -1
  136. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/interface.d.ts +153 -6
  137. package/types/uni/uts-plugin-component/lib/uni-canvas/utssdk/interface.d.ts +37 -44
  138. package/types/uni/uts-plugin-extend/global.d.ts +0 -2
  139. package/types/uni/uts-plugin-extend/index.d.ts +0 -2
  140. package/types/uni-cloud/interface.d.ts +13 -9
  141. package/types/vue/LifeCycle.d.ts +723 -1
  142. package/types/uni/uts-plugin-api/.temp/uni-actionSheet/utssdk/interface.uts +0 -554
  143. package/types/uni/uts-plugin-api/.temp/uni-addPhoneContact/utssdk/interface.uts +0 -224
  144. package/types/uni/uts-plugin-api/.temp/uni-arrayBufferToBase64/utssdk/interface.uts +0 -77
  145. package/types/uni/uts-plugin-api/.temp/uni-authentication/utssdk/interface.uts +0 -365
  146. package/types/uni/uts-plugin-api/.temp/uni-base64ToArrayBuffer/utssdk/interface.uts +0 -77
  147. package/types/uni/uts-plugin-api/.temp/uni-canvas/utssdk/interface.uts +0 -972
  148. package/types/uni/uts-plugin-api/.temp/uni-chooseLocation/utssdk/interface.uts +0 -410
  149. package/types/uni/uts-plugin-api/.temp/uni-chooseMedia/utssdk/interface.uts +0 -459
  150. package/types/uni/uts-plugin-api/.temp/uni-clipboard/utssdk/interface.uts +0 -203
  151. package/types/uni/uts-plugin-api/.temp/uni-createInnerAudioContext/utssdk/interface.uts +0 -2613
  152. package/types/uni/uts-plugin-api/.temp/uni-createIntersectionObserver/utssdk/interface.uts +0 -152
  153. package/types/uni/uts-plugin-api/.temp/uni-createRequestPermissionListener/utssdk/interface.uts +0 -61
  154. package/types/uni/uts-plugin-api/.temp/uni-createSelectorQuery/utssdk/interface.uts +0 -548
  155. package/types/uni/uts-plugin-api/.temp/uni-createWebviewContext/utssdk/interface.uts +0 -137
  156. package/types/uni/uts-plugin-api/.temp/uni-dialogPage/utssdk/interface.uts +0 -1380
  157. package/types/uni/uts-plugin-api/.temp/uni-document/utssdk/interface.uts +0 -76
  158. package/types/uni/uts-plugin-api/.temp/uni-event/utssdk/interface.uts +0 -338
  159. package/types/uni/uts-plugin-api/.temp/uni-exit/utssdk/interface.uts +0 -102
  160. package/types/uni/uts-plugin-api/.temp/uni-file/utssdk/interface.uts +0 -384
  161. package/types/uni/uts-plugin-api/.temp/uni-fileSystemManager/utssdk/interface.uts +0 -5316
  162. package/types/uni/uts-plugin-api/.temp/uni-getAccessibilityInfo/utssdk/interface.uts +0 -35
  163. package/types/uni/uts-plugin-api/.temp/uni-getAppAuthorizeSetting/utssdk/interface.uts +0 -616
  164. package/types/uni/uts-plugin-api/.temp/uni-getAppBaseInfo/utssdk/interface.uts +0 -2157
  165. package/types/uni/uts-plugin-api/.temp/uni-getBackgroundAudioManager/utssdk/interface.uts +0 -895
  166. package/types/uni/uts-plugin-api/.temp/uni-getDeviceInfo/utssdk/interface.uts +0 -1755
  167. package/types/uni/uts-plugin-api/.temp/uni-getElementById/utssdk/interface.uts +0 -82
  168. package/types/uni/uts-plugin-api/.temp/uni-getEnterOptionsSync/utssdk/interface.uts +0 -295
  169. package/types/uni/uts-plugin-api/.temp/uni-getLaunchOptionsSync/utssdk/interface.uts +0 -299
  170. package/types/uni/uts-plugin-api/.temp/uni-getLocation/utssdk/interface.uts +0 -1764
  171. package/types/uni/uts-plugin-api/.temp/uni-getLocation-system/utssdk/interface.uts +0 -1
  172. package/types/uni/uts-plugin-api/.temp/uni-getLocation-tencent/utssdk/interface.uts +0 -1
  173. package/types/uni/uts-plugin-api/.temp/uni-getLocation-tencent-uni1/utssdk/interface.uts +0 -736
  174. package/types/uni/uts-plugin-api/.temp/uni-getNetworkType/utssdk/interface.uts +0 -274
  175. package/types/uni/uts-plugin-api/.temp/uni-getPerformance/utssdk/interface.uts +0 -198
  176. package/types/uni/uts-plugin-api/.temp/uni-getProvider/utssdk/interface.uts +0 -634
  177. package/types/uni/uts-plugin-api/.temp/uni-getRecorderManager/utssdk/interface.uts +0 -980
  178. package/types/uni/uts-plugin-api/.temp/uni-getSystemInfo/utssdk/interface.uts +0 -5550
  179. package/types/uni/uts-plugin-api/.temp/uni-getSystemSetting/utssdk/interface.uts +0 -501
  180. package/types/uni/uts-plugin-api/.temp/uni-installApk/utssdk/interface.uts +0 -83
  181. package/types/uni/uts-plugin-api/.temp/uni-interceptor/utssdk/interface.uts +0 -169
  182. package/types/uni/uts-plugin-api/.temp/uni-keyboard/utssdk/interface.uts +0 -102
  183. package/types/uni/uts-plugin-api/.temp/uni-loadFontFace/utssdk/interface.uts +0 -580
  184. package/types/uni/uts-plugin-api/.temp/uni-makePhoneCall/utssdk/interface.uts +0 -100
  185. package/types/uni/uts-plugin-api/.temp/uni-media/utssdk/interface.uts +0 -2980
  186. package/types/uni/uts-plugin-api/.temp/uni-modal/utssdk/interface.uts +0 -190
  187. package/types/uni/uts-plugin-api/.temp/uni-navigationBar/utssdk/interface.uts +0 -1002
  188. package/types/uni/uts-plugin-api/.temp/uni-network/utssdk/interface.uts +0 -3620
  189. package/types/uni/uts-plugin-api/.temp/uni-oauth/utssdk/interface.uts +0 -1592
  190. package/types/uni/uts-plugin-api/.temp/uni-oauth-huawei/utssdk/interface.uts +0 -1
  191. package/types/uni/uts-plugin-api/.temp/uni-openAppAuthorizeSetting/utssdk/interface.uts +0 -254
  192. package/types/uni/uts-plugin-api/.temp/uni-openDocument/utssdk/interface.uts +0 -112
  193. package/types/uni/uts-plugin-api/.temp/uni-pageScrollTo/utssdk/interface.uts +0 -153
  194. package/types/uni/uts-plugin-api/.temp/uni-payment/utssdk/interface.uts +0 -833
  195. package/types/uni/uts-plugin-api/.temp/uni-payment-alipay/utssdk/interface.uts +0 -1
  196. package/types/uni/uts-plugin-api/.temp/uni-payment-huawei/utssdk/interface.uts +0 -1
  197. package/types/uni/uts-plugin-api/.temp/uni-payment-wxpay/utssdk/interface.uts +0 -3
  198. package/types/uni/uts-plugin-api/.temp/uni-previewImage/utssdk/interface.uts +0 -518
  199. package/types/uni/uts-plugin-api/.temp/uni-privacy/utssdk/interface.uts +0 -560
  200. package/types/uni/uts-plugin-api/.temp/uni-prompt/utssdk/interface.uts +0 -2607
  201. package/types/uni/uts-plugin-api/.temp/uni-pullDownRefresh/utssdk/interface.uts +0 -189
  202. package/types/uni/uts-plugin-api/.temp/uni-requestMerchantTransfer/utssdk/interface.uts +0 -710
  203. package/types/uni/uts-plugin-api/.temp/uni-route/utssdk/interface.uts +0 -2695
  204. package/types/uni/uts-plugin-api/.temp/uni-rpx2px/utssdk/interface.uts +0 -80
  205. package/types/uni/uts-plugin-api/.temp/uni-scanCode/utssdk/interface.uts +0 -130
  206. package/types/uni/uts-plugin-api/.temp/uni-shareWithSystem/utssdk/interface.uts +0 -719
  207. package/types/uni/uts-plugin-api/.temp/uni-sse/utssdk/interface.uts +0 -277
  208. package/types/uni/uts-plugin-api/.temp/uni-storage/utssdk/interface.uts +0 -1020
  209. package/types/uni/uts-plugin-api/.temp/uni-tabBar/utssdk/interface.uts +0 -1148
  210. package/types/uni/uts-plugin-api/.temp/uni-theme/utssdk/interface.uts +0 -1059
  211. package/types/uni/uts-plugin-api/.temp/uni-virtualPayment/utssdk/interface.uts +0 -1660
  212. package/types/uni/uts-plugin-api/.temp/uni-websocket/utssdk/interface.uts +0 -1941
  213. package/types/uni/uts-plugin-biz/.temp/uni-ad/utssdk/interface.uts +0 -726
  214. package/types/uni/uts-plugin-biz/.temp/uni-crash/utssdk/interface.uts +0 -89
  215. package/types/uni/uts-plugin-biz/.temp/uni-facialRecognitionVerify/utssdk/interface.uts +0 -212
  216. package/types/uni/uts-plugin-biz/.temp/uni-map-tencent/utssdk/interface.uts +0 -2359
  217. package/types/uni/uts-plugin-biz/.temp/uni-push/utssdk/interface.uts +0 -960
  218. package/types/uni/uts-plugin-biz/.temp/uni-secure-network/utssdk/interface.uts +0 -204
  219. package/types/uni/uts-plugin-biz/.temp/uni-verify/utssdk/interface.uts +0 -730
  220. package/types/uni/uts-plugin-component/.temp/uni-camera/utssdk/interface.uts +0 -221
  221. package/types/uni/uts-plugin-component/.temp/uni-video/utssdk/interface.uts +0 -935
  222. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/global.d.ts +0 -14
  223. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/index.d.ts +0 -1
  224. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +0 -1670
@@ -1,1941 +0,0 @@
1
- export interface Uni {
2
- /**
3
- * 创建一个 WebSocket 连接。
4
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#connectsocket
5
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#connectsocket
6
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#connectsocket
7
- * @uniPlatform
8
- {
9
- "app": {
10
- "android": {
11
- "osVer": "4.4",
12
- "uniVer": "√",
13
- "uniUtsPlugin": "3.91",
14
- "unixVer": "3.91",
15
- "unixUtsPlugin": "3.91"
16
- },
17
- "ios": {
18
- "osVer": "12.0",
19
- "uniVer": "√",
20
- "uniUtsPlugin": "4.11",
21
- "unixVer": "4.11",
22
- "unixUtsPlugin": "4.11"
23
- },
24
- "harmony": {
25
- "osVer": "3.0",
26
- "uniVer": "4.23",
27
- "unixVer": "4.61"
28
- }
29
- },
30
- "mp": {
31
- "weixin": {
32
- "hostVer": "√",
33
- "uniVer": "√",
34
- "unixVer": "4.41"
35
- },
36
- "alipay": {
37
- "hostVer": "√",
38
- "uniVer": "√",
39
- "unixVer": "x"
40
- },
41
- "baidu": {
42
- "hostVer": "√",
43
- "uniVer": "√",
44
- "unixVer": "x"
45
- },
46
- "toutiao": {
47
- "hostVer": "√",
48
- "uniVer": "√",
49
- "unixVer": "x"
50
- },
51
- "lark": {
52
- "hostVer": "√",
53
- "uniVer": "√",
54
- "unixVer": "x"
55
- },
56
- "qq": {
57
- "hostVer": "√",
58
- "uniVer": "√",
59
- "unixVer": "x"
60
- },
61
- "kuaishou": {
62
- "hostVer": "√",
63
- "uniVer": "√",
64
- "unixVer": "x"
65
- },
66
- "jd": {
67
- "hostVer": "√",
68
- "uniVer": "√",
69
- "unixVer": "x"
70
- }
71
- },
72
- "web": {
73
- "uniVer": "√",
74
- "unixVer": "4.0"
75
- }
76
- }
77
- * @example
78
- ```typescript
79
- uni.connectSocket({
80
- url: "ws://192.168.12.106:8080/ws",
81
- complete: (e) => {
82
- console.log("socket :", e);
83
- }
84
- });
85
- ```
86
- */
87
- connectSocket(options: ConnectSocketOptions): SocketTask;
88
-
89
- /**
90
- * @description
91
- * 监听WebSocket连接打开事件。
92
- * @deprecated 已废弃,使用 SocketTask 的 onOpen 替换。
93
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketopen
94
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketopen
95
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketopen
96
- * @uniPlatform
97
- {
98
- "app": {
99
- "android": {
100
- "osVer": "4.4",
101
- "uniVer": "√",
102
- "uniUtsPlugin": "3.91",
103
- "unixVer": "3.91",
104
- "unixUtsPlugin": "3.91"
105
- },
106
- "ios": {
107
- "osVer": "12.0",
108
- "uniVer": "√",
109
- "uniUtsPlugin": "4.11",
110
- "unixVer": "4.11",
111
- "unixUtsPlugin": "4.11"
112
- },
113
- "harmony": {
114
- "osVer": "3.0",
115
- "uniVer": "4.23",
116
- "unixVer": "4.61"
117
- }
118
- },
119
- "mp": {
120
- "weixin": {
121
- "hostVer": "√",
122
- "uniVer": "√",
123
- "unixVer": "4.41"
124
- },
125
- "alipay": {
126
- "hostVer": "√",
127
- "uniVer": "√",
128
- "unixVer": "x"
129
- },
130
- "baidu": {
131
- "hostVer": "√",
132
- "uniVer": "√",
133
- "unixVer": "x"
134
- },
135
- "toutiao": {
136
- "hostVer": "√",
137
- "uniVer": "√",
138
- "unixVer": "x"
139
- },
140
- "lark": {
141
- "hostVer": "√",
142
- "uniVer": "√",
143
- "unixVer": "x"
144
- },
145
- "qq": {
146
- "hostVer": "√",
147
- "uniVer": "√",
148
- "unixVer": "x"
149
- },
150
- "kuaishou": {
151
- "hostVer": "√",
152
- "uniVer": "√",
153
- "unixVer": "x"
154
- },
155
- "jd": {
156
- "hostVer": "√",
157
- "uniVer": "√",
158
- "unixVer": "x"
159
- }
160
- },
161
- "web": {
162
- "uniVer": "√",
163
- "unixVer": "4.0"
164
- }
165
- }
166
- * @example
167
- ```typescript
168
- uni.onSocketOpen(function (res) {
169
- console.log('WebSocket连接已打开!');
170
- });
171
- ```
172
- */
173
- onSocketOpen(options: OnSocketOpenCallback): void;
174
-
175
- /**
176
- * 监听WebSocket错误。
177
- * @deprecated 已废弃,使用 SocketTask 的 onError 替换。
178
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketerror
179
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketerror
180
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketerror
181
- * @uniPlatform
182
- {
183
- "app": {
184
- "android": {
185
- "osVer": "4.4",
186
- "uniVer": "√",
187
- "uniUtsPlugin": "3.91",
188
- "unixVer": "3.91",
189
- "unixUtsPlugin": "3.91"
190
- },
191
- "ios": {
192
- "osVer": "12.0",
193
- "uniVer": "√",
194
- "uniUtsPlugin": "4.11",
195
- "unixVer": "4.11",
196
- "unixUtsPlugin": "4.11"
197
- },
198
- "harmony": {
199
- "osVer": "3.0",
200
- "uniVer": "4.23",
201
- "unixVer": "4.61"
202
- }
203
- },
204
- "mp": {
205
- "weixin": {
206
- "hostVer": "√",
207
- "uniVer": "√",
208
- "unixVer": "4.41"
209
- },
210
- "alipay": {
211
- "hostVer": "√",
212
- "uniVer": "√",
213
- "unixVer": "x"
214
- },
215
- "baidu": {
216
- "hostVer": "√",
217
- "uniVer": "√",
218
- "unixVer": "x"
219
- },
220
- "toutiao": {
221
- "hostVer": "√",
222
- "uniVer": "√",
223
- "unixVer": "x"
224
- },
225
- "lark": {
226
- "hostVer": "√",
227
- "uniVer": "√",
228
- "unixVer": "x"
229
- },
230
- "qq": {
231
- "hostVer": "√",
232
- "uniVer": "√",
233
- "unixVer": "x"
234
- },
235
- "kuaishou": {
236
- "hostVer": "√",
237
- "uniVer": "√",
238
- "unixVer": "x"
239
- },
240
- "jd": {
241
- "hostVer": "√",
242
- "uniVer": "√",
243
- "unixVer": "x"
244
- }
245
- },
246
- "web": {
247
- "uniVer": "√",
248
- "unixVer": "4.0"
249
- }
250
- }
251
- * @example
252
- ```typescript
253
- uni.onSocketError(function (res) {
254
- console.log('WebSocket连接打开失败,请检查!');
255
- });
256
- ```
257
- */
258
- onSocketError(callback: OnSocketErrorCallback): void;
259
-
260
- /**
261
- * 通过 WebSocket 连接发送数据,需要先 uni.connectSocket,并在 uni.onSocketOpen 回调之后才能发送。
262
- * @deprecated 已废弃,使用 SocketTask 的 send 替换。
263
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#sendsocketmessage
264
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#sendsocketmessage
265
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#sendsocketmessage
266
- * @uniPlatform
267
- {
268
- "app": {
269
- "android": {
270
- "osVer": "4.4",
271
- "uniVer": "√",
272
- "uniUtsPlugin": "3.91",
273
- "unixVer": "3.91",
274
- "unixUtsPlugin": "3.91"
275
- },
276
- "ios": {
277
- "osVer": "12.0",
278
- "uniVer": "√",
279
- "uniUtsPlugin": "4.11",
280
- "unixVer": "4.11",
281
- "unixUtsPlugin": "4.11"
282
- },
283
- "harmony": {
284
- "osVer": "3.0",
285
- "uniVer": "4.23",
286
- "unixVer": "4.61"
287
- }
288
- },
289
- "mp": {
290
- "weixin": {
291
- "hostVer": "√",
292
- "uniVer": "√",
293
- "unixVer": "4.41"
294
- },
295
- "alipay": {
296
- "hostVer": "√",
297
- "uniVer": "√",
298
- "unixVer": "x"
299
- },
300
- "baidu": {
301
- "hostVer": "√",
302
- "uniVer": "√",
303
- "unixVer": "x"
304
- },
305
- "toutiao": {
306
- "hostVer": "√",
307
- "uniVer": "√",
308
- "unixVer": "x"
309
- },
310
- "lark": {
311
- "hostVer": "√",
312
- "uniVer": "√",
313
- "unixVer": "x"
314
- },
315
- "qq": {
316
- "hostVer": "√",
317
- "uniVer": "√",
318
- "unixVer": "x"
319
- },
320
- "kuaishou": {
321
- "hostVer": "√",
322
- "uniVer": "√",
323
- "unixVer": "x"
324
- },
325
- "jd": {
326
- "hostVer": "√",
327
- "uniVer": "√",
328
- "unixVer": "x"
329
- }
330
- },
331
- "web": {
332
- "uniVer": "√",
333
- "unixVer": "4.0"
334
- }
335
- }
336
- * @example
337
- ```typescript
338
- uni.sendSocketMessage({
339
- data: msg
340
- });
341
- ```
342
- */
343
- sendSocketMessage(options: SendSocketMessageOptions): void;
344
-
345
- /**
346
- * 监听WebSocket接受到服务器的消息事件。
347
- * @deprecated 已废弃,使用 SocketTask 的 onMessage 替换。
348
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketmessage
349
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketmessage
350
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketmessage
351
- * @uniPlatform
352
- {
353
- "app": {
354
- "android": {
355
- "osVer": "4.4",
356
- "uniVer": "√",
357
- "uniUtsPlugin": "3.91",
358
- "unixVer": "3.91",
359
- "unixUtsPlugin": "3.91"
360
- },
361
- "ios": {
362
- "osVer": "12.0",
363
- "uniVer": "√",
364
- "uniUtsPlugin": "4.11",
365
- "unixVer": "4.11",
366
- "unixUtsPlugin": "4.11"
367
- },
368
- "harmony": {
369
- "osVer": "3.0",
370
- "uniVer": "4.23",
371
- "unixVer": "4.61"
372
- }
373
- },
374
- "mp": {
375
- "weixin": {
376
- "hostVer": "√",
377
- "uniVer": "√",
378
- "unixVer": "4.41"
379
- },
380
- "alipay": {
381
- "hostVer": "√",
382
- "uniVer": "√",
383
- "unixVer": "x"
384
- },
385
- "baidu": {
386
- "hostVer": "√",
387
- "uniVer": "√",
388
- "unixVer": "x"
389
- },
390
- "toutiao": {
391
- "hostVer": "√",
392
- "uniVer": "√",
393
- "unixVer": "x"
394
- },
395
- "lark": {
396
- "hostVer": "√",
397
- "uniVer": "√",
398
- "unixVer": "x"
399
- },
400
- "qq": {
401
- "hostVer": "√",
402
- "uniVer": "√",
403
- "unixVer": "x"
404
- },
405
- "kuaishou": {
406
- "hostVer": "√",
407
- "uniVer": "√",
408
- "unixVer": "x"
409
- },
410
- "jd": {
411
- "hostVer": "√",
412
- "uniVer": "√",
413
- "unixVer": "x"
414
- }
415
- },
416
- "web": {
417
- "uniVer": "√",
418
- "unixVer": "4.0"
419
- }
420
- }
421
- * @example
422
- ```typescript
423
- uni.onSocketMessage(function (res) {
424
- console.log('收到服务器内容:' + res.data);
425
- });
426
- ```
427
- */
428
- onSocketMessage(callback: OnSocketMessageCallback): void;
429
-
430
- /**
431
- * 关闭 WebSocket 连接。
432
- * @deprecated 已废弃,使用 SocketTask 的 close 替换。
433
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#closesocket
434
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#closesocket
435
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#closesocket
436
- * @uniPlatform
437
- {
438
- "app": {
439
- "android": {
440
- "osVer": "4.4",
441
- "uniVer": "√",
442
- "uniUtsPlugin": "3.91",
443
- "unixVer": "3.91",
444
- "unixUtsPlugin": "3.91"
445
- },
446
- "ios": {
447
- "osVer": "12.0",
448
- "uniVer": "√",
449
- "uniUtsPlugin": "4.11",
450
- "unixVer": "4.11",
451
- "unixUtsPlugin": "4.11"
452
- },
453
- "harmony": {
454
- "osVer": "3.0",
455
- "uniVer": "4.23",
456
- "unixVer": "4.61"
457
- }
458
- },
459
- "mp": {
460
- "weixin": {
461
- "hostVer": "√",
462
- "uniVer": "√",
463
- "unixVer": "4.41"
464
- },
465
- "alipay": {
466
- "hostVer": "√",
467
- "uniVer": "√",
468
- "unixVer": "x"
469
- },
470
- "baidu": {
471
- "hostVer": "√",
472
- "uniVer": "√",
473
- "unixVer": "x"
474
- },
475
- "toutiao": {
476
- "hostVer": "√",
477
- "uniVer": "√",
478
- "unixVer": "x"
479
- },
480
- "lark": {
481
- "hostVer": "√",
482
- "uniVer": "√",
483
- "unixVer": "x"
484
- },
485
- "qq": {
486
- "hostVer": "√",
487
- "uniVer": "√",
488
- "unixVer": "x"
489
- },
490
- "kuaishou": {
491
- "hostVer": "√",
492
- "uniVer": "√",
493
- "unixVer": "x"
494
- },
495
- "jd": {
496
- "hostVer": "√",
497
- "uniVer": "√",
498
- "unixVer": "x"
499
- }
500
- },
501
- "web": {
502
- "uniVer": "√",
503
- "unixVer": "4.0"
504
- }
505
- }
506
- * @example
507
- ```typescript
508
- uni.closeSocket();
509
- ```
510
- */
511
- closeSocket(options: CloseSocketOptions): void;
512
-
513
- /**
514
- * 监听WebSocket关闭。
515
- * @deprecated 已废弃,使用 SocketTask 的 onClose 替换。
516
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketclose
517
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketclose
518
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketclose
519
- * @uniPlatform
520
- {
521
- "app": {
522
- "android": {
523
- "osVer": "4.4",
524
- "uniVer": "√",
525
- "uniUtsPlugin": "3.91",
526
- "unixVer": "3.91",
527
- "unixUtsPlugin": "3.91"
528
- },
529
- "ios": {
530
- "osVer": "12.0",
531
- "uniVer": "√",
532
- "uniUtsPlugin": "4.11",
533
- "unixVer": "4.11",
534
- "unixUtsPlugin": "4.11"
535
- },
536
- "harmony": {
537
- "osVer": "3.0",
538
- "uniVer": "4.23",
539
- "unixVer": "4.61"
540
- }
541
- },
542
- "mp": {
543
- "weixin": {
544
- "hostVer": "√",
545
- "uniVer": "√",
546
- "unixVer": "4.41"
547
- },
548
- "alipay": {
549
- "hostVer": "√",
550
- "uniVer": "√",
551
- "unixVer": "x"
552
- },
553
- "baidu": {
554
- "hostVer": "√",
555
- "uniVer": "√",
556
- "unixVer": "x"
557
- },
558
- "toutiao": {
559
- "hostVer": "√",
560
- "uniVer": "√",
561
- "unixVer": "x"
562
- },
563
- "lark": {
564
- "hostVer": "√",
565
- "uniVer": "√",
566
- "unixVer": "x"
567
- },
568
- "qq": {
569
- "hostVer": "√",
570
- "uniVer": "√",
571
- "unixVer": "x"
572
- },
573
- "kuaishou": {
574
- "hostVer": "√",
575
- "uniVer": "√",
576
- "unixVer": "x"
577
- },
578
- "jd": {
579
- "hostVer": "√",
580
- "uniVer": "√",
581
- "unixVer": "x"
582
- }
583
- },
584
- "web": {
585
- "uniVer": "√",
586
- "unixVer": "4.0"
587
- }
588
- }
589
- * @example
590
- ```typescript
591
- uni.onSocketClose(function (res) {
592
- console.log('WebSocket 已关闭!');
593
- });
594
- ```
595
- */
596
- onSocketClose(callback: OnSocketCloseCallback): void;
597
- }
598
-
599
- export type ConnectSocket = (options: ConnectSocketOptions) => SocketTask;
600
- export type ConnectSocketSuccess = {
601
- errMsg: string
602
- };
603
- type ConnectSocketSuccessCallback = (result: ConnectSocketSuccess) => void;
604
- /**
605
- * 错误码
606
- * - 600009 URL格式不合法
607
- */
608
- export type ConnectSocketErrorCode = 600009;
609
-
610
- /**
611
- * 连接调用失败的错误回调参数
612
- */
613
- export interface ConnectSocketFail extends IUniError {
614
- errCode: ConnectSocketErrorCode;
615
- };
616
-
617
- type ConnectSocketFailCallback = (result: ConnectSocketFail) => void;
618
- type ConnectSocketComplete = any;
619
- type ConnectSocketCompleteCallback = (result: ConnectSocketComplete) => void;
620
- export type ConnectSocketOptions = {
621
- /**
622
- * 开发者服务器接口地址
623
- * @uniPlatform
624
- {
625
- "app": {
626
- "android": {
627
- "osVer": "4.4",
628
- "uniVer": "√",
629
- "uniUtsPlugin": "3.91",
630
- "unixVer": "3.91",
631
- "unixUtsPlugin": "3.91"
632
- },
633
- "ios": {
634
- "osVer": "12.0",
635
- "uniVer": "√",
636
- "uniUtsPlugin": "4.11",
637
- "unixVer": "4.11",
638
- "unixUtsPlugin": "4.11"
639
- },
640
- "harmony": {
641
- "osVer": "3.0",
642
- "uniVer": "4.23",
643
- "unixVer": "4.61"
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
- }
689
- */
690
- url: string,
691
-
692
- /**
693
- * HTTP 请求 Header,header 中不能设置 Referer
694
- * @defaultValue null
695
- * @uniPlatform
696
- {
697
- "app": {
698
- "android": {
699
- "osVer": "4.4",
700
- "uniVer": "√",
701
- "uniUtsPlugin": "3.91",
702
- "unixVer": "3.91",
703
- "unixUtsPlugin": "3.91"
704
- },
705
- "ios": {
706
- "osVer": "12.0",
707
- "uniVer": "√",
708
- "uniUtsPlugin": "4.11",
709
- "unixVer": "4.11",
710
- "unixUtsPlugin": "4.11"
711
- }
712
- },
713
- "mp": {
714
- "weixin": {
715
- "hostVer": "√",
716
- "uniVer": "√",
717
- "unixVer": "4.41"
718
- },
719
- "alipay": {
720
- "hostVer": "√",
721
- "uniVer": "√",
722
- "unixVer": "x"
723
- },
724
- "baidu": {
725
- "hostVer": "√",
726
- "uniVer": "√",
727
- "unixVer": "x"
728
- },
729
- "toutiao": {
730
- "hostVer": "√",
731
- "uniVer": "√",
732
- "unixVer": "x"
733
- },
734
- "lark": {
735
- "hostVer": "√",
736
- "uniVer": "√",
737
- "unixVer": "x"
738
- },
739
- "qq": {
740
- "hostVer": "√",
741
- "uniVer": "√",
742
- "unixVer": "x"
743
- },
744
- "kuaishou": {
745
- "hostVer": "√",
746
- "uniVer": "√",
747
- "unixVer": "x"
748
- },
749
- "jd": {
750
- "hostVer": "√",
751
- "uniVer": "√",
752
- "unixVer": "x"
753
- }
754
- }
755
- }
756
- */
757
- header?: UTSJSONObject | null,
758
-
759
- /**
760
- * 子协议数组
761
- * @defaultValue null
762
- * @uniPlatform
763
- {
764
- "app": {
765
- "android": {
766
- "osVer": "4.4",
767
- "uniVer": "√",
768
- "uniUtsPlugin": "3.91",
769
- "unixVer": "3.91",
770
- "unixUtsPlugin": "3.91"
771
- },
772
- "ios": {
773
- "osVer": "12.0",
774
- "uniVer": "√",
775
- "uniUtsPlugin": "4.11",
776
- "unixVer": "4.11",
777
- "unixUtsPlugin": "4.11"
778
- }
779
- },
780
- "mp": {
781
- "weixin": {
782
- "hostVer": "√",
783
- "uniVer": "√",
784
- "unixVer": "4.41"
785
- },
786
- "alipay": {
787
- "hostVer": "√",
788
- "uniVer": "√",
789
- "unixVer": "x"
790
- },
791
- "baidu": {
792
- "hostVer": "√",
793
- "uniVer": "√",
794
- "unixVer": "x"
795
- },
796
- "toutiao": {
797
- "hostVer": "√",
798
- "uniVer": "√",
799
- "unixVer": "x"
800
- },
801
- "lark": {
802
- "hostVer": "√",
803
- "uniVer": "√",
804
- "unixVer": "x"
805
- },
806
- "qq": {
807
- "hostVer": "√",
808
- "uniVer": "√",
809
- "unixVer": "x"
810
- },
811
- "kuaishou": {
812
- "hostVer": "√",
813
- "uniVer": "√",
814
- "unixVer": "x"
815
- },
816
- "jd": {
817
- "hostVer": "√",
818
- "uniVer": "√",
819
- "unixVer": "x"
820
- }
821
- }
822
- }
823
- */
824
- protocols?: (string[]) | null,
825
-
826
- /**
827
- * 接口调用成功的回调函数
828
- * @defaultValue null
829
- */
830
- success?: ConnectSocketSuccessCallback | null,
831
-
832
- /**
833
- * 接口调用失败的回调函数
834
- * @defaultValue null
835
- */
836
- fail?: ConnectSocketFailCallback | null,
837
-
838
- /**
839
- * 接口调用结束的回调函数(调用成功、失败都会执行)
840
- * @defaultValue null
841
- */
842
- complete?: ConnectSocketCompleteCallback | null
843
- };
844
-
845
- export type GeneralCallbackResult = {
846
- /**
847
- * 错误信息
848
- */
849
- errMsg: string
850
- };
851
-
852
- /**
853
- * 错误码
854
- */
855
- export type SendSocketMessageErrorCode =
856
- /**
857
- * 发送数据超限,发送队列不能超过16M大小。
858
- */
859
- 10001 |
860
- /**
861
- * websocket未连接
862
- */
863
- 10002 |
864
- /**
865
- * websocket系统错误
866
- */
867
- 602001;
868
-
869
- /**
870
- * 发送失败的错误回调参数
871
- */
872
- export interface SendSocketMessageFail extends IUniError {
873
- errCode: SendSocketMessageErrorCode;
874
- };
875
- export type SendSocketMessageOptions = {
876
- /**
877
- * 需要发送的内容
878
- * @type string | ArrayBuffer
879
- * @type {SocketDataOptions}
880
- * @uniPlatform
881
- {
882
- "app": {
883
- "android": {
884
- "osVer": "4.4",
885
- "uniVer": "√",
886
- "uniUtsPlugin": "3.91",
887
- "unixVer": "3.91",
888
- "unixUtsPlugin": "3.91"
889
- },
890
- "ios": {
891
- "osVer": "12.0",
892
- "uniVer": "√",
893
- "uniUtsPlugin": "4.11",
894
- "unixVer": "4.11",
895
- "unixUtsPlugin": "4.11"
896
- },
897
- "harmony": {
898
- "osVer": "3.0",
899
- "uniVer": "4.23",
900
- "unixVer": "4.61"
901
- }
902
- },
903
- "mp": {
904
- "weixin": {
905
- "hostVer": "√",
906
- "uniVer": "√",
907
- "unixVer": "4.41"
908
- },
909
- "alipay": {
910
- "hostVer": "√",
911
- "uniVer": "√",
912
- "unixVer": "x"
913
- },
914
- "baidu": {
915
- "hostVer": "√",
916
- "uniVer": "√",
917
- "unixVer": "x"
918
- },
919
- "toutiao": {
920
- "hostVer": "√",
921
- "uniVer": "√",
922
- "unixVer": "x"
923
- },
924
- "lark": {
925
- "hostVer": "√",
926
- "uniVer": "√",
927
- "unixVer": "x"
928
- },
929
- "qq": {
930
- "hostVer": "√",
931
- "uniVer": "√",
932
- "unixVer": "x"
933
- },
934
- "kuaishou": {
935
- "hostVer": "√",
936
- "uniVer": "√",
937
- "unixVer": "x"
938
- },
939
- "jd": {
940
- "hostVer": "√",
941
- "uniVer": "√",
942
- "unixVer": "x"
943
- }
944
- }
945
- }
946
- */
947
- data: any,
948
-
949
- /**
950
- * 接口调用成功的回调函数
951
- * @defaultValue null
952
- */
953
- success?: ((result: GeneralCallbackResult) => void) | null,
954
-
955
- /**
956
- * 接口调用失败的回调函数
957
- * @defaultValue null
958
- */
959
- fail?: ((result: SendSocketMessageFail) => void) | null,
960
-
961
- /**
962
- * 接口调用结束的回调函数(调用成功、失败都会执行)
963
- * @defaultValue null
964
- */
965
- complete?: ((result: any) => void) | null
966
- };
967
-
968
- export type CloseSocketOptions = {
969
- /**
970
- * 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。如果这个参数没有被指定,默认的取值是1000 (表示正常连接关闭)
971
- * @defaultValue 1000
972
- * @uniPlatform
973
- {
974
- "app": {
975
- "android": {
976
- "osVer": "4.4",
977
- "uniVer": "√",
978
- "uniUtsPlugin": "3.91",
979
- "unixVer": "3.91",
980
- "unixUtsPlugin": "3.91"
981
- },
982
- "ios": {
983
- "osVer": "12.0",
984
- "uniVer": "√",
985
- "uniUtsPlugin": "4.11",
986
- "unixVer": "4.11",
987
- "unixUtsPlugin": "4.11"
988
- },
989
- "harmony": {
990
- "osVer": "3.0",
991
- "uniVer": "4.23",
992
- "unixVer": "4.61"
993
- }
994
- },
995
- "mp": {
996
- "weixin": {
997
- "hostVer": "√",
998
- "uniVer": "√",
999
- "unixVer": "4.41"
1000
- },
1001
- "alipay": {
1002
- "hostVer": "√",
1003
- "uniVer": "√",
1004
- "unixVer": "x"
1005
- },
1006
- "baidu": {
1007
- "hostVer": "√",
1008
- "uniVer": "√",
1009
- "unixVer": "x"
1010
- },
1011
- "toutiao": {
1012
- "hostVer": "√",
1013
- "uniVer": "√",
1014
- "unixVer": "x"
1015
- },
1016
- "lark": {
1017
- "hostVer": "√",
1018
- "uniVer": "√",
1019
- "unixVer": "x"
1020
- },
1021
- "qq": {
1022
- "hostVer": "√",
1023
- "uniVer": "√",
1024
- "unixVer": "x"
1025
- },
1026
- "kuaishou": {
1027
- "hostVer": "√",
1028
- "uniVer": "√",
1029
- "unixVer": "x"
1030
- },
1031
- "jd": {
1032
- "hostVer": "√",
1033
- "uniVer": "√",
1034
- "unixVer": "x"
1035
- }
1036
- }
1037
- }
1038
- */
1039
- code?: number | null,
1040
-
1041
- /**
1042
- * 一个可读的字符串,表示连接被关闭的原因。这个字符串必须是不长于123字节的UTF-8 文本(不是字符)
1043
- * @defaultValue ""
1044
- * @uniPlatform
1045
- {
1046
- "app": {
1047
- "android": {
1048
- "osVer": "4.4",
1049
- "uniVer": "√",
1050
- "uniUtsPlugin": "3.91",
1051
- "unixVer": "3.91",
1052
- "unixUtsPlugin": "3.91"
1053
- },
1054
- "ios": {
1055
- "osVer": "12.0",
1056
- "uniVer": "√",
1057
- "uniUtsPlugin": "4.11",
1058
- "unixVer": "4.11",
1059
- "unixUtsPlugin": "4.11"
1060
- },
1061
- "harmony": {
1062
- "osVer": "3.0",
1063
- "uniVer": "4.23",
1064
- "unixVer": "4.61"
1065
- }
1066
- },
1067
- "mp": {
1068
- "weixin": {
1069
- "hostVer": "√",
1070
- "uniVer": "√",
1071
- "unixVer": "4.41"
1072
- },
1073
- "alipay": {
1074
- "hostVer": "√",
1075
- "uniVer": "√",
1076
- "unixVer": "x"
1077
- },
1078
- "baidu": {
1079
- "hostVer": "√",
1080
- "uniVer": "√",
1081
- "unixVer": "x"
1082
- },
1083
- "toutiao": {
1084
- "hostVer": "√",
1085
- "uniVer": "√",
1086
- "unixVer": "x"
1087
- },
1088
- "lark": {
1089
- "hostVer": "√",
1090
- "uniVer": "√",
1091
- "unixVer": "x"
1092
- },
1093
- "qq": {
1094
- "hostVer": "√",
1095
- "uniVer": "√",
1096
- "unixVer": "x"
1097
- },
1098
- "kuaishou": {
1099
- "hostVer": "√",
1100
- "uniVer": "√",
1101
- "unixVer": "x"
1102
- },
1103
- "jd": {
1104
- "hostVer": "√",
1105
- "uniVer": "√",
1106
- "unixVer": "x"
1107
- }
1108
- }
1109
- }
1110
- */
1111
- reason?: string | null,
1112
-
1113
- /**
1114
- * 接口调用成功的回调函数
1115
- * @defaultValue null
1116
- */
1117
- success?: ((result: GeneralCallbackResult) => void) | null,
1118
-
1119
- /**
1120
- * 接口调用失败的回调函数
1121
- * @defaultValue null
1122
- */
1123
- fail?: ((result: GeneralCallbackResult) => void) | null,
1124
-
1125
- /**
1126
- * 接口调用结束的回调函数(调用成功、失败都会执行)
1127
- * @defaultValue null
1128
- */
1129
- complete?: ((result: GeneralCallbackResult) => void) | null
1130
- };
1131
-
1132
- export type OnSocketOpenCallbackResult = {
1133
- /**
1134
- * 连接成功的 HTTP 响应 Header
1135
- * @uniPlatform
1136
- {
1137
- "app": {
1138
- "android": {
1139
- "osVer": "4.4",
1140
- "uniVer": "√",
1141
- "uniUtsPlugin": "3.91",
1142
- "unixVer": "3.91",
1143
- "unixUtsPlugin": "3.91"
1144
- },
1145
- "ios": {
1146
- "osVer": "12.0",
1147
- "uniVer": "√",
1148
- "uniUtsPlugin": "4.11",
1149
- "unixVer": "4.11",
1150
- "unixUtsPlugin": "4.11"
1151
- },
1152
- "harmony": {
1153
- "osVer": "3.0",
1154
- "uniVer": "4.23",
1155
- "unixVer": "4.61"
1156
- }
1157
- },
1158
- "mp": {
1159
- "weixin": {
1160
- "hostVer": "√",
1161
- "uniVer": "√",
1162
- "unixVer": "4.41"
1163
- },
1164
- "alipay": {
1165
- "hostVer": "√",
1166
- "uniVer": "√",
1167
- "unixVer": "x"
1168
- },
1169
- "baidu": {
1170
- "hostVer": "√",
1171
- "uniVer": "√",
1172
- "unixVer": "x"
1173
- },
1174
- "toutiao": {
1175
- "hostVer": "√",
1176
- "uniVer": "√",
1177
- "unixVer": "x"
1178
- },
1179
- "lark": {
1180
- "hostVer": "√",
1181
- "uniVer": "√",
1182
- "unixVer": "x"
1183
- },
1184
- "qq": {
1185
- "hostVer": "√",
1186
- "uniVer": "√",
1187
- "unixVer": "x"
1188
- },
1189
- "kuaishou": {
1190
- "hostVer": "√",
1191
- "uniVer": "√",
1192
- "unixVer": "x"
1193
- },
1194
- "jd": {
1195
- "hostVer": "√",
1196
- "uniVer": "√",
1197
- "unixVer": "x"
1198
- }
1199
- }
1200
- }
1201
- */
1202
- header: any
1203
- };
1204
-
1205
- export type OnSocketMessageCallbackResult = {
1206
- /**
1207
- * 服务器返回的消息
1208
- * @type {SocketDataOptions}
1209
- * @uniPlatform
1210
- {
1211
- "app": {
1212
- "android": {
1213
- "osVer": "4.4",
1214
- "uniVer": "√",
1215
- "uniUtsPlugin": "3.91",
1216
- "unixVer": "3.91",
1217
- "unixUtsPlugin": "3.91"
1218
- },
1219
- "ios": {
1220
- "osVer": "12.0",
1221
- "uniVer": "√",
1222
- "uniUtsPlugin": "4.11",
1223
- "unixVer": "4.11",
1224
- "unixUtsPlugin": "4.11"
1225
- },
1226
- "harmony": {
1227
- "osVer": "3.0",
1228
- "uniVer": "4.23",
1229
- "unixVer": "4.61"
1230
- }
1231
- },
1232
- "mp": {
1233
- "weixin": {
1234
- "hostVer": "√",
1235
- "uniVer": "√",
1236
- "unixVer": "4.41"
1237
- },
1238
- "alipay": {
1239
- "hostVer": "√",
1240
- "uniVer": "√",
1241
- "unixVer": "x"
1242
- },
1243
- "baidu": {
1244
- "hostVer": "√",
1245
- "uniVer": "√",
1246
- "unixVer": "x"
1247
- },
1248
- "toutiao": {
1249
- "hostVer": "√",
1250
- "uniVer": "√",
1251
- "unixVer": "x"
1252
- },
1253
- "lark": {
1254
- "hostVer": "√",
1255
- "uniVer": "√",
1256
- "unixVer": "x"
1257
- },
1258
- "qq": {
1259
- "hostVer": "√",
1260
- "uniVer": "√",
1261
- "unixVer": "x"
1262
- },
1263
- "kuaishou": {
1264
- "hostVer": "√",
1265
- "uniVer": "√",
1266
- "unixVer": "x"
1267
- },
1268
- "jd": {
1269
- "hostVer": "√",
1270
- "uniVer": "√",
1271
- "unixVer": "x"
1272
- }
1273
- }
1274
- }
1275
- */
1276
- data: any
1277
- };
1278
-
1279
- export interface SocketTask {
1280
- /**
1281
- * 通过 WebSocket 连接发送数据
1282
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-send
1283
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#send
1284
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#send
1285
- * @uniPlatform
1286
- {
1287
- "app": {
1288
- "android": {
1289
- "osVer": "4.4",
1290
- "uniVer": "√",
1291
- "uniUtsPlugin": "3.91",
1292
- "unixVer": "3.91",
1293
- "unixUtsPlugin": "3.91"
1294
- },
1295
- "ios": {
1296
- "osVer": "12.0",
1297
- "uniVer": "√",
1298
- "uniUtsPlugin": "4.11",
1299
- "unixVer": "4.11",
1300
- "unixUtsPlugin": "4.11"
1301
- },
1302
- "harmony": {
1303
- "osVer": "3.0",
1304
- "uniVer": "4.23",
1305
- "unixVer": "4.61"
1306
- }
1307
- },
1308
- "mp": {
1309
- "weixin": {
1310
- "hostVer": "√",
1311
- "uniVer": "√",
1312
- "unixVer": "4.41"
1313
- },
1314
- "alipay": {
1315
- "hostVer": "√",
1316
- "uniVer": "√",
1317
- "unixVer": "x"
1318
- },
1319
- "baidu": {
1320
- "hostVer": "√",
1321
- "uniVer": "√",
1322
- "unixVer": "x"
1323
- },
1324
- "toutiao": {
1325
- "hostVer": "√",
1326
- "uniVer": "√",
1327
- "unixVer": "x"
1328
- },
1329
- "lark": {
1330
- "hostVer": "√",
1331
- "uniVer": "√",
1332
- "unixVer": "x"
1333
- },
1334
- "qq": {
1335
- "hostVer": "√",
1336
- "uniVer": "√",
1337
- "unixVer": "x"
1338
- },
1339
- "kuaishou": {
1340
- "hostVer": "√",
1341
- "uniVer": "√",
1342
- "unixVer": "x"
1343
- },
1344
- "jd": {
1345
- "hostVer": "√",
1346
- "uniVer": "√",
1347
- "unixVer": "x"
1348
- }
1349
- },
1350
- "web": {
1351
- "uniVer": "√",
1352
- "unixVer": "4.0"
1353
- }
1354
- }
1355
- * @example
1356
- ```typescript
1357
- task.send({data:"halo"});
1358
- ```
1359
- */
1360
- send(options: SendSocketMessageOptions): void;
1361
-
1362
- /**
1363
- * 关闭 WebSocket 连接
1364
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-close
1365
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#close
1366
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#close
1367
- * @uniPlatform
1368
- {
1369
- "app": {
1370
- "android": {
1371
- "osVer": "4.4",
1372
- "uniVer": "√",
1373
- "uniUtsPlugin": "3.91",
1374
- "unixVer": "3.91",
1375
- "unixUtsPlugin": "3.91"
1376
- },
1377
- "ios": {
1378
- "osVer": "12.0",
1379
- "uniVer": "√",
1380
- "uniUtsPlugin": "4.11",
1381
- "unixVer": "4.11",
1382
- "unixUtsPlugin": "4.11"
1383
- },
1384
- "harmony": {
1385
- "osVer": "3.0",
1386
- "uniVer": "4.23",
1387
- "unixVer": "4.61"
1388
- }
1389
- },
1390
- "mp": {
1391
- "weixin": {
1392
- "hostVer": "√",
1393
- "uniVer": "√",
1394
- "unixVer": "4.41"
1395
- },
1396
- "alipay": {
1397
- "hostVer": "√",
1398
- "uniVer": "√",
1399
- "unixVer": "x"
1400
- },
1401
- "baidu": {
1402
- "hostVer": "√",
1403
- "uniVer": "√",
1404
- "unixVer": "x"
1405
- },
1406
- "toutiao": {
1407
- "hostVer": "√",
1408
- "uniVer": "√",
1409
- "unixVer": "x"
1410
- },
1411
- "lark": {
1412
- "hostVer": "√",
1413
- "uniVer": "√",
1414
- "unixVer": "x"
1415
- },
1416
- "qq": {
1417
- "hostVer": "√",
1418
- "uniVer": "√",
1419
- "unixVer": "x"
1420
- },
1421
- "kuaishou": {
1422
- "hostVer": "√",
1423
- "uniVer": "√",
1424
- "unixVer": "x"
1425
- },
1426
- "jd": {
1427
- "hostVer": "√",
1428
- "uniVer": "√",
1429
- "unixVer": "x"
1430
- }
1431
- },
1432
- "web": {
1433
- "uniVer": "√",
1434
- "unixVer": "4.0"
1435
- }
1436
- }
1437
- * @example
1438
- ```typescript
1439
- task.close();
1440
- ```
1441
- */
1442
- close(options: CloseSocketOptions): void;
1443
-
1444
- /**
1445
- * 监听 WebSocket 连接打开事件
1446
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onopen
1447
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onopen
1448
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onopen
1449
- * @uniPlatform
1450
- {
1451
- "app": {
1452
- "android": {
1453
- "osVer": "4.4",
1454
- "uniVer": "√",
1455
- "uniUtsPlugin": "3.91",
1456
- "unixVer": "3.91",
1457
- "unixUtsPlugin": "3.91"
1458
- },
1459
- "ios": {
1460
- "osVer": "12.0",
1461
- "uniVer": "√",
1462
- "uniUtsPlugin": "4.11",
1463
- "unixVer": "4.11",
1464
- "unixUtsPlugin": "4.11"
1465
- },
1466
- "harmony": {
1467
- "osVer": "3.0",
1468
- "uniVer": "4.23",
1469
- "unixVer": "4.61"
1470
- }
1471
- },
1472
- "mp": {
1473
- "weixin": {
1474
- "hostVer": "√",
1475
- "uniVer": "√",
1476
- "unixVer": "4.41"
1477
- },
1478
- "alipay": {
1479
- "hostVer": "√",
1480
- "uniVer": "√",
1481
- "unixVer": "x"
1482
- },
1483
- "baidu": {
1484
- "hostVer": "√",
1485
- "uniVer": "√",
1486
- "unixVer": "x"
1487
- },
1488
- "toutiao": {
1489
- "hostVer": "√",
1490
- "uniVer": "√",
1491
- "unixVer": "x"
1492
- },
1493
- "lark": {
1494
- "hostVer": "√",
1495
- "uniVer": "√",
1496
- "unixVer": "x"
1497
- },
1498
- "qq": {
1499
- "hostVer": "√",
1500
- "uniVer": "√",
1501
- "unixVer": "x"
1502
- },
1503
- "kuaishou": {
1504
- "hostVer": "√",
1505
- "uniVer": "√",
1506
- "unixVer": "x"
1507
- },
1508
- "jd": {
1509
- "hostVer": "√",
1510
- "uniVer": "√",
1511
- "unixVer": "x"
1512
- }
1513
- },
1514
- "web": {
1515
- "uniVer": "√",
1516
- "unixVer": "4.0"
1517
- }
1518
- }
1519
- * @example
1520
- ```typescript
1521
- task.onOpen((res) => {})
1522
- ```
1523
- */
1524
- onOpen(callback: (result: OnSocketOpenCallbackResult) => void): void;
1525
-
1526
- /**
1527
- * 监听 WebSocket 连接关闭事件
1528
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onclose
1529
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onclose
1530
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onclose
1531
- * @uniPlatform
1532
- {
1533
- "app": {
1534
- "android": {
1535
- "osVer": "4.4",
1536
- "uniVer": "√",
1537
- "uniUtsPlugin": "3.91",
1538
- "unixVer": "3.91",
1539
- "unixUtsPlugin": "3.91"
1540
- },
1541
- "ios": {
1542
- "osVer": "12.0",
1543
- "uniVer": "√",
1544
- "uniUtsPlugin": "4.11",
1545
- "unixVer": "4.11",
1546
- "unixUtsPlugin": "4.11"
1547
- },
1548
- "harmony": {
1549
- "osVer": "3.0",
1550
- "uniVer": "4.23",
1551
- "unixVer": "4.61"
1552
- }
1553
- },
1554
- "mp": {
1555
- "weixin": {
1556
- "hostVer": "√",
1557
- "uniVer": "√",
1558
- "unixVer": "4.41"
1559
- },
1560
- "alipay": {
1561
- "hostVer": "√",
1562
- "uniVer": "√",
1563
- "unixVer": "x"
1564
- },
1565
- "baidu": {
1566
- "hostVer": "√",
1567
- "uniVer": "√",
1568
- "unixVer": "x"
1569
- },
1570
- "toutiao": {
1571
- "hostVer": "√",
1572
- "uniVer": "√",
1573
- "unixVer": "x"
1574
- },
1575
- "lark": {
1576
- "hostVer": "√",
1577
- "uniVer": "√",
1578
- "unixVer": "x"
1579
- },
1580
- "qq": {
1581
- "hostVer": "√",
1582
- "uniVer": "√",
1583
- "unixVer": "x"
1584
- },
1585
- "kuaishou": {
1586
- "hostVer": "√",
1587
- "uniVer": "√",
1588
- "unixVer": "x"
1589
- },
1590
- "jd": {
1591
- "hostVer": "√",
1592
- "uniVer": "√",
1593
- "unixVer": "x"
1594
- }
1595
- },
1596
- "web": {
1597
- "uniVer": "√",
1598
- "unixVer": "4.0"
1599
- }
1600
- }
1601
- * @example
1602
- ```typescript
1603
- task.onClose((res) => {
1604
- })
1605
- ```
1606
- */
1607
- onClose(callback: (result: any) => void): void;
1608
-
1609
- /**
1610
- * onError()
1611
- * @description
1612
- * 监听 WebSocket 错误
1613
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onerror
1614
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onerror
1615
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onerror
1616
- * @uniPlatform
1617
- {
1618
- "app": {
1619
- "android": {
1620
- "osVer": "4.4",
1621
- "uniVer": "√",
1622
- "uniUtsPlugin": "3.91",
1623
- "unixVer": "3.91",
1624
- "unixUtsPlugin": "3.91"
1625
- },
1626
- "ios": {
1627
- "osVer": "12.0",
1628
- "uniVer": "√",
1629
- "uniUtsPlugin": "4.11",
1630
- "unixVer": "4.11",
1631
- "unixUtsPlugin": "4.11"
1632
- },
1633
- "harmony": {
1634
- "osVer": "3.0",
1635
- "uniVer": "4.23",
1636
- "unixVer": "4.61"
1637
- }
1638
- },
1639
- "mp": {
1640
- "weixin": {
1641
- "hostVer": "√",
1642
- "uniVer": "√",
1643
- "unixVer": "4.41"
1644
- },
1645
- "alipay": {
1646
- "hostVer": "√",
1647
- "uniVer": "√",
1648
- "unixVer": "x"
1649
- },
1650
- "baidu": {
1651
- "hostVer": "√",
1652
- "uniVer": "√",
1653
- "unixVer": "x"
1654
- },
1655
- "toutiao": {
1656
- "hostVer": "√",
1657
- "uniVer": "√",
1658
- "unixVer": "x"
1659
- },
1660
- "lark": {
1661
- "hostVer": "√",
1662
- "uniVer": "√",
1663
- "unixVer": "x"
1664
- },
1665
- "qq": {
1666
- "hostVer": "√",
1667
- "uniVer": "√",
1668
- "unixVer": "x"
1669
- },
1670
- "kuaishou": {
1671
- "hostVer": "√",
1672
- "uniVer": "√",
1673
- "unixVer": "x"
1674
- },
1675
- "jd": {
1676
- "hostVer": "√",
1677
- "uniVer": "√",
1678
- "unixVer": "x"
1679
- }
1680
- },
1681
- "web": {
1682
- "uniVer": "√",
1683
- "unixVer": "4.0"
1684
- }
1685
- }
1686
- * @example
1687
- ```typescript
1688
- task.onError((res) => {
1689
- })
1690
- ```
1691
- */
1692
- onError(callback: (result: GeneralCallbackResult) => void): void;
1693
-
1694
- /**
1695
- * 监听 WebSocket 接受到服务器的消息事件
1696
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onmessage
1697
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onmessage
1698
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onmessage
1699
- * @uniPlatform
1700
- {
1701
- "app": {
1702
- "android": {
1703
- "osVer": "4.4",
1704
- "uniVer": "√",
1705
- "uniUtsPlugin": "3.91",
1706
- "unixVer": "3.91",
1707
- "unixUtsPlugin": "3.91"
1708
- },
1709
- "ios": {
1710
- "osVer": "12.0",
1711
- "uniVer": "√",
1712
- "uniUtsPlugin": "4.11",
1713
- "unixVer": "4.11",
1714
- "unixUtsPlugin": "4.11"
1715
- },
1716
- "harmony": {
1717
- "osVer": "3.0",
1718
- "uniVer": "4.23",
1719
- "unixVer": "4.61"
1720
- }
1721
- },
1722
- "mp": {
1723
- "weixin": {
1724
- "hostVer": "√",
1725
- "uniVer": "√",
1726
- "unixVer": "4.41"
1727
- },
1728
- "alipay": {
1729
- "hostVer": "√",
1730
- "uniVer": "√",
1731
- "unixVer": "x"
1732
- },
1733
- "baidu": {
1734
- "hostVer": "√",
1735
- "uniVer": "√",
1736
- "unixVer": "x"
1737
- },
1738
- "toutiao": {
1739
- "hostVer": "√",
1740
- "uniVer": "√",
1741
- "unixVer": "x"
1742
- },
1743
- "lark": {
1744
- "hostVer": "√",
1745
- "uniVer": "√",
1746
- "unixVer": "x"
1747
- },
1748
- "qq": {
1749
- "hostVer": "√",
1750
- "uniVer": "√",
1751
- "unixVer": "x"
1752
- },
1753
- "kuaishou": {
1754
- "hostVer": "√",
1755
- "uniVer": "√",
1756
- "unixVer": "x"
1757
- },
1758
- "jd": {
1759
- "hostVer": "√",
1760
- "uniVer": "√",
1761
- "unixVer": "x"
1762
- }
1763
- },
1764
- "web": {
1765
- "uniVer": "√",
1766
- "unixVer": "4.0"
1767
- }
1768
- }
1769
- * @example
1770
- ```typescript
1771
- task.onMessage((res) => {
1772
- })
1773
- ```
1774
- */
1775
- onMessage(callback: (result: OnSocketMessageCallbackResult) => void): void;
1776
- };
1777
- export type OnSocketOpenCallback = (result: OnSocketOpenCallbackResult) => void;
1778
-
1779
- export type OnSocketOpen = (options: OnSocketOpenCallback) => void;
1780
- export type OnSocketErrorCallbackResult = {
1781
- /**
1782
- * 错误信息
1783
- */
1784
- errMsg: string
1785
- };
1786
- export type OnSocketErrorCallback = (result: OnSocketErrorCallbackResult) => void;
1787
-
1788
- export type OnSocketError = (callback: OnSocketErrorCallback) => void;
1789
-
1790
- export type SendSocketMessage = (options: SendSocketMessageOptions) => void;
1791
- export type OnSocketMessageCallback = (result: OnSocketMessageCallbackResult) => void;
1792
-
1793
- export type OnSocketMessage = (callback: OnSocketMessageCallback) => void;
1794
-
1795
- export type CloseSocket = (options: CloseSocketOptions) => void;
1796
- export type OnSocketCloseCallbackResult = {
1797
- /**
1798
- * 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。
1799
- * @uniPlatform
1800
- {
1801
- "app": {
1802
- "android": {
1803
- "osVer": "4.4",
1804
- "uniVer": "√",
1805
- "uniUtsPlugin": "3.91",
1806
- "unixVer": "3.91",
1807
- "unixUtsPlugin": "3.91"
1808
- },
1809
- "ios": {
1810
- "osVer": "12.0",
1811
- "uniVer": "√",
1812
- "uniUtsPlugin": "4.11",
1813
- "unixVer": "4.11",
1814
- "unixUtsPlugin": "4.11"
1815
- },
1816
- "harmony": {
1817
- "osVer": "3.0",
1818
- "uniVer": "4.23",
1819
- "unixVer": "4.61"
1820
- }
1821
- },
1822
- "mp": {
1823
- "weixin": {
1824
- "hostVer": "√",
1825
- "uniVer": "√",
1826
- "unixVer": "4.41"
1827
- },
1828
- "alipay": {
1829
- "hostVer": "√",
1830
- "uniVer": "√",
1831
- "unixVer": "x"
1832
- },
1833
- "baidu": {
1834
- "hostVer": "√",
1835
- "uniVer": "√",
1836
- "unixVer": "x"
1837
- },
1838
- "toutiao": {
1839
- "hostVer": "√",
1840
- "uniVer": "√",
1841
- "unixVer": "x"
1842
- },
1843
- "lark": {
1844
- "hostVer": "√",
1845
- "uniVer": "√",
1846
- "unixVer": "x"
1847
- },
1848
- "qq": {
1849
- "hostVer": "√",
1850
- "uniVer": "√",
1851
- "unixVer": "x"
1852
- },
1853
- "kuaishou": {
1854
- "hostVer": "√",
1855
- "uniVer": "√",
1856
- "unixVer": "x"
1857
- },
1858
- "jd": {
1859
- "hostVer": "√",
1860
- "uniVer": "√",
1861
- "unixVer": "x"
1862
- }
1863
- }
1864
- }
1865
- */
1866
- code: number,
1867
-
1868
- /**
1869
- * 一个可读的字符串,表示连接被关闭的原因。
1870
- * @uniPlatform
1871
- {
1872
- "app": {
1873
- "android": {
1874
- "osVer": "4.4",
1875
- "uniVer": "√",
1876
- "uniUtsPlugin": "3.91",
1877
- "unixVer": "3.91",
1878
- "unixUtsPlugin": "3.91"
1879
- },
1880
- "ios": {
1881
- "osVer": "12.0",
1882
- "uniVer": "√",
1883
- "uniUtsPlugin": "4.11",
1884
- "unixVer": "4.11",
1885
- "unixUtsPlugin": "4.11"
1886
- },
1887
- "harmony": {
1888
- "osVer": "3.0",
1889
- "uniVer": "4.23",
1890
- "unixVer": "4.61"
1891
- }
1892
- },
1893
- "mp": {
1894
- "weixin": {
1895
- "hostVer": "√",
1896
- "uniVer": "√",
1897
- "unixVer": "4.41"
1898
- },
1899
- "alipay": {
1900
- "hostVer": "√",
1901
- "uniVer": "√",
1902
- "unixVer": "x"
1903
- },
1904
- "baidu": {
1905
- "hostVer": "√",
1906
- "uniVer": "√",
1907
- "unixVer": "x"
1908
- },
1909
- "toutiao": {
1910
- "hostVer": "√",
1911
- "uniVer": "√",
1912
- "unixVer": "x"
1913
- },
1914
- "lark": {
1915
- "hostVer": "√",
1916
- "uniVer": "√",
1917
- "unixVer": "x"
1918
- },
1919
- "qq": {
1920
- "hostVer": "√",
1921
- "uniVer": "√",
1922
- "unixVer": "x"
1923
- },
1924
- "kuaishou": {
1925
- "hostVer": "√",
1926
- "uniVer": "√",
1927
- "unixVer": "x"
1928
- },
1929
- "jd": {
1930
- "hostVer": "√",
1931
- "uniVer": "√",
1932
- "unixVer": "x"
1933
- }
1934
- }
1935
- }
1936
- */
1937
- reason: string
1938
- };
1939
- export type OnSocketCloseCallback = (result: OnSocketCloseCallbackResult) => void;
1940
-
1941
- export type OnSocketClose = (callback: OnSocketCloseCallback) => void;