diff --git a/src/platforms/mp-toutiao/runtime/api/protocols.js b/src/platforms/mp-toutiao/runtime/api/protocols.js index d703130074bee31391adc8d172bc39147c31d692..745bad5d8974d7dc3246a16e18ef19f4e3e05ebe 100644 --- a/src/platforms/mp-toutiao/runtime/api/protocols.js +++ b/src/platforms/mp-toutiao/runtime/api/protocols.js @@ -2,21 +2,16 @@ import previewImage from '../../../mp-weixin/helpers/normalize-preview-image' // 不支持的 API 列表 const todos = [ - 'getBackgroundAudioManager', 'createCameraContext', 'createLivePlayerContext', 'getSavedFileInfo', - 'openDocument', - 'chooseLocation', 'createMapContext', - 'canIUse', 'onMemoryWarning', 'onGyroscopeChange', 'startGyroscope', 'stopGyroscope', 'setScreenBrightness', 'getScreenBrightness', - 'onUserCaptureScreen', 'addPhoneContact', 'openBluetoothAdapter', 'startBluetoothDevicesDiscovery', @@ -55,8 +50,6 @@ const todos = [ 'setBackgroundColor', 'setBackgroundTextStyle', 'chooseInvoiceTitle', - 'navigateToMiniProgram', - 'navigateBackMiniProgram', 'addTemplate', 'deleteTemplate', 'getTemplateLibraryById', @@ -66,13 +59,12 @@ const todos = [ 'setEnableDebug', 'onWindowResize', 'offWindowResize', - 'compressImage', 'createOffscreenCanvas', 'vibrate' ] // 存在兼容性的 API 列表 -// 头条小程序不支持canIUses +// 头条小程序自1.35.0+支持canIUses const canIUses = [ // 'createIntersectionObserver', // 'getSavedFileList', @@ -88,6 +80,13 @@ const canIUses = [ // 'onSocketClose', // 'getExtConfig', // 'getExtConfigSync', + // 'navigateToMiniProgram', + // 'navigateBackMiniProgram', + // 'compressImage', + // 'chooseLocation', + // 'openDocument', + // 'onUserCaptureScreen', + // 'getBackgroundAudioManager', ] // 需要做转换的 API 列表