Showing
1 changed file
with
8 additions
and
1 deletions
@@ -2,6 +2,7 @@ import detailModel from '../../../models/product/detail'; | @@ -2,6 +2,7 @@ import detailModel from '../../../models/product/detail'; | ||
2 | import formatImage from '../../../utils/formatImage'; | 2 | import formatImage from '../../../utils/formatImage'; |
3 | import config from '../../../common/config'; | 3 | import config from '../../../common/config'; |
4 | import common from '../../../models/common'; | 4 | import common from '../../../models/common'; |
5 | +import Yas from '../../../common/yas'; | ||
5 | 6 | ||
6 | import { | 7 | import { |
7 | Actionsheet | 8 | Actionsheet |
@@ -13,6 +14,7 @@ import { | @@ -13,6 +14,7 @@ import { | ||
13 | 14 | ||
14 | let app = getApp(); | 15 | let app = getApp(); |
15 | let router = global.router; | 16 | let router = global.router; |
17 | +let yas; | ||
16 | 18 | ||
17 | const LIMIT_TYPE = { | 19 | const LIMIT_TYPE = { |
18 | UNKNOWN: 0, | 20 | UNKNOWN: 0, |
@@ -135,9 +137,14 @@ Page(Object.assign({ | @@ -135,9 +137,14 @@ Page(Object.assign({ | ||
135 | uid, | 137 | uid, |
136 | originUnionID | 138 | originUnionID |
137 | }); | 139 | }); |
140 | + | ||
141 | + yas = new Yas(app); // 实例化埋点 | ||
138 | }, | 142 | }, |
139 | onShow() { | 143 | onShow() { |
140 | - this.init(); | 144 | + setTimeout(() => { |
145 | + app = app || getApp(); | ||
146 | + this.init(); | ||
147 | + }, app ? 0 : 1000); | ||
141 | }, | 148 | }, |
142 | init() { | 149 | init() { |
143 | this.productInfo().then(() => { | 150 | this.productInfo().then(() => { |
-
Please register or login to post a comment