<template>
<div>
</div>
</template>
<script>
import wx from "weixin-js-sdk"
export default {
name: 'Warn',
components: {
},
data () {
return {
}
}
},
methods: {
// 分享
enableShare() {
let that = this;
this.$httpRequest({
url: this.$api.Wxsdk,
methods: 'post',
data: {
url:location.href.split('#')[0]
}
})
.then(wechatRes => {
wx.config({
debug: false,
appId: wechatRes.appId,
timestamp: parseInt(wechatRes.timestamp),
nonceStr: wechatRes.nonceStr,
signature: wechatRes.signature,
jsApiList:[ 'hideOptionMenu', // 分用禁享
]});
wx.error(function (res) {
console.log(res)
});
wx.ready(function() {
wx.hideOptionMenu();
})
})
},
},
mounted () {
this.enableShare();
},
}
</script>
<style lang="stylus" scoped>
</style>