Authored by 黄敬囿

优化数据上报 review by 李奇

... ... @@ -222,8 +222,12 @@ App({
key: 'userInfo',
data: this.globalData.userInfo
});
setTimeout(() => {
let uid = user.uid;
this.setUserUnionType(uid);
}, 1000);
this.setUserUnionType(this.globalData.userInfo.uid);
},
getUserUnionType() {
return this.globalData.userUnionType;
... ...
... ... @@ -2,6 +2,7 @@
import Promise from '../vendors/es6-promise';
import config from './config';
import api from './api';
import Yas from './yas';
export function getQRCodeSource(code) {
let param = {
... ... @@ -15,7 +16,13 @@ export function getQRCodeSource(code) {
}).then(data => {
if (data.code === 200) {
if (data.data) {
return JSON.parse(data.data);
let resultJson = JSON.parse(result.data);
if (resultJson) {
let app = getApp();
let yas = new Yas(app);
yas.report('YB_SHARE_UNION_TYPE', resultJson);
}
return resultJson;
}
} else {
return {};
... ...
import api from '../../common/api';
import config from '../../common/config';
import Yas from '../../common/yas';
export default {
/**
... ... @@ -130,7 +131,13 @@ export default {
}).then(result => {
if (result.code === 200) {
if (result.data) {
return JSON.parse(result.data);
let resultJson = JSON.parse(result.data);
if(resultJson){
let app = getApp();
let yas = new Yas(app);
yas.report('YB_SHARE_UNION_TYPE', resultJson);
}
return resultJson;
}
}
}).catch(e => {
... ...