提交 74692794 编写于 作者: X xzs02

Merge branch 'dev' of github.com:dcloudio/uni-app into dev

const TODOS = [ // 不支持的 API 列表
'hideTabBar',
'hideTabBarRedDot',
'removeTabBarBadge',
'setTabBarBadge',
'setTabBarItem',
'setTabBarStyle',
'showTabBar',
'showTabBarRedDot',
'startPullDownRefresh',
// 不支持的 API 列表
const TODOS = [
'saveImageToPhotosAlbum',
'getRecorderManager',
'getBackgroundAudioManager',
......@@ -15,11 +7,40 @@ const TODOS = [ // 不支持的 API 列表
'chooseVideo',
'saveVideoToPhotosAlbum',
'createVideoContext',
'createCameraContext',
'createLivePlayerContext',
'openDocument',
'onMemoryWarning',
'startAccelerometer',
'startCompass',
'addPhoneContact',
'createIntersectionObserver'
'setTabBarItem',
'setTabBarStyle',
'hideTabBar',
'showTabBar',
'setTabBarBadge',
'removeTabBarBadge',
'showTabBarRedDot',
'hideTabBarRedDot',
'setBackgroundColor',
'setBackgroundTextStyle',
'startPullDownRefresh',
'createIntersectionObserver',
'authorize',
'openSetting',
'getSetting',
'chooseAddress',
'chooseInvoiceTitle',
'addTemplate',
'deleteTemplate',
'getTemplateLibraryById',
'getTemplateLibraryList',
'getTemplateList',
'sendTemplateMessage',
'getUpdateManager',
'setEnableDebug',
'getExtConfig',
'getExtConfigSync'
]
function _handleNetworkInfo (result) {
......
// 不支持的 API 列表
const TODOS = [
'hideKeyboard'
'hideKeyboard',
'onGyroscopeChange',
'startGyroscope',
'stopGyroscope',
'openBluetoothAdapter',
'startBluetoothDevicesDiscovery',
'onBluetoothDeviceFound',
'stopBluetoothDevicesDiscovery',
'onBluetoothAdapterStateChange',
'getConnectedBluetoothDevices',
'getBluetoothDevices',
'getBluetoothAdapterState',
'closeBluetoothAdapter',
'writeBLECharacteristicValue',
'readBLECharacteristicValue',
'onBLEConnectionStateChange',
'onBLECharacteristicValueChange',
'notifyBLECharacteristicValueChange',
'getBLEDeviceServices',
'getBLEDeviceCharacteristics',
'createBLEConnection',
'closeBLEConnection',
'onBeaconServiceChange',
'onBeaconUpdate',
'getBeacons',
'startBeaconDiscovery',
'stopBeaconDiscovery',
'hideShareMenu'
]
function createTodoMethod (contextName, methodName) {
......
// 不支持的 API 列表
const TODOS = [
'hideKeyboard'
'hideKeyboard',
'onSocketOpen',
'onSocketError',
'sendSocketMessage',
'onSocketMessage',
'closeSocket',
'onSocketClose',
'getImageInfo',
'getBackgroundAudioManager',
'createVideoContext',
'createCameraContext',
'createLivePlayerContext',
'getSavedFileList',
'getSavedFileInfo',
'removeSavedFile',
'getFileInfo',
'openDocument',
'chooseLocation',
'createMapContext',
'canIUse',
'onMemoryWarning',
'onGyroscopeChange',
'startGyroscope',
'stopGyroscope',
'setScreenBrightness',
'getScreenBrightness',
'onUserCaptureScreen',
'addPhoneContact',
'openBluetoothAdapter',
'startBluetoothDevicesDiscovery',
'onBluetoothDeviceFound',
'stopBluetoothDevicesDiscovery',
'onBluetoothAdapterStateChange',
'getConnectedBluetoothDevices',
'getBluetoothDevices',
'getBluetoothAdapterState',
'closeBluetoothAdapter',
'writeBLECharacteristicValue',
'readBLECharacteristicValue',
'onBLEConnectionStateChange',
'onBLECharacteristicValueChange',
'notifyBLECharacteristicValueChange',
'getBLEDeviceServices',
'getBLEDeviceCharacteristics',
'createBLEConnection',
'closeBLEConnection',
'onBeaconServiceChange',
'onBeaconUpdate',
'getBeacons',
'startBeaconDiscovery',
'stopBeaconDiscovery',
'setNavigationBarColor',
'showNavigationBarLoading',
'hideNavigationBarLoading',
'setTabBarItem',
'setTabBarStyle',
'hideTabBar',
'showTabBar',
'setTabBarBadge',
'removeTabBarBadge',
'showTabBarRedDot',
'hideTabBarRedDot',
'setBackgroundColor',
'setBackgroundTextStyle',
'createIntersectionObserver',
'chooseInvoiceTitle',
'navigateToMiniProgram',
'navigateBackMiniProgram',
'addTemplate',
'deleteTemplate',
'getTemplateLibraryById',
'getTemplateLibraryList',
'getTemplateList',
'sendTemplateMessage',
'setEnableDebug',
'getExtConfig',
'getExtConfigSync'
]
// 需要做转换的 API 列表
const protocols = {}
const protocols = {
chooseImage: {
args: {
sizeType: false
}
},
previewImage: {
args: {
indicator: false,
loop: false
}
},
connectSocket: {
args: {
method: false
}
},
chooseVideo: {
args: {
maxDuration: false
}
},
scanCode: {
args: {
onlyFromCamera: false,
scanType: false
}
},
startAccelerometer: {
args: {
interval: false
}
},
showToast: {
args: {
image: false,
mask: false
}
},
showLoading: {
args: {
mask: false
}
},
showModal: {
args: {
cancelColor: false,
confirmColor: false
}
},
showActionSheet: {
args: {
itemColor: false
}
},
login: {
args: {
scopes: false,
timeout: false
}
},
getUserInfo: {
args: {
lang: false,
timeout: false
}
},
requestPayment: {
orderInfo: 'data'
}
}
TODOS.forEach(todoApi => {
protocols[todoApi] = false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册