diff --git a/src/ga/type.ts b/src/ga/type.ts
index 18c0d1a..23ce07b 100644
--- a/src/ga/type.ts
+++ b/src/ga/type.ts
@@ -79,6 +79,7 @@ export enum GA_EventName {
Inspector = "Inspector",
EngineVersion = "engine_version",
AppVersion = "app_version",
+ Popup = "popup",
GameUrl = "game_url",
GamePlayer = "game_player",
GamePause = "game_pause",
diff --git a/src/views/popup/index.vue b/src/views/popup/index.vue
index ecc1408..6a7a0a7 100644
--- a/src/views/popup/index.vue
+++ b/src/views/popup/index.vue
@@ -6,7 +6,7 @@
- CocosStore打赏该插件
- - 支持作者其他插件
+ - 支持作者其他插件
-
@@ -48,6 +48,7 @@ import { ChromeConst } from "cc-plugin/src/chrome/const";
import { defineComponent, onMounted, ref } from "vue";
import { Page } from "../../core/types";
import { ga } from "../../ga";
+import { GA_EventName } from "../../ga/type";
import Ad from "../../scripts/inject-view/ad.vue";
import { getAdData } from "../../scripts/inject-view/loader";
const { CCInput, CCButton, CCButtonGroup, CCInputNumber, CCSelect, CCCheckBox, CCColor } = ccui.components;
@@ -103,36 +104,48 @@ export default defineComponent({
{
text: "在线工具",
icon: "icon_fly",
- click: () => {
+ click: (event: MouseEvent | null, item: ButtonGroupItem) => {
viewType.value = ViewType.OnlineTools;
+ ga.fireEventWithParam(GA_EventName.Popup, item.text);
},
},
{
text: "支持我",
icon: "icon_cocos",
- click: () => {
+ click: (event: MouseEvent | null, item: ButtonGroupItem) => {
viewType.value = ViewType.Support;
+ ga.fireEventWithParam(GA_EventName.Popup, item.text);
},
},
{
text: "加我为好友",
icon: "icon_wechat",
- click: () => {
+ click: (event: MouseEvent | null, item: ButtonGroupItem) => {
viewType.value = ViewType.Friends;
+ ga.fireEventWithParam(GA_EventName.Popup, item.text);
},
},
{
text: "推荐",
icon: "icon_good",
- click: () => {
+ click: (event: MouseEvent | null, item: ButtonGroupItem) => {
viewType.value = ViewType.Recommend;
+ ga.fireEventWithParam(GA_EventName.Popup, item.text);
},
},
]);
const viewType = ref(ViewType.Friends);
const onlineTools = ref([]);
const chooseItem = ref(items.value[0]);
+ const myPlugins = ref("https://store.cocos.com/app/search?name=xu_yanfeng");
return {
+ myPlugins,
+ onClickBuyPlugins() {
+ ga.fireEventWithParam(GA_EventName.Popup, myPlugins.value);
+ },
+ onClickTry(event: MouseEvent, url: string) {
+ ga.fireEventWithParam(GA_EventName.Popup, url);
+ },
onlineTools,
isViewSupport() {
return viewType.value === ViewType.Support;