标签:miss pen div min open method token 例子 error
发送http请求
let map = { method: ‘post‘, headers: { token: ‘‘, ‘Content-Type‘: ‘application/json‘ }, body: ‘‘ } fetch(‘http://xxxx‘, map).then( (result) => { result.json().then( (obj) => { console.log(obj); } ).catch( (error) => { console.log(error); } ) } ).catch( (error) => { console.log(error); } );
日期选择器
let option={date:new Date(),minDate:new Date(2012,1,28),maxDate:new Date(2020,1,28)}; DatePickerAndroid.open(option).then( (result) => { if(result.action===DatePickerAndroid.dismissedAction){ console.log(‘未选择‘); }else { console.log(result); } } ).catch( (error) => { console.log(error); } );
时间选择
let option={hour:13,minute:11}; TimePickerAndroid.open(option).then( (result) => { if(result.action===TimePickerAndroid.dismissedAction){ console.log(‘未选择‘); }else { console.log(result); } } ).catch( (error) => { console.log(error); } );
标签:miss pen div min open method token 例子 error
原文地址:http://www.cnblogs.com/simadi/p/7742826.html