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

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 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 ==========

View File

@ -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;

View File

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