carlifeApi.js 2.05 KB
import api from '~/utils/request/request'
module.exports = {
  /** 获取用户绑定设备信息 */
  getUserDevInfo() {
    return api.post({
      method: 'scrm.api.carlife.devicebind.get.accountbinding',
      deviceType: 'GPS'
    })
  },
  /** 绑定设备 */
  bindDev(data) {
    return api.post(
      {
        method: 'scrm.api.carlife.devicebind.binding',
        appType: 'CgacarMiniprogram',
        ...data
      },
      true
    )
  },
  /** 解绑设备 */
  unbindDev(data) {
    return api.post({
      method: 'scrm.api.carlife.devicebind.unbinding',
      ...data
    })
  },
  /**获取设备最新位置信息 */
  getCarPosition(data) {
    return api.post({
      method: 'scrm.api.carlife.deviceposition.get.vehicle.position',
      ...data
    })
  },
  /**获取设备最近行程 */
  getPathList(data) {
    return api.post({
      method: 'scrm.api.carlife.deviceposition.get.recently.journey',
      pageSize: 10,
      ...data
    })
  },
  /** 获取设备总里程 */
  getDevMileage(data) {
    return api.post({
      method: 'scrm.api.carlife.deviceposition.get.total.mileage',
      ...data
    })
  },
  /** 获取线索列表 */
  getClueList(data) {
    return api.post({
      method: 'scrm.api.carlife.weapp.clue.listWithPage',
      pageSize: 10,
      channelType: 'GH',
      ...data
    })
  },
  /**获取设备日行程 */
  getPathListByDay(data) {
    return api.post({
      method: 'scrm.api.carlife.deviceposition.get.journey.bydate',
      pageSize: 10,
      ...data
    })
  },
  /**获取指定行程信息 */
  getPathDetail(journeyId) {
    return api.post(
      {
        method: 'scrm.api.carlife.deviceposition.get.journey.by.id',
        journeyId
      },
      true
    )
  },
  /**底部商城导航栏跳转至第三方倍礼安商城 */
  getBizjiaUrl(data) {
    return api.post({
      method: `scrm.api.carlife.cgacar.api.shopmall`,
      ...data
    })
  },
  /**判断是否绑定车架号 */
  checkBindVIN(data) {
    return api.post({
      method: `scrm.api.carlife.cgacar.commom.list.veh`,
      ...data
    })
  }
}