Authored by huzhiming

Merge branch 'feature/share' of http://git.yoho.cn/fe/xianyu-ufo-app-web into feature/share

... ... @@ -202,6 +202,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();
}
}
};
... ...
... ... @@ -32,6 +32,11 @@ import 'video.js/dist/video-js.css';
import sdk from 'yoho-activity-sdk';
if (process.env.NODE_ENV === 'development') {
const VConsole = require('vconsole');
const vConsole = new VConsole();
}
import {
initClient,
initBaseLogs
... ... @@ -78,6 +83,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 || {};
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.2-beta-1",
"version": "0.0.2-beta-2",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ... @@ -131,6 +131,7 @@
"terser-webpack-plugin": "^2.1.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^1.1.2",
"vconsole": "^3.3.4",
"webpack": "4.16.5",
"webpack-bundle-analyzer": "^3.0.3",
"webpack-cli": "^3.1.2",
... ...
... ... @@ -10893,6 +10893,11 @@ vary@~1.1.2:
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
vconsole@^3.3.4:
version "3.3.4"
resolved "http://npm.yohops.com/vconsole/-/vconsole-3.3.4.tgz#a7dacd8887b3d3e902e8d18425cda56c34e77f51"
integrity sha1-p9rNiIez0+kC6NGEJc2lbDTnf1E=
verror@1.10.0:
version "1.10.0"
resolved "http://npm.yohops.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
... ...