import Taro from '@tarojs/taro' ; param { String } url param { Object } data const httpClient = ( url , data ) => new Promise ( ( resolve , reject ) : void => { Taro . cloud . callFunction ( { name : url , data , } ) . then ( res => { resolve ( res . result ) ; } ) . catch ( e => { reject ( e ) ; } ) ; } ) ; export default httpClient ;