浏览代码

服务费bug修改

gcz 1 年之前
父节点
当前提交
da83d5460a
共有 2 个文件被更改,包括 12 次插入4 次删除
  1. 11 3
      pages/cash/index.vue
  2. 1 1
      pages/passwordSet/index.vue

+ 11 - 3
pages/cash/index.vue

@@ -303,7 +303,15 @@
 			 */
 			setServiceType(data) {
 				if (data && data.serviceType) {
-					return data.serviceType == 1 ? ('¥' + data.serviceCharge) : data.serviceCharge
+					if(data.serviceType == 1){
+						return ('¥' + data.serviceCharge)
+					}else {
+						let num1 = this.withdrawInfo.serviceCharge;
+						let num = isNaN(num1) ? 0 : (Number(num1) / 100)
+						let money = num ? this.moneyValue * num : Number(this.moneyValue)
+						return money
+						
+					}
 				}
 			},
 			/**
@@ -315,11 +323,11 @@
 					money = this.moneyValue - (isNaN(this.withdrawInfo.serviceCharge) ? 0 : this.withdrawInfo
 						.serviceCharge)
 				} else if (this.withdrawInfo.serviceType == 2) {
-					let num1 = this.withdrawInfo.serviceCharge.replace("%", '')
+					let num1 = this.withdrawInfo.serviceCharge;
 					let num = isNaN(num1) ? 0 : (Number(num1) / 100)
 					money = num ? this.moneyValue * num : Number(this.moneyValue)
 				}
-				this.moneyAccount = money < 0 ? '金额过小于零' : money.toFixed(2)
+				this.moneyAccount = money < 0 ? '金额过小于零' : this.moneyValue - money.toFixed(2) 
 			},
 			browserBack() {
 				console.log(1);

+ 1 - 1
pages/passwordSet/index.vue

@@ -33,7 +33,7 @@
 				title: '这是我的',
 				statusBarHeight: 0, // 状态栏安全距离
 				value: "",
-				tip: ["输入当前密码,确认身份","设置六位数数字密码","再次输入"],
+				tip: ["输入当前密码,用于确认身份","设置六位数数字密码","再次输入"],
 				actionIndex: 0,
 				password: '',
 				withdrawInfo: {}