|
@@ -14,7 +14,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<button type="button" style="border: 1px solid #000; padding: 20px; background-color: #fff;"
|
|
<button type="button" style="border: 1px solid #000; padding: 20px; background-color: #fff;"
|
|
|
- @click="trackEvent">AppsFlyer Test</button>
|
|
|
|
|
|
|
+ @click="trackEvent">initSDK Test</button>
|
|
|
|
|
+
|
|
|
|
|
+ <button type="button" style="border: 1px solid #000; padding: 20px; background-color: #fff;"
|
|
|
|
|
+ @click="registrationEvent">registration Test</button>
|
|
|
|
|
+
|
|
|
|
|
+ <button type="button" style="border: 1px solid #000; padding: 20px; background-color: #fff;"
|
|
|
|
|
+ @click="purchaseEvent">purchase Test</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
<app-block class="home-main__notice">
|
|
<app-block class="home-main__notice">
|
|
@@ -67,22 +73,76 @@ import Banner from '@mobile/components/base/banner/index.vue'
|
|
|
import plus from '@/utils/h5plus'
|
|
import plus from '@/utils/h5plus'
|
|
|
import ProductList from '../../product/list/components/waterfall-list/index.vue'
|
|
import ProductList from '../../product/list/components/waterfall-list/index.vue'
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const trackEvent = () => {
|
|
const trackEvent = () => {
|
|
|
plus.onPlusReady(() => {
|
|
plus.onPlusReady(() => {
|
|
|
- const success = (args: unknown) => {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const startSDKsuccess = (args: unknown) => {
|
|
|
window.alert('成功:' + JSON.stringify(args))
|
|
window.alert('成功:' + JSON.stringify(args))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const success = (args: unknown) => {
|
|
|
|
|
+
|
|
|
|
|
+ window.plus.bridge.exec('AppsFlyerExpand', 'startSDK', [startSDKcallbackID])
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const fail = (code: unknown) => {
|
|
const fail = (code: unknown) => {
|
|
|
window.alert('失败:' + JSON.stringify(code))
|
|
window.alert('失败:' + JSON.stringify(code))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const callbackID = window.plus.bridge.callbackId(success, fail)
|
|
const callbackID = window.plus.bridge.callbackId(success, fail)
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const startSDKcallbackID = window.plus.bridge.callbackId(startSDKsuccess, fail)
|
|
|
|
|
+
|
|
|
window.plus.bridge.exec('AppsFlyerExpand', 'initSDK', [callbackID, '123', false])
|
|
window.plus.bridge.exec('AppsFlyerExpand', 'initSDK', [callbackID, '123', false])
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const registrationEvent = () => {
|
|
|
|
|
+ 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', 'logEvent', [callbackID, 'af_complete_registration', JSON.stringify({ af_registration_method: "Mobile" })])
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const purchaseEvent = () => {
|
|
|
|
|
+ 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', 'logEvent', [callbackID, 'af_purchase', JSON.stringify({ af_revenue: 9.99, af_currency: "USD" })])
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const noticeStore = useNoticeStore()
|
|
const noticeStore = useNoticeStore()
|
|
|
const goodsCollectionStore = useGoodsCollectionStore()
|
|
const goodsCollectionStore = useGoodsCollectionStore()
|
|
|
|
|
|