Commit 92b62fb4 authored by cellee's avatar cellee

0001错误 不提示

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent f7079474
...@@ -63,10 +63,10 @@ export default { ...@@ -63,10 +63,10 @@ export default {
console.log(resp); console.log(resp);
if (resp.code == 500 || resp.error_code != '0000') { if (resp.code == 500 || resp.error_code != '0000') {
// window.location.href = '/500'; // window.location.href = '/500';
message.error(`${resp.error_code}:${resp.error_msg}`);
} }
if (resp.error_code != '0000') { if (resp.error_code != '0000') {
console.log('请求错误码:' + '(' + playload.index + ')' + resp.error_code); message.error(`${resp.error_code}:${resp.error_msg}`);
console.log(playload);
} else { } else {
switch (playload.index) { switch (playload.index) {
case 21: case 21:
......
...@@ -3,6 +3,7 @@ import { message } from 'antd'; ...@@ -3,6 +3,7 @@ import { message } from 'antd';
import { Link, useIntl, connect, Dispatch, history } from 'umi'; import { Link, useIntl, connect, Dispatch, history } from 'umi';
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
import { printf } from '@/utils/log';
export default { export default {
namespace: 'Contract', namespace: 'Contract',
...@@ -46,8 +47,8 @@ export default { ...@@ -46,8 +47,8 @@ export default {
console.log('开始请求'); console.log('开始请求');
const resp = yield call(service.RA, playload); const resp = yield call(service.RA, playload);
if (resp.error_code != '0000') { if (resp.error_code != '0000') {
console.log('请求错误码:' + '(' + playload.index + ')' + resp.error_code); printf(playload, resp);
console.log(playload); message.error(`${resp.error_code}:${resp.error_msg}`);
} else { } else {
switch (playload.index) { switch (playload.index) {
case 19: case 19:
......
...@@ -102,8 +102,7 @@ export default { ...@@ -102,8 +102,7 @@ export default {
} }
if (resp.error_code != '0000') { if (resp.error_code != '0000') {
console.log('请求错误码:' + '(' + playload.index + ')' + resp.error_code); message.error(`${resp.error_code}:${resp.error_msg}`);
console.log(playload);
var Data3Error = null; var Data3Error = null;
var Result = null; var Result = null;
let Data4Error = null; let Data4Error = null;
......
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2020-12-04 17:24:27
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\VisitorRecord.ts
*/
import * as service from '../../services/tos'; import * as service from '../../services/tos';
import { message } from 'antd'; import { message } from 'antd';
import { Link, useIntl, connect, Dispatch, history } from 'umi'; import { Link, useIntl, connect, Dispatch, history } from 'umi';
...@@ -34,11 +42,12 @@ export default { ...@@ -34,11 +42,12 @@ export default {
//标准请求 //标准请求
*RA({ playload }, { call, put }) { *RA({ playload }, { call, put }) {
const resp = yield call(service.RA, playload); const resp = yield call(service.RA, playload);
console.log(resp);
if (resp.code == 500 || resp.error_code != '0000') { if (resp.code == 500 || resp.error_code != '0000') {
message.error(`${resp.error_code}:${resp.error_msg}`);
} }
if (resp.error_code != '0000') { if (resp.error_code != '0000') {
printf(playload, resp); printf(playload, resp);
message.error(`${resp.error_code}:${resp.error_msg}`);
} else { } else {
switch (playload.index) { switch (playload.index) {
case 26: case 26:
......
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