追加开放组件

This commit is contained in:
aixianling
2021-11-24 16:34:31 +08:00
parent bedcd5d751
commit fea3dcae5b

View File

@@ -0,0 +1,26 @@
<template>
<ww-open-data :type="type" :openid="openid"/>
</template>
<script>
import {mapActions} from "vuex";
export default {
name: "AiOpenData",
props: ['type', 'openid'],
methods: {
...mapActions(['injectJWeixin'])
},
mounted() {
this.injectJWeixin().then(() => {
WWOpenData.bind(this.$el)
WWOpenData.on('error', res => {
console.log(res)
})
WWOpenData.on('update', res => {
console.log(res)
})
})
}
}
</script>