diff --git a/src/mock/permission.js b/src/mock/permission.js
index bdf2980..9e50855 100644
--- a/src/mock/permission.js
+++ b/src/mock/permission.js
@@ -26,6 +26,11 @@ export const menuListItem = [
url: "/activity",
icon: "Menu",
},
+ {
+ title: "重复下单开关",
+ url: "/switchOrder",
+ icon: "Menu",
+ },
]
},
{
diff --git a/src/router/originalRoutingTable.js b/src/router/originalRoutingTable.js
index 2903f7e..c4a5667 100644
--- a/src/router/originalRoutingTable.js
+++ b/src/router/originalRoutingTable.js
@@ -64,6 +64,15 @@ const routerList = [
requiresAuth: true, //有一些页面是否登录才能进去
},
},
+ {
+ path: "/switchOrder",
+ name: "switchOrder",
+ component: () => import("../views/system/switchOrder.vue"),
+ meta: {
+ name: "重复下单开关",
+ requiresAuth: true, //有一些页面是否登录才能进去
+ },
+ },
{
path: "/edit",
name: "edit",
diff --git a/src/views/goods/index.vue b/src/views/goods/index.vue
index af09c61..f590c17 100644
--- a/src/views/goods/index.vue
+++ b/src/views/goods/index.vue
@@ -40,6 +40,20 @@
/>
+
+
+
+
+
+
+
+
+
+
@@ -200,11 +222,13 @@ const formData = ref({
price: '',
carouselImage: [],
details: '',
+ icon: '',
isList: false
})
const fileBannerList = ref([]); // 轮播图
const fileDetail = ref([]); // 详情图
+const fileIcon = ref([]); // 服务图标
// 页面初始化
const initData = () => {
@@ -262,6 +286,13 @@ const handleDetailExceed= (files, uploadFiles) => {
)
}
+// 服务图标上传限制
+const handleIconExceed = (files, uploadFiles) => {
+ ElMessage.warning(
+ `服务图标最多可上传1张`
+ )
+}
+
// 轮播图移除
const handleBannerRemove = (file) => {
@@ -276,6 +307,11 @@ const handleDetailRemove = (file, fileList) => {
formData.value.details = '';
}
+// 服务图表移除
+const handleIconRemove = (file, fileList) => {
+ formData.value.icon = '';
+}
+
// 轮播上传请求
const addUploadCarouselImageFile = (params) => {
const formData = new FormData();
@@ -310,6 +346,23 @@ const addUploadDetailFile = (params) => {
});
}
+// 服务图标上传
+const addUploadIconFile = (params) => {
+ const formData = new FormData();
+ formData.append('files', params.file);
+
+ addFile(formData)
+ .then((response) => {
+ handleIconSuccess(response, params.file, params.fileList);
+ })
+ .catch((error) => {
+ if(error)
+ {
+ handleError(error, params.file, params.fileList);
+ }
+ });
+}
+
// 处理轮播上传成功的回调
const handleCarouselImageSuccess = (response, file) => {
@@ -328,6 +381,12 @@ const handleDetailSuccess = (response) => {
loading.value = false;
}
+// 处理服务图标上传成功的回调
+const handleIconSuccess = (response) => {
+ formData.value.icon = response.data[0];
+ loading.value = false;
+}
+
// 处理上传失败的回调
const handleError = (error, file, fileList) => {
loading.value = false;
diff --git a/src/views/goods/options.js b/src/views/goods/options.js
index a5e3129..6c19c23 100644
--- a/src/views/goods/options.js
+++ b/src/views/goods/options.js
@@ -16,6 +16,12 @@ export const options = [
props: 'isList',
width: '150',
align: 'left'
+ },
+ {
+ label: '服务图标',
+ props: 'icon',
+ width: 'auto',
+ align: 'left'
},
{
label: '轮播图',
diff --git a/src/views/order/index.vue b/src/views/order/index.vue
index 318be1d..3afe52f 100644
--- a/src/views/order/index.vue
+++ b/src/views/order/index.vue
@@ -66,7 +66,7 @@
/>
-
+
+
+
+ 重复下单开关
+
+
+
+
+
+
+
+