足力健前端,vue版本

apis.js 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. const base = [
  2. 'base64ToArrayBuffer',
  3. 'arrayBufferToBase64',
  4. 'addInterceptor',
  5. 'removeInterceptor'
  6. ]
  7. const network = [
  8. 'request',
  9. 'uploadFile',
  10. 'downloadFile',
  11. 'connectSocket',
  12. 'onSocketOpen',
  13. 'onSocketError',
  14. 'sendSocketMessage',
  15. 'onSocketMessage',
  16. 'closeSocket',
  17. 'onSocketClose'
  18. ]
  19. const route = [
  20. 'navigateTo',
  21. 'redirectTo',
  22. 'reLaunch',
  23. 'switchTab',
  24. 'navigateBack'
  25. ]
  26. const storage = [
  27. 'setStorage',
  28. 'setStorageSync',
  29. 'getStorage',
  30. 'getStorageSync',
  31. 'getStorageInfo',
  32. 'getStorageInfoSync',
  33. 'removeStorage',
  34. 'removeStorageSync',
  35. 'clearStorage',
  36. 'clearStorageSync'
  37. ]
  38. const location = [
  39. 'getLocation',
  40. 'chooseLocation',
  41. 'openLocation',
  42. 'createMapContext'
  43. ]
  44. const media = [
  45. 'chooseImage',
  46. 'previewImage',
  47. 'getImageInfo',
  48. 'saveImageToPhotosAlbum',
  49. 'compressImage',
  50. 'getRecorderManager',
  51. 'getBackgroundAudioManager',
  52. 'createInnerAudioContext',
  53. 'chooseVideo',
  54. 'saveVideoToPhotosAlbum',
  55. 'createVideoContext',
  56. 'createCameraContext',
  57. 'createLivePlayerContext',
  58. 'createLivePusherContext'
  59. ]
  60. const device = [
  61. 'getSystemInfo',
  62. 'getSystemInfoSync',
  63. 'canIUse',
  64. 'onMemoryWarning',
  65. 'getNetworkType',
  66. 'onNetworkStatusChange',
  67. 'onAccelerometerChange',
  68. 'startAccelerometer',
  69. 'stopAccelerometer',
  70. 'onCompassChange',
  71. 'startCompass',
  72. 'stopCompass',
  73. 'onGyroscopeChange',
  74. 'startGyroscope',
  75. 'stopGyroscope',
  76. 'makePhoneCall',
  77. 'scanCode',
  78. 'setClipboardData',
  79. 'getClipboardData',
  80. 'setScreenBrightness',
  81. 'getScreenBrightness',
  82. 'setKeepScreenOn',
  83. 'onUserCaptureScreen',
  84. 'vibrateLong',
  85. 'vibrateShort',
  86. 'addPhoneContact',
  87. 'openBluetoothAdapter',
  88. 'startBluetoothDevicesDiscovery',
  89. 'onBluetoothDeviceFound',
  90. 'stopBluetoothDevicesDiscovery',
  91. 'onBluetoothAdapterStateChange',
  92. 'getConnectedBluetoothDevices',
  93. 'getBluetoothDevices',
  94. 'getBluetoothAdapterState',
  95. 'closeBluetoothAdapter',
  96. 'writeBLECharacteristicValue',
  97. 'readBLECharacteristicValue',
  98. 'onBLEConnectionStateChange',
  99. 'onBLECharacteristicValueChange',
  100. 'notifyBLECharacteristicValueChange',
  101. 'getBLEDeviceServices',
  102. 'getBLEDeviceCharacteristics',
  103. 'createBLEConnection',
  104. 'closeBLEConnection',
  105. 'onBeaconServiceChange',
  106. 'onBeaconUpdate',
  107. 'getBeacons',
  108. 'startBeaconDiscovery',
  109. 'stopBeaconDiscovery',
  110. 'checkIsSupportSoterAuthentication',
  111. 'checkIsSoterEnrolledInDevice',
  112. 'startSoterAuthentication',
  113. 'onUIStyleChange'
  114. ]
  115. const keyboard = [
  116. 'hideKeyboard',
  117. 'onKeyboardHeightChange'
  118. ]
  119. const ui = [
  120. 'showToast',
  121. 'hideToast',
  122. 'showLoading',
  123. 'hideLoading',
  124. 'showModal',
  125. 'showActionSheet',
  126. 'setNavigationBarTitle',
  127. 'setNavigationBarColor',
  128. 'showNavigationBarLoading',
  129. 'hideNavigationBarLoading',
  130. 'setTabBarItem',
  131. 'setTabBarStyle',
  132. 'hideTabBar',
  133. 'showTabBar',
  134. 'setTabBarBadge',
  135. 'removeTabBarBadge',
  136. 'showTabBarRedDot',
  137. 'hideTabBarRedDot',
  138. 'onTabBarMidButtonTap',
  139. 'setBackgroundColor',
  140. 'setBackgroundTextStyle',
  141. 'createAnimation',
  142. 'pageScrollTo',
  143. 'onWindowResize',
  144. 'offWindowResize',
  145. 'loadFontFace',
  146. 'startPullDownRefresh',
  147. 'stopPullDownRefresh',
  148. 'createSelectorQuery',
  149. 'createIntersectionObserver',
  150. 'getMenuButtonBoundingClientRect'
  151. ]
  152. const event = [
  153. '$emit',
  154. '$on',
  155. '$once',
  156. '$off'
  157. ]
  158. const file = [
  159. 'saveFile',
  160. 'getSavedFileList',
  161. 'getSavedFileInfo',
  162. 'removeSavedFile',
  163. 'getFileInfo',
  164. 'openDocument',
  165. 'getFileSystemManager'
  166. ]
  167. const canvas = [
  168. 'createOffscreenCanvas',
  169. 'createCanvasContext',
  170. 'canvasToTempFilePath',
  171. 'canvasPutImageData',
  172. 'canvasGetImageData'
  173. ]
  174. const third = [
  175. 'getProvider',
  176. 'login',
  177. 'checkSession',
  178. 'getUserInfo',
  179. 'share',
  180. 'shareWithSystem',
  181. 'showShareMenu',
  182. 'hideShareMenu',
  183. 'requestPayment',
  184. 'subscribePush',
  185. 'unsubscribePush',
  186. 'onPush',
  187. 'offPush',
  188. 'requireNativePlugin',
  189. 'upx2px',
  190. 'restoreGlobal',
  191. 'getSubNVueById',
  192. 'getCurrentSubNVue',
  193. 'setPageMeta',
  194. 'onNativeEventReceive',
  195. 'sendNativeEvent'
  196. ]
  197. const ad = [
  198. 'createRewardedVideoAd'
  199. ]
  200. const apis = [
  201. ...base,
  202. ...network,
  203. ...route,
  204. ...storage,
  205. ...location,
  206. ...media,
  207. ...device,
  208. ...keyboard,
  209. ...ui,
  210. ...event,
  211. ...file,
  212. ...canvas,
  213. ...third,
  214. ...ad
  215. ]
  216. module.exports = apis