mock.js 2.16 KB
const Mock = require('mockjs');

Mock.mock("/api/v1/financial/contracts/contract/project/acceptancs", 'post', res => {
  console.log("project add successful");
  console.log(res.body);
  return {
    encode: 200
  }
})
Mock.mock("/api/v1/financial/contracts/contract/project/acceptancs", 'put', res => {
  console.log("project modify successful");
  console.log(res.body);
  return {
    encode: 200
  }
})


Mock.mock("http://192.168.9.162:20080/api/v1/financial/contracts", 'post', res => {
  console.log("contract add successful");
  console.log(res.body);
  return {
    encode: 200
  }
})
Mock.mock("http://192.168.9.162:20080/api/v1/financial/contracts", 'put', res => {
  console.log("contract modify successful");
  console.log(res.body);
  return {
    encode: 200
  }
})


Mock.mock("/api/v1/financial/contracts/contract/payments", 'post', res => {
  console.log("payment add successful");
  console.log(res.body);
  return {
    encode: 200
  }
})
Mock.mock("/api/v1/financial/contracts/contract/payments", 'put', res => {
  console.log("payment modify successful");
  console.log(res.body);
  return {
    encode: 200
  }
})


Mock.mock("/api/v1/financial/contracts/contract/delivers", 'post', res => {
  console.log("delivers add successful");
  console.log(res.body);
  return {
    encode: 200
  }
})
Mock.mock("/api/v1/financial/contracts/contract/delivers", 'put', res => {
  console.log("delivers modify successful");
  console.log(res.body);
  return {
    encode: 200
  }
})



Mock.mock("/api/v1/financial/contracts/contract/receipts", 'post', res => {
  console.log("receipts add successful");
  console.log(res.body);
  return {
    encode: 200
  }
})
Mock.mock("/api/v1/financial/contracts/contract/receipts", 'put', res => {
  console.log("receipts modify successful");
  console.log(res.body);
  return {
    encode: 200
  }
})


Mock.mock("/api/v1/financial/contracts/contract/rebacks", 'post', res => {
  console.log("rebacks add successful");
  console.log(res.body);
  return {
    encode: 200
  }
})
Mock.mock("/api/v1/financial/contracts/contract/rebacks", 'put', res => {
  console.log("rebacks modify successful");
  console.log(res.body);
  return {
    encode: 200
  }
})