shish 11 luni în urmă
părinte
comite
e08e5b378e

+ 12 - 15
hdh5/admin/ghs/pay.vue

@@ -150,9 +150,6 @@ export default {
 			amountBuffer: '0',
 			updateScheduled: false,
 			updateTimer: null,
-			// 优化:缓存计算结果
-			_cachedCanPay: false,
-			_lastAmount: '0',
 			// 弹框状态
 			showConfirm: false,
 			id:0,
@@ -163,15 +160,10 @@ export default {
 		}
 	},
 	computed: {
-		// 优化:使用缓存的计算属性
+		// 简化支付按钮判断逻辑:只要大于0就能支付
 		canPay() {
-			// 只有当金额变化时才重新计算
-			if (this.currentAmount !== this._lastAmount) {
-				const amount = parseFloat(this.currentAmount);
-				this._cachedCanPay = amount > 0 && amount <= 99999999.99;
-				this._lastAmount = this.currentAmount;
-			}
-			return this._cachedCanPay;
+			const amount = parseFloat(this.currentAmount);
+			return amount > 0;
 		}
 	},
 	onLoad(options) {
@@ -195,6 +187,8 @@ export default {
 				}
 			})
 		}
+		
+
 	},
 	methods: {
 		// 优化:添加触摸反馈
@@ -248,8 +242,8 @@ export default {
 		addNumber(num) {
 			const buffer = this.amountBuffer;
 			
-			// 快速路径:如果当前是0,直接替换
-			if (buffer === '0') {
+			// 快速路径:如果当前是0且输入的不是小数点,直接替换
+			if (buffer === '0' && num !== '.') {
 				this.amountBuffer = num;
 				this.currentAmount = num;
 				return;
@@ -356,7 +350,8 @@ export default {
 			const amount = parseFloat(this.currentAmount);
 			// 隐藏弹框
 			this.hideConfirmDialog();
-			if (Number(amount)<=0) {
+			// 简化验证:只要大于0就能支付
+			if (amount <= 0) {
 				uni.showToast({
 					title: '请输入金额!',
 					icon: 'none',
@@ -412,7 +407,9 @@ export default {
 			uni.navigateBack({
 				delta: 1
 			});
-		}
+		},
+
+
 	}
 }
 </script>

+ 1 - 1
hdh5/unpackage/dist/build/web/assets/admin-ghs-index.DcGZB47V.js → hdh5/unpackage/dist/build/web/assets/admin-ghs-index.4GZ3-Dqa.js

@@ -1 +1 @@
-import{c as e,w as a,i as o,o as t,a as n}from"./index-CSj67Gf1.js";import{_ as s}from"./_plugin-vue_export-helper.BCo6x5W8.js";const r=s({name:"index",data:()=>({}),computed:{},onLoad(e){},methods:{}},[["render",function(s,r,d,u,i,m){const p=o;return t(),e(p,null,{default:a((()=>[n(" 您好 ")])),_:1})}]]);export{r as default};
+import{c as e,w as a,i as o,o as t,a as n}from"./index-UHzLPBx9.js";import{_ as s}from"./_plugin-vue_export-helper.BCo6x5W8.js";const r=s({name:"index",data:()=>({}),computed:{},onLoad(e){},methods:{}},[["render",function(s,r,d,u,i,m){const p=o;return t(),e(p,null,{default:a((()=>[n(" 您好 ")])),_:1})}]]);export{r as default};

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/admin-ghs-pay.BAorWuXC.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/admin-ghs-pay.jpik5sxk.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/admin-ghs-success.BRSsZICY.js


Fișier diff suprimat deoarece este prea mare
+ 1 - 1
hdh5/unpackage/dist/build/web/assets/index-UHzLPBx9.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/pay-DXSf4K0N.css


+ 1 - 1
hdh5/unpackage/dist/build/web/index.html

@@ -16,7 +16,7 @@
 	<script src="/static/web/quill-1.3.7.min.js"></script>
     <!--preload-links-->
     <!--app-context-->
-    <script type="module" crossorigin src="/assets/index-CSj67Gf1.js"></script>
+    <script type="module" crossorigin src="/assets/index-UHzLPBx9.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-Dzn8UyOo.css">
   </head>
   <body>

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff