Authored by yyq

添加设备型号

... ... @@ -163,6 +163,17 @@ const xianyu = {
errorAction && errorAction(error);
});
}
},
getClientInfo(okAction, errorAction) {
if (this.isAliApp && window.WindVane) {
window.WindVane.call('WVNativeDetector', 'getModelInfo', {}, data => {
okAction && okAction(data);
}, error => {
errorAction && errorAction(error);
});
} else {
errorAction && errorAction();
}
}
};
... ...
... ... @@ -78,6 +78,7 @@ Vue.use(ChangeBidPriceDialog);
initClient(store);
initBaseLogs();
store.$xianyu = xianyu;
xianyu.$router = router;
yoho.auth = async(args) => {
let {
... ...
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 || {};
... ...