const getOpenData = window.openData?.();
onClick={() => handleClickConsult("offSiteCustomer")}
进行判断是哪个地方传过来的,之后再加上不同的埋点信息。- export const handleClickConsult = (name) => {
-
- // @ts-ignore
-
- // window.showConsultModal && window.showConsultModal();
-
- // 钉钉预约演示跳转钉钉客服
-
- const trackerData = {
-
- offSiteCustomer: {
-
- actionName: "点击在线客服",
-
- actionGroup: "在线客服",
-
- productName: "学习中心",
-
- },
-
- footer: {
-
- actionName: "点击底部在线咨询",
-
- actionGroup: "在线咨询",
-
- productName: "学习中心",
-
- },
-
- rightFloating: {
-
- actionName: "点击右侧在线咨询",
-
- actionGroup: "在线咨询",
-
- productName: "学习中心",
-
- },
-
-
- };
-
- //判断name是否在trackerData里面,在的话就使用 ...trackerData[name]里面的
-
- if (trackerData[name]) {
-
- trackerAction({
-
- ...trackerData[name],
-
- actionName: name,
-
- actionGroup: "预约演示",
-
- productName: "OKR学习",
-
- });
-
- }
-
- };
- const handleSee = debounce(async (data) => {
- try {
- setIsPlayerVideo(true);
- const res = await seeLearning(data.learningId);
- if (res && res.Code === 1) {
- setIsRead(true);
- setShowNoticePop(false);
- }
- } catch (error) {
- Toast.Error('error', { canClose: false });
- }
- }, 500);