调整收费套餐页面

This commit is contained in:
邱贞招 2024-12-03 10:04:11 +08:00
parent a65e254c17
commit 105269a62e
2 changed files with 67 additions and 67 deletions

View File

@ -5,7 +5,7 @@ NODE_ENV = production
# 测试环境配置 # 测试环境配置
ENV = 'staging' ENV = 'staging'
# VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api' VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api' # VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api'
# 共享电动车管理系统/测试环境 # 共享电动车管理系统/测试环境
# VUE_APP_BASE_API = 'https://dianche.chuantewulian.cn/stage-api' # VUE_APP_BASE_API = 'https://dianche.chuantewulian.cn/stage-api'

View File

@ -538,9 +538,7 @@ export default {
} }
}, },
validateMore() { validateMore() {
if(this.form.ridingRule === '1'){ if(this.form.ridingRule == 2) {
return true
}
const { start, end, eachUnit, fee } = this.more; const { start, end, eachUnit, fee } = this.more;
// //
if (start === '' || end === '') { if (start === '' || end === '') {
@ -576,12 +574,11 @@ export default {
return false; return false;
} }
return true; // return true; //
}
return true;
}, },
validateRules() { validateRules() {
if(this.form.ridingRule === '1'){ if(this.form.ridingRule == 2 && this.rule.length > 0){
console.log(111111111111)
return true
}
for (let i = 0; i < this.rule.length; i++) { for (let i = 0; i < this.rule.length; i++) {
const { start, end, eachUnit, fee } = this.rule[i]; const { start, end, eachUnit, fee } = this.rule[i];
if (start === '' || end === '') { if (start === '' || end === '') {
@ -621,6 +618,9 @@ export default {
} }
} }
return true; // return true; //
}else {
return true; //
}
}, },
addInterval() { addInterval() {
// this.rule.push({ start: '', end: '', eachUnit: '', fee: '' }); // this.rule.push({ start: '', end: '', eachUnit: '', fee: '' });
@ -739,13 +739,13 @@ export default {
}); });
}, },
submitForm() { submitForm() {
this.$refs["form"].validate(valid => {
if(!this.validateRules()){ if(!this.validateRules()){
return return
} }
if (!this.validateMore()) { if (!this.validateMore()) {
return; // return; //
} }
this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
// //
if (!/^\d+$/.test(this.startingTime)) { if (!/^\d+$/.test(this.startingTime)) {
@ -757,7 +757,7 @@ export default {
return; return;
} }
// this.form.rule.push(this.more) // this.form.rule.push(this.more)
console.log(this.form,'mmmmmmmmmmmmm'); console.log(JSON.stringify(this.form),'mmmmmmmmmmmmm');
let data = { ...this.form }; // 使 this.form let data = { ...this.form }; // 使 this.form