From b940b7f96e03accaba6299704e6a0b924b8bb365 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期六, 03 八月 2024 20:32:12 +0800 Subject: [PATCH] update 花店注册流程变化(2步化为一步) --- sub_pages/customer/trade/detail.vue | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/sub_pages/customer/trade/detail.vue b/sub_pages/customer/trade/detail.vue index b645d37..1748d7e 100644 --- a/sub_pages/customer/trade/detail.vue +++ b/sub_pages/customer/trade/detail.vue @@ -149,6 +149,9 @@ } }, onShow() { + if (this.id) { + this.getDetail() + } this.refreshShopNum() }, onLoad(options) { @@ -158,6 +161,31 @@ } this.refreshShopNum() }, + // #ifdef PUB_CUSTOMER + onShareAppMessage() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/sub_pages/customer/trade/detail?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + + title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : "花满芫", + path: url, + } + }, + onShareTimeline() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/sub_pages/customer/trade/detail?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : "花满芫", + path: url, + } + }, + // #endif methods: { async updateItemNum(item) { const res = await this.$message.confirm('', { @@ -196,7 +224,7 @@ if (!item.stock) { item.stock = 0 } - if (item.shopnum + addnum > item.stock) { + if (addnum > 0 & item.shopnum + addnum > item.stock) { this.$message.showToast('库存不足,无法修改') return } @@ -216,7 +244,7 @@ }) this.$message.hideLoading() if (code === 0) { - item.shopnum += addnum + item.shopnum += addnum this.refreshShopNum() this.$forceUpdate() } @@ -224,6 +252,8 @@ async refreshShopNum() { this.shopnum = await this.$store.dispatch('countShopping'); + this.$store.dispatch('sign_add', 'shopnum') + }, async collectItem(dto) { if (!this.currentInfo.id) { -- Gitblit v1.9.3