27 lines
490 B
Vue
27 lines
490 B
Vue
|
|
<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>
|