Browse Source

发起拼团,砍价订阅推送,首页跳转领券UI调整

home_hotList^2
ld0104 2 years ago
parent
commit
31c2123e70
  1. 31
      pages/activity/DargainGoodsDetails/index.vue
  2. 17
      pages/activity/GroupDetails/index.vue
  3. 65
      pages/activity/activity/index.vue
  4. 45
      pages/home/index.vue
  5. 7
      pages/shop/HotNewGoods/index.vue
  6. BIN
      static/images/welfare.png

31
pages/activity/DargainGoodsDetails/index.vue

@ -155,7 +155,8 @@
tagStyle: {
a: 'color:#0A59F7;text-decoration:underline;',
img: 'padding:0;margin:0;font-size:0;display:block;'
}
},
subType:true
};
},
onLoad() {
@ -215,10 +216,30 @@
})
},
goDargain() {
this.$yrouter.push({
path: "/pages/activity/DargainDetails/index",
query: { id: this.bargainId, partake: 0 }
});
let isParticipation=JSON.parse(this.$yroute.query.isParticipation)
if(this.subType && !isParticipation) {
let tmplIds = ['iUviwf1eQoQ2BGXdCQx7ki_EAj_4e4v1eLI5IeUbT_0'];
uni.requestSubscribeMessage({
tmplIds,
success:res=> {
this.subType=false
this.$yrouter.push({
path: "/pages/activity/DargainDetails/index",
query: { id: this.bargainId, partake: 0 }
});
},
fail(err) {
console.log("requestSubscribeMessage err", err)
}
})
}else{
this.$yrouter.push({
path: "/pages/activity/DargainDetails/index",
query: { id: this.bargainId, partake: 0 }
});
}
},
linktap(e) {
// console.log('description', e.innerText);

17
pages/activity/GroupDetails/index.vue

@ -352,7 +352,8 @@ export default {
tagStyle: {
a: 'color:#0A59F7;text-decoration:underline;',
img: 'padding:0;margin:0;font-size:0;display:block;'
}
},
subType:true
}
},
computed: {},
@ -581,10 +582,24 @@ export default {
})
// this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId });
},
subscribeMessage(){
let tmplIds = ['kNUN676-t1H3mQplI3iG8_aztf6c1TStnAADF104e4M'];
uni.requestSubscribeMessage({
tmplIds,
success:res=> {
this.subType=false
},
fail(err) {
console.log("requestSubscribeMessage err", err)
}
})
},
//
openTeam: function() {
var that = this
console.log(this.attr)
if(this.subType) this.subscribeMessage()
if (that.attr.cartAttr == false) { //
console.log(this.attr.cartAttr)
that.attr.cartAttr = !this.attr.cartAttr

65
pages/activity/activity/index.vue

@ -149,13 +149,21 @@
this.getBargainList();
},
onLoad() {
if(this.$yroute.query.isType==1){
this.tabType=1
this.activityType=2
}else if(this.$yroute.query.isType==0){
this.tabType=0
this.activityType=2
switch (this.$yroute.query.isType){
case '0':
this.tabType=0
this.activityType=2
break;
case '1':
this.tabType=1
this.activityType=2
break;
case '2':
this.tabType=0
this.activityType=1
break;
}
getBanner(3).then(
res => {
this.$set(this,'banner',res.data.banner)
@ -210,40 +218,25 @@
this.goodsList=[]
// this.tabType = 0;
if(i === 0) {
this.seckillList=[]
this.seckillForm.page=1
this.setTime(0);
// this.goodsList = this.seckillList;
} else if(i === 1) {
this.groupForm.page=1
this.grouponList=[]
this.groupLoaded=false
this.getGrouponList()
// this.goodsList = this.grouponList;
} else {
this.bargainList=[]
this.bargainForm.page=1
this.getBargainList()
// this.goodsList = this.bargainList;
}
},
setTabType(i) {
if(this.tabType == i) return;
// this.goodsList=[]
this.goodsList=[]
this.tabType = i;
if(this.activityType == 0) {
this.seckillList=[]
this.goodsList=[]
this.seckillForm.page=1
this.setTime(i);
}else if(this.activityType == 1){
this.groupForm.page=1
this.grouponList=[]
this.groupLoaded=false
this.getGrouponList()
}else{
this.bargainList=[]
this.bargainForm.page=1
this.getBargainList()
}
@ -266,9 +259,10 @@
query: { id }
})
} else {
let isParticipation=item.isParticipation
this.$yrouter.push({
path: "/pages/activity/DargainGoodsDetails/index",
query: { id, partake: 0 }
query: { id, partake: 0 ,isParticipation}
});
// this.$yrouter.push({
// path: "/pages/activity/DargainDetails/index",
@ -281,7 +275,6 @@
title: "",
});
getSeckillConfig().then(res => {
console.log(res.data,55555555);
this.timeList = res.data.seckillTime;
this.timeList.forEach(res=>{
res.rule=res.rule.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"')
@ -297,15 +290,12 @@
})
},
setTime(i) {
this.seckillList=[]
this.seckillForm.page=1
if(i == 0 && this.tabType==0) {
console.log(1111111111111);
this.seckillActive = this.seckillTimeIndex;
} else {
if(this.seckillTimeIndex == this.timeList.length-1) {
// this.seckillActive = 0;
this.seckillList=[]
this.goodsList=[]
this.seckillForm.page=1
return
} else {
this.seckillActive = this.seckillTimeIndex+1;
@ -322,6 +312,9 @@
},
getSeckillList() {
if (this.seckillLoaded) return;
uni.showLoading({
title: "",
});
let time = this.timeList[this.seckillActive].id;
getSeckillList(time, this.seckillForm).then(res => {
this.seckillLoaded = res.data.length < this.seckillForm.limit;
@ -334,7 +327,13 @@
})
},
getGrouponList() {
this.groupForm.page=1
this.grouponList=[]
this.groupLoaded=false
if (this.groupLoaded) return
uni.showLoading({
title: "",
});
if(this.activityType === 1 && this.tabType===0){
getCombinationList(this.groupForm).then(res => {
this.grouponList = this.grouponList.concat(res.data.storeCombinationQueryVos)
@ -350,10 +349,16 @@
this.goodsList = this.grouponList;
})
}
uni.hideLoading();
},
getBargainList() {
if (this.bargainLoaded) return;
this.bargainList=[]
this.bargainForm.page=1
uni.showLoading({
title: "",
});
getBargainList(this.bargainForm).then(res => {
if(this.tabType===0){
this.bargainList.push.apply(this.bargainList, res.data.yxStoreBargainQueryVos);
@ -365,7 +370,7 @@
if(this.activityType === 2) {
this.goodsList = this.bargainList;
}
uni.hideLoading();
});
},
}

45
pages/home/index.vue

@ -58,10 +58,11 @@
</view>
</view> -->
<view class="selection-box acea-row row-between">
<view class="left">
<view class="left" hover-class="none">
<navigator url="/pages/user/coupon/GetCoupon/index">
<view class="title">福利领券</view>
<view class="subtitle">大额优惠券领不停</view>
<!-- <view class="title">福利领券</view>
<view class="subtitle">大额优惠券领不停</view> -->
<!-- <image class="img" src="@/static/images/welfare.png" mode=""></image> -->
<image class="img" src="@/static/images/welfare.png" mode=""></image>
</navigator>
</view>
@ -665,9 +666,9 @@
goComDetail(item){
let id=item.id
this.$yrouter.push({
path: '/pages/activity/GroupDetails/index',
query: { id }
})
path: "/pages/activity/activity/index",
query: { isType:2 }
});
},
goSeckillDetail(sec){
let id=sec.id
@ -1077,26 +1078,26 @@
width: 230rpx;
height: 350rpx;
background-color: #F5F6F8;
padding-top: 24rpx;
// padding-top: 24rpx;
color: #3A3A3C;
border-radius: 16rpx;
margin-right: 20rpx;
box-shadow: 0px 10px 16px 0px rgba(0,0,0,0.06);
.title{
margin-left: 26rpx;
font-size: 36rpx;
font-weight: 600;
}
.subtitle{
margin-left: 26rpx;
font-size: 20rpx;
font-weight: 600;
}
overflow: hidden;
// .title{
// margin-left: 26rpx;
// font-size: 36rpx;
// font-weight: 600;
// }
// .subtitle{
// margin-left: 26rpx;
// font-size: 20rpx;
// font-weight: 600;
// }
.img{
width: 213rpx;
height: 236rpx;
margin-left: 18rpx;
margin-top: 15rpx;
width: 230rpx;
height: 350rpx;
border-radius: 16rpx;
}
}
.right{
@ -1278,7 +1279,7 @@
font-size: 34rpx;
position: absolute;
top: 90rpx;
left: 22rpx;
left: 24rpx;
}
}
.hot-right{

7
pages/shop/HotNewGoods/index.vue

@ -158,7 +158,7 @@ export default {
// observeParents: true
// }
// isShow:false,
isShowBind:false
// isShowBind:false
};
},
mounted: function() {
@ -199,8 +199,9 @@ export default {
},
//
bindPickerChange(e) {
// if(this.mouthIndex == e.detail.value) return;
if(e.detail.value!=0 && this.mouthIndex == e.detail.value) return;
this.mouthIndex = e.detail.value;
this.subclassIndex=0
this.form.mouth = this.mouthList[this.mouthIndex];
this.goodsList = [];
this.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
@ -223,7 +224,7 @@ export default {
//
bindPickerSubclassChange(e) {
// if(this.subclassIndex == e.detail.value) return;
if(this.isShowBind && this.subclassIndex == e.detail.value) {
if(e.detail.value!=0 && this.subclassIndex == e.detail.value) {
return;
}else{
if(e.detail.value=="0"){

BIN
static/images/welfare.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Loading…
Cancel
Save