common-api.uts 2.05 KB
/**
 * 公共 API(从 gl_tape/api/module/common.js 迁移)
 */
import http from "@/api/request/http.uts";

/** 获取交付人员列表 */
export function getEmployeeListApi(data: UTSJSONObject): Promise<any> {
	return http.post({
		"method": "dj.api.smartcarlife.employee.getByMerchantId.new",
		"projectName": "boutique",
		"sceneList": [0],
		...data
	} as UTSJSONObject);
}

/** 获取门店主营车品牌 */
export function getMerchantCarBrandList(merchantIdList: Array<number | string>): Promise<any> {
	return http.post({
		method: "merchants.api.open.merchant.info",
		projectName: "merchants",
		merchantIdList,
		merchantInfoSwitch: {
			brandFlag: true
		}
	} as UTSJSONObject, false, "merchant");
}

/**
 * 车型
 */
export function getCarBrandsListApi(data: UTSJSONObject): Promise<any> {
	return http.post({
		method: "scrm.api.carlife.common.getCarSeriesList",
		...data
	} as UTSJSONObject, false, "scrm");
}

/**
 * 查询门店支付配置
 */
export function findPayInfo(data: UTSJSONObject): Promise<any> {
	return http.post({
		method: "dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId",
		projectName: "boutique",
		...data
	} as UTSJSONObject);
}

/** Pad 业务类型列表(与 simgle_app `getPadBusinessTypeList` 一致) */
export function getPadBusinessTypeListApi(): Promise<any> {
	return http.shukeRequest(
		"linkwe-gateway/reception/pad/materials/biz-types/list",
		{} as UTSJSONObject,
		"POST",
		true
	);
}

/** Pad 文件夹列表(与 simgle_app `getPadFolderList` → `materials/folders/list` 一致) */
export function getPadFolderListApi(body: UTSJSONObject): Promise<any> {
	return http.shukeRequest("linkwe-gateway/reception/pad/materials/folders/list", body, "POST", true);
}

/**
 * Pad 素材列表(与 simgle_app `getPadMaterialList` → `materials/materials/list` 一致)
 * 首页轮播:`{ typeCode, status: 0, showOnHomepage: 1 }`
 */
export function getPadMaterialListApi(body: UTSJSONObject): Promise<any> {
	return http.shukeRequest("linkwe-gateway/reception/pad/materials/materials/list", body, "POST", true);
}