From 5f62d1aef5656b400ac9b5ac79713c3848db9751 Mon Sep 17 00:00:00 2001
From: wangxiaowei <1121133807@qq.com>
Date: Thu, 5 Sep 2024 17:38:04 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=95=86=E5=93=81=E4=B8=8A?=
=?UTF-8?q?=E4=B8=8B=E6=9E=B6=E4=B9=8B=E5=90=8E=E5=8F=AA=E8=83=BD=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E4=BB=B7=E6=A0=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bundle_b/pages/local_shop/local_shop_edit.vue | 43 ++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/bundle_b/pages/local_shop/local_shop_edit.vue b/bundle_b/pages/local_shop/local_shop_edit.vue
index 9c4c18d..3f05293 100644
--- a/bundle_b/pages/local_shop/local_shop_edit.vue
+++ b/bundle_b/pages/local_shop/local_shop_edit.vue
@@ -43,8 +43,11 @@
+
+
+ *上下架商品只能修改商品价格
@@ -61,7 +64,8 @@
import {
getLocalGoodsShopDetails,
saveLocalShopGoods,
- setLocalShopState
+ setLocalShopState,
+ editLocalShopPrice
} from '@/api/store'
import {
trottle
@@ -197,6 +201,43 @@
}
})
},
+
+ // 上下架的商品只能修改价格
+ async editPrice() {
+ let {
+ price,
+ } = this.formData;
+
+ if (!this.$u.test.amount(price)) {
+ this.$toast({
+ title: "商品价格格式错误"
+ });
+ return false;
+ }
+
+ uni.showLoading({
+ title: '上传中请稍后',
+ mask: true
+ })
+
+ const {data, code} = await editLocalShopPrice({
+ id: this.id,
+ price,
+ type: 'price'
+ })
+
+ if (code == 1) {
+ this.$toast({
+ title: '修改成功'
+ });
+ } else {
+ this.$toast({
+ title: '修改失败'
+ });
+ }
+ uni.hideLoading()
+ },
+
async formSubmit() {
const url = this.shop_pic.map((item) => {
if (item.lsg_id && item.url) {