gio-miniprogram-sdk 4.4.1 → 4.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/alipay.js +1 -1
  2. package/dist/baidu.js +1 -1
  3. package/dist/bytedance.js +1 -1
  4. package/dist/jingdong.js +1 -1
  5. package/dist/kuaishou.js +1 -1
  6. package/dist/plugins/gioABTest.js +1 -1
  7. package/dist/plugins/gioCompress.js +1 -1
  8. package/dist/plugins/gioEventAutoTracking.js +1 -1
  9. package/dist/plugins/gioImpressionTracking.js +1 -1
  10. package/dist/plugins/gioMultipleInstances.js +1 -1
  11. package/dist/plugins/gioPerformance.js +1 -1
  12. package/dist/qq.js +1 -1
  13. package/dist/quickapp.js +1 -1
  14. package/dist/taobao.js +1 -1
  15. package/dist/taro.js +1 -1
  16. package/dist/uniapp.js +1 -1
  17. package/dist/wechat.js +1 -1
  18. package/dist/xiaohongshu.js +1 -1
  19. package/package.json +7 -1
  20. package/.eslintignore +0 -11
  21. package/.eslintrc.js +0 -120
  22. package/.github/workflows/greetings.yml +0 -13
  23. package/.github/workflows/publish.yml +0 -45
  24. package/.prettierignore +0 -19
  25. package/.prettierrc.js +0 -9
  26. package/babel.config.js +0 -6
  27. package/rollup.config.js +0 -100
  28. package/rollup.plugins.config.js +0 -84
  29. package/src/adapters/gioTaobaoAdapter.ts +0 -202
  30. package/src/adapters/gioTaroAdapter.ts +0 -467
  31. package/src/adapters/gioUniAppAdapter.ts +0 -431
  32. package/src/constants/config.ts +0 -170
  33. package/src/constants/emitMsg.ts +0 -24
  34. package/src/constants/regex.ts +0 -18
  35. package/src/core/dataStore/eventContextBuilder.ts +0 -95
  36. package/src/core/dataStore/eventHooks/appEffects.ts +0 -218
  37. package/src/core/dataStore/eventHooks/index.ts +0 -468
  38. package/src/core/dataStore/eventHooks/minipPage.ts +0 -234
  39. package/src/core/dataStore/eventHooks/pageEffects.ts +0 -189
  40. package/src/core/dataStore/index.ts +0 -661
  41. package/src/core/growingIO.ts +0 -637
  42. package/src/core/pluginsInstance/base.ts +0 -157
  43. package/src/core/pluginsInstance/taro.ts +0 -15
  44. package/src/core/pluginsInstance/tb.ts +0 -15
  45. package/src/core/pluginsInstance/uniapp.ts +0 -15
  46. package/src/core/uploader.ts +0 -272
  47. package/src/core/userStore.ts +0 -267
  48. package/src/index.ts +0 -77
  49. package/src/minipInstance/base.ts +0 -352
  50. package/src/minipInstance/framework.ts +0 -24
  51. package/src/minipInstance/jd.ts +0 -11
  52. package/src/minipInstance/ks.ts +0 -12
  53. package/src/minipInstance/my.ts +0 -131
  54. package/src/minipInstance/qq.ts +0 -12
  55. package/src/minipInstance/quickapp.ts +0 -233
  56. package/src/minipInstance/swan.ts +0 -20
  57. package/src/minipInstance/tb.ts +0 -58
  58. package/src/minipInstance/tt.ts +0 -12
  59. package/src/minipInstance/wx.ts +0 -27
  60. package/src/minipInstance/xhs.ts +0 -20
  61. package/src/platformConfig/base.ts +0 -82
  62. package/src/platformConfig/framework.ts +0 -31
  63. package/src/platformConfig/jd.ts +0 -11
  64. package/src/platformConfig/ks.ts +0 -11
  65. package/src/platformConfig/my.ts +0 -16
  66. package/src/platformConfig/qq.ts +0 -13
  67. package/src/platformConfig/quickapp.ts +0 -48
  68. package/src/platformConfig/swan.ts +0 -11
  69. package/src/platformConfig/tb.ts +0 -29
  70. package/src/platformConfig/tt.ts +0 -11
  71. package/src/platformConfig/wx.ts +0 -20
  72. package/src/platformConfig/xhs.ts +0 -27
  73. package/src/plugins/gioABTest.ts +0 -348
  74. package/src/plugins/gioCompress.ts +0 -253
  75. package/src/plugins/gioEventAutoTracking.ts +0 -288
  76. package/src/plugins/gioImpressionTracking.ts +0 -386
  77. package/src/plugins/gioMultipleInstances.ts +0 -189
  78. package/src/plugins/gioPerformance/exception.ts +0 -152
  79. package/src/plugins/gioPerformance/monitor.ts +0 -284
  80. package/src/plugins/gioPerformance/network.ts +0 -197
  81. package/src/plugins/gioPerformance.ts +0 -131
  82. package/src/types/base.ts +0 -167
  83. package/src/types/dataStore.ts +0 -62
  84. package/src/types/eventHooks.ts +0 -147
  85. package/src/types/gioCustomTracking.ts +0 -9
  86. package/src/types/gioEventTracking.ts +0 -10
  87. package/src/types/gioPerformance.ts +0 -8
  88. package/src/types/growingIO.ts +0 -137
  89. package/src/types/minipInstance.ts +0 -133
  90. package/src/types/platforms.ts +0 -64
  91. package/src/types/plugins.ts +0 -24
  92. package/src/types/uploader.ts +0 -30
  93. package/src/types/userStore.ts +0 -28
  94. package/src/utils/glodash.ts +0 -430
  95. package/src/utils/tools.ts +0 -472
  96. package/src/utils/verifiers.ts +0 -52
  97. package/tsconfig.json +0 -32
  98. package/typings/global.d.ts +0 -105
@@ -1,253 +0,0 @@
1
- /**
2
- * 名称:数据加密插件
3
- * 用途:用于提供上报数据加密。
4
- */
5
- import { GrowingIOType } from '@@/types/growingIO';
6
-
7
- class GioCompress {
8
- public pluginVersion: string;
9
- private f;
10
- private _compress;
11
- constructor(public growingIO: GrowingIOType) {
12
- this.pluginVersion = '__PLUGIN_VERSION__';
13
- this.f = String.fromCharCode;
14
- this._compress = function (uncompressed, bitsPerChar, getCharFromInt) {
15
- if (uncompressed === null) return '';
16
- let i,
17
- value,
18
- context_dictionary = {},
19
- context_dictionaryToCreate = {},
20
- context_c = '',
21
- context_wc = '',
22
- context_w = '',
23
- context_enlargeIn = 2, // Compensate for the first entry which should not count
24
- context_dictSize = 3,
25
- context_numBits = 2,
26
- context_data = [],
27
- context_data_val = 0,
28
- context_data_position = 0,
29
- ii;
30
-
31
- for (ii = 0; ii < uncompressed.length; ii += 1) {
32
- context_c = uncompressed.charAt(ii);
33
- if (
34
- !Object.prototype.hasOwnProperty.call(context_dictionary, context_c)
35
- ) {
36
- context_dictionary[context_c] = context_dictSize++;
37
- context_dictionaryToCreate[context_c] = true;
38
- }
39
-
40
- context_wc = context_w + context_c;
41
- if (
42
- Object.prototype.hasOwnProperty.call(context_dictionary, context_wc)
43
- ) {
44
- context_w = context_wc;
45
- } else {
46
- if (
47
- Object.prototype.hasOwnProperty.call(
48
- context_dictionaryToCreate,
49
- context_w
50
- )
51
- ) {
52
- if (context_w.charCodeAt(0) < 256) {
53
- for (i = 0; i < context_numBits; i++) {
54
- context_data_val = context_data_val << 1;
55
- if (context_data_position === bitsPerChar - 1) {
56
- context_data_position = 0;
57
- context_data.push(getCharFromInt(context_data_val));
58
- context_data_val = 0;
59
- } else {
60
- context_data_position++;
61
- }
62
- }
63
- value = context_w.charCodeAt(0);
64
- for (i = 0; i < 8; i++) {
65
- context_data_val = (context_data_val << 1) | (value & 1);
66
- if (context_data_position === bitsPerChar - 1) {
67
- context_data_position = 0;
68
- context_data.push(getCharFromInt(context_data_val));
69
- context_data_val = 0;
70
- } else {
71
- context_data_position++;
72
- }
73
- value = value >> 1;
74
- }
75
- } else {
76
- value = 1;
77
- for (i = 0; i < context_numBits; i++) {
78
- context_data_val = (context_data_val << 1) | value;
79
- if (context_data_position === bitsPerChar - 1) {
80
- context_data_position = 0;
81
- context_data.push(getCharFromInt(context_data_val));
82
- context_data_val = 0;
83
- } else {
84
- context_data_position++;
85
- }
86
- value = 0;
87
- }
88
- value = context_w.charCodeAt(0);
89
- for (i = 0; i < 16; i++) {
90
- context_data_val = (context_data_val << 1) | (value & 1);
91
- if (context_data_position === bitsPerChar - 1) {
92
- context_data_position = 0;
93
- context_data.push(getCharFromInt(context_data_val));
94
- context_data_val = 0;
95
- } else {
96
- context_data_position++;
97
- }
98
- value = value >> 1;
99
- }
100
- }
101
- context_enlargeIn--;
102
- if (context_enlargeIn === 0) {
103
- context_enlargeIn = Math.pow(2, context_numBits);
104
- context_numBits++;
105
- }
106
- delete context_dictionaryToCreate[context_w];
107
- } else {
108
- value = context_dictionary[context_w];
109
- for (i = 0; i < context_numBits; i++) {
110
- context_data_val = (context_data_val << 1) | (value & 1);
111
- if (context_data_position === bitsPerChar - 1) {
112
- context_data_position = 0;
113
- context_data.push(getCharFromInt(context_data_val));
114
- context_data_val = 0;
115
- } else {
116
- context_data_position++;
117
- }
118
- value = value >> 1;
119
- }
120
- }
121
- context_enlargeIn--;
122
- if (context_enlargeIn === 0) {
123
- context_enlargeIn = Math.pow(2, context_numBits);
124
- context_numBits++;
125
- }
126
- // Add wc to the dictionary.
127
- context_dictionary[context_wc] = context_dictSize++;
128
- context_w = String(context_c);
129
- }
130
- }
131
-
132
- // Output the code for w.
133
- if (context_w !== '') {
134
- if (
135
- Object.prototype.hasOwnProperty.call(
136
- context_dictionaryToCreate,
137
- context_w
138
- )
139
- ) {
140
- if (context_w.charCodeAt(0) < 256) {
141
- for (i = 0; i < context_numBits; i++) {
142
- context_data_val = context_data_val << 1;
143
- if (context_data_position === bitsPerChar - 1) {
144
- context_data_position = 0;
145
- context_data.push(getCharFromInt(context_data_val));
146
- context_data_val = 0;
147
- } else {
148
- context_data_position++;
149
- }
150
- }
151
- value = context_w.charCodeAt(0);
152
- for (i = 0; i < 8; i++) {
153
- context_data_val = (context_data_val << 1) | (value & 1);
154
- if (context_data_position === bitsPerChar - 1) {
155
- context_data_position = 0;
156
- context_data.push(getCharFromInt(context_data_val));
157
- context_data_val = 0;
158
- } else {
159
- context_data_position++;
160
- }
161
- value = value >> 1;
162
- }
163
- } else {
164
- value = 1;
165
- for (i = 0; i < context_numBits; i++) {
166
- context_data_val = (context_data_val << 1) | value;
167
- if (context_data_position === bitsPerChar - 1) {
168
- context_data_position = 0;
169
- context_data.push(getCharFromInt(context_data_val));
170
- context_data_val = 0;
171
- } else {
172
- context_data_position++;
173
- }
174
- value = 0;
175
- }
176
- value = context_w.charCodeAt(0);
177
- for (i = 0; i < 16; i++) {
178
- context_data_val = (context_data_val << 1) | (value & 1);
179
- if (context_data_position === bitsPerChar - 1) {
180
- context_data_position = 0;
181
- context_data.push(getCharFromInt(context_data_val));
182
- context_data_val = 0;
183
- } else {
184
- context_data_position++;
185
- }
186
- value = value >> 1;
187
- }
188
- }
189
- context_enlargeIn--;
190
- if (context_enlargeIn === 0) {
191
- context_enlargeIn = Math.pow(2, context_numBits);
192
- context_numBits++;
193
- }
194
- delete context_dictionaryToCreate[context_w];
195
- } else {
196
- value = context_dictionary[context_w];
197
- for (i = 0; i < context_numBits; i++) {
198
- context_data_val = (context_data_val << 1) | (value & 1);
199
- if (context_data_position === bitsPerChar - 1) {
200
- context_data_position = 0;
201
- context_data.push(getCharFromInt(context_data_val));
202
- context_data_val = 0;
203
- } else {
204
- context_data_position++;
205
- }
206
- value = value >> 1;
207
- }
208
- }
209
- context_enlargeIn--;
210
- if (context_enlargeIn === 0) {
211
- context_enlargeIn = Math.pow(2, context_numBits);
212
- context_numBits++;
213
- }
214
- }
215
-
216
- // Mark the end of the stream
217
- value = 2;
218
- for (i = 0; i < context_numBits; i++) {
219
- context_data_val = (context_data_val << 1) | (value & 1);
220
- if (context_data_position === bitsPerChar - 1) {
221
- context_data_position = 0;
222
- context_data.push(getCharFromInt(context_data_val));
223
- context_data_val = 0;
224
- } else {
225
- context_data_position++;
226
- }
227
- value = value >> 1;
228
- }
229
-
230
- // Flush the last char
231
- while (true) {
232
- context_data_val = context_data_val << 1;
233
- if (context_data_position === bitsPerChar - 1) {
234
- context_data.push(getCharFromInt(context_data_val));
235
- break;
236
- } else context_data_position++;
237
- }
238
- return context_data.join('');
239
- };
240
- }
241
-
242
- compressToUTF16 = (input) => {
243
- const self = this;
244
- if (input === null) return '';
245
- return (
246
- this._compress(input, 15, function (a) {
247
- return self.f(a + 32);
248
- }) + ' '
249
- );
250
- };
251
- }
252
-
253
- export default { name: 'gioCompress', method: GioCompress };
@@ -1,288 +0,0 @@
1
- /**
2
- * 名称:无埋点插件
3
- * 用途:用于提供无埋点的事件构建方法。
4
- */
5
- import { ID_REG, SWAN_XID_REG, TARO_XID_REG } from '@@/constants/regex';
6
- import { EventTarget } from '@@/types/eventHooks';
7
- import { GrowingIOType } from '@@/types/growingIO';
8
- import { consoleText, getExtraData, isTaro3 } from '@@/utils/tools';
9
- import EMIT_MSG from '@@/constants/emitMsg';
10
- import { isEmpty } from '@@/utils/glodash';
11
-
12
- let ut;
13
- class GioEventAutoTracking {
14
- public pluginVersion: string;
15
- private prevEvent: any;
16
- public circleServerUrl: string;
17
- public circleOpen = false;
18
- constructor(public growingIO: GrowingIOType) {
19
- this.pluginVersion = '__PLUGIN_VERSION__';
20
- ut = this.growingIO.utils;
21
- this.prevEvent = {};
22
- this.listenForLunchEvent();
23
- }
24
-
25
- main = (e: EventTarget, eventName: string) => {
26
- const {
27
- vdsConfig,
28
- platformConfig,
29
- plugins,
30
- emitter,
31
- trackingId
32
- }: GrowingIOType = this.growingIO;
33
- if (
34
- // 无埋点事件拦截
35
- !vdsConfig.autotrack ||
36
- // 无事件名称拦截
37
- !eventName ||
38
- // 标记忽略的节点拦截
39
- ut.get(e, 'currentTarget.dataset.growingIgnore') ||
40
- ut.get(e, 'target.dataset.growingIgnore') ||
41
- // 没有标记强制采集且是自动播放的组件(例如轮播、视频播放)事件拦截
42
- (!ut.get(e, 'target.dataset.growingTrack') &&
43
- ut.get(e, 'detail.source') === 'autoplay') ||
44
- // 防止重写页面后可能出现重复的事件
45
- (e.type === this.prevEvent?.type &&
46
- // uniapp中后产生事件的时间戳可能比前序的小导致相减为负值,所以要取绝对值保证两个事件不是重复触发即可。事件重复触发是taro才会出现的
47
- Math.abs(Number(e.timeStamp) - Number(this.prevEvent?.timeStamp)) < 10)
48
- ) {
49
- return;
50
- }
51
- // taro3多余事件过滤
52
- if (vdsConfig.taro && [('#eh', 'eh')].includes(eventName)) {
53
- return;
54
- }
55
- this.prevEvent = e;
56
- // uniapp
57
- if (vdsConfig.uniVue) {
58
- eventName = plugins?.gioUniAppAdapter.getHandlerName(eventName, e);
59
- }
60
- // 事件逻辑
61
- if (vdsConfig.debug) {
62
- console.log('Action:', e.type, Date.now());
63
- }
64
- // 向其他插件广播事件
65
- emitter.emit(EMIT_MSG.ON_COMPOSE_BEFORE, {
66
- event: eventName,
67
- params: e ?? {}
68
- });
69
- const actionListeners = platformConfig.listeners.actions;
70
- if (actionListeners.click.includes(e.type)) {
71
- this.buildClickEvent(trackingId, e, eventName);
72
- } else if (actionListeners.change.includes(e.type)) {
73
- this.buildChangeEvent(trackingId, e, eventName);
74
- }
75
- };
76
-
77
- // 获取触发节点xpath信息
78
- getNodeXpath = (e: EventTarget, eventName: string) => {
79
- const { gioPlatform, vdsConfig } = this.growingIO;
80
- const target = e.currentTarget || e.target;
81
- let id = target.id;
82
- if (
83
- !id ||
84
- (gioPlatform === 'swan' && SWAN_XID_REG.test(id)) ||
85
- (isTaro3(vdsConfig.taro) && TARO_XID_REG.test(id))
86
- ) {
87
- id = '';
88
- }
89
- return `${id}#${eventName}`;
90
- };
91
-
92
- // 构建点击事件
93
- buildClickEvent = (trackingId: string, e: EventTarget, eventName: string) => {
94
- const xpath = this.getNodeXpath(e, eventName);
95
- if (xpath) {
96
- const {
97
- dataStore: { eventContextBuilder, eventInterceptor, eventHooks }
98
- } = this.growingIO;
99
- const target = e.currentTarget || e.target;
100
- let idx;
101
- if (ut.has(target?.dataset, 'index') && target?.dataset?.index !== '') {
102
- const index: any = ut.toString(target.dataset.index);
103
- if (ID_REG.test(index) && index - 0 > 0 && index - 0 < 2147483647) {
104
- idx = +index;
105
- } else {
106
- consoleText(
107
- `${target.dataset.index},index标记应为 大于 0 且小于 2147483647 的整数!`,
108
- 'warn'
109
- );
110
- }
111
- }
112
- const event = {
113
- eventType: 'VIEW_CLICK',
114
- element: [
115
- {
116
- xpath,
117
- index: idx,
118
- textValue: target?.dataset?.title,
119
- hyperlink: target?.dataset?.src
120
- }
121
- ],
122
- ...eventContextBuilder(trackingId)
123
- };
124
- // 合并页面属性
125
- event.attributes = eventHooks.currentPage.eventSetPageProps(
126
- trackingId,
127
- event
128
- );
129
- eventInterceptor(event);
130
- }
131
- };
132
-
133
- // 构建tab菜单点击事件
134
- buildTabClickEvent = (trackingId: string, tabItem: any) => {
135
- const {
136
- dataStore: { eventContextBuilder, eventInterceptor, eventHooks }
137
- } = this.growingIO;
138
- const event = {
139
- eventType: 'VIEW_CLICK',
140
- element: [
141
- {
142
- xpath: '#onTabItemTap',
143
- textValue: tabItem.text,
144
- index: tabItem.index + 1,
145
- hyperlink: ut.toString(tabItem.pagePath)
146
- }
147
- ],
148
- ...eventContextBuilder(trackingId)
149
- };
150
- // 合并页面属性
151
- event.attributes = eventHooks.currentPage.eventSetPageProps(
152
- trackingId,
153
- event
154
- );
155
- eventInterceptor(event);
156
- };
157
-
158
- // 构建表单变化事件
159
- buildChangeEvent = (
160
- trackingId: string,
161
- e: EventTarget,
162
- eventName: string
163
- ) => {
164
- const xpath = this.getNodeXpath(e, eventName);
165
- if (xpath) {
166
- const {
167
- dataStore: { eventContextBuilder, eventInterceptor, eventHooks }
168
- } = this.growingIO;
169
- const target = e.currentTarget || e.target;
170
- const event = {
171
- eventType: 'VIEW_CHANGE',
172
- element: { xpath },
173
- ...eventContextBuilder(trackingId)
174
- };
175
- const ev = ut.get(e, 'detail.value') || ut.get(e, 'target.attr.value');
176
- if (target?.dataset?.growingTrack || target?.dataset?.growingtrack) {
177
- if (!ut.isNil(ev)) {
178
- event.element.textValue = ut.toString(ev);
179
- }
180
- }
181
- event.element = [event.element];
182
- // 合并页面属性
183
- event.attributes = eventHooks.currentPage.eventSetPageProps(
184
- trackingId,
185
- event
186
- );
187
- eventInterceptor(event);
188
- }
189
- };
190
-
191
- // --------------------- 以下内容是对新版小程序圈选的支持 ---------------------
192
-
193
- // 监听小程序的onLunch事件
194
- listenForLunchEvent = () => {
195
- const { emitter } = this.growingIO;
196
- emitter.on(EMIT_MSG.MINIP_LIFECYCLE, ({ event, params }) => {
197
- if (['App onLaunch', 'App onShow'].includes(event)) {
198
- this.circleInit(params);
199
- }
200
- });
201
- };
202
-
203
- // 初始化圈选
204
- circleInit = (params: any) => {
205
- const { emitter } = this.growingIO;
206
- const extraData = getExtraData(
207
- params.referrerInfo?.extraData || params.query || {}
208
- );
209
- // 额外参数中存在gdpCircleRoomCollectUrl,则表示是圈选的跳转,进入圈选状态
210
- if (extraData?.gdpCircleRoomCollectUrl) {
211
- // 圈选初始化
212
- if (this.circleServerUrl !== extraData?.gdpCircleRoomCollectUrl) {
213
- this.circleServerUrl = extraData?.gdpCircleRoomCollectUrl;
214
- // 提前移除一次事件发送监听,防止重复监听
215
- emitter.off(EMIT_MSG.ON_SEND_AFTER, this.collectorSendFn);
216
- // 添加事件发送监听,用于发送圈选事件
217
- emitter.on(EMIT_MSG.ON_SEND_AFTER, this.collectorSendFn);
218
- this.showPromptModal('enter');
219
- }
220
- this.circleOpen = true;
221
- }
222
- };
223
-
224
- // 数据采集发送监听回调
225
- collectorSendFn = ({ requestData, trackingId }) => {
226
- const { uploader } = this.growingIO;
227
- if (this.circleOpen) {
228
- // 过滤仅主实例的非CUSTOM事件可以圈选
229
- const filteredEvents = requestData.filter(
230
- (e) =>
231
- e.eventType !== 'CUSTOM' && trackingId === this.growingIO.trackingId
232
- );
233
- if (!isEmpty(filteredEvents)) {
234
- // 同时请求数在3个以下直接发起请求
235
- if (uploader.requestingNum < uploader.requestLimit) {
236
- this.circleRequest(filteredEvents);
237
- } else {
238
- // 同时有3个请求在发送时,设轮询延时直到请求数在3个以下
239
- let t = setInterval(() => {
240
- if (uploader.requestingNum < uploader.requestLimit) {
241
- this.circleRequest(filteredEvents);
242
- clearInterval(t);
243
- t = undefined;
244
- }
245
- }, 500);
246
- }
247
- }
248
- }
249
- };
250
-
251
- // 圈选结束
252
- circleClose = () => {
253
- this.circleOpen = false;
254
- this.circleServerUrl = '';
255
- this.growingIO.emitter.off(EMIT_MSG.ON_SEND_AFTER, this.collectorSendFn);
256
- };
257
-
258
- // 展示圈选提示
259
- showPromptModal = (type: 'enter' | 'error', msg?: string) => {
260
- this.growingIO.minipInstance.minip.showModal({
261
- title: 'GrowingIO提示',
262
- content: type === 'error' ? msg : '您已进入圈选模式',
263
- showCancel: false
264
- });
265
- };
266
-
267
- // 发起圈选请求
268
- circleRequest = (requestData: any) => {
269
- const { minipInstance } = this.growingIO;
270
- minipInstance.request({
271
- url: this.circleServerUrl,
272
- header: { 'content-type': 'application/json;charset=UTF-8' },
273
- method: 'POST',
274
- data: requestData,
275
- complete: ({ statusCode, data, errMsg }: any) => {
276
- if (![200, 204].includes(statusCode) || !data?.success) {
277
- this.showPromptModal(
278
- 'error',
279
- data?.message || data || errMsg || '圈选请求失败,请重试!'
280
- );
281
- this.circleClose();
282
- }
283
- }
284
- });
285
- };
286
- }
287
-
288
- export default { name: 'gioEventAutoTracking', method: GioEventAutoTracking };