瀏覽代碼

提示框调整

JXDS18FUJT 2 年之前
父節點
當前提交
f20ac43bc5
共有 4 個文件被更改,包括 23 次插入9 次删除
  1. 0 1
      src/main.ts
  2. 0 3
      src/style/main.scss
  3. 3 2
      src/style/reset.scss
  4. 20 3
      src/views/cashout/index.vue

+ 0 - 1
src/main.ts

@@ -2,7 +2,6 @@ import { createApp } from 'vue';
 import App from './App';
 import router from './router';
 import store from './store';
-
 import Vant from "vant";
 import "vant/lib/index.css";
 import '@/style/index.scss';

+ 0 - 3
src/style/main.scss

@@ -9,9 +9,6 @@
   width: 100%;
   height: 100%;
 }
-:root {
-  --van-button-primary-background-color: red;
-}
 body{
   background-color: #F2F3F5;
 }

+ 3 - 2
src/style/reset.scss

@@ -2,8 +2,9 @@
   box-sizing: border-box;
 }
 :root {
-  --van-toast-default-width:270px;
-  --van-button-primary-background-color: red;
+  --van-toast-default-min-height:88px;
+  --van-toast-default-width:auto;
+  --van-toast-max-width:100%;
 }
 
 html, body {

+ 20 - 3
src/views/cashout/index.vue

@@ -29,9 +29,8 @@
 			</van-field>
 			<div class="button">
 
-				<van-button @click="() => {
-					cashToCardShow = true
-				}" class="cash-button" color="#498EF5" round icon="credit-pay" type="primary">提现到银行卡
+				<van-button @click="checkCashCardAmount" class="cash-button" color="#498EF5" round icon="credit-pay"
+					type="primary">提现到银行卡
 				</van-button>
 				<van-button @click="() => {
 					cashToWxShow = true
@@ -113,6 +112,23 @@ export default defineComponent({
 		const encTrueName = ref('')
 		const wxBankListFieldnames = { text: 'bankName', values: 'values', children: 'children' }
 		const wxBankList = reactive(WXBANKLIST);
+		const checkCashCardAmount = () => {
+			if (Number(amount.value) >= 1000 && Number(amount.value) <= 5000) {
+				cashToCardShow.value = true
+			}
+			else if(Number(amount.value)<1000){
+				cashToCardShow.value = false
+				Toast.fail('银行卡提现不能小于1000')
+
+			}
+			else{
+				cashToCardShow.value = false
+				Toast.fail('银行卡提现不能大于5000')
+
+			}
+
+
+		}
 		const getBankCode = (val: {
 			bankCode: number,
 			bankName: string
@@ -256,6 +272,7 @@ export default defineComponent({
 			cashToCardShow,
 			bgImgIcon,
 			amount,
+			checkCashCardAmount,
 			cashToWx,
 			cashToCard,
 			getBankCode