Browse Source

分享

feature/feature-compatible
fengchengzhi 7 years ago
parent
commit
e5ce894fed
1 changed files with 8 additions and 3 deletions
  1. 11
      src/view/home.vue

11
src/view/home.vue

@ -109,7 +109,7 @@
this.getdefaultAddress() this.getdefaultAddress()
}, },
defaultCity (val,old){ defaultCity (val,old){
this.wxShare({"merchantNo":this.merchantNo,"source":0,"url":encodeURIComponent(location.href)})
this.ShareWenXin()
} }
}, },
computed: { computed: {
@ -226,14 +226,19 @@
this.getGoodsList() this.getGoodsList()
this.getCityName () this.getCityName ()
}); });
},
ShareWenXin (){
var merchantNo = this.merchantNo
if ( !merchantNo ){
merchantNo = 2
}
this.wxShare({"merchantNo":merchantNo,"source":0,"url":encodeURIComponent(location.href)})
} }
}, },
mounted() { mounted() {
// //
this.getdefaultAddress() this.getdefaultAddress()
this.getAddress() this.getAddress()
this.wxShare({"merchantNo":2,"source":0,"url":encodeURIComponent(location.href)})
// console.log('url',encodeURIComponent(location.href))
}, },
destroyed () { destroyed () {

Loading…
Cancel
Save