Browse Source

活动页面布局逻辑调整

sxx
whyneedname 2 years ago
parent
commit
ade8c79e8e
  1. 8
      config/index.js
  2. 2
      pages/activity/GroupDetails/index.vue
  3. 2
      pages/activity/SeckillDetails/index.vue
  4. 67
      pages/activity/activity/index.vue
  5. 5
      pages/shop/Evaluations/EvaluationDetail/index.vue

8
config/index.js

@ -1,8 +1,8 @@
// export const VUE_APP_API_URL = 'http://192.168.10.129:48080/bxgApp'
export const VUE_APP_API_URL = 'http://192.168.10.113:48080/bxgApp'
// export const VUE_APP_API_URL = 'https://farm.lotus-wallet.com/bxgApp'
// export const VUE_APP_API_URL = 'http://192.168.10.113:48080/bxgApp'
export const VUE_APP_API_URL = 'https://farm.lotus-wallet.com/bxgApp'
// export const VUE_APP_API_URL = 'https://xiaohui.shop.cyjyyjy.com/xiaohuiapp'
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static'
// export const BXG_TENANT_ID = 129
export const BXG_TENANT_ID = 138
export const BXG_TENANT_ID = 129
// export const BXG_TENANT_ID = 138
// export const BXG_TENANT_ID = 128

2
pages/activity/GroupDetails/index.vue

@ -358,7 +358,7 @@ export default {
}
},
},
onShow: function() {
onLoad: function() {
this.mountedStart()
},
methods: {

2
pages/activity/SeckillDetails/index.vue

@ -275,7 +275,7 @@ export default {
}
}
},
onShow: function() {
onLoad: function() {
this.mountedStart()
},
methods: {

67
pages/activity/activity/index.vue

@ -1,7 +1,7 @@
<template>
<view class="bargain on">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<cu-custom :isBack="true" :isCenter="true" :bgColor="bgColor">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
@ -26,7 +26,7 @@
</view>
<view class="activity-content">
<view class="top-nav-box" :style="activityType !== 0?'height: 104rpx;':''">
<view class="top-nav-box" :style="(activityType !== 0?'height: 104rpx;':'')+(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')">
<view class="activity-type-box acea-row row-center">
<view class="item" @click="setActivityType(0)">
<view :class="'title ' + (activityType === 0? 'active' : '')">秒杀专区</view>
@ -43,7 +43,7 @@
<view :class="'tab ' + (tabType === 1 ? 'active' : '')" @click="setTabType(1)">下期预告</view>
</view>
</view>
<view class="list-box" :style="activityType !== 0?'height: calc(100% - 104rpx);':''">
<view class="list-box" :style="navStyle?(activityType !== 0?'padding-top:104rpx':'padding-top:186rpx'):''">
<view class="countdown-box acea-row row-between-wrapper" v-if="activityType === 0 && tabType === 0 && timeList[seckillActive].stop">
<view class="acea-row row-middle">
<view class="text">{{timeList[seckillActive].status == 2 ? timeList[seckillActive].time + '即将开始' : '本轮结束仅剩'}}</view>
@ -105,10 +105,13 @@
},
data() {
return {
CustomBar: this.CustomBar,
bgColor: '',
banner: [],
swiperCurrent: 0,
activityType: 0,
tabType: 0,
navStyle: false,
goodsList: [],
timeList: [],
seckillList: [],
@ -133,15 +136,13 @@
bargainList: [],
bargainLoaded: false,
isShowRule: false, //
active: false,
active: false,
};
},
mounted() {
this.seckillInfo();
this.getGrouponList();
this.getBargainList();
},
onLoad() {
getBanner(3).then(
@ -149,6 +150,30 @@
this.$set(this,'banner',res.data.banner)
})
},
onPageScroll(e) {
if (e.scrollTop > 130) {
this.bgColor = '#F1F1F1';
this.navStyle = true;
} else {
this.bgColor = '',
this.navStyle = false;
};
},
onReachBottom() {
switch (this.activityType) {
case 0:
this.getSeckillList();
break;
case 1:
this.getGrouponList();
break;
case 2:
this.getBargainList();
break;
default:
break;
}
},
methods: {
//
close: function () {
@ -177,7 +202,6 @@
// this.goodsList = this.seckillList;
} else if (i === 1) {
this.goodsList = this.grouponList;
console.log('this.goodsList', this.goodsList)
} else {
this.goodsList = this.bargainList;
}
@ -274,14 +298,20 @@
this.grouponList = this.grouponList.concat(res.data.storeCombinationQueryVos)
this.groupForm.page++;
this.groupLoaded = res.data.storeCombinationQueryVos.length < this.groupForm.limit;
if(this.activityType === 1) {
this.goodsList = this.grouponList;
}
})
},
getBargainList() {
if (this.bargainLoaded) return;
getBargainList(this.bargainForm).then(res => {
this.bargainLoaded = res.data.length < this.bargainForm.limit;
this.bargainList.push.apply(this.bargainList, res.data);
this.bargainForm.page++;
this.bargainLoaded = res.data.length < this.bargainForm.limit;
if(this.activityType === 2) {
this.goodsList = this.bargainList;
}
});
},
}
@ -304,6 +334,11 @@
}
}
.header {
position: fixed;
top: 0;
left: 0;
z-index: 20;
width: 750rpx;
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
@ -325,9 +360,6 @@
.banner-box {
width: 750rpx;
height: 488rpx;
position: absolute;
top: 0;
z-index: -1;
.swiper {
width: 100%;
height: 100%;
@ -361,15 +393,13 @@
}
.activity-content {
position: absolute;
bottom: 0;
position: relative;
top: -64rpx;
width: 750rpx;
height: calc(100vh - 424rpx);
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.top-nav-box {
height: 186rpx;
position: relative;
width: 750rpx;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.activity-type-box {
height: 104rpx;
padding: 34rpx 0rpx 26rpx;
@ -411,7 +441,6 @@
.tab-box {
width: 100%;
position: absolute;
bottom: 0;
height: 82rpx;
overflow: hidden;

5
pages/shop/Evaluations/EvaluationDetail/index.vue

@ -16,12 +16,7 @@
<view class="synopsis-box acea-row" v-if="info.synopsis">
<view class="left-circle"></view>
<view class="info">
<!-- <text>甄选评测介绍</text> -->{{' ' + info.synopsis}}
{{' ' + info.synopsis}}
<!-- <text>甄选评测介绍</text>{{' ' + info.synopsis}} -->
</view>
<image src="../../../../static/images/evaluation-icon.png" mode=""></image>
</view>

Loading…
Cancel
Save