common.js 1.16 KB
import http from '../request/http'
module.exports = {
  /**上传图片
   */
  uploadImg(data) {
    return http.post({
      method: '/rest/upload/uploadImage',
      ...data
    });
  },
  /**视频上传
   */
  uploadVideo(data) {
    return http.post({
      method: `${common}uploadVideo`,
      ...data,
      noSignAttr: ["file"],
    });
  },
	/** 获取协议 */
	getAgreementByKey(data) {
    return http.get({method: '/rest/agreement/getAgreementByKey', ...data})
	},
	/** 查询车品牌(品牌-车系-车型树形结构) */
	getCarBrandList() {
    return http.get({method: '/rest/ropApi/getCarBrandComplete'})
	},
	/** 根据车系ID查询车型列表 */
  getCarTypeList(csId) {
    return http.get({method: '/rest/ropApi/getCarTypeList', csId});
  },
  /**获取图片版本号 */
  getImgVersion() {
    return http.getMock();
  },
  /**手机号密码登录 */
  passwordLogin(data) {
    return http.fetch('/rest/login', data)
  },
  /**获取用户信息 */
  getLoginInfo(data) {
    return http.get({method: '/rest/login/userInfo', ...data}, true)
  },
  /**退出登录 */
  logout(data) {
    return http.post({method: '/rest/login/logout', ...data})
  }
};