HimoolERP/erp_mobile/App.vue
2022-06-07 16:07:33 +08:00

39 lines
871 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
</style>
<script>
var globalEvent = uni.requireNativePlugin('globalEvent');
export default {
onLaunch: function() {
console.log('App Launch')
globalEvent.addEventListener('onPrintCallback', function(e) {
console.log(e.key)
if (e.key == 0) {
uni.showToast({
title: '打印成功',
duration: 2000
});
} else if (e.key == 3) {
uni.showToast({
title: '缺纸',
duration: 2000
});
}
});
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>