wkw il y a 2 semaines
Parent
commit
3e23b89365
1 fichiers modifiés avec 16 ajouts et 0 suppressions
  1. 16 0
      src/pages/trade/index.vue

+ 16 - 0
src/pages/trade/index.vue

@@ -412,10 +412,26 @@ const getMatchEnroll = async (hash) =>{
 }
 
 const changeWGT = async () => {
+  if(WGTbalance.value < wgt_price.value){
+    uni.showToast({
+      title: '余额不足',
+      icon: 'none',
+      duration: 5000
+    });
+    return;
+  }
   await handleTokenSignUp(WGTForToken, wgt_price.value);
 };
 
 const changeSTT = async () => {
+  if(STTbalance.value < entry_fee.value){
+    uni.showToast({
+      title: '余额不足',
+      icon: 'none',
+      duration: 5000
+    });
+    return;
+  }
   await handleTokenSignUp(STTForToken, entry_fee.value);
 };