@@ -154,9 +154,9 @@ class BaseController extends Controller {
ajaxErrorBody(error, msg) {
if (error.stack) {
- return {err: 2, msg: msg, data: null};
+ return {err: 4, msg: msg, data: null};
} else {
- return {err: 1, msg: error.toString(), data: null};
+ return {err: 3, msg: error.toString(), data: null};
}
@@ -116,7 +116,7 @@ module.exports = app => {
if (stream) {
await sendToWormhole(stream);
- ctx.body = {err: 1, msg: err.toString(), data: null};
+ this.ajaxErrorBody(err, '导入数据失败');
@@ -94,9 +94,9 @@ module.exports = options => {
if (this.helper.isAjax(this.request)) {
if (err.stack) {
- this.body = {err: 2, msg: '标段数据未知错误', data: null};
+ this.body = {err: 4, msg: '标段数据未知错误', data: null};
- this.body = {err: 1, msg: err.toString(), data: null};
+ this.body = {err: 3, msg: err.toString(), data: null};
if (this.helper.isWap(this.request)) {
@@ -49,9 +49,9 @@ module.exports = options => {
@@ -46,7 +46,7 @@ module.exports = app => {
*/
async addReviseNode(tid, rid, lid, count) {
if (!rid) return null;
- return await this.addNodeBatch(tid, lid, {crid: rid, revise_calc: 1}, count);
+ return await this.addNodeBatch(tid, lid, {crid: rid, check_calc: 1}, count);
/**