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/store/modules/users.js b/src/store/modules/users.js
index 4c0b912..a15428d 100644
--- a/src/store/modules/users.js
+++ b/src/store/modules/users.js
@@ -8,7 +8,7 @@ export default {
state: {
UserInfo: {},
token: sessionStorage.getItem("token") || "",
- isCollapse: true,
+ isCollapse: false,
themeConfig: {
primary: "#4060c7",
tabColor: "#FFFFFF",
diff --git a/src/views/goods/index.vue b/src/views/goods/index.vue
index af09c61..c08153b 100644
--- a/src/views/goods/index.vue
+++ b/src/views/goods/index.vue
@@ -22,6 +22,7 @@
@@ -40,6 +41,20 @@
/>
+
+
+
+
+
+
+
+
+
+
@@ -200,11 +223,13 @@ const formData = ref({
price: '',
carouselImage: [],
details: '',
+ icon: '',
isList: false
})
const fileBannerList = ref([]); // 轮播图
const fileDetail = ref([]); // 详情图
+const fileIcon = ref([]); // 服务图标
// 页面初始化
const initData = () => {
@@ -262,6 +287,13 @@ const handleDetailExceed= (files, uploadFiles) => {
)
}
+// 服务图标上传限制
+const handleIconExceed = (files, uploadFiles) => {
+ ElMessage.warning(
+ `服务图标最多可上传1张`
+ )
+}
+
// 轮播图移除
const handleBannerRemove = (file) => {
@@ -276,6 +308,11 @@ const handleDetailRemove = (file, fileList) => {
formData.value.details = '';
}
+// 服务图表移除
+const handleIconRemove = (file, fileList) => {
+ formData.value.icon = '';
+}
+
// 轮播上传请求
const addUploadCarouselImageFile = (params) => {
const formData = new FormData();
@@ -310,6 +347,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 +382,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..15056d0 100644
--- a/src/views/order/index.vue
+++ b/src/views/order/index.vue
@@ -27,6 +27,7 @@
+
@@ -66,7 +67,7 @@
/>
-
+
服务中
待付款
已完成
+ 已取消
diff --git a/src/views/system/switchOrder.vue b/src/views/system/switchOrder.vue
new file mode 100644
index 0000000..c49bb58
--- /dev/null
+++ b/src/views/system/switchOrder.vue
@@ -0,0 +1,77 @@
+
+
+
+ 重复下单开关
+
+
+
+
+
+
+
+