Authored by TaoHuang

Merge branch 'develop' into hotfix/report

@@ -163,6 +163,17 @@ const xianyu = { @@ -163,6 +163,17 @@ const xianyu = {
163 errorAction && errorAction(error); 163 errorAction && errorAction(error);
164 }); 164 });
165 } 165 }
  166 + },
  167 + getClientInfo(okAction, errorAction) {
  168 + if (this.isAliApp && window.WindVane) {
  169 + window.WindVane.call('WVNativeDetector', 'getModelInfo', {}, data => {
  170 + okAction && okAction(data);
  171 + }, error => {
  172 + errorAction && errorAction(error);
  173 + });
  174 + } else {
  175 + errorAction && errorAction();
  176 + }
166 } 177 }
167 }; 178 };
168 179
@@ -83,6 +83,7 @@ Vue.use(ChangeBidPriceDialog); @@ -83,6 +83,7 @@ Vue.use(ChangeBidPriceDialog);
83 initClient(store); 83 initClient(store);
84 initBaseLogs(); 84 initBaseLogs();
85 85
  86 +store.$xianyu = xianyu;
86 xianyu.$router = router; 87 xianyu.$router = router;
87 yoho.auth = async(args) => { 88 yoho.auth = async(args) => {
88 let { 89 let {
1 import * as Types from './types'; 1 import * as Types from './types';
2 import cookie from 'yoho-cookie'; 2 import cookie from 'yoho-cookie';
3 -import { merge } from 'lodash'; 3 +import { get, set, merge } from 'lodash';
4 4
5 export default function(mergeState = {}) { 5 export default function(mergeState = {}) {
6 return { 6 return {
@@ -201,12 +201,38 @@ export default function(mergeState = {}) { @@ -201,12 +201,38 @@ export default function(mergeState = {}) {
201 { 201 {
202 params: { appop, param }, 202 params: { appop, param },
203 asyncindx = false, 203 asyncindx = false,
  204 + retry = false
204 }, 205 },
205 ) { 206 ) {
  207 +
206 try { 208 try {
207 // console.log(appop) 209 // console.log(appop)
208 // console.log(param) 210 // console.log(param)
209 setTimeout(() => { 211 setTimeout(() => {
  212 + // 获取设备信息
  213 + if (!retry && !get(window, 'appBaseLogs.device.dm') && this.$xianyu.getClientInfo) {
  214 + this.$xianyu.getClientInfo(info => {
  215 + info = info || {}
  216 + set(window, 'appBaseLogs.device.dm', info.platformName ? info.platformName : `${info.brand} ${info.model}`);
  217 +
  218 + this.dispatch('reportYas', {
  219 + params: { appop, param },
  220 + asyncindx,
  221 + retry: true
  222 + });
  223 + }, (error) => {
  224 + error && set(window, 'appBaseLogs.device.dm', 'unknown');
  225 +
  226 + this.dispatch('reportYas', {
  227 + params: { appop, param },
  228 + asyncindx,
  229 + retry: true
  230 + });
  231 + });
  232 +
  233 + return;
  234 + }
  235 +
210 if (window._yas && window._yas.sendAppLogs) { 236 if (window._yas && window._yas.sendAppLogs) {
211 param = param || {}; 237 param = param || {};
212 238
1 { 1 {
2 "name": "xianyu-ufo-app-web", 2 "name": "xianyu-ufo-app-web",
3 - "version": "0.0.2-beta-1", 3 + "version": "0.0.2-beta-2",
4 "private": true, 4 "private": true,
5 "description": "Xianyu Project With Express", 5 "description": "Xianyu Project With Express",
6 "repository": { 6 "repository": {