buyerask-api-map.js 1.93 KB
/**
 * buyerask-api-map.js
 *@author dennis
 *@createtime 9/26/19
 *@description 买家求购
 */

const API = require('./api-constants');

module.exports = {
  '/api/order/buyaskconfig': {
    ufo: true,
    auth: true,
    path: 'shopping/bid',
    api: API.BUYER_ASK_CONFIG,
    params: {}
  },
  '/api/order/buyeraskcompute': {
    ufo: true,
    auth: true,
    path: 'shopping/bid',
    api: API.BUYER_ASK_COMPUTE,
    params: {
      price: {type: Number, required: true},
      storage_id: {type: Number, required: true},
    }
  },
  '/api/order/buyeraskprepublish': {
    ufo: true,
    auth: true,
    path: 'shopping/bid',
    api: API.BUYER_ASK_TIPS,
    params: {
      price: {type: Number, required: true},
      storage_id: {type: Number, required: true},
      address_id: {type: String, required: true},
    }
  },

  '/api/order/buyeraskpublish': {
    ufo: true,
    auth: true,
    path: 'shopping/bid',
    api: API.BUYER_ASK_PUBLISH,
    params: {
      price: {type: Number, required: true},
      storage_id: {type: Number, required: true},
      address_id: {type: String, required: true},
      time_limit_id: {type: Number, required: true}, // 有效期
    }
  },

  '/api/order/buyerask/computechangeprice': {
    ufo: true,
    auth: true,
    path: 'shopping/bid',
    api: API.BUYER_ASK_COMPUTE_CHANGE_PRICE,
    params: {
      price: {type: Number, required: true},
      orderCode: {type: String, required: true},
    }
  },
  '/api/order/buyerask/prechangeprice': {
    ufo: true,
    auth: true,
    path: 'shopping/bid',
    api: API.BUYER_ASK_PRE_CHANGE_PRICE,
    params: {
      price: {type: Number, required: true},
      orderCode: {type: String, required: true},
    }
  },

  '/api/order/buyerask/changeprice': {
    ufo: true,
    auth: true,
    path: 'shopping/bid',
    api: API.BUYER_ASK_CHANGE_PRICE,
    params: {
      price: {type: Number, required: true},
      orderCode: {type: String, required: true},
    }
  }

};