diff --git a/xuan-deduct-uniapp/src/App.vue b/xuan-deduct-uniapp/src/App.vue index e758b8b..35ef91d 100644 --- a/xuan-deduct-uniapp/src/App.vue +++ b/xuan-deduct-uniapp/src/App.vue @@ -6,6 +6,7 @@ export default { console.log('App Launch') this.setupGlobalListeners() this.setupRouteInterceptor() + this.setupCoinToast() }, onShow: function() { console.log('App Show') @@ -15,6 +16,17 @@ export default { this.removeGlobalListeners() }, methods: { + setupCoinToast() { + uni.$coinToast = { + success: () => { + uni.$emit('showCoinToast', true) + }, + error: () => { + uni.$emit('showCoinToast', false) + } + } + }, + setupRouteInterceptor() { const self = this diff --git a/xuan-deduct-uniapp/src/components/coin-toast/coin-toast.vue b/xuan-deduct-uniapp/src/components/coin-toast/coin-toast.vue new file mode 100644 index 0000000..7dafc5c --- /dev/null +++ b/xuan-deduct-uniapp/src/components/coin-toast/coin-toast.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/xuan-deduct-uniapp/src/pages/bazi/bazi.vue b/xuan-deduct-uniapp/src/pages/bazi/bazi.vue index 705047f..c130307 100644 --- a/xuan-deduct-uniapp/src/pages/bazi/bazi.vue +++ b/xuan-deduct-uniapp/src/pages/bazi/bazi.vue @@ -1,5 +1,6 @@