restapi.js 2.34 KB
const restapi = require('../../../utils/restapi.js');
import {api} from '../../../utils/util.js'
module.exports = {

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

  /**
   * 获取门店的服务顾问列表
   */
  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);
  },
  
  /**
   * 获取顾问信息
   */
  getEmployee(employeeId, success) {
    restapi.req('/web-dj-weapp/servicer/getEmployee', { employeeId: employeeId }, {}, 'GET', 'json', 'text', success);
  },
  /**
   * 查询顾问的服务人
   */
  getUserOfConsultant(record, success) {
    restapi.req('/web-dj-weapp/servicer/getUserOfConsultant', record, {}, 'GET', 'json', 'text', success);
  },

  /**
   * 设置顾问
   */
  setConsultant(ref, success) {
    restapi.req('/web-dj-weapp/servicer/setConsultant', ref, {}, 'Get', 'json', 'text', success);
  },

  /**
   * 用户行为(浏览、点赞)
   */
  makeAppraise(record, success, fail) {
    restapi.req('/web-dj-weapp/servicer/makeAppraise', record, {}, 'Get', 'json', 'text', success, fail);
  },

  /**
   * 获取员工分组列表
   */
  getAccountGroupList(success, ) {
    restapi.req('/web-dj-weapp/servicer/getAccountGroupList', {}, {}, 'GET', 'json', 'text', success);
  },
  /** 获取服务详情 */
  getRemindServiceDetail(data, success) {
    api.get('remindServiceInfo/getRemindServiceDetail', data, success)
  },
  /** 查看活动详情*/
  getActivityDetail: function (data, success, fail) {
    restapi.req('/web-dj-weapp/popularActivity/detail', JSON.stringify(data), { 'content-type': 'application/json' }, 'POST', 'json', 'text', success, fail);
  },
  /** 获取群二维码 */
  getQrCodeInfo(success) {
    api.get('remindServiceInfo/getQrCodeInfo', {}, success)
  },
  /**获取员工信息 */
  getYqInfo(data, success){
    api.get('smartcarlife/serviceMerchantRef/getYqInfo',data,success)
  }
}