diff --git a/src/api/product.js b/src/api/product.js index 5ebdfc4..1a0dc11 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -7,7 +7,7 @@ const getByPage = (params) => { ); }; //炼厂list -const findByEntity = (params = {}) => { +const findByEntity = (params) => { return request.postJson( "/oil-refinery/xoilRefineryInfo/findByEntity", params @@ -17,8 +17,29 @@ const findByEntity = (params = {}) => { const update = (params) => { return request.postJson("/oil-refinery/oilRefineryProduct/update", params); }; +// 下单 +const orderSave = (params) => { + return request.postJson( + "/oil-refinery/xoilRefineryOrder/save", + params + ); +}; +//查看企业产品 +const getRefineryProductList = (params) => { + return request.postJson( + "/oil-refinery/oilRefineryProduct/getRefineryProductList", + params + ); +}; + // 搜索客户 + const getRefineryCompanyList = (params) => { + return request.postJson("/oil-user/oilCompanyInfo/getLikeByCompanyType", params); +}; export default { getByPage, findByEntity, + orderSave, + getRefineryProductList, + getRefineryCompanyList }; diff --git a/src/store/getters.js b/src/store/getters.js index 86733ce..b8a541f 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -7,6 +7,7 @@ const getters = { auth: (state) => state.user.auth, company_type: (state) => state.user.companyType, company_id: (state) => state.user.companyId, + company_name: (state) => state.user.userCompanyName, permission_routes: (state) => state.permission.routes, }; export default getters; diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 4e2475e..0e7ce91 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -5,6 +5,7 @@ const getDefaultState = () => { auth: null, companyType: 0, companyId: "", + userCompanyName:'' }; }; @@ -21,6 +22,7 @@ const mutations = { //chainParentMark 1:总公司 0:分公司 state.companyType = data.chainParentMark; state.companyId = data.userCompany; + state.userCompanyName = data.userCompanyName; }, }; diff --git a/src/utils/index.js b/src/utils/index.js index 09d2e74..d33d6ac 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -51,3 +51,8 @@ export function isLicensePlate(no) { ); return instance.test(no); } + +export function typeJudgment(object) { + let res = {}.__proto__.toString.call(object); + return res ? res : ""; +} diff --git a/src/views/login/index.vue b/src/views/login/index.vue index c217cf1..9ea2be5 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -154,7 +154,7 @@ export default { }); return; } - + console.log() localStorage.setItem("customerToken", res.data.accessToken); this.$router.replace("/"); }) diff --git a/src/views/order/components/billOfLading.vue b/src/views/order/components/billOfLading.vue index a19915d..2837988 100644 --- a/src/views/order/components/billOfLading.vue +++ b/src/views/order/components/billOfLading.vue @@ -83,7 +83,7 @@ -