123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- <template>
- <view class="activity">
- <statusBar :item="navBarData"></statusBar>
-
- <viewX-Case class="mid">
- <template #title>
- <view class="title three-font">活动直播</view>
- </template>
- <template #lookMore>
- <view class="lookMore fz-font">
- 查看更多
- </view>
- </template>
- <template #activeBlock>
- <view class="activeData" v-for="i in 4" :key="i">
- <image src="../../static/activity/bg1.png" mode="aspectFill"></image>
- <view class="liveBroadcast">
- <view class="title">
- <view class="tag bqZ-font">类型</view>
- <text three-font>直播活动标题标题标题标题标题标题标题</text>
- </view>
-
- <view class="operate">
- <view class="left">
- <view class="img">
- <image src="../../static/jys/jys.png"></image>
- </view>
- <view class="user fwb-font">用户名</view>
- </view>
- <view class="collection">
- <uni-icons type="star" size="20"></uni-icons>
- <text class="fz-font">收藏</text>
-
- </view>
- </view>
- </view>
- </view>
- </template>
- </viewX-Case>
-
- <viewX-Case style="margin-top: 10px;">
- <template #title>
- <view class="title three-font">活动推荐</view>
- </template>
- <template #lookMore>
- <view class="lookMore fz-font" @click="lookMore">查看更多</view>
- </template>
- <template #activeBlock>
- <!-- <activity-case v-for="i in 10" :key="i"></activity-case> -->
- <teaching-case v-for="i in 10" :item="actData" :key="i"></teaching-case>
- </template>
- </viewX-Case>
-
-
-
- <uni-fab ref="fab"
- :pattern="pattern"
- :horizontal="horizontal"
- :vertical="vertical"
- :direction="direction"
-
- @fabClick="fabClick" />
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- navBarData:{
- title:'活动', //导航栏标题
- btn:0 //是否显示返回按钮 0不显示 1 显示
- },
- actData:{
- btn:1
- },
- title: 'uni-fab',
- directionStr: '垂直',
- horizontal: 'right',
- vertical: 'bottom',
- direction: 'horizontal',
- pattern: {
- color: '#7A7E83',
- backgroundColor: '#fff',
- selectedColor: '#007AFF',
- buttonColor: '#007AFF',
- iconColor: '#fff'
- },
- };
- },
- methods:{
- lookMore(){
- uni.navigateTo({
- url:'/pages/activityList/activityList'
- })
- },
- fabClick(){
- // console.log(111);
- uni.navigateTo({
- url:'/pages/publish/publish'
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .activity{
- .mid{
- // margin:20px 0;
- .activeData{
- width: 460rpx;
- display: inline-block;
- margin-right: 20px;
- image{
- width: 100%;
- height: 120px;
- border-radius: 10px;
- margin-bottom: 10px;
- }
- .liveBroadcast{
- flex: 1;
- width: 460rpx;
- display: flex;
- flex-direction: column;
- align-content: flex-end ;
- .title{
- display: flex;
- margin-bottom: 5px;
- .tag{
- border: 1px #00b2b6 solid;
- // font-size: 12px;
- width: 64rpx;
- height: 38rpx;
- display: flex;
- white-space: nowrap;
- justify-content: center;
- align-items: center;
- // padding: 2px 4px;
- padding: 1rpx 4rpx;
- border-radius: 3px;
- margin-right: 10rpx;
- color: #00b2b6;
- }
- text{
- // display: -webkit-box;//对象作为弹性伸缩盒子模型显示
- // overflow: hidden;//溢出隐藏
- // -webkit-box-orient: vertical;//设置伸缩盒子对象的子元素的排列方式
- // -webkit-line-clamp: 2;//设置 块元素包含的文本行数
- overflow: hidden;
- text-overflow:ellipsis;
- white-space: nowrap;
- }
-
- }
- .operate{
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20rpx 0;
- color: #666666;
- // margin-bottom: 20rpx;
- // padding-bottom: 20rpx;
- .left{
- display: flex;
- // justify-content: flex-start;
- align-items: center;
- .img{
- width:30px;
- height:30px;
- // padding-right: 20rpx;
- margin-right: 20rpx;
-
- image{
- width: 100%;
- height: 100%;
- border-radius: 50%;
- }
- }
-
- .user{
- // font-size: 16px;
- // padding-left: 15rpx;
- }
-
- }
- .collection{
- // float: right;
- // font-size: 14px;
- // padding-top: 10px;
- }
- }
- }
- }
- .activeData:nth-child(1){
- margin-left: 15px;
- }
- }
-
- .title{
- font-weight: bold;
- // color: #999999;
- }
- .lookMore{
- color: #666666;
- // font-size: 14px;
- }
- }
- </style>
|