大德通墓地App
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.
 
 
 

109 lines
2.1 KiB

<template>
<div>
<!-- 底部 -->
<view class="bottom" >
<view class="heart" v-if="isCollection" @click="cancelCollect">
<image style="width: 36rpx; height: 36rpx;" class="img"
src="../../../../static/check_live.png"></image><text>取消收藏</text>
</view>
<view class="heart active" v-else @click="addCollect" >
<image style="width: 36rpx; height: 36rpx;" class="img"
src="../../../../static/live.png"></image><text>收藏</text>
</view>
<view class="link btn" @click="toLinkInfo">
<text class="text">链上查看</text>
</view>
<view class="subscribe btn" @click="toSubscribe">
<text class="text">预约了解</text>
</view>
</view>
</div>
</template>
<script>
export default {
data() {
return {
info: '',
isCollection: false
}
},
methods: {
toLinkInfo() {
uni.$emit('toLinkInfo')
},
toSubscribe() {
uni.$emit('toSubscribe')
},
addCollect() {
uni.$emit('addCollect')
this.isCollection = !this.isCollection
},
cancelCollect() {
uni.$emit('cancelCollect')
this.isCollection = !this.isCollection
}
},
onLoad() {
// 接收参数
uni.$on("infoData", (data) => {
console.log(data, '00009999')
this.isCollection = data.isCollection
// if(data && data.pagodaId){
// this.isCollection = data.isCollection
// console.log(this.isCollection, '0000-------------------------------------9999')
// }
})
},
onUnload(){
}
}
</script>
<style scoped lang="scss">
.bottom {
padding: 24rpx;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
.heart {
flex-direction: row;
align-items: center;
.img {
margin-right: 10rpx;
}
}
.active{
color: #E67D29;
}
.heart {
flex: 1;
}
.btn {
width: 208rpx;
height: 80rpx;
background-color: #e67d29;
border-radius: 12rpx;
line-height: 80rpx;
text-align: center;
align-items: center;
justify-content: center;
}
.link {
margin-right: 24rpx;
background-color: #5173b9;
align-items: center;
justify-content: center;
}
.text {
color: #FFFFFF;
}
}
</style>