diff --git a/mock/modules/ycy.js b/mock/modules/ycy.js index aba129e..318fac0 100644 --- a/mock/modules/ycy.js +++ b/mock/modules/ycy.js @@ -5,14 +5,27 @@ const StockList = Mock.mock({ "id|+1": "0", billserial: "@integer(10000000000,19999999999)", billType: "@integer(0,5)", - stockNum: "前端", - unit: "前端", + stockNum: "@integer(1,2)", + unit: "@cword(张本,1)", stockDate: "@date", operator: "@cname", remark: " @integer(10000000000,19999999999)", }, ], }); -export default [ -] +export default [ + { + url: "/stockList", + method: "get", + response: () => { + const obj = { + list: StockList, + }; + return { + code: 200, + data: obj, + }; + }, + }, +]; diff --git a/src/api/login.js b/src/api/login.js index 34c4da1..3d7cbb8 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -5,4 +5,4 @@ const API = { udaiu: "/user", }; export const reqUser = () => request.get(API.LOGIN_URL); -export const reqUser = (data) => request.post(API.LOGIN_URL, data); +export const reqUserone = (data) => request.post(API.LOGIN_URL, data); diff --git a/src/api/stockList.js b/src/api/stockList.js new file mode 100644 index 0000000..47b311a --- /dev/null +++ b/src/api/stockList.js @@ -0,0 +1,7 @@ +import request from "@/utils/requestMock"; + +const API = { + STOCK_LIST: "/stockList", +}; + +export const reqStockList = () => request.get(API.STOCK_LIST); diff --git a/src/pages/finance-bill-manage/billStock.vue b/src/pages/finance-bill-manage/billStock.vue index dc6a5a8..ed57b49 100644 --- a/src/pages/finance-bill-manage/billStock.vue +++ b/src/pages/finance-bill-manage/billStock.vue @@ -35,8 +35,9 @@