Showing
3 changed files
with
21 additions
and
3 deletions
@@ -222,8 +222,12 @@ App({ | @@ -222,8 +222,12 @@ App({ | ||
222 | key: 'userInfo', | 222 | key: 'userInfo', |
223 | data: this.globalData.userInfo | 223 | data: this.globalData.userInfo |
224 | }); | 224 | }); |
225 | + setTimeout(() => { | ||
226 | + let uid = user.uid; | ||
227 | + this.setUserUnionType(uid); | ||
228 | + }, 1000); | ||
225 | 229 | ||
226 | - this.setUserUnionType(this.globalData.userInfo.uid); | 230 | + |
227 | }, | 231 | }, |
228 | getUserUnionType() { | 232 | getUserUnionType() { |
229 | return this.globalData.userUnionType; | 233 | return this.globalData.userUnionType; |
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | import Promise from '../vendors/es6-promise'; | 2 | import Promise from '../vendors/es6-promise'; |
3 | import config from './config'; | 3 | import config from './config'; |
4 | import api from './api'; | 4 | import api from './api'; |
5 | +import Yas from './yas'; | ||
5 | 6 | ||
6 | export function getQRCodeSource(code) { | 7 | export function getQRCodeSource(code) { |
7 | let param = { | 8 | let param = { |
@@ -15,7 +16,13 @@ export function getQRCodeSource(code) { | @@ -15,7 +16,13 @@ export function getQRCodeSource(code) { | ||
15 | }).then(data => { | 16 | }).then(data => { |
16 | if (data.code === 200) { | 17 | if (data.code === 200) { |
17 | if (data.data) { | 18 | if (data.data) { |
18 | - return JSON.parse(data.data); | 19 | + let resultJson = JSON.parse(result.data); |
20 | + if (resultJson) { | ||
21 | + let app = getApp(); | ||
22 | + let yas = new Yas(app); | ||
23 | + yas.report('YB_SHARE_UNION_TYPE', resultJson); | ||
24 | + } | ||
25 | + return resultJson; | ||
19 | } | 26 | } |
20 | } else { | 27 | } else { |
21 | return {}; | 28 | return {}; |
1 | import api from '../../common/api'; | 1 | import api from '../../common/api'; |
2 | 2 | ||
3 | import config from '../../common/config'; | 3 | import config from '../../common/config'; |
4 | +import Yas from '../../common/yas'; | ||
4 | 5 | ||
5 | export default { | 6 | export default { |
6 | /** | 7 | /** |
@@ -130,7 +131,13 @@ export default { | @@ -130,7 +131,13 @@ export default { | ||
130 | }).then(result => { | 131 | }).then(result => { |
131 | if (result.code === 200) { | 132 | if (result.code === 200) { |
132 | if (result.data) { | 133 | if (result.data) { |
133 | - return JSON.parse(result.data); | 134 | + let resultJson = JSON.parse(result.data); |
135 | + if(resultJson){ | ||
136 | + let app = getApp(); | ||
137 | + let yas = new Yas(app); | ||
138 | + yas.report('YB_SHARE_UNION_TYPE', resultJson); | ||
139 | + } | ||
140 | + return resultJson; | ||
134 | } | 141 | } |
135 | } | 142 | } |
136 | }).catch(e => { | 143 | }).catch(e => { |
-
Please register or login to post a comment