li.shaoyi 4 月之前
父节点
当前提交
b0d6800cec
共有 1 个文件被更改,包括 22 次插入0 次删除
  1. 22 0
      src/packages/tss/views/home/main/index.vue

+ 22 - 0
src/packages/tss/views/home/main/index.vue

@@ -11,6 +11,12 @@
     <!-- 任务 #6996 -->
     <Banner :data-list="topBanners" :height="290" />
     <div class="home-main__container">
+
+
+      <button type="button" style="border: 1px solid #000; padding: 20px; background-color: #fff;"
+        @click="trackEvent">AppsFlyer Test</button>
+
+
       <app-block class="home-main__notice">
         <h4 @click="$router.push({ name: 'notice-list' })">
           <span>{{ $t('routes.notice') }}</span>
@@ -61,6 +67,22 @@ import Banner from '@mobile/components/base/banner/index.vue'
 import plus from '@/utils/h5plus'
 import ProductList from '../../product/list/components/waterfall-list/index.vue'
 
+const trackEvent = () => {
+  plus.onPlusReady(() => {
+    const success = (args: unknown) => {
+      window.alert('成功:' + JSON.stringify(args))
+    }
+
+    const fail = (code: unknown) => {
+      window.alert('失败:' + JSON.stringify(code))
+    }
+
+    const callbackID = window.plus.bridge.callbackId(success, fail)
+
+    window.plus.bridge.exec('AppsFlyerExpand', 'initSDK', ['123','456',callbackID, ])
+  })
+}
+
 const noticeStore = useNoticeStore()
 const goodsCollectionStore = useGoodsCollectionStore()