90 lines
2.5 KiB
Vue
90 lines
2.5 KiB
Vue
<template>
|
||
<view class="main">
|
||
<!-- 头部 -->
|
||
<status-nav></status-nav>
|
||
<!-- 消除碳足迹 -->
|
||
<view class="calculator-bg">
|
||
<view class="bg-img">
|
||
<image src="/static/count-bg.png" mode="widthFix"></image>
|
||
</view>
|
||
<view class="calculator calculator-other">
|
||
<view class="eliminate">
|
||
<view class="eliminate-title">
|
||
<image src="/static/icon-title-03.png" mode="heightFix"></image>
|
||
</view>
|
||
<view class="tips">
|
||
<view class="item">
|
||
您全家一年的碳足迹(碳排放)为<text>{{total}}</text>kg,人均碳足迹为<text>{{average}}</text>kg。
|
||
</view>
|
||
<view class="item">
|
||
消除掉您的家庭碳足迹需要指数<text>{{total}}</text>棵,您需要捐款<text>{{total}}</text>元人民币用于中国绿色碳汇基金会低碳旅游专项基金。
|
||
</view>
|
||
<view class="item">
|
||
谢谢您在应对气候变化方面所做的贡献,您是一位有责任的的人。
|
||
</view>
|
||
</view>
|
||
<view class="eliminate-img">
|
||
<image src="/static/eliminate.png" mode="heightFix"></image>
|
||
<view class="payment-btn" @tap="toEliminate">
|
||
<image src="/static/icon-tabbar-04.png" mode="heightFix"></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 导航 -->
|
||
<tabbar :current='2'></tabbar>
|
||
</view>
|
||
</view>
|
||
<!-- 轮播 -->
|
||
<view class="banner">
|
||
<swiper-pull></swiper-pull>
|
||
</view>
|
||
<!-- 底部 -->
|
||
<view class="footer">
|
||
<text>中国绿色碳汇基金会低碳旅游专项基金监制,北京凯来美气候技术咨询有限公司开发。</text>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import statusNav from '@/components/status-nav/status-nav.vue';
|
||
import tabbar from '@/components/tabbar/tabbar.vue';
|
||
import swiperPull from '@/components/swiper/swiper-pull.vue';
|
||
export default {
|
||
components: {
|
||
statusNav,
|
||
tabbar,
|
||
swiperPull
|
||
},
|
||
data() {
|
||
return {
|
||
statusHeight: uni.getSystemInfoSync().statusBarHeight, //状态栏高度
|
||
member: 0, //家庭成员
|
||
total: 0, //总计
|
||
average: 0, //平均值
|
||
treeNum: 0, //树数量
|
||
money: 0, //捐款额
|
||
}
|
||
},
|
||
onLoad() {
|
||
if (uni.getStorageSync('allTotal')) {
|
||
this.total = uni.getStorageSync('allTotal');
|
||
}
|
||
if (uni.getStorageSync('average')) {
|
||
this.average = uni.getStorageSync('average');
|
||
}
|
||
},
|
||
methods: {
|
||
// 去捐款
|
||
toEliminate() {
|
||
uni.navigateTo({
|
||
url: `/pages/contribution/contribution?money=${this.money}`
|
||
})
|
||
},
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
|
||
</style>
|