分佣:商品详情,展示分佣

pull/1/MERGE
YunaiV 2023-09-09 22:34:22 +08:00
parent 31970ceda9
commit b71fed3782
3 changed files with 16 additions and 11 deletions

View File

@ -270,11 +270,11 @@
import userEvaluation from '@/components/userEvaluation/index.vue' import userEvaluation from '@/components/userEvaluation/index.vue'
import countDown from '@/components/countDown/index.vue' import countDown from '@/components/countDown/index.vue'
import shareRedPackets from '@/components/shareRedPackets'; import shareRedPackets from '@/components/shareRedPackets';
import { spread } from "@/api/user";
import * as ProductSpuApi from '@/api/product/spu.js'; import * as ProductSpuApi from '@/api/product/spu.js';
import * as ProductFavoriteApi from '@/api/product/favorite.js'; import * as ProductFavoriteApi from '@/api/product/favorite.js';
import * as ProductCommentApi from '@/api/product/comment.js'; import * as ProductCommentApi from '@/api/product/comment.js';
import * as CombinationApi from '@/api/promotion/combination.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 Util from '@/utils/util.js';
import * as ProductUtil from '@/utils/product.js'; import * as ProductUtil from '@/utils/product.js';
export default { export default {
@ -350,7 +350,7 @@
actionSheetHidden: true, // actionSheetHidden: true, //
posterImage: '', // posterImage: '', //
sharePacket: { // sharePacket: { //
isState: true, // enabled: false, //
}, },
// ========== nav + scroll ========== // ========== nav + scroll ==========
@ -411,9 +411,9 @@
let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue); let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue);
app.globalData.spread = mapeMpQrCodeValue.spread; app.globalData.spread = mapeMpQrCodeValue.spread;
this.id = mapeMpQrCodeValue.id; this.id = mapeMpQrCodeValue.id;
// TODO code //
setTimeout(()=>{ setTimeout(()=>{
spread(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {}) BrokerageAPI.bindBrokerageUser(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {})
}, 2000) }, 2000)
} else { } else {
this.id = options.id; this.id = options.id;
@ -482,6 +482,7 @@
this.getGoodsDetails(); this.getGoodsDetails();
// //
this.isFavoriteExists(); this.isFavoriteExists();
this.getBrokeragePrice();
// //
this.getProductReplyList(); this.getProductReplyList();
this.getProductReplyCount(); this.getProductReplyCount();
@ -570,6 +571,11 @@
}); });
}) })
}, },
getBrokeragePrice: function() {
BrokerageAPI.getProductBrokeragePrice(this.id).then(res => {
this.sharePacket = res.data
});
},
/** /**
* 默认选中属性 * 默认选中属性
*/ */
@ -1021,7 +1027,7 @@
* 关闭分销的弹窗 * 关闭分销的弹窗
*/ */
closeChange: function() { closeChange: function() {
this.$set(this.sharePacket, 'isState', true); this.$set(this.sharePacket, 'enabled', false);
}, },
// ========== nav ========== // ========== nav ==========

View File

@ -195,11 +195,11 @@
import { imageBase64 } from "@/api/public"; import { imageBase64 } from "@/api/public";
import { toLogin } from '@/libs/login.js'; import { toLogin } from '@/libs/login.js';
import { silenceBindingSpread } from "@/utils"; import { silenceBindingSpread } from "@/utils";
import { spread } from "@/api/user";
import * as ProductSpuApi from '@/api/product/spu.js'; import * as ProductSpuApi from '@/api/product/spu.js';
import * as ProductFavoriteApi from '@/api/product/favorite.js'; import * as ProductFavoriteApi from '@/api/product/favorite.js';
import * as ProductCommentApi from '@/api/product/comment.js'; import * as ProductCommentApi from '@/api/product/comment.js';
import * as SeckillApi from '@/api/promotion/seckill.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 Util from '@/utils/util.js';
import * as ProductUtil from '@/utils/product.js'; import * as ProductUtil from '@/utils/product.js';
export default { export default {
@ -307,11 +307,11 @@
// #ifdef MP || APP-NVUE // #ifdef MP || APP-NVUE
// id // id
// TODO //
setTimeout(()=>{ setTimeout(()=>{
if (options.spread) { if (options.spread) {
app.globalData.spread = options.spread; app.globalData.spread = options.spread;
spread(options.spread).then(res => {}) BrokerageAPI.bindBrokerageUser(options.spread).then(res => {})
} }
},2000) },2000)
// #endif // #endif
@ -332,9 +332,9 @@
let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue); let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue);
app.globalData.spread = mapeMpQrCodeValue.spread; app.globalData.spread = mapeMpQrCodeValue.spread;
this.id = mapeMpQrCodeValue.id; this.id = mapeMpQrCodeValue.id;
// TODO code //
setTimeout(()=>{ setTimeout(()=>{
spread(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {}) BrokerageAPI.bindBrokerageUser(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {})
},2000) },2000)
} else { } else {
this.id = options.id; this.id = options.id;

View File

@ -276,7 +276,6 @@
<script> <script>
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js' import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
import { spread } from "@/api/user";
import { toLogin } from '@/libs/login.js'; import { toLogin } from '@/libs/login.js';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { imageBase64 } from "@/api/public"; import { imageBase64 } from "@/api/public";