47 lines
859 B
Vue
47 lines
859 B
Vue
<template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import { promiseTimeout, showToast, uniPromiseApi } from "@/common/untool"
|
|
import { sysEventNames } from "@/common/enum"
|
|
import * as apiService from "@/common/api"
|
|
|
|
export default {
|
|
components: { },
|
|
data() {
|
|
return {
|
|
tmplIds: [],
|
|
}
|
|
},
|
|
computed: {
|
|
|
|
},
|
|
created() {
|
|
this.initData()
|
|
uni.$on(sysEventNames.subMessage, this.triggerCallApi)
|
|
},
|
|
mounted(){
|
|
},
|
|
unmounted(){
|
|
uni.$off(sysEventNames.subMessage, this.triggerCallApi)
|
|
},
|
|
methods: {
|
|
async initData(){
|
|
let res = await apiService.querySappNotifyTplList()
|
|
let tmplIds = res?.data?.map?.(t=> t.tplId) || []
|
|
this.tmplIds = tmplIds
|
|
},
|
|
async triggerCallApi(){
|
|
await uniPromiseApi('requestSubscribeMessage', {
|
|
tmplIds: this.tmplIds
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|