nativeTestService.js 523 Bytes
import BaseService from '../../libs/services/baseService.js';

const UFO_SEARCH_LIST = 'ufo.product.search.list';

export default class NativeTestService extends BaseService {
  async getHomePageList(params, complete) {
    return await this.GET(
      {
        ...params,
        method: UFO_SEARCH_LIST
      }, 
      { 
        path: '/resources',
        complete
      }
    ).then((data) => {
      return data;
    }).catch((error) => {
      // 这里请抛出异常,不要return
      throw error;
    })
  }
}