From c8879fc04e29b5da5c8a2eaacaf4623d98cd8535 Mon Sep 17 00:00:00 2001 From: H1d3rOne Date: Tue, 10 Mar 2026 19:59:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9B=E5=BB=BA=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E9=87=91=E5=B8=81toast=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加coin-toast组件,- bazi.vue使用自定义toast - 金币图标金色,数字金色加粗 --- xuan-deduct-uniapp/src/App.vue | 12 ++ .../src/components/coin-toast/coin-toast.vue | 110 ++++++++++++++++++ xuan-deduct-uniapp/src/pages/bazi/bazi.vue | 17 ++- xuan-deduct-uniapp/src/utils/coinToast.js | 33 +++--- 4 files changed, 148 insertions(+), 24 deletions(-) create mode 100644 xuan-deduct-uniapp/src/components/coin-toast/coin-toast.vue 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 @@