调整收费套餐页面
This commit is contained in:
parent
a65e254c17
commit
105269a62e
|
@ -5,7 +5,7 @@ NODE_ENV = production
|
|||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
# 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://dche.ccttiot.com/prod-api'
|
||||
# VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api'
|
||||
# 共享电动车管理系统/测试环境
|
||||
# VUE_APP_BASE_API = 'https://dianche.chuantewulian.cn/stage-api'
|
||||
|
|
|
@ -538,9 +538,7 @@ export default {
|
|||
}
|
||||
},
|
||||
validateMore() {
|
||||
if(this.form.ridingRule === '1'){
|
||||
return true
|
||||
}
|
||||
if(this.form.ridingRule == 2) {
|
||||
const { start, end, eachUnit, fee } = this.more;
|
||||
// 检查开始和结束值是否为空
|
||||
if (start === '' || end === '') {
|
||||
|
@ -576,12 +574,11 @@ export default {
|
|||
return false;
|
||||
}
|
||||
return true; // 校验通过
|
||||
}
|
||||
return true;
|
||||
},
|
||||
validateRules() {
|
||||
if(this.form.ridingRule === '1'){
|
||||
console.log(111111111111)
|
||||
return true
|
||||
}
|
||||
if(this.form.ridingRule == 2 && this.rule.length > 0){
|
||||
for (let i = 0; i < this.rule.length; i++) {
|
||||
const { start, end, eachUnit, fee } = this.rule[i];
|
||||
if (start === '' || end === '') {
|
||||
|
@ -621,6 +618,9 @@ export default {
|
|||
}
|
||||
}
|
||||
return true; // 校验通过
|
||||
}else {
|
||||
return true; // 校验通过
|
||||
}
|
||||
},
|
||||
addInterval() {
|
||||
// this.rule.push({ start: '', end: '', eachUnit: '', fee: '' });
|
||||
|
@ -739,13 +739,13 @@ export default {
|
|||
});
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if(!this.validateRules()){
|
||||
return
|
||||
}
|
||||
if (!this.validateMore()) {
|
||||
return; // 校验未通过,阻止提交
|
||||
}
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
// 如何不是整数,弹窗提示
|
||||
if (!/^\d+$/.test(this.startingTime)) {
|
||||
|
@ -757,7 +757,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
// this.form.rule.push(this.more)
|
||||
console.log(this.form,'mmmmmmmmmmmmm');
|
||||
console.log(JSON.stringify(this.form),'mmmmmmmmmmmmm');
|
||||
let data = { ...this.form }; // 使用对象扩展运算符确保复制一个新对象,避免直接修改 this.form
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user