Commit 0a87de5f0c4addb3b6ed1e5b6166e60e3e8a9cd6

Authored by zhiyangdu
1 parent 8e14e986

健康商城商品详情页有阿虎

src/pages/healthGoodDetails/healthGoodDetails.vue
@@ -182,6 +182,7 @@ export default { @@ -182,6 +182,7 @@ export default {
182 name: 'goodDetails', 182 name: 'goodDetails',
183 data () { 183 data () {
184 return { 184 return {
  185 + title: "", // 标题
185 banner: null, 186 banner: null,
186 goodsInfo: null, 187 goodsInfo: null,
187 backs: null, // 后退按钮组 188 backs: null, // 后退按钮组
@@ -201,7 +202,22 @@ export default { @@ -201,7 +202,22 @@ export default {
201 props: [ 202 props: [
202 ], 203 ],
203 //对象内部的属性监听,也叫深度监听 204 //对象内部的属性监听,也叫深度监听
  205 + head: {
  206 + title () {
  207 + return {
  208 + inner: this.title
  209 + }
  210 + }
  211 + },
204 watch: { 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 computed: { 223 computed: {