This commit is contained in:
2023-06-19 17:25:50 +08:00
parent ef579def81
commit eb19778bd0
41 changed files with 2788 additions and 186 deletions

23
src/utils/view_history.js Normal file
View File

@ -0,0 +1,23 @@
// 添加访问记录
import useUserStore from "@/store/modules/user";
import { addViewRecord } from "@/api/admin/enterprise/demand";
export function addViewHistory(type, itemId, itemName) {
const enterprise = useUserStore().enterprise;
if (!enterprise) {
return;
}
const enterpriseId = enterprise.id;
const enterpriseName = enterprise.name;
const nickname = enterprise.userName;
const phone = enterprise.phone;
addViewRecord({
type: type,
typeId: itemId,
typeName: itemName,
enterpriseId: enterpriseId,
enterpriseName: enterpriseName,
nickname: nickname,
phone: phone,
});
}