分佣:商品详情,展示分佣
parent
31970ceda9
commit
b71fed3782
|
@ -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 相关的方法 ==========
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue