Browse Source

联调错误修正

zhanghe 7 years ago
parent
commit
13443bd475
4 changed files with 5 additions and 10 deletions
  1. 1 3
      src/models/campus.js
  2. 1 3
      src/models/mproduct/mproduct.js
  3. 1 3
      src/models/terminal/terminal.js
  4. 2 1
      src/utils/config.js

+ 1 - 3
src/models/campus.js

@@ -5,7 +5,6 @@ import queryString from 'query-string';
 import { pageModel } from './common';
 import { pageSize } from '../utils/config';
 import { checkSearchParams } from '../utils/utils';
-import { getLocalUser } from '../utils/helper';
 
 export default modelExtend(pageModel, {
   namespace: 'campus',
@@ -34,8 +33,7 @@ export default modelExtend(pageModel, {
   effects: {
     * query({ payload = {} }, { call, put }) {
       yield put({ type: 'changeLoading', payload: { listLoading: true } });
-      const { merchantId } = getLocalUser();
-      const { data, success } = yield call(query, { ...payload, merchantId });
+      const { data, success } = yield call(query, payload);
       if (success) {
         yield put({
           type: 'querySuccess',

+ 1 - 3
src/models/mproduct/mproduct.js

@@ -4,7 +4,6 @@ import { query } from '../../services/mproduct';
 import { pageModel } from '../common';
 import { pageSize } from '../../utils/config';
 import { checkSearchParams } from '../../utils/utils';
-import { getLocalUser } from '../../utils/helper';
 
 export default modelExtend(pageModel, {
   namespace: 'mproduct',
@@ -28,8 +27,7 @@ export default modelExtend(pageModel, {
   effects: {
     * query({ payload = {} }, { call, put }) {
       yield put({ type: 'changeLoading', payload: { listLoading: true } });
-      const { merchantId } = getLocalUser();
-      const { data, success } = yield call(query, { ...payload, merchantId });
+      const { data, success } = yield call(query, payload);
       if (success) {
         yield put({
           type: 'querySuccess',

+ 1 - 3
src/models/terminal/terminal.js

@@ -5,7 +5,6 @@ import queryString from 'query-string';
 import { pageModel } from '../common';
 import { pageSize } from '../../utils/config';
 import { checkSearchParams } from '../../utils/utils';
-import { getLocalUser } from '../../utils/helper';
 
 export default modelExtend(pageModel, {
   namespace: 'terminal',
@@ -29,8 +28,7 @@ export default modelExtend(pageModel, {
   effects: {
     * query({ payload = {} }, { call, put }) {
       yield put({ type: 'changeLoading', payload: { listLoading: true } });
-      const { merchantId } = getLocalUser();
-      const { data, success } = yield call(query, { ...payload, merchantId });
+      const { data, success } = yield call(query, payload);
       if (success) {
         yield put({
           type: 'querySuccess',

+ 2 - 1
src/utils/config.js

@@ -44,7 +44,8 @@ Codes.CODE_SEASON = '季';
 Codes.CODE_ITEM = '件';
 
 module.exports = {
-  apiHost: '/api/v1',
+  //apiHost: '/api/v1',
+  apiHost: 'http://tt-cms.api.ai160.com',
   ossHost: 'http://efunimgs.oss-cn-beijing.aliyuncs.com',
   // apiHost: '/api',
   // 每页返回数据量