From 71c629cb0687fe762a4c771b14dae16ffe393762 Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 11:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=B4=B9=E6=A8=A1=E6=9D=BF=20?= =?UTF-8?q?=E5=93=81=E7=89=8C=20=E8=AE=A1=E9=87=8F=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=88=90=E5=8A=9F=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/goods-seller/goodsOperationSec.vue | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 4ba576f9..3c5f1323 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -688,12 +688,12 @@ export default { // 局部刷新 refresh(v){ if( v == 'template'){ - this.GET_ShipTemplate() + this.GET_ShipTemplate('localRefresh'); }else if( v == 'goodsUnit'){ this.goodsUnitList = [] - this.GET_GoodsUnit() + this.GET_GoodsUnit('localRefresh'); }else{ - this.getGoodsBrandList() + this.getGoodsBrandList('localRefresh'); } }, getImages(v) { @@ -942,21 +942,33 @@ export default { }, /** 查询商品品牌列表 */ - getGoodsBrandList() { + getGoodsBrandList(type) { API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then( (response) => { this.brandList = response; + if(type === 'localRefresh') { + this.$Message.success("刷新成功"); + } } - ); + ).catch(() => { + if(type === 'localRefresh') { + this.$Message.error("刷新失败,请重试"); + } + }); }, // 获取商品单位 - GET_GoodsUnit() { + GET_GoodsUnit(type) { API_GOODS.getGoodsUnitList(this.params).then((res) => { if (res.success) { this.goodsUnitList.push(...res.result.records.map((i) => i.name)); this.total = res.result.total; } + if (type === 'localRefresh' && res.success) { + this.$Message.success("刷新成功"); + } else if(type === 'localRefresh') { + this.$Message.error("刷新失败,请重试"); + } }); }, // 获取当前店铺分类 @@ -1809,12 +1821,17 @@ export default { } }); }, - GET_ShipTemplate(){ + GET_ShipTemplate(type){ // 获取物流模板 API_Shop.getShipTemplate().then((res) => { if (res.success) { this.logisticsTemplate = res.result; } + if (type === 'localRefresh' && res.success) { + this.$Message.success("刷新成功"); + } else if(type === 'localRefresh') { + this.$Message.error("刷新失败,请重试"); + } }); } },