From b71fed3782c1bf8f7c07352ae1b0b2db8b07b20e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 9 Sep 2023 22:34:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BD=A3=EF=BC=9A=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85=EF=BC=8C=E5=B1=95=E7=A4=BA=E5=88=86=E4=BD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/goods_combination_details/index.vue | 16 +++++++++++----- pages/activity/goods_seckill_details/index.vue | 10 +++++----- pages/goods_details/index.vue | 1 - 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/pages/activity/goods_combination_details/index.vue b/pages/activity/goods_combination_details/index.vue index 372e0b1d..ad7dde14 100644 --- a/pages/activity/goods_combination_details/index.vue +++ b/pages/activity/goods_combination_details/index.vue @@ -270,11 +270,11 @@ import userEvaluation from '@/components/userEvaluation/index.vue' import countDown from '@/components/countDown/index.vue' import shareRedPackets from '@/components/shareRedPackets'; - import { spread } from "@/api/user"; import * as ProductSpuApi from '@/api/product/spu.js'; import * as ProductFavoriteApi from '@/api/product/favorite.js'; import * as ProductCommentApi from '@/api/product/comment.js'; import * as CombinationApi from '@/api/promotion/combination.js'; + import * as BrokerageAPI from '@/api/trade/brokerage.js' import * as Util from '@/utils/util.js'; import * as ProductUtil from '@/utils/product.js'; export default { @@ -350,7 +350,7 @@ actionSheetHidden: true, // 微信小程序的右上角分享的弹出 posterImage: '', // 海报路径 sharePacket: { // 分销弹出信息 - isState: true, // 默认不显示 + enabled: false, // 默认不显示 }, // ========== 顶部 nav + scroll 相关的变量 ========== @@ -411,9 +411,9 @@ let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue); app.globalData.spread = mapeMpQrCodeValue.spread; this.id = mapeMpQrCodeValue.id; - // TODO 芋艿:code 是啥 + // 绑定分销用户 setTimeout(()=>{ - spread(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {}) + BrokerageAPI.bindBrokerageUser(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {}) }, 2000) } else { this.id = options.id; @@ -482,6 +482,7 @@ this.getGoodsDetails(); // 获得商品收藏 this.isFavoriteExists(); + this.getBrokeragePrice(); // 获得商品评价列表 this.getProductReplyList(); this.getProductReplyCount(); @@ -570,6 +571,11 @@ }); }) }, + getBrokeragePrice: function() { + BrokerageAPI.getProductBrokeragePrice(this.id).then(res => { + this.sharePacket = res.data + }); + }, /** * 默认选中属性 */ @@ -1021,7 +1027,7 @@ * 关闭分销的弹窗 */ closeChange: function() { - this.$set(this.sharePacket, 'isState', true); + this.$set(this.sharePacket, 'enabled', false); }, // ========== 顶部 nav 相关的方法 ========== diff --git a/pages/activity/goods_seckill_details/index.vue b/pages/activity/goods_seckill_details/index.vue index 4da226df..ca5eaf34 100644 --- a/pages/activity/goods_seckill_details/index.vue +++ b/pages/activity/goods_seckill_details/index.vue @@ -195,11 +195,11 @@ import { imageBase64 } from "@/api/public"; import { toLogin } from '@/libs/login.js'; import { silenceBindingSpread } from "@/utils"; - import { spread } from "@/api/user"; import * as ProductSpuApi from '@/api/product/spu.js'; import * as ProductFavoriteApi from '@/api/product/favorite.js'; import * as ProductCommentApi from '@/api/product/comment.js'; import * as SeckillApi from '@/api/promotion/seckill.js'; + import * as BrokerageAPI from '@/api/trade/brokerage.js' import * as Util from '@/utils/util.js'; import * as ProductUtil from '@/utils/product.js'; export default { @@ -307,11 +307,11 @@ // #ifdef MP || APP-NVUE // 小程序链接进入获取绑定关系id - // TODO 芋艿:分销??? + // 绑定分销关系 setTimeout(()=>{ if (options.spread) { app.globalData.spread = options.spread; - spread(options.spread).then(res => {}) + BrokerageAPI.bindBrokerageUser(options.spread).then(res => {}) } },2000) // #endif @@ -332,9 +332,9 @@ let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue); app.globalData.spread = mapeMpQrCodeValue.spread; this.id = mapeMpQrCodeValue.id; - // TODO 芋艿:code 是啥 + // 绑定分销用户 setTimeout(()=>{ - spread(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {}) + BrokerageAPI.bindBrokerageUser(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {}) },2000) } else { this.id = options.id; diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index 57d20851..d74690f6 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -276,7 +276,6 @@