追加开放组件
This commit is contained in:
26
src/components/AiOpenData.vue
Normal file
26
src/components/AiOpenData.vue
Normal 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>
|
||||
Reference in New Issue
Block a user