feat(addTicket): 购票逻辑报错处理

This commit is contained in:
woody 2025-05-27 15:32:42 +08:00
parent 65d3fc1ebf
commit 7cc12d6fac
1 changed files with 3 additions and 1 deletions

View File

@ -203,7 +203,6 @@ export default {
} }
}, },
mounted() { mounted() {
this.getData()
// 1=,2=,3=4 // 1=,2=,3=4
if ( if (
this.$route.query.controlType == 4 || this.$route.query.controlType == 4 ||
@ -213,6 +212,7 @@ export default {
} else { } else {
this.lookOver = false this.lookOver = false
} }
console.log(this.$route.query.controlType, 'this.$route.query.controlType')
this.controlType = this.$route.query.controlType this.controlType = this.$route.query.controlType
this.pkId = this.$route.query.pkId || '' this.pkId = this.$route.query.pkId || ''
if (this.pkId) { if (this.pkId) {
@ -265,10 +265,12 @@ export default {
}, },
submit() { submit() {
console.log(this.controlType, 'obj')
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
let obj = {} let obj = {}
obj = this.ruleForm obj = this.ruleForm
if (this.controlType == 1) { if (this.controlType == 1) {
api.ticketSave(obj).then((res) => { api.ticketSave(obj).then((res) => {
if (res.code == 200) { if (res.code == 200) {