Selaa lähdekoodia

fix(exchange): 添加兑换失败的错误提示

在兑换失败的catch块中增加uni.showToast来展示具体错误信息,提升用户体验
408249787@qq.com 1 viikko sitten
vanhempi
commit
a3c037aba1
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      pages/index/components/exchange.uvue

+ 4 - 1
pages/index/components/exchange.uvue

@@ -26,7 +26,10 @@ async function handleExchange() {
       icon: 'success'
     })
   } catch (err: any) {
-
+    uni.showToast({
+      title: err.message,
+      icon: 'error'
+    })
   }
 }
 </script>