Commit 595e9674 by 李嘉林

支付成功支持营销组件

parent 30da3d20
......@@ -37,6 +37,25 @@
>
<notice :datas="item"></notice>
</div>
<!-- 营销组件 -->
<div v-if="item.componentCode == 'coupon' && item.componentInfo.visible == 1">
<coupon :datas="item"></coupon>
</div>
<div v-if="item.componentCode == 'time-limited-discount' && item.componentInfo.visible == 1">
<time-limited-discount :class="'time-limited-discount'+index" :datas="item" :k="index"></time-limited-discount>
</div>
<div v-if="item.componentCode == 'integral-turntable' && item.componentInfo.visible == 1">
<integralTurntable :datas="item"></integralTurntable>
</div>
<div v-if="item.componentCode == 'live-broadcast' && item.componentInfo.visible == 1">
<live-broadcast :datas="item"></live-broadcast>
</div>
<div v-if="item.componentCode == 'spell-group' && item.componentInfo.visible == 1">
<spell-group :datas="item"></spell-group>
</div>
<div v-if="item.componentCode == 'official-account' && item.componentInfo.visible == 1">
<official-account></official-account>
</div>
<pay-success-info
v-if="item.componentCode=='pay-success-info' && item.componentInfo.visible==1"
:render="true"
......@@ -92,6 +111,10 @@ import text from "@/components/content/text";
import richText from "../../components/basicTool/rich-text";
import interval from "@/components/basicTool/interval/index.vue";
import partition from "@/components/basicTool/partition/index.vue";
import coupon from '@/components/activity/coupon'
import integralTurntable from '@/components/activity/integralTurntable'
import spellGroup from '@/components/activity/spellGroup'
import tool from '../../utils/tool.js'
const app = getApp();
const { log } = app;
export default {
......@@ -137,16 +160,22 @@ export default {
partition,
paySuccessInfo,
PayElectronCard,
automatiCard
automatiCard,
coupon,
integralTurntable,
spellGroup,
},
computed: {
// 是否开启企业要货
whetherOpenEnterprisesWantGoods() {
return this.mpApp.globalData.shopInfo.whetherOpenEnterprisesWantGoods || 0
let { shopInfo } = this.mpApp.globalData;
let whetherOpenEnterprisesWantGoods = shopInfo ? shopInfo.whetherOpenEnterprisesWantGoods : 0
return whetherOpenEnterprisesWantGoods;
},
// 是否开启待审核
whetherOpenApproval() {
return this.mpApp.shop_configuration.whetherOpenApproval || 0
let whetherOpenApproval = this.mpApp.shop_configuration ? this.mpApp.shop_configuration.whetherOpenApproval : 0;
return whetherOpenApproval;
},
},
onLoad(options) {
......@@ -186,7 +215,52 @@ export default {
onShow() {
console.log("--paySuccess-onShow");
},
// 滚动节流方法
onPageScroll: tool.throttle(function (el) {
console.log(el,'--onPageScroll');
this.scrolls(el[0])
},200),
methods: {
scrolls(el){
// this.setFooterShow(el);
if (this.pageData) {
for (let i = 0; i < this.pageData.length; i++) {
const element = this.pageData[i]
if(element.componentCode=="time-limited-discount"){
let com=this.$mp.page.selectComponent(".time-limited-discount"+i) ;
com && com.getScroll(el);
}
if(element.componentCode=="goods-list"){
let com=this.$mp.page.selectComponent(".goodsListItem"+i) ;
com && com.getScroll(el);
}
if(element.componentCode=="merchants-list"){
let com=this.$mp.page.selectComponent(".merchants-list"+i) ;
com && com.getScroll(el);
}
if(element.componentCode=="video-player"){
console.log("视频组件滚动")
let com=this.$mp.page.selectComponent(".VideoPlayer"+i);
console.log(com,i,'--com')
com && com.getScroll(el);
}
}
}
if(this.$mp.page && this.$mp.page.selectComponent(".getIndexHomePage")){
this.$mp.page.selectComponent(".getIndexHomePage").getScroll(el);
}
if(this.$mp.page && this.$mp.page.selectComponent(".goodsListItem")){
this.$mp.page.selectComponent(".goodsListItem").getScroll(el);
}
if(this.$mp.page && this.$mp.page.selectAllComponents(".transverse-label-goodsListItem")){
this.$mp.page.selectAllComponents(".transverse-label-goodsListItem").forEach(item=>{
console.log(item,'-this.$mp.page.selectComponent(".goodsListItem")')
item.getScroll(el)
})
}
},
orderMsg() {
order.orderDetail(this.query).then(res1 => {
let res = res1.data;
......@@ -500,8 +574,7 @@ export default {
.paySuccess {
position: relative;
width: 100vw;
height: 100vh;
overflow-y: auto;
height: auto;
.tabbar{
position: sticky;
top: 0;
......
......@@ -8,7 +8,9 @@
"van-picker": "/static/vant/picker/index",
"van-icon":"/static/vant/icon/index",
"photo-gallery":"/static/nativeComponents/PhotoGallery/index",
"notice":"/static/nativeComponents/Notice/index"
"notice":"/static/nativeComponents/Notice/index",
"time-limited-discount": "/static/nativeComponents/TimeLimitedDiscount/index",
"live-broadcast":"/static/nativeComponents/LiveBroadcast/index"
},
"navigationStyle":"custom"
}
......@@ -263,8 +263,8 @@ const componentOptions = {
});
},
getScroll() {
this.getEleInfo(() => {
this.getData();
this.getEleInfo(() => {
});
},
// 获取当前组件位置信息
......@@ -329,7 +329,7 @@ const componentOptions = {
});
},
getData() {
if (this.loaded) return;
// if (this.loaded) return;
this.loaded = true;
let { dimension } = this.data.datas.componentData;
if (dimension == 0) {
......@@ -345,8 +345,8 @@ const componentOptions = {
ready() {
this.loaded = false;
this.isContain = false;
this.getEleInfo(() => {
this.getData();
this.getEleInfo(() => {
});
},
moved() {},
......@@ -359,8 +359,8 @@ const componentOptions = {
show() {
this.loaded = false;
this.isContain = false;
this.getEleInfo(() => {
this.getData();
this.getEleInfo(() => {
});
const { isPageHidden } = this.data;
// show事件发生前,页面不是处于隐藏状态时
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment