Browse Source

提交

storemanagementweb
gwbvipvip 11 months ago
parent
commit
ce1730c6a7
3 changed files with 21 additions and 24 deletions
  1. +1
    -1
      config/proxy.js
  2. +5
    -9
      src/pages/shopmanage/storeGoodsInfo/components/ChooseDevice.jsx
  3. +15
    -14
      src/pages/shopmanage/storeGoodsInfo/services.js

+ 1
- 1
config/proxy.js View File

@@ -9,7 +9,7 @@
export default {
dev: {
'/saasbase/': {
target: 'http://10.2.1.26:21995/saasbase/',
target: 'http://192.168.1.50:5006/',
changeOrigin: true,
secure: false, //关闭证书验证
pathRewrite: {


+ 5
- 9
src/pages/shopmanage/storeGoodsInfo/components/ChooseDevice.jsx View File

@@ -38,17 +38,13 @@ const ChooseDevice = (props) => {
* 获取设备列表
*/
const onFetchDeviceList = async () => {
const response = await GetDeviceInfoPage({
current: 1,
pageSize: 999,
storeId: props.storeId
});
if (response.statusCode === 200 && response.data?.data) {
response.data.data.forEach(item => {
item.label = item.deviceName;
const response = await GetDeviceInfoPage();
if (response.statusCode === 200 && response.data) {
response?.data?.forEach(item => {
item.label = item.name;
item.value = item.id;
});
setDeviceList(response.data.data);
setDeviceList(response.data);
} else {
message.error(JSON.stringify(response.errors) || '获取设备列表失败');
}


+ 15
- 14
src/pages/shopmanage/storeGoodsInfo/services.js View File

@@ -120,8 +120,20 @@ export async function AddGoodDevice(data) {
});
}

/** 获取设备列表 */
export async function GetDeviceInfoPage(data) {
return request(`/saasbase/api/device/list`, {
method: 'get',
data: data,
});
}


/** 查询商品绑定的所有设备 */
export async function GetGoodDevice(goodsId, storeId) {
return request(`/storemanage/api/FoodMenu/GetGoodDeviceAsync?foodId=${goodsId}&storeId=${storeId}`, {
method: 'GET',
});
}



@@ -205,22 +217,11 @@ export function GetRequestLogPageAsync(data) {



/** 获取设备列表 */
export async function GetDeviceInfoPage(data) {
return request(`/kitchen/api/Device/GetDeviceInfoPage`, {
method: 'POST',
data: data,
});
}



/** 查询商品绑定的所有设备 */
export async function GetGoodDevice(goodsId, storeId) {
return request(`/kitchen/api/goodes/GetGoodDevice?foodId=${goodsId}&storeId=${storeId}`, {
method: 'GET',
});
}



/** 菜谱列表 */
export async function GetFoodMenuInfoPage(data) {


Loading…
Cancel
Save