From 4e07c0c78024e59e2dd5badf6c26bc45873978a6 Mon Sep 17 00:00:00 2001
From: zx <604444282@qq.com>
Date: Wed, 22 Jun 2022 17:46:04 +0800
Subject: [PATCH] zx
---
.env.development | 2 +-
.env.production | 2 +-
src/api/Item/index.js | 37 +++
src/api/public/index.js | 56 +++-
src/api/shopChoose/index.js | 10 +
src/components/upload/index.vue | 2 +-
src/mixins/index.js | 4 +-
src/request/index.js | 2 +-
src/store/actions.js | 3 +
src/store/getters.js | 5 +-
src/store/mutations.js | 5 +
src/store/state.js | 1 +
src/utils/util.js | 10 +-
src/views/Basic/Employee/depend/config.js | 2 +-
src/views/Basic/Employee/index.vue | 2 +-
.../_buildingManage/depend/config.js | 2 +-
.../EstateInfo/_buildingManage/index.vue | 2 +-
.../EstateInfo/_houseHoldInfo/depend/form.js | 2 +-
.../Basic/EstateInfo/_houseHoldInfo/index.vue | 2 +-
.../EstateInfo/_houseManage/depend/form.js | 2 +-
.../Basic/EstateInfo/_houseManage/index.vue | 2 +-
src/views/Basic/WorkOrder/finishDrawer.vue | 2 +-
src/views/Basic/WorkOrder/form.js | 2 +-
src/views/IntShop/Item/_addItem/index.vue | 92 +++---
.../IntShop/Item/_itemList/depend/config.js | 43 ++-
src/views/IntShop/Item/_itemList/index.vue | 107 +++----
.../IntShop/Setting/_certification/index.vue | 266 ++++++++++++++----
src/views/IntShop/Setting/_shopInfo/index.vue | 53 ++--
src/views/IntShop/WorkBench/index.vue | 18 +-
.../Operation/Announcement/depend/form.vue | 2 +-
.../Facility/_facilityInfo/index.vue | 2 +-
src/views/Operation/Vote/depend/editForm.vue | 2 +-
src/views/Operation/Vote/depend/form.vue | 2 +-
src/views/ShopChoose/index.vue | 99 +++++--
34 files changed, 604 insertions(+), 241 deletions(-)
create mode 100644 src/api/Item/index.js
create mode 100644 src/api/shopChoose/index.js
diff --git a/.env.development b/.env.development
index 4cb1cdc..1e3c5a3 100644
--- a/.env.development
+++ b/.env.development
@@ -1,3 +1,3 @@
NODE_ENV = 'development'
VUE_APP_URL = 'https://saas.kaidalai.cn/api/merchant'
-VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/admin'
\ No newline at end of file
+VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/merchant/'
\ No newline at end of file
diff --git a/.env.production b/.env.production
index 0863502..74783ad 100644
--- a/.env.production
+++ b/.env.production
@@ -1,3 +1,3 @@
NODE_ENV = 'production'
VUE_APP_URL = 'https://saas.kaidalai.cn/api/merchant'
-VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource'
\ No newline at end of file
+VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/merchant/'
\ No newline at end of file
diff --git a/src/api/Item/index.js b/src/api/Item/index.js
new file mode 100644
index 0000000..917803c
--- /dev/null
+++ b/src/api/Item/index.js
@@ -0,0 +1,37 @@
+import httpService from "@/request"
+
+// 账号-查询所有商品
+export function getGoodsList(params) {
+ return httpService({
+ url: `/user/goods/list`,
+ method: 'get',
+ params: params,
+ })
+}
+
+// 账号-添加商品
+export function addGood(params) {
+ return httpService({
+ url: `/user/goods/insert`,
+ method: 'post',
+ data: params,
+ })
+}
+
+// 批量删除物品
+export function delGoods(params) {
+ return httpService({
+ url: `/user/goods/delete`,
+ method: 'post',
+ data: params,
+ })
+}
+
+// 上下架
+export function isShelf(params) {
+ return httpService({
+ url: `/user/goods/isShelf`,
+ method: 'get',
+ params: params,
+ })
+}
\ No newline at end of file
diff --git a/src/api/public/index.js b/src/api/public/index.js
index dbbff2b..13e9a16 100644
--- a/src/api/public/index.js
+++ b/src/api/public/index.js
@@ -25,4 +25,58 @@ export function getCityList(params) {
method: 'get',
params: params,
})
-}
\ No newline at end of file
+}
+
+// 添加店铺
+export function addShop(params) {
+ return httpService({
+ url: `/user/authentication/subjectAuthenticationPre`,
+ method: 'post',
+ data: params,
+ })
+}
+
+// 根据店铺主键id查询店铺信息
+export function getShopDetail(params) {
+ return httpService({
+ url: `/user/shop/detail`,
+ method: 'get',
+ params: params,
+ })
+}
+
+// 根据店铺主键id查询主体信息
+export function getCertiDetail(params) {
+ return httpService({
+ url: `/user/authentication/authenticationFBI`,
+ method: 'get',
+ params: params,
+ })
+}
+
+// 修改主体认证
+export function updateCertification(params) {
+ return httpService({
+ url: `/user/authentication/updateSubjectAuthentication`,
+ method: 'post',
+ data: params,
+ })
+}
+
+// 查询所有的商品分类(级联)
+export function getItemCategory(params) {
+ return httpService({
+ url: `/user/goods/findAllGoodsCategory`,
+ method: 'get',
+ params: params,
+ })
+}
+
+// 店铺认证(已废弃)
+// export function subjectAuthentication(params) {
+// return httpService({
+// url: `/user/authentication/subjectAuthentication`,
+// method: 'post',
+// data: params,
+// })
+// }
\ No newline at end of file
diff --git a/src/api/shopChoose/index.js b/src/api/shopChoose/index.js
new file mode 100644
index 0000000..4c37c25
--- /dev/null
+++ b/src/api/shopChoose/index.js
@@ -0,0 +1,10 @@
+import httpService from "@/request"
+
+// 账号-查询所有店铺
+export function getAllShop(params) {
+ return httpService({
+ url: `/user/shop/list`,
+ method: 'get',
+ params: params,
+ })
+}
diff --git a/src/components/upload/index.vue b/src/components/upload/index.vue
index 4818f41..92c606d 100644
--- a/src/components/upload/index.vue
+++ b/src/components/upload/index.vue
@@ -50,7 +50,7 @@ export default {
previewVisible: false,
previewImage: "",
uploadHeaders: {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
},
};
},
diff --git a/src/mixins/index.js b/src/mixins/index.js
index fa5b6c3..c632c18 100644
--- a/src/mixins/index.js
+++ b/src/mixins/index.js
@@ -12,10 +12,10 @@ export default {
install(Vue) {
Vue.mixin({
computed: {
- ...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys','getCity','getUserInfo'])
+ ...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys','getCity','getUserInfo','getShopInfo'])
},
methods: {
- ...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys','setCity','setUserInfo'])
+ ...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys','setCity','setUserInfo','setShopInfo'])
}
})
}
diff --git a/src/request/index.js b/src/request/index.js
index c3681ba..75a9f8d 100644
--- a/src/request/index.js
+++ b/src/request/index.js
@@ -26,7 +26,7 @@ function filterRequestData(obj) {
//创建axios的实例
const httpService = axios.create({
baseURL: process.env.VUE_APP_URL ,// TODO:具体的配置可以根据项目情况而来
- timeout: 5000
+ timeout: 10000
})
//axios的拦截--request
diff --git a/src/store/actions.js b/src/store/actions.js
index c6e2697..f3e1524 100644
--- a/src/store/actions.js
+++ b/src/store/actions.js
@@ -25,6 +25,9 @@ const actions = {
setUserInfo: ({commit}, log) => {
commit('setUserInfo', log)
},
+ setShopInfo: ({commit}, log) => {
+ commit('setShopInfo', log)
+ },
}
export default actions
\ No newline at end of file
diff --git a/src/store/getters.js b/src/store/getters.js
index 0d574ce..0e113a6 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -24,7 +24,10 @@ const getters = {
},
getUserInfo(state) {
return state.userInfo
- }
+ },
+ getShopInfo(state) {
+ return state.shopInfo
+ },
}
export default getters
\ No newline at end of file
diff --git a/src/store/mutations.js b/src/store/mutations.js
index 5d7afb4..1b057ef 100644
--- a/src/store/mutations.js
+++ b/src/store/mutations.js
@@ -32,6 +32,11 @@ const mutations = {
state.userInfo = log
let str = JSON.stringify(log);
sessionStorage.setItem('userInfo', str);
+ },
+ setShopInfo (state, log) {
+ state.shopInfo = log
+ let str = JSON.stringify(log);
+ sessionStorage.setItem('shopInfo', str);
}
}
diff --git a/src/store/state.js b/src/store/state.js
index 13b4db6..4076c7b 100644
--- a/src/store/state.js
+++ b/src/store/state.js
@@ -13,5 +13,6 @@ const state = {
communityCode: sessionStorage.getItem('communityCode') || "",
cityList:[],
userInfo: JSON.parse(sessionStorage.getItem('userInfo')) || {},
+ shopInfo: JSON.parse(sessionStorage.getItem('shopInfo')) || {},
}
export default state
\ No newline at end of file
diff --git a/src/utils/util.js b/src/utils/util.js
index cfe91b1..0c05a36 100644
--- a/src/utils/util.js
+++ b/src/utils/util.js
@@ -7,16 +7,10 @@ export default {
Vue.prototype.$axios = axios
Vue.prototype.qs = qs
// 上传
- // Vue.prototype.$upload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/upload/uploadImg'
- // 上传员工/房屋/住户/单元/楼栋EXCEL
- // Vue.prototype.$excelUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importManageUserExcel'
- // Vue.prototype.$houseUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importEstateExcel'
- // Vue.prototype.$residentUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importResidentExcel'
- // Vue.prototype.$unitUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importUnitExcel'
- // Vue.prototype.$buildingUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importBuildingExcel'
+ Vue.prototype.$upload = process.env.VUE_APP_URL + '/user/upload/uploadImg'
// 静态地址
Vue.prototype.$ImgUrl = (src) => {
- return process.env.VUE_APP_STATIC + store.getters.getCommunityCode + '/' + src
+ return process.env.VUE_APP_STATIC + '/' + src
}
// 时间格式化
Vue.prototype.formatDate = (time, fmt) => {
diff --git a/src/views/Basic/Employee/depend/config.js b/src/views/Basic/Employee/depend/config.js
index bdc2146..c1d2e05 100644
--- a/src/views/Basic/Employee/depend/config.js
+++ b/src/views/Basic/Employee/depend/config.js
@@ -213,5 +213,5 @@ export const options = {
};
import store from "@/store";
export const uploadHeaders = {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
};
diff --git a/src/views/Basic/Employee/index.vue b/src/views/Basic/Employee/index.vue
index 48a3f4b..3d058d0 100644
--- a/src/views/Basic/Employee/index.vue
+++ b/src/views/Basic/Employee/index.vue
@@ -284,7 +284,7 @@ export default {
type: "add",
// 文件上传
uploadHeaders: {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
}
};
},
diff --git a/src/views/Basic/EstateInfo/_buildingManage/depend/config.js b/src/views/Basic/EstateInfo/_buildingManage/depend/config.js
index 29c5c0d..c4f0678 100644
--- a/src/views/Basic/EstateInfo/_buildingManage/depend/config.js
+++ b/src/views/Basic/EstateInfo/_buildingManage/depend/config.js
@@ -140,5 +140,5 @@ export const unitColumns = [
]
import store from "@/store";
export const uploadHeaders = {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
}
\ No newline at end of file
diff --git a/src/views/Basic/EstateInfo/_buildingManage/index.vue b/src/views/Basic/EstateInfo/_buildingManage/index.vue
index 0ee19be..0dc0616 100644
--- a/src/views/Basic/EstateInfo/_buildingManage/index.vue
+++ b/src/views/Basic/EstateInfo/_buildingManage/index.vue
@@ -88,7 +88,7 @@ export default {
editId:undefined,
// 上传
uploadHeaders: {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
}
};
},
diff --git a/src/views/Basic/EstateInfo/_houseHoldInfo/depend/form.js b/src/views/Basic/EstateInfo/_houseHoldInfo/depend/form.js
index 14d99eb..c6b6476 100644
--- a/src/views/Basic/EstateInfo/_houseHoldInfo/depend/form.js
+++ b/src/views/Basic/EstateInfo/_houseHoldInfo/depend/form.js
@@ -95,5 +95,5 @@ export const options = {
// 请求头
import store from "@/store";
export const uploadHeaders = {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
}
\ No newline at end of file
diff --git a/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue b/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue
index 5b5fa6b..bb32ab2 100644
--- a/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue
+++ b/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue
@@ -309,7 +309,7 @@ export default {
},
// 上传
uploadHeaders: {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
}
};
},
diff --git a/src/views/Basic/EstateInfo/_houseManage/depend/form.js b/src/views/Basic/EstateInfo/_houseManage/depend/form.js
index fe04a53..2e0e5aa 100644
--- a/src/views/Basic/EstateInfo/_houseManage/depend/form.js
+++ b/src/views/Basic/EstateInfo/_houseManage/depend/form.js
@@ -65,5 +65,5 @@ export const rules = {
// 请求头
import store from "@/store";
export const uploadHeaders = {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
}
\ No newline at end of file
diff --git a/src/views/Basic/EstateInfo/_houseManage/index.vue b/src/views/Basic/EstateInfo/_houseManage/index.vue
index 9bde90a..994ac22 100644
--- a/src/views/Basic/EstateInfo/_houseManage/index.vue
+++ b/src/views/Basic/EstateInfo/_houseManage/index.vue
@@ -234,7 +234,7 @@ export default {
},
// 上传
uploadHeaders: {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
},
fileList: []
};
diff --git a/src/views/Basic/WorkOrder/finishDrawer.vue b/src/views/Basic/WorkOrder/finishDrawer.vue
index f2beb4b..e7094e7 100644
--- a/src/views/Basic/WorkOrder/finishDrawer.vue
+++ b/src/views/Basic/WorkOrder/finishDrawer.vue
@@ -80,7 +80,7 @@
import store from "@/store";
import {finish} from "@/api/basic/Workorder";
const uploadHeaders = {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
}
function getBase64(file) {
return new Promise((resolve, reject) => {
diff --git a/src/views/Basic/WorkOrder/form.js b/src/views/Basic/WorkOrder/form.js
index d6c8f07..26ef1c1 100644
--- a/src/views/Basic/WorkOrder/form.js
+++ b/src/views/Basic/WorkOrder/form.js
@@ -94,5 +94,5 @@ export const options = {
// 请求头
import store from "@/store";
export const uploadHeaders = {
- "manage-login-token": store.getters.getToken,
+ "merchant-login-token": store.getters.getToken,
}
\ No newline at end of file
diff --git a/src/views/IntShop/Item/_addItem/index.vue b/src/views/IntShop/Item/_addItem/index.vue
index 00636cb..22231d2 100644
--- a/src/views/IntShop/Item/_addItem/index.vue
+++ b/src/views/IntShop/Item/_addItem/index.vue
@@ -14,40 +14,35 @@
>