restapi.js 3.07 KB
import restapi from '../../../utils/restapi.js'
import {api} from '../../../utils/util.js'
module.exports = {

  /** 获取主页数据*/
  getIndexModules: function (merchantId, success, fail) {
    restapi.req('/web-dj-weapp/home/getIndexModules', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success, fail);
  },

  /**
   * 获得门店公告内容
   */

  getNotice: function ( success) {
    restapi.req('/web-dj-weapp/home/getNotice', {}, {}, 'GET', 'json', 'text', success);
  },

  /**
   * 获取门店信息
   */
  getMerchantById(merchantId, success) {
    restapi.req('/web-dj-weapp/personal/merchant', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success);
  },
 
  /**
   * 获取小程序应用信息
   * merchantId:商户号
   */
  getAppInfo: function (merchantId, success, fail) {
    restapi.req('/web-dj-weapp/appinfo/get', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success, fail);
  },

  /**
  * 获取我的顾问
  */
  getEmployeeOfAccount(success, fail) {
    restapi.req('/web-dj-weapp/servicer/getEmployeeOfAccount', {}, {}, 'GET', 'json', 'text', success, fail);
  },

  /** 获取车辆信息 */
  getVehicles:function(success, fail){
    restapi.req('/web-dj-weapp/home/getVehiclesForVerify', {}, {}, 'GET', 'json', 'text', success, fail);
  },
  /** 获取只能提醒服务列表(首页) */
  getRemindServiceList(data, success) {
    api.get('remindServiceInfo/getRemindServiceList', data, success)
  },

  /**
   * 获取门店的服务顾问列表
   */
  getEmployeesList(merchantId, accountGroupList, success, fail) {
    if (!merchantId || merchantId == 'undefined') {
      merchantId = 0;
    }
    restapi.req('/web-dj-weapp/servicer/getEmployeesList', { merchantId: merchantId, accountGroupList: accountGroupList }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
  },
  /**
   * 获取设备绑定信息
   */
  getDeviceBindInfo: function (sourcefrom, success, fail) {
    restapi.req('/web-dj-weapp/device/getBindInfo', { sourcefrom: sourcefrom }, { 'content-type': 'application/x-www-form-urlencoded' }, 'GET', 'json', 'text', success, fail)
  },

  /** 获取直播间详情 */
  getLiveInfo: function (requestDTO, success, fail) {
    restapi.req('/web-dj-weapp/home/liveplayer/info', requestDTO, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
  },
  /** 获取直播回放信息 */
  getLiveReplay: function (requestDTO, success, fail) {
    restapi.req('/web-dj-weapp/home/liveplayer/replay', requestDTO, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
  },
  /**
   * 获取专题列表
   */
  listSepcicalSubject(success, fail) {
    restapi.req('/web-dj-weapp/popularActivity/listSepcicalSubject', {}, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
  },
  /**分类  */
  getTagList(success) {
    api.get('remindServiceInfo/classifytag/list', {}, success)
  },
}