Commit e2aeacb2 authored by zhengke's avatar zhengke

parent 24500b62
...@@ -32,11 +32,6 @@ ...@@ -32,11 +32,6 @@
font-size: 30rpx; font-size: 30rpx;
width:400rpx; width:400rpx;
color: #1F1F1F; color: #1F1F1F;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
padding-right: 10rpx; padding-right: 10rpx;
} }
.Activity_Time { .Activity_Time {
...@@ -52,9 +47,33 @@ ...@@ -52,9 +47,33 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.tradeActive{
background-color: #F6F6F6;
width:100%;
position: fixed;
top: 65px;
left: 0;
}
.tradeTop{
display: flex;
font-size:30rpx;
margin-bottom:20px;
}
.Top_LEFT{
display: inline-block;
width:10rpx;
height:30rpx;
background-color: #9cf;
margin:3px 7px 0 0;
}
</style> </style>
<template> <template>
<view class="trade-activity" :style="{height:'calc(100vh - '+pagePaddingBottom+')'}"> <view class="trade-activity" :style="{height:!isShowSign?'0':'calc(100vh - '+pagePaddingBottom+')'}" :class="{'tradeActive':isShowSign}">
<template v-if="isShowSign">
<view class="tradeTop">
<text class="Top_LEFT"></text>
请选择你要报名的活动
</view>
<view class="trade_List" v-for="(item, index) in tradeData"> <view class="trade_List" v-for="(item, index) in tradeData">
<view class="tradeImgDiv"> <view class="tradeImgDiv">
<image :src="item.CoverImg" style="width:100%;height:100%" mode="aspectFill"></image> <image :src="item.CoverImg" style="width:100%;height:100%" mode="aspectFill"></image>
...@@ -69,16 +88,22 @@ ...@@ -69,16 +88,22 @@
</view> </view>
</view> </view>
<view class="Activity_Time" style="margin-top:20rpx;"> <view class="Activity_Time" style="margin-top:20rpx;">
报名时间:{{item.StartTime}} 活动时间:{{item.StartTime}}
</view>
<view class="Activity_Time" style="margin-top:10rpx;">
活动时间:{{item.EndTime}}
</view> </view>
</view> </view>
</view> </view>
<view style="width:100%;height:100rpx;"></view> <view style="width:100%;height:100rpx;"></view>
</template>
<view class="trade_Btn"> <view class="trade_Btn">
<u-button size="80" :ripple="true" :custom-style="{ <u-button size="80" :ripple="true" v-if="!isShowSign" :custom-style="{
backgroundColor: mc,
height: '80rpx',
color: '#FFF',
fontSize: '14px',
margin: '0 3vw',
width: '60vw',
}" @click="isShowSign=true">立即报名</u-button>
<u-button size="80" :ripple="true" v-if="isShowSign" :custom-style="{
backgroundColor: mc, backgroundColor: mc,
height: '80rpx', height: '80rpx',
color: '#FFF', color: '#FFF',
...@@ -97,28 +122,45 @@ ...@@ -97,28 +122,45 @@
return { return {
mc: '', mc: '',
tradeData: this.dataObj, tradeData: this.dataObj,
Ids: '' Ids: '',
isShowSign:false
} }
}, },
mounted() { mounted() {
console.log(this.dataObj,'data');
this.mc = this.$uiConfig.mainColor; this.mc = this.$uiConfig.mainColor;
}, },
created() { created() {
},
onShow() {
}, },
methods: { methods: {
getShow(){
this.isShowSign=false;
},
//跳转报名 //跳转报名
goSignUp() { goSignUp() {
if(this.isShowSign){
let MyArray=[]; let MyArray=[];
this.tradeData.forEach(x=>{ this.tradeData.forEach(x=>{
if(x.IsCheck){ if(x.IsCheck){
MyArray.push(x.Id); MyArray.push(x.Id);
} }
}) })
if(MyArray.length==0){
uni.showToast({
title: '请选择活动',
icon: 'none'
})
return
}
this.Ids = MyArray.toString(); this.Ids = MyArray.toString();
uni.navigateTo({ uni.navigateTo({
url: "/pages/kotra/activeSignUp?Id=" + this.Ids url: "/pages/kotra/activeSignUp?Id=" + this.Ids
}); });
} }
}
}, },
}; };
</script> </script>
......
...@@ -212,6 +212,7 @@ ...@@ -212,6 +212,7 @@
:dataObj="d.data" :dataObj="d.data"
:pagePaddingBottom = 'pagePaddingBottom' :pagePaddingBottom = 'pagePaddingBottom'
@refresh="refreshPage" @refresh="refreshPage"
ref="tradeActive"
></tradeActivity> ></tradeActivity>
</template> </template>
</view> </view>
...@@ -717,6 +718,12 @@ export default { ...@@ -717,6 +718,12 @@ export default {
}, 500); }, 500);
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.getIsOpenReserve(); this.getIsOpenReserve();
//调用
if (Object.keys(this.$refs).length > 0 && this.$refs.tradeActive) {
//判断
this.$refs.tradeActive[0].getShow(); //调取最近学习组件的方法
console.log(this.$refs.tradeActive[0]);
}
}, },
methods: { methods: {
......
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