From 5db235312a038f1e42e479f4a19f26b392b30552 Mon Sep 17 00:00:00 2001 From: fanfan Date: Tue, 18 Jun 2024 14:24:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/detail.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue index 88cc53a..c3cf4c4 100644 --- a/pages/goods/detail.vue +++ b/pages/goods/detail.vue @@ -840,10 +840,10 @@ }) .catch() }, - getServeList() { + getServeList(goodsId) { const that = this let params = { - goodsId: that.goods.goods_id + goodsId: goodsId } return new Promise((resolve, reject) => { GoodsApi.serveList(params).then(res => { @@ -1006,6 +1006,7 @@ GoodsApi.detail(this.goodsId) .then(result => { let info = result.data.detail; + this.getServeList(info.goods_id) let item = this.findItemById(info.skuList, info.goods_id) if (item) { if (item.sec_start_time) { @@ -1062,7 +1063,6 @@ } } } - that.getServeList() }) .catch() }) @@ -1174,10 +1174,13 @@ // 获取推荐商品列表 const that = this; // 构建页面参数 - const params = that.$getShareUrlParams(this.options) + // const params = that.$getShareUrlParams(that.options) const res = await GoodsApi.goodsShortUrl({ - page_url: `pages/goods/detail?${params}`, - page_title: that.goods.goods_name + page_url: 'pages/goods/detail?refereeId=' + store.getters.userId + '&goodsId=' + this.goods + .goods_id, + page_title: that.goods.goods_name, + // goodsId:that.goods.goods_id, + // refereeId:store.getters.userId }) if (res.data.url) { let str =