From b5c6a43a5860f04c6fd7cd5f9666ef4eaa37d6ee Mon Sep 17 00:00:00 2001
From: zzyuan <781948537@qq.com>
Date: Thu, 15 May 2025 17:26:22 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E8=B6=85=E6=8E=A5=E5=8F=A3=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/superStore/shopMaterial.js | 10 +--
src/api/superStore/super.js | 7 +-
src/api/superStore/superUitId.js | 9 +-
src/utils/request.js | 2 +-
src/views/dish/dish/index.vue | 87 +------------------
src/views/dish/nutritionInfo/index.vue | 3 +
.../components/MaterialDialog.vue | 41 +++++----
src/views/superstore/shopMaterial/index.vue | 2 +-
src/views/superstore/super/index.vue | 18 ++--
9 files changed, 53 insertions(+), 126 deletions(-)
diff --git a/src/api/superStore/shopMaterial.js b/src/api/superStore/shopMaterial.js
index bbb49ac4..4285224e 100644
--- a/src/api/superStore/shopMaterial.js
+++ b/src/api/superStore/shopMaterial.js
@@ -61,7 +61,7 @@ export function getMaterialListApi(data) {
// 新增商品
export function addMaterialApi(data) {
return request({
- url: '/smart-canteen/supermarket_product/add',
+ url: '/smart-canteen/supermarket_product',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
@@ -85,14 +85,14 @@ export function updateMaterialApi(data) {
// 删除商品
export function removeMaterialApi(data) {
return request({
- url: '/smart-canteen/supermarket_product/del',
+ url: '/smart-canteen/supermarket_product/del/'+data.productId,
method: 'post',
headers: {
"merchant-id":"378915229716713472",
- },
- data: data
+ }
})
-}
+}
+
// 批量删除商品
export function batchRemoveMaterialApi(data) {
return request({
diff --git a/src/api/superStore/super.js b/src/api/superStore/super.js
index 057358c5..a513e401 100644
--- a/src/api/superStore/super.js
+++ b/src/api/superStore/super.js
@@ -27,7 +27,7 @@ export function supermarketPageListApi(data) {
// 超市列表-新增
export function insertSupermarketApi(data) {
return request({
- url: '/smart-canteen/supermarket_info/add',
+ url: '/smart-canteen/supermarket_info',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
@@ -50,12 +50,11 @@ export function editSupermarketApi(data) {
// 超市列表-删除
export function deleteSupermarketApi(data) {
return request({
- url: '/smart-canteen/supermarket_info/del',
+ url: '/smart-canteen/supermarket_info/del/'+data.supermarketId,
method: 'post',
headers: {
"merchant-id":"378915229716713472",
- },
- data: data
+ }
})
}
diff --git a/src/api/superStore/superUitId.js b/src/api/superStore/superUitId.js
index 7a503ff6..79ec51bd 100644
--- a/src/api/superStore/superUitId.js
+++ b/src/api/superStore/superUitId.js
@@ -27,7 +27,7 @@ export function drpUnitPageListApi(data) {
// 单位列表-新增
export function addDrpUnitApi(data) {
return request({
- url: '/smart-canteen/supermarket_unit/add',
+ url: '/smart-canteen/supermarket_unit',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
@@ -49,14 +49,13 @@ export function editDrpUnitApi(data) {
}
// 单位列表-删除
-export function removeDrpUnitApi(data) {
+export function removeDrpUnitApi(unitId) {
return request({
- url: '/smart-canteen/supermarket_unit/del',
+ url: '/smart-canteen/supermarket_unit/del/'+unitId,
method: 'post',
headers: {
"merchant-id":"378915229716713472",
- },
- data: data
+ }
})
}
diff --git a/src/utils/request.js b/src/utils/request.js
index 056aae6b..542114f5 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -84,7 +84,7 @@ service.interceptors.request.use(config => {
// console.log(sessionObj)
// console.log(requestObj)
if(requestObj.data&&requestObj.data.indexOf('pageNum')==-1){
- if (sessionObj.data === requestObj.data && requestObj.time - sessionObj.time < 3000 && sessionObj.url === requestObj.url) {
+ if (sessionObj.data === requestObj.data && requestObj.time - sessionObj.time < 2000 && sessionObj.url === requestObj.url) {
console.warn(`[${sessionObj.url}]: 数据正在处理,请勿重复提交`)
return Promise.reject(new Error('数据正在处理,请勿重复提交'))
}
diff --git a/src/views/dish/dish/index.vue b/src/views/dish/dish/index.vue
index 80c97539..fd30f477 100644
--- a/src/views/dish/dish/index.vue
+++ b/src/views/dish/dish/index.vue
@@ -721,92 +721,7 @@