Commit a9586508 by Sxy

fix: 优化看板

parent e08c3b32
......@@ -24,6 +24,15 @@ class StatisticsCtl extends CtlBase {
}
}
// 获取 pathName
async getPathName(pobj, qobj, req) {
try {
const rs = await this.service.getPathName(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
// 需求渠道分析
async getStatisticsByUappId(pobj, qobj, req) {
try {
......
......@@ -7,6 +7,9 @@ class StatisticsService {
async getAllProducts(pobj) {
return ToQiFuTong.getAllProducts();
}
async getPathName(pobj) {
return ToQiFuTong.getPathName();
}
async getStatisticsByUappId(pobj) {
const data = await ToQiFuTong.getStatisticsByUappId({
start: pobj.start,
......@@ -24,7 +27,7 @@ class StatisticsService {
const data = await ToQiFuTong.getOrderStatisticsByUappId({
start: pobj.start,
end: pobj.end,
type_code: pobj.type_code,
pathName: pobj.type_code,
status: pobj.status
});
const dates = ToQiFuTong.getAllDate(pobj.start, pobj.end);
......@@ -82,12 +85,12 @@ class StatisticsService {
result.push({
uapp_id: info.uapp_id ? info.uapp_id.toString() : "",
count: info.count,
type_code: val.type_code
type_code: val.pathName
})
}
productList.push({
count: productCount,
type_code: val.type_code
type_code: val.pathName
})
}
productList = productList.sort(function (a, b) { return a.count - b.count });
......@@ -180,7 +183,7 @@ class StatisticsService {
endNow: pobj.endNow,
startLast: pobj.startLast,
endLast: pobj.endLast,
type_code: pobj.type_code,
pathName: pobj.type_code,
uapp_id: pobj.uapp_id
});
return {
......@@ -201,6 +204,7 @@ class StatisticsService {
uapp_id: pobj.uapp_id,
type_code: pobj.type_code,
type_name: pobj.type_code,
pathName: pobj.type_code,
pageIndex: pobj.pageNum || 1,
pageSize: pobj.pageSize || 10,
listType: pobj.listType,
......
......@@ -58,9 +58,9 @@ class BaseClient {
async postRequest(url, data, headers = {}) {
try {
// console.log(` ${url} : 请求信息 ------- `);
// console.log(JSON.stringify(data))
// console.log(JSON.stringify(headers))
console.log(` ${url} : 请求信息 ------- `);
console.log(JSON.stringify(data))
console.log(JSON.stringify(headers))
let result = await axios.post(`${url}`, data, {
headers: {
'Content-Type': 'application/json',
......@@ -68,8 +68,8 @@ class BaseClient {
}
});
result = result.data;
// console.log(` ${url} : 返回信息 ------- `);
// console.log(result);
console.log(` ${url} : 返回信息 ------- `);
console.log(result);
if (result.status === 0) {
return result.data
} else {
......@@ -98,6 +98,14 @@ class BaseClient {
});
return data;
}
async getPathName() {
const data = await this.pushQiFuTong('/web/opaction/order/springBoard', {
"actionType": "getPathName",
"actionBody": {
}
});
return data;
}
async getNeedProductType() {
const data = await this.pushQiFuTong('/web/action/opNeed/springBoard', {
"actionType": "getNeedProductType",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment