@yysports/tools 0.0.5 → 0.0.6
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.
package/dist/Track/index.js
CHANGED
|
@@ -224,16 +224,27 @@ var Track = /*#__PURE__*/function () {
|
|
|
224
224
|
}, {
|
|
225
225
|
key: "eventLog",
|
|
226
226
|
value: function eventLog(_eventLog) {
|
|
227
|
+
var copyEventLog = {
|
|
228
|
+
module: '',
|
|
229
|
+
content: ''
|
|
230
|
+
};
|
|
227
231
|
if (typeof _eventLog === 'string') {
|
|
228
232
|
var _CurrentUser$authMap;
|
|
233
|
+
var actionLog = (_CurrentUser$authMap = CurrentUser.authMap) === null || _CurrentUser$authMap === void 0 ? void 0 : _CurrentUser$authMap[_eventLog];
|
|
234
|
+
if (actionLog) {
|
|
235
|
+
copyEventLog.content = '触发: ' + actionLog;
|
|
236
|
+
} else {
|
|
237
|
+
copyEventLog.content = _eventLog;
|
|
238
|
+
}
|
|
239
|
+
} else {
|
|
240
|
+
Object.assign(copyEventLog, _eventLog);
|
|
241
|
+
}
|
|
242
|
+
if (!copyEventLog.module) {
|
|
229
243
|
var routeNames = this.getPageModuleName();
|
|
230
|
-
|
|
231
|
-
module: routeNames.join('-'),
|
|
232
|
-
content: '触发: ' + ((_CurrentUser$authMap = CurrentUser.authMap) === null || _CurrentUser$authMap === void 0 ? void 0 : _CurrentUser$authMap[_eventLog])
|
|
233
|
-
};
|
|
244
|
+
copyEventLog.module = (routeNames === null || routeNames === void 0 ? void 0 : routeNames.join('-')) || '-';
|
|
234
245
|
}
|
|
235
246
|
this.pushQueue({
|
|
236
|
-
log:
|
|
247
|
+
log: copyEventLog,
|
|
237
248
|
type: 'event'
|
|
238
249
|
});
|
|
239
250
|
}
|
package/lib/Track/index.js
CHANGED
|
@@ -171,15 +171,26 @@ var Track = class {
|
|
|
171
171
|
// 推送用户触发日志
|
|
172
172
|
static eventLog(eventLog) {
|
|
173
173
|
var _a;
|
|
174
|
+
const copyEventLog = {
|
|
175
|
+
module: "",
|
|
176
|
+
content: ""
|
|
177
|
+
};
|
|
174
178
|
if (typeof eventLog === "string") {
|
|
179
|
+
const actionLog = (_a = import_CurrentUser.default.authMap) == null ? void 0 : _a[eventLog];
|
|
180
|
+
if (actionLog) {
|
|
181
|
+
copyEventLog.content = "触发: " + actionLog;
|
|
182
|
+
} else {
|
|
183
|
+
copyEventLog.content = eventLog;
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
Object.assign(copyEventLog, eventLog);
|
|
187
|
+
}
|
|
188
|
+
if (!copyEventLog.module) {
|
|
175
189
|
const routeNames = this.getPageModuleName();
|
|
176
|
-
|
|
177
|
-
module: routeNames.join("-"),
|
|
178
|
-
content: "触发: " + ((_a = import_CurrentUser.default.authMap) == null ? void 0 : _a[eventLog])
|
|
179
|
-
};
|
|
190
|
+
copyEventLog.module = (routeNames == null ? void 0 : routeNames.join("-")) || "-";
|
|
180
191
|
}
|
|
181
192
|
this.pushQueue({
|
|
182
|
-
log:
|
|
193
|
+
log: copyEventLog,
|
|
183
194
|
type: "event"
|
|
184
195
|
});
|
|
185
196
|
}
|