restapi.js 2.35 KB
const restapi = require('../../../utils/restapi.js');

module.exports = {

  /**
   * 爱车追踪-获取爱车位置
   */
  getVehiclePosition: function (userId, success, fail) {
    restapi.req('/web-dj-weapp/smartcar/getVehiclePosition', { userId: userId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
  },
  /**
   * 我的里程-分页获取日里程列表
   */
  getDayWheelPathList: function (obj, success, fail) {
    restapi.req('/web-dj-weapp/journey/getDailyWheelPathList', obj, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
  },

  /**
   * 我的里程-分页获取月里程列表
   */
  getMonthWheelPathList: function (obj, success, fail) {
    restapi.req('/web-dj-weapp/journey/getMonthWheelPathList', obj, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
  },

  /**
   * 我的里程-获取日里程卡片信息
   */
  getDailyJourneyCardInfo: function (userId, date, success, fail) {
    restapi.req('/web-dj-weapp/journey/getDailyJourneyCardInfo', { userId: userId, time: date }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
  },

  /**
   * 我的里程-获取月里程卡片信息
   */
  getMonthJourneyCardInfo: function (userId, date, success, fail) {
    restapi.req('/web-dj-weapp/journey/getMonthJourneyCardInfo', { userId: userId, time: date }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
  },

  /**
   * 获取近四个月有轨迹的日期
   */
  getJouneyDays: function (userId, success, fail) {
    restapi.req('/web-dj-weapp/journey/getJouneyDays', { userId: userId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
  },
 
  /**
   * 获取轨迹详情
   */
  getJourneyById: function (journeyId, success, fail) {
    restapi.req('/web-dj-weapp/smartcar/getJourneyById', { journeyId: journeyId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
  },
 
  /**
   * 获取门店信息
   */
  getMerchantById(merchantId, success) {
    restapi.req('/web-dj-weapp/personal/merchant', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success);
  },

}