推广小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

71 lines
1.5 KiB

<template>
<view>
<view class="info cardStyle_"
v-for="(item, index) in cardListData"
:key="index" @click="toDetail(item)">
<view class="left">
<image :src="item.image" alt="">
</view>
<view class="right">
<view class="detailed">
<view class="title">{{item.title}}</view>
<view class="date">{{ $dayjs(item.startTime).format('YYYY-MM-DD') }}</view>
<view class="address">{{item.address}}</view>
</view>
<view class="data">
<text>¥{{item.price}}</text>
<text>{{item.num}}/{{item.sum}}</text>
<text class="btn" v-if="item.state == 0">报名中</text>
<text class="btn-2" v-if="item.state == 1">已结束</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"travelList",
props : ['cardListData'],
data() {
return {
};
},
methods : {
toDetail({ id }) {
uni.navigateTo({
url:`/pages_order/lvyou-detail?travelId=${id}`
})
},
}
}
</script>
<style scoped lang="scss">
.info {
position: relative;
margin: 20rpx 0;
padding: 35rpx 0 35rpx 24rpx;
border-radius: 26rpx;
.right {
.data {
display: flex;
justify-content: space-between;
align-items: center;
.btn {
background: #381615;
color: $uni-color-primary;
padding: 10rpx 40rpx;
border-radius: 30rpx 0px 0px 30rpx;
}
.btn-2 {
background: #333;
color: #999;
padding: 10rpx 40rpx;
border-radius: 30rpx 0px 0px 30rpx;
}
}
}
}
</style>