UNPKG

para-bridge-demo

Version:

a bridge api for js-ios/andriod rest

21 lines 403 B
``` tsx interface IGetGravityInfoResult { // 状态 0:不支持 | 1:成功 | 2:失败 status: '0' | '1' | '2'; // 重力信息 gravityInfo: { x: string; y: string; z: string; }; } private getGravityInfo = () => { getGravityInfo().then(result => { this.setState({ value: JSON.stringify(result), }); }).catch(err => { alert(JSON.stringify(err)); }); } ```