|
|
|
@ -45,6 +45,9 @@ export default { |
|
|
|
.then(res => { |
|
|
|
if (res && res.code == 0) { |
|
|
|
this.list = res.response.slice(); |
|
|
|
if (this.list.length > 0) { |
|
|
|
this.wechat(this.list[0].merchantNo); |
|
|
|
} |
|
|
|
} else if (res.code == 666) { |
|
|
|
this.$vux.toast.text("您还没登录,请先登录!", "middle"); |
|
|
|
setTimeout(function() { |
|
|
|
@ -62,14 +65,19 @@ export default { |
|
|
|
} |
|
|
|
this.$vux.loading.hide(); |
|
|
|
}); |
|
|
|
}, |
|
|
|
wechat(merchantNo) { |
|
|
|
this.wxShare({ |
|
|
|
merchantNo: merchantNo, |
|
|
|
source: 0, |
|
|
|
url: encodeURIComponent(location.href), |
|
|
|
shareUrl: encodeURIComponent( |
|
|
|
"http://" + location.host + "/v2/home" |
|
|
|
) |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// this.wxShare({ |
|
|
|
// merchantNo: merchantNo, |
|
|
|
// source: 0, |
|
|
|
// url: encodeURIComponent(location.href) |
|
|
|
// }); |
|
|
|
this.getData(); |
|
|
|
} |
|
|
|
}; |
|
|
|
|