Commit 0a87de5f0c4addb3b6ed1e5b6166e60e3e8a9cd6
1 parent
8e14e986
健康商城商品详情页有阿虎
Showing
1 changed file
with
16 additions
and
0 deletions
src/pages/healthGoodDetails/healthGoodDetails.vue
| ... | ... | @@ -182,6 +182,7 @@ export default { |
| 182 | 182 | name: 'goodDetails', |
| 183 | 183 | data () { |
| 184 | 184 | return { |
| 185 | + title: "", // 标题 | |
| 185 | 186 | banner: null, |
| 186 | 187 | goodsInfo: null, |
| 187 | 188 | backs: null, // 后退按钮组 |
| ... | ... | @@ -201,7 +202,22 @@ export default { |
| 201 | 202 | props: [ |
| 202 | 203 | ], |
| 203 | 204 | //对象内部的属性监听,也叫深度监听 |
| 205 | + head: { | |
| 206 | + title () { | |
| 207 | + return { | |
| 208 | + inner: this.title | |
| 209 | + } | |
| 210 | + } | |
| 211 | + }, | |
| 204 | 212 | watch: { |
| 213 | + // 设置页面标题 | |
| 214 | + title (newVal) { | |
| 215 | + if (this.$store.state.browser.toLowerCase() == "qq" && this.$store.state.deviceType.toLowerCase() == "iphone") { | |
| 216 | + this.$iFrame.insertIFrame(newVal); | |
| 217 | + } else { | |
| 218 | + this.$emit("updateHead"); | |
| 219 | + } | |
| 220 | + } | |
| 205 | 221 | }, |
| 206 | 222 | //属性的结果会被缓存,除非依赖的响应式属性变化才会重新计算。主要当作属性来使用; |
| 207 | 223 | computed: { | ... | ... |