今天更改访问方式,get post 出现了以下问题
以下代码把method:"get" 更改为 method:"post"没有用
getDataList(dd) { //debugger;; this.dataListLoading = true; this.$http({ url: this.$http.adornUrl( "/generator/kdtask/queryFZOrdersE/" + this.taskUseSum ), method: "get", params: this.$http.adornParams({ page: this.pageIndex, limit: this.pageSize, rt_results: this.dataForm.key, }), }).then(({ data }) => { if (data && data.code === 0) { this.dataList = data.orderList; this.backDataList= data.orderList; if (this.dataList) { this.orderArray = []; this.taskIdsArray=[]; this.dataList.forEach((order) => { this.orderArray.push(JSON.parse(order.rt_order)); this.taskIdsArray.push(order.id); }); } //this.totalPage = data.page.totalCount; } else { this.dataList = []; this.backDataList= []; this.totalPage = 0; } this.dataListLoading = false; }); },
post 要用以下方式
getSameDataList_post() {
//debugger;;
this.dataListLoading = true;
this.$http({
url: this.$http.adornUrl(
"/generator/kdtask/queryAllByIds"
),
method: "post",
data: this.$http.adornData(this.taskIdsArray, false)
// params: this.$http.adornParams({
// // ids: this.taskIdsArray,
// data: this.$http.adornData(this.taskIdsArray, false)
// }),
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.List;
} else {
this.totalPage = 0;
}
this.dataListLoading = false;
});
},