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

pull/1/MERGE
YunaiV 2023-09-09 22:27:39 +08:00
parent ad4eb04f49
commit 31970ceda9
2 changed files with 17 additions and 12 deletions

View File

@ -6,7 +6,15 @@
<image src='../../static/images/red-packets.png'></image>
<view class='text font-color'>
<view>会员分享返</view>
<view class='money'><text class='label'></text>{{sharePacket.priceName}}</view>
<view class='money' v-if="sharePacket.brokerageMinPrice && sharePacket.brokerageMaxPrice">
<text class='label'></text>{{ fen2yuan(sharePacket.brokerageMinPrice) }} ~ {{ fen2yuan(sharePacket.brokerageMaxPrice) }}
</view>
<view class='money' v-else-if="sharePacket.brokerageMinPrice">
<text class='label'></text>{{ fen2yuan(sharePacket.brokerageMinPrice) }}
</view>
<view class='money' v-else-if="sharePacket.brokerageMaxPrice">
<text class='label'></text>{{ fen2yuan(sharePacket.brokerageMaxPrice) }}
</view>
<view class='tip'>下单即返佣金</view>
<view class='shareBut'>立即分享</view>
</view>
@ -15,6 +23,7 @@
</template>
<script>
import * as Util from '@/utils/util.js';
export default {
props: {
sharePacket: {
@ -22,7 +31,8 @@
default: function() {
return {
enabled: true,
priceName:'' //
brokerageMinPrice: undefined,
brokerageMaxPrice: undefined,
}
}
}
@ -38,6 +48,9 @@
},
goShare:function(){
this.$emit('listenerActionSheet');
},
fen2yuan(price) {
return Util.fen2yuan(price)
}
}
}

View File

@ -299,8 +299,6 @@
// #ifdef MP
import { base64src } from '@/utils/base64src.js'
import { getQrcode } from '@/api/api.js';
import {getActivityListBySpuIds} from "../../api/promotion/activity";
import {setActivityList} from "../../utils/product";
// #endif
const app = getApp();
export default {
@ -373,7 +371,7 @@
posterbackgd: '/static/images/posterbackgd.png', //
storeImage: '', //
sharePacket: { //
enabled: true, //
enabled: false, //
},
actionSheetHidden: true, //
@ -513,10 +511,6 @@
this.$set(this.attr, 'properties', ProductUtil.convertProductPropertyList(skus));
this.$set(this, 'skuMap', ProductUtil.convertProductSkuMap(skus));
// // TODO
// this.$set(this.sharePacket, 'priceName', res.data.priceName);
// this.$set(this.sharePacket, 'enabled', Math.floor(res.data.priceName) === 0);
//
PromotionActivityApi.getActivityListBySpuId(this.id).then(res => {
let activityList = res.data;
@ -570,9 +564,7 @@
},
getBrokeragePrice: function() {
BrokerageAPI.getProductBrokeragePrice(this.id).then(res => {
// this.sharePacket = res.data
// console.log(this.sharePacket)
this.$set(this.sharePacket, 'isState', false);
this.sharePacket = res.data
});
},
/**