Browse Source

修改mock

pull/99/head
xuxiaoming 3 years ago
parent
commit
5052322aef
3 changed files with 2 additions and 7 deletions
  1. +1
    -1
      .gitignore
  2. +1
    -4
      src/server/mock/index.js
  3. +0
    -2
      src/views/productionPlanning/productInventory/index.vue

+ 1
- 1
.gitignore View File

@ -2,7 +2,7 @@
node_modules
/dist
yarn.lock
# local env files
.env.local
.env.*.local


+ 1
- 4
src/server/mock/index.js View File

@ -2,7 +2,7 @@ import Mock from 'mockjs'
import * as login from './modules/login.js'
// 可以通过 isOpen 参数设置是否拦截整个模块的 mock 功能
fnCreate(login, true)
fnCreate(login, false)
/**
* 创建mock模拟数据
@ -17,9 +17,6 @@ function fnCreate(mod, isOpen = true) {
Mock.mock(new RegExp(res.url), res.type, (opts) => {
opts['data'] = opts.body ? JSON.parse(opts.body) : null
delete opts.body
console.log('\n')
console.log('%cmock拦截, 请求: ', 'color:blue', opts)
console.log('%cmock拦截, 响应: ', 'color:blue', res.data)
return res.data
})
}


+ 0
- 2
src/views/productionPlanning/productInventory/index.vue View File

@ -56,10 +56,8 @@ export default {
"ArticleStock-ArtId",
"ArticleStock-Descr",
"ArticleStock-FGQty",
"ArticleStock-SFGQty",
"ArticleStock-WIPQty",
"ArticleStock-PUCQty",
"ArticleStock-OSCQty"
],
articleList:[],
syncDataDisable:false,


Loading…
Cancel
Save