14、fetch请求操作

48 阅读1分钟
fetch(`/CardSolution/attendance/result/page?systime=` + new Date().getTime(), {
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        method: 'post',
                        body: JSON.stringify(params)
                    }).then(res => res.json()).then(res => {
                        if (res.success) {
                            console.log('res.data.pageData=>', res.data.pageData);
                            this.tableData = res.data.pageData
                            this.totalRows = res.data.totalRows
                            console.log('this.totalRows', this.totalRows);
                        } else {
                            this.$toast('暂无数据');
                        }
                    })