| | |
| | | result: result |
| | | }; |
| | | |
| | | console.log("请求参数:", requestData); |
| | | console.log("当前选项卡:", this.current); |
| | | console.log("result状态:", result); |
| | | |
| | | // 判断搜索框是否有值 |
| | | if (this.searchValue != null && this.searchValue.trim() !== '') { |
| | |
| | | url: url, |
| | | data: requestData |
| | | }).then(res => { |
| | | console.log("API返回完整数据:", JSON.stringify(res, null, 2)); |
| | | console.log("res结构:", res); |
| | | console.log("res.data:", res.data); |
| | | console.log("res.totalCount:", res.totalCount); |
| | | |
| | | // 根据响应格式.json,正确的数据结构是: |
| | | // res.data 是数组,res.totalCount 是总数 |
| | |
| | | return; |
| | | } |
| | | |
| | | console.log("解析后的dataList:", dataList); |
| | | console.log("dataList长度:", dataList ? dataList.length : 0); |
| | | |
| | | if (this.pageIndex === 1) { |
| | | this.data = dataList || []; |
| | |
| | | } |
| | | } |
| | | |
| | | console.log("处理后的data:", this.data); |
| | | console.log("data长度:", this.data.length); |
| | | |
| | | this.totalCount = totalCount; |
| | | this.totalPage = Math.ceil(this.totalCount / this.limit); |