From 85b1a8f0f1cce8f7ec3269763a91dacecdf098b1 Mon Sep 17 00:00:00 2001 From: linxi Date: Mon, 24 Mar 2025 18:13:19 +0800 Subject: [PATCH] =?UTF-8?q?Task=EF=BC=9A=E5=A4=9A=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/inn.js | 6 ++ pages/shop/GoodsCon/index.vue | 4 +- pagesInn/components/jin-edit/homeList.vue | 102 ++++++++++++++++++++++ pagesInn/inn/innHome.vue | 26 +++++- 4 files changed, 133 insertions(+), 5 deletions(-) create mode 100644 pagesInn/components/jin-edit/homeList.vue diff --git a/api/inn.js b/api/inn.js index 928a72f..364d657 100644 --- a/api/inn.js +++ b/api/inn.js @@ -266,5 +266,11 @@ export function shareTown(id) { return request.get("/ancientTown/poster/" + id, {login: true}) } +/** + * 获取用户店铺列表 + */ +export function getMerchantApply() { + return request.get("/merchantApply/userHotels", {}, {login: true}) +} diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index a10651e..17ec6f2 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -1363,7 +1363,7 @@ export default { }, // 点击加入购物车按钮 joinCart() { - if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || storeInfo.isNegotiable === 1) { + if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || this.storeInfo.isNegotiable === 1) { return } // 0=加入购物车 @@ -1372,7 +1372,7 @@ export default { }, // 立即购买 tapBuy() { - if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || storeInfo.isNegotiable === 1) { + if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || this.storeInfo.isNegotiable === 1) { return } // 1=直接购买 diff --git a/pagesInn/components/jin-edit/homeList.vue b/pagesInn/components/jin-edit/homeList.vue new file mode 100644 index 0000000..b1a57c3 --- /dev/null +++ b/pagesInn/components/jin-edit/homeList.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/pagesInn/inn/innHome.vue b/pagesInn/inn/innHome.vue index ee96eee..4723e76 100644 --- a/pagesInn/inn/innHome.vue +++ b/pagesInn/inn/innHome.vue @@ -401,6 +401,10 @@ 修改资料 + + + 切换店铺 + @@ -431,6 +435,7 @@ /> + @@ -446,7 +451,8 @@ import { setTopHotelNew, getHotelNewsZan, getHotelShareBackgroundImage, - hotelNewsView + hotelNewsView, + getMerchantApply } from "@/api/inn.js" import {formatDateTime} from "@/utils" import {getUrlParam} from "@/utils/common.js" @@ -454,14 +460,16 @@ import imgBox from '@/components/imageTypeSet/imagebox.vue' import cookie from "@/utils/store/cookie" import {addStore, removeStore} from "@/api/favorite" import { pageListenMixins } from '@/mixins/pageListenMixins' - +import homeList from "../components/jin-edit/homeList.vue" export default { components: { - imgBox + imgBox, + homeList }, mixins: [pageListenMixins], data() { return { + homeList: [], webUrl: this.$VUE_APP_RESOURCES_URL, isLoad: false, activeIndex: 0, @@ -588,6 +596,18 @@ export default { this.fetchInnDetail() }, methods: { + goHome(e) { + this.id = e.id + this.fetchInnDetail() + }, + changeHome() { + uni.showLoading() + getMerchantApply().then(res => { + this.$refs.homeList.open(res.data || []) + }).finally(() => { + uni.hideLoading() + }) + }, changeShare() { this.showShare = !this.showShare },