diff --git a/src/views/DepositInterestTrial/DepositInterestTrial.vue b/src/views/DepositInterestTrial/DepositInterestTrial.vue index de2866fc73573df44dd4f796d18462a16ad5778d..8c66ff342dd04ee1fed34c869ea45ca6d3071992 100644 --- a/src/views/DepositInterestTrial/DepositInterestTrial.vue +++ b/src/views/DepositInterestTrial/DepositInterestTrial.vue @@ -29,7 +29,8 @@ - + + - + + + + - + + 存入金额(元) --> - - + + - + - - + + - + @@ -123,23 +128,23 @@ - - + + - - + + - - + + @@ -155,7 +160,7 @@ - + - +
计算 @@ -219,7 +224,7 @@ export default class DepositInterestTrial extends Vue{ ]; onConfirmTypes(typeValue: string) { - this.typeValue = typeValue; + this.test.saveType = typeValue; this.showTypes = false; } // choices: any[] = [ @@ -252,13 +257,13 @@ export default class DepositInterestTrial extends Vue{ "利随本清", "等额本金", "等额本息", + "按月结息(到期一次性还本)", "按季结息(到期一次性还本)", -"按月结息(到期一次性还本)", "按年结息(到期一次性还本)", ]; onConfirmChoices(choiceValue: string) { - this.choiceValue = choiceValue; + this.test2.repayType = choiceValue; this.showChoices = false; } // timeTypes: any[] = [ @@ -277,14 +282,11 @@ export default class DepositInterestTrial extends Vue{ showTimeTypes:any=false; timeTypes: any[] = [ "定存整取", - "定存整取", "零存整取", - "零存整取", "整存整取", - "整存整取", ]; onConfirmTimeTypes(timeTypeValue: string) { - this.timeTypeValue = timeTypeValue; + this.test.timeType = timeTypeValue; this.showTimeTypes = false; } @@ -306,12 +308,12 @@ export default class DepositInterestTrial extends Vue{ times: any[] = [ "一年", "两年", - "三年", + "三年", ]; onConfirmTimes(timeValue: string) { - this.timeValue = timeValue; + this.test.time = timeValue; this.showTimes = false; } test2: any = { @@ -342,35 +344,44 @@ export default class DepositInterestTrial extends Vue{ } countA() { let result = 0; - result = parseInt(this.test.depositAmt)*parseInt(this.test.yearRate)/100*parseInt(this.test.time?this.test.time:"0"); - this.$router.push({ - name: "CountResultB", - params: { - saveType: this.test.saveType || "0", - timeType: this.test.timeType || "0", - time: this.test.time || "0", - yearRate: this.test.yearRate, - depositAmt: this.test.depositAmt, - result: result.toString(), - } - }) + result = parseInt(this.test.depositAmt)*parseInt(this.test.yearRate)/100*parseInt(this.test.time=="一年"?"1":this.test.time=="两年"?"2":"3"); + console.log("@@@@"+this.test.depositAmt) + if(this.test.depositAmt==""||this.test.yearRate==""||this.test.time==""){ + alert("请输入数据"); + }else{ + this.$router.push({ + name: "CountResultB", + params: { + saveType: this.test.saveType || "0", + timeType: this.test.timeType || "0", + time: this.test.time=="一年"?"1":this.test.time=="两年"?"2":"3", + yearRate: this.test.yearRate, + depositAmt: this.test.depositAmt, + result: result.toString(), + } + }) + } } countB() { let result = 0; result = parseInt(this.test2.loanAmt)*parseInt(this.test2.loanRate)/100*parseInt(this.test2.loanTime)/12; - this.$router.push({ - name: "CountResult", - params: { - routeName: "aaa", - loanAmt: this.test2.loanAmt, - loanTime: this.test2.loanTime, - planMonthRepay: this.test2.planMonthRepay, - loanRate: this.test2.loanRate, - loanType: this.test2.loanType, - repayType: this.test2.repayType, - result: result.toString(), - } - }) + if(this.test2.loanAmt==""||this.test2.loanRate==""||this.test2.loanTime==""){ + alert("请输入数据") + }else{ + this.$router.push({ + name: "CountResult", + params: { + routeName: "aaa", + loanAmt: this.test2.loanAmt, + loanTime: this.test2.loanTime, + planMonthRepay: this.test2.planMonthRepay, + loanRate: this.test2.loanRate, + loanType: this.test2.loanType, + repayType: this.test2.repayType, + result: result.toString(), + } + }) + } } clearData() { this.test = new Test(); @@ -413,7 +424,7 @@ export default class DepositInterestTrial extends Vue{ padding: 1.5% 0% 1.5% 0%; position: absolute; background-color: #ffffff; - + width: 90%; margin-left: 5%; margin-top: -25%; @@ -421,7 +432,7 @@ export default class DepositInterestTrial extends Vue{ } .layoutName { font-family: "Arial Normal", "Arial"; - + font-weight: 400; font-style: normal; font-size: 13px; diff --git a/src/views/authentication/LoginView.vue b/src/views/authentication/LoginView.vue index ed73fc6d11320eb5b1fc92e12705e92f8d7843d5..dd129b7c34e8921c2c036005e23fff9f0e8e53d1 100644 --- a/src/views/authentication/LoginView.vue +++ b/src/views/authentication/LoginView.vue @@ -149,7 +149,7 @@ export default class LoginView extends Vue { } //手机号 verifyPhone(s:string) { - return /^1[3-9]\d{9}$/.test(s) // 返回true或false + return /^(13[0-9]|14[01,4-9]|15[0-3,5-9]|16[5-7]|17[0135678]|18[0-9]|19[189])\d{8}$/.test(s) // 返回true或false } //获取图形验证码 _updatePicCode() {