"use strict";
const common_vendor = require("./common/vendor.js");
const request = require("./request.js");
const login = (usr = null) => {
  return request.request(`/contract/miniapp/user/login`, "POST", usr);
};
const isToken = () => {
  if (!common_vendor.index.getStorageSync("token")) {
    common_vendor.index.navigateTo({ url: "/pages/index/login" });
  }
};
const getStoreName = () => {
  return request.request(`/contract/miniapp/store/list`, "GET");
};
const getProduct = (product = null) => {
  return request.request(`/contract/miniapp/product/categories`, "GET", product);
};
const idCardInfo = (idCardInfo2 = null) => {
  return request.request(`/contract/miniapp/file/ocr/idcard`, "GET", idCardInfo2, true);
};
const getChildListBatch = () => {
  return request.request(`/contract/miniapp/car/rootList`, "GET");
};
const add = (appOrderCarList = null) => {
  return request.request(`/contract/miniapp/order/add`, "POST", appOrderCarList);
};
const list = (params = null) => {
  return request.request(`/contract/miniapp/order/list`, "GET", params);
};
const carCert = (params = null) => {
  return request.request(`/contract/miniapp/file/ocr/carCert`, "GET", params, true);
};
const logout = () => {
  return request.request(`/contract/miniapp/user/logout`, "POST");
};
exports.add = add;
exports.carCert = carCert;
exports.getChildListBatch = getChildListBatch;
exports.getProduct = getProduct;
exports.getStoreName = getStoreName;
exports.idCardInfo = idCardInfo;
exports.isToken = isToken;
exports.list = list;
exports.login = login;
exports.logout = logout;
//# sourceMappingURL=../.sourcemap/mp-weixin/api.js.map
