| | |
| | | dateRange: [], |
| | | status: '' |
| | | }, |
| | | loading: false, |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 800, |
| | |
| | | methods: { |
| | | handleSearch() { |
| | | console.log('搜索条件:', this.query) |
| | | // 修复方案:使用箭头函数 + 字段校验 |
| | | this.loading = true; |
| | | const vm = this; // 保留Vue实例引用 |
| | | let ajax = new $ax(Feng.ctxPath + "/tHuiminCard/list", |
| | | (data) => { // 改用箭头函数 |
| | | console.log('原始数据:', data); |
| | | this.loading = false; |
| | | if(data.rows && Array.isArray(data.rows)){ |
| | | vm.tableData = data.rows; |
| | | vm.total = data.total; |
| | |
| | | } |
| | | }, |
| | | (data) => { |
| | | this.loading = false; |
| | | Feng.error("搜索失败: " + (data.responseJSON?.message || '服务器异常')); // 错误提示优化 |
| | | }); |
| | | |