|
|
import * as Types from './types';
|
|
|
import cookie from 'yoho-cookie';
|
|
|
import { merge } from 'lodash';
|
|
|
import { get, set, merge } from 'lodash';
|
|
|
|
|
|
export default function(mergeState = {}) {
|
|
|
return {
|
...
|
...
|
@@ -201,12 +201,38 @@ export default function(mergeState = {}) { |
|
|
{
|
|
|
params: { appop, param },
|
|
|
asyncindx = false,
|
|
|
retry = false
|
|
|
},
|
|
|
) {
|
|
|
|
|
|
try {
|
|
|
// console.log(appop)
|
|
|
// console.log(param)
|
|
|
setTimeout(() => {
|
|
|
// 获取设备信息
|
|
|
if (!retry && !get(window, 'appBaseLogs.device.dm') && this.$xianyu.getClientInfo) {
|
|
|
this.$xianyu.getClientInfo(info => {
|
|
|
info = info || {}
|
|
|
set(window, 'appBaseLogs.device.dm', info.platformName ? info.platformName : `${info.brand} ${info.model}`);
|
|
|
|
|
|
this.dispatch('reportYas', {
|
|
|
params: { appop, param },
|
|
|
asyncindx,
|
|
|
retry: true
|
|
|
});
|
|
|
}, (error) => {
|
|
|
error && set(window, 'appBaseLogs.device.dm', 'unknown');
|
|
|
|
|
|
this.dispatch('reportYas', {
|
|
|
params: { appop, param },
|
|
|
asyncindx,
|
|
|
retry: true
|
|
|
});
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (window._yas && window._yas.sendAppLogs) {
|
|
|
param = param || {};
|
|
|
|
...
|
...
|
|