import {doGet, dePostWithPromise} from 'wechat_common/utils/request'

export default function REQUEST(options, bindType) {
  switch (options.method) {
    case "GET":
      return bindType ? doGet(bindType(options)) : doGet(options)
    case "POST":
      return bindType ? dePostWithPromise(bindType(options)) : dePostWithPromise(options)
    default :
      return bindType ? doGet(bindType(options)) : doGet(options)
  }
}
