新增报告弹窗,反馈修改
144
common/style.css
|
@ -271,11 +271,13 @@ image{
|
||||||
|
|
||||||
.interface-btns .operate .btn{
|
.interface-btns .operate .btn{
|
||||||
width: 90px;
|
width: 90px;
|
||||||
height: 153px;
|
height: 71px;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
background-image: url('/static/icon-btn-02.png');
|
background-image: url('/static/icon-btn-03.png');
|
||||||
}
|
}
|
||||||
.interface-btns .operate .btn:last-child{
|
.interface-btns .operate .btn:last-child{
|
||||||
|
height: 153px;
|
||||||
|
background-image: url('/static/icon-btn-02.png');
|
||||||
writing-mode: tb-rl;
|
writing-mode: tb-rl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,22 +468,31 @@ image{
|
||||||
.assess-txt text{
|
.assess-txt text{
|
||||||
color: #327531;
|
color: #327531;
|
||||||
}
|
}
|
||||||
.assess-contrast>image{
|
.assess-contrast .assess-contrast-bg{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-bottom: 1px solid #98b992;
|
height: 253px;
|
||||||
|
background-color: rgba(252, 252, 242, .52);
|
||||||
|
}
|
||||||
|
.assess-contrast .line{
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
border-top: 1px solid #98b992;
|
||||||
|
border-bottom: 1px solid #31742f;
|
||||||
}
|
}
|
||||||
.assess-contrast .list{
|
.assess-contrast .list{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: flex-end;
|
||||||
padding-top: 16px;
|
margin-top: -220px;
|
||||||
border-top: 1px solid #31742f;
|
|
||||||
}
|
}
|
||||||
.assess-contrast .item{
|
.assess-contrast .item{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
.assess-contrast .item image{
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
.assess-contrast .item:nth-of-type(1) text{
|
.assess-contrast .item:nth-of-type(1) text{
|
||||||
color: #327531;
|
color: #327531;
|
||||||
}
|
}
|
||||||
|
@ -541,6 +552,10 @@ image{
|
||||||
height: 27px;
|
height: 27px;
|
||||||
margin-top: 9px;
|
margin-top: 9px;
|
||||||
}
|
}
|
||||||
|
.eliminate-img .payment-btn-other{
|
||||||
|
right: auto;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* 在线支付 */
|
/* 在线支付 */
|
||||||
.contribution{
|
.contribution{
|
||||||
|
@ -558,3 +573,118 @@ image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 查看证书 */
|
||||||
|
.certificate-bg{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: rgba(0, 0, 0, .5);
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
.certificate{
|
||||||
|
width: calc(100% - 200px);
|
||||||
|
background-color: #ffffff;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.certificate>image{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.certificate .content{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.certificate .logo{
|
||||||
|
width: 149px;
|
||||||
|
height: 111px;
|
||||||
|
margin: 100px auto 0;
|
||||||
|
}
|
||||||
|
.certificate .logo image{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.certificate .txt{
|
||||||
|
width: calc(100% - 200px);
|
||||||
|
margin: 40px auto 0;
|
||||||
|
}
|
||||||
|
.certificate .txt .code{
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 24px;
|
||||||
|
color: #d4191a;
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 32px;
|
||||||
|
}
|
||||||
|
.certificate .txt>image{
|
||||||
|
width: 529px;
|
||||||
|
height: 223px;
|
||||||
|
margin-left: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.certificate .msg{
|
||||||
|
width: 700px;
|
||||||
|
margin: 40px auto 0;
|
||||||
|
}
|
||||||
|
.certificate .msg .item{
|
||||||
|
font-size: 30px;
|
||||||
|
line-height: 50px;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
.certificate .msg .item:nth-of-type(1){
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.certificate .msg .item:nth-of-type(2){
|
||||||
|
text-indent: 2em;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.certificate .msg .item text{
|
||||||
|
color: #d4191a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.certificate .msg .time{
|
||||||
|
font-size: 30px;
|
||||||
|
line-height: 36px;
|
||||||
|
margin-top: 20px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.certificate .foot{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 680px;
|
||||||
|
margin: 40px auto 0;
|
||||||
|
}
|
||||||
|
.certificate .foot-logo{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 365px;
|
||||||
|
}
|
||||||
|
.certificate .foot-logo image{
|
||||||
|
width: 170px;
|
||||||
|
height: 170px;
|
||||||
|
}
|
||||||
|
.certificate .qr{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.certificate .qr image{
|
||||||
|
width: 194px;
|
||||||
|
height: 191px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.certificate .qr text{
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
|
@ -25,7 +25,7 @@
|
||||||
backHome(){
|
backHome(){
|
||||||
plus.runtime.launchApplication({
|
plus.runtime.launchApplication({
|
||||||
//打开app
|
//打开app
|
||||||
pname: "io.feihouyun.cs", //B款app云打包的包名
|
pname: "com.samton", //B款app云打包的包名
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
toPage(index) {
|
toPage(index) {
|
||||||
switch (index){
|
switch (index){
|
||||||
case 0:
|
case 0:
|
||||||
uni.reLaunch({
|
uni.navigateTo({
|
||||||
url: this.navList[index]
|
url: this.navList[index]
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (uni.getStorageSync('subTotal')) {
|
if (uni.getStorageSync('subTotal')) {
|
||||||
uni.reLaunch({
|
uni.navigateTo({
|
||||||
url: this.navList[index]
|
url: this.navList[index]
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (uni.getStorageSync('average')) {
|
if (uni.getStorageSync('average')) {
|
||||||
uni.reLaunch({
|
uni.navigateTo({
|
||||||
url: this.navList[index]
|
url: this.navList[index]
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -81,25 +81,32 @@
|
||||||
<view class="">,人均碳足迹为<text>{{average}}</text>kg。</view>
|
<view class="">,人均碳足迹为<text>{{average}}</text>kg。</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="assess-contrast">
|
<view class="assess-contrast">
|
||||||
<image src="/static/assess.png" mode="widthFix"></image>
|
<!-- <image src="/static/assess.png" mode="widthFix"></image> -->
|
||||||
|
<view class="assess-contrast-bg"></view>
|
||||||
|
<view class="line"></view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
|
<image src="/static/footprint.png" mode="heightFix" :style="{height: averageHeight+'px'}"></image>
|
||||||
<view>您的碳足迹为</view>
|
<view>您的碳足迹为</view>
|
||||||
<view><text>{{average}}</text>kg</view>
|
<view><text>{{average}}</text>kg</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
|
<image src="/static/footprint.png" mode="heightFix" style="height: 92px;"></image>
|
||||||
<view>中国人均碳足迹为</view>
|
<view>中国人均碳足迹为</view>
|
||||||
<view><text>6230</text>kg</view>
|
<view><text>7100</text>kg</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view>工业国家人均碳足迹为</view>
|
<image src="/static/footprint.png" mode="heightFix" style="height: 207px;"></image>
|
||||||
<view><text>11460</text>kg</view>
|
<view>美国人均碳足迹为</view>
|
||||||
|
<view><text>16100</text>kg</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
|
<image src="/static/footprint.png" mode="heightFix" style="height: 60px;"></image>
|
||||||
<view>全球人均碳足迹为</view>
|
<view>全球人均碳足迹为</view>
|
||||||
<view><text>4840</text>kg</view>
|
<view><text>4700</text>kg</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
|
<image src="/static/footprint.png" mode="heightFix" style="height: 30px;"></image>
|
||||||
<view>应对气候变化全球人均目标碳足迹为</view>
|
<view>应对气候变化全球人均目标碳足迹为</view>
|
||||||
<view><text>2330</text>kg</view>
|
<view><text>2330</text>kg</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -143,6 +150,7 @@
|
||||||
histogram: {}, //柱状图数据
|
histogram: {}, //柱状图数据
|
||||||
pie: {}, //饼图数据
|
pie: {}, //饼图数据
|
||||||
heightList: [], //柱状高度
|
heightList: [], //柱状高度
|
||||||
|
averageHeight:0, //足迹icon图片
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -243,6 +251,7 @@
|
||||||
averageEv() {
|
averageEv() {
|
||||||
let averageNum = this.total / this.member * 1;
|
let averageNum = this.total / this.member * 1;
|
||||||
this.average = averageNum.toFixed(2);
|
this.average = averageNum.toFixed(2);
|
||||||
|
this.averageHeight = Math.ceil((this.average*30)/2330*1);
|
||||||
uni.setStorageSync('average', this.average);
|
uni.setStorageSync('average', this.average);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,23 +71,23 @@
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
let wv = currentWebview.children()[0];
|
let wv = currentWebview.children()[0];
|
||||||
wv.setStyle({top:iframeInfo.top,left:iframeInfo.left,width:iframeInfo.width,height:iframeInfo.height});
|
wv.setStyle({top:iframeInfo.top,left:iframeInfo.left,width:iframeInfo.width,height:iframeInfo.height});
|
||||||
wv.overrideUrlLoading({mode:"reject",match:'.*www\.thjj\.org/list.html#key.*'}, (e)=>{
|
// wv.overrideUrlLoading({mode:"reject",match:'.*www\.thjj\.org/list.html#key.*'}, (e)=>{
|
||||||
let wxCode = e.url.substr(e.url.indexOf('=')+1);
|
// let wxCode = e.url.substr(e.url.indexOf('=')+1);
|
||||||
console.log(wxCode+'微信证书编号')
|
// console.log(wxCode+'微信证书编号')
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url:'/pages/count/count'
|
// url:'/pages/eliminate/eliminate'
|
||||||
})
|
// })
|
||||||
});
|
// });
|
||||||
wv.addEventListener('titleUpdate',({title}) => {
|
// wv.addEventListener('titleUpdate',({title}) => {
|
||||||
console.log(title+'标题url')
|
// console.log(title+'标题url')
|
||||||
if(title.indexOf('show.aspx?no=')!==-1){
|
// if(title.indexOf('show.aspx?no=')!==-1){
|
||||||
let zfbCode = title.substr(title.indexOf('show.aspx?no=')+1);
|
// let zfbCode = title.substr(title.indexOf('show.aspx?no=')+1);
|
||||||
console.log(zfbCode+'支付宝编号');
|
// console.log(zfbCode+'支付宝编号');
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url:'/pages/assess/assess'
|
// url:'/pages/eliminate/eliminate'
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
<!-- 导航 -->
|
<!-- 导航 -->
|
||||||
<tabbar :current='0'></tabbar>
|
<tabbar :current='0'></tabbar>
|
||||||
<!-- 操作说明 -->
|
<!-- 操作说明 -->
|
||||||
<view class="explain">操作说明:点击图标,计算您的碳足迹。</view>
|
<view class="explain">友情提醒:计算前请先按AC键,消除上一用户数据</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 轮播 -->
|
<!-- 轮播 -->
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
'食': [{
|
'食': [{
|
||||||
'title': '吸烟数量',
|
'title': '吸烟数量',
|
||||||
'company': '包',
|
'company': '包',
|
||||||
'carbon': 0.00591,
|
'carbon': 0.1182,
|
||||||
'num': '',
|
'num': '',
|
||||||
'tag': 'b1'
|
'tag': 'b1'
|
||||||
},
|
},
|
||||||
|
@ -315,7 +315,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
numlist: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '00', '.'],
|
numlist: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '00', '.'],
|
||||||
operateList: ['CE', '计算'],
|
operateList: ['DEL','AC', '计算'],
|
||||||
cateTagList: [], //分类标题
|
cateTagList: [], //分类标题
|
||||||
subTotal: [0, 0, 0, 0, 0], //小计
|
subTotal: [0, 0, 0, 0, 0], //小计
|
||||||
total: 0, //总计
|
total: 0, //总计
|
||||||
|
@ -325,14 +325,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
if (uni.getStorageSync('subTotal')) {
|
if(uni.getStorageSync('cateTagList')){
|
||||||
uni.removeStorageSync('subTotal');
|
this.cateTagList = uni.getStorageSync('cateTagList');
|
||||||
}
|
}
|
||||||
if (uni.getStorageSync('allTotal')) {
|
if(uni.getStorageSync('cacheTotal')){
|
||||||
uni.removeStorageSync('allTotal');
|
this.total = uni.getStorageSync('cacheTotal');
|
||||||
}
|
}
|
||||||
if (uni.getStorageSync('average')) {
|
if(uni.getStorageSync('cacheSubTotal')){
|
||||||
uni.removeStorageSync('average');
|
this.subTotal = uni.getStorageSync('cacheSubTotal');
|
||||||
|
}
|
||||||
|
if(uni.getStorageSync('cateList')){
|
||||||
|
this.cateList = uni.getStorageSync('cateList');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -341,6 +344,8 @@
|
||||||
this.cateTagList.push(this.cateList[index][index1].tag);
|
this.cateTagList.push(this.cateList[index][index1].tag);
|
||||||
this.focusIndex = index;
|
this.focusIndex = index;
|
||||||
this.focusIndex1 = index1;
|
this.focusIndex1 = index1;
|
||||||
|
// 缓存已选分类
|
||||||
|
uni.setStorageSync('cateTagList',this.cateTagList)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取光标
|
// 获取光标
|
||||||
|
@ -368,8 +373,9 @@
|
||||||
if (this.cateTagList.length > 0) {
|
if (this.cateTagList.length > 0) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
this.cateList[this.focusIndex][this.focusIndex1].num = '';
|
this.cateList[this.focusIndex][this.focusIndex1].num = '';
|
||||||
// 计算
|
}else if(index == 1){
|
||||||
this.calculationEv();
|
// 清除所有数据
|
||||||
|
this.clearEv();
|
||||||
} else {
|
} else {
|
||||||
// 计算
|
// 计算
|
||||||
this.calculationEv();
|
this.calculationEv();
|
||||||
|
@ -377,6 +383,25 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 清除所有数据
|
||||||
|
clearEv(){
|
||||||
|
this.cateList['衣'].forEach(item=>item.num = '');
|
||||||
|
this.cateList['食'].forEach(item=>item.num = '');
|
||||||
|
this.cateList['住'].forEach(item=>item.num = '');
|
||||||
|
this.cateList['行'].forEach(item=>item.num = '');
|
||||||
|
this.cateList['用'].forEach(item=>item.num = '');
|
||||||
|
this.cateTagList = [];
|
||||||
|
this.subTotal = [0, 0, 0, 0, 0];
|
||||||
|
this.total = 0; //总计
|
||||||
|
// 清除缓存
|
||||||
|
const res = uni.getStorageInfoSync();
|
||||||
|
res.keys.map((item) => {
|
||||||
|
if (item !== 'experients') {
|
||||||
|
uni.removeStorageSync(item);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 计算
|
// 计算
|
||||||
calculationEv() {
|
calculationEv() {
|
||||||
// 小计
|
// 小计
|
||||||
|
@ -425,6 +450,8 @@
|
||||||
})
|
})
|
||||||
this.subTotal[4] = parseFloat(subTotalNum5);
|
this.subTotal[4] = parseFloat(subTotalNum5);
|
||||||
|
|
||||||
|
uni.setStorageSync('cacheSubTotal', this.subTotal);
|
||||||
|
|
||||||
// 总计
|
// 总计
|
||||||
let totalArr = this.subTotal.filter(item => {
|
let totalArr = this.subTotal.filter(item => {
|
||||||
return item !== 0
|
return item !== 0
|
||||||
|
@ -434,6 +461,7 @@
|
||||||
totalNum += item * 1;
|
totalNum += item * 1;
|
||||||
})
|
})
|
||||||
this.total = parseFloat(totalNum);
|
this.total = parseFloat(totalNum);
|
||||||
|
uni.setStorageSync('cacheTotal', this.total);
|
||||||
|
|
||||||
// 缓存小计数据
|
// 缓存小计数据
|
||||||
let cacheTotal = [];
|
let cacheTotal = [];
|
||||||
|
@ -446,6 +474,9 @@
|
||||||
|
|
||||||
// 缓存总计数据
|
// 缓存总计数据
|
||||||
uni.setStorageSync('allTotal', this.total.toFixed(2));
|
uni.setStorageSync('allTotal', this.total.toFixed(2));
|
||||||
|
|
||||||
|
// 缓存分类数组
|
||||||
|
uni.setStorageSync('cateList', this.cateList);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
<view class="payment-btn" @tap="toEliminate">
|
<view class="payment-btn" @tap="toEliminate">
|
||||||
<image src="/static/icon-tabbar-04.png" mode="heightFix"></image>
|
<image src="/static/icon-tabbar-04.png" mode="heightFix"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="payment-btn payment-btn-other" @tap="ifShow=true">
|
||||||
|
<image src="/static/icon-tabbar-05.png" mode="heightFix"></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 导航 -->
|
<!-- 导航 -->
|
||||||
|
@ -42,6 +45,43 @@
|
||||||
<view class="footer">
|
<view class="footer">
|
||||||
<text>中国绿色碳汇基金会低碳旅游专项基金监制,北京凯来美气候技术咨询有限公司开发。</text>
|
<text>中国绿色碳汇基金会低碳旅游专项基金监制,北京凯来美气候技术咨询有限公司开发。</text>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 证书 -->
|
||||||
|
<view class="certificate-bg" v-if="ifShow" @tap="ifShow=false">
|
||||||
|
<view class="certificate">
|
||||||
|
<image src="/static/certificate-bg.jpg" mode="widthFix"></image>
|
||||||
|
<view class="content">
|
||||||
|
<view class="logo">
|
||||||
|
<image src="/static/logo-01.png" mode="heightFix"></image>
|
||||||
|
</view>
|
||||||
|
<view class="txt">
|
||||||
|
<image src="/static/code-title.png" mode="heightFix"></image>
|
||||||
|
<view class="code">No.{{code}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="msg">
|
||||||
|
<view class="item">
|
||||||
|
您是第
|
||||||
|
<view class="number">
|
||||||
|
<text v-for="(item,index) in difference">0</text>
|
||||||
|
<text>{{experients}}</text>
|
||||||
|
</view>
|
||||||
|
位体验者:
|
||||||
|
</view>
|
||||||
|
<view class="item">感谢您参与“爱绿行碳普惠”平台互动,计算碳排放量,学习节能降碳等知识,践行低碳旅游和生活新风尚,用行动守护景区美丽环境。</view>
|
||||||
|
<view class="time">2023年2月15日</view>
|
||||||
|
</view>
|
||||||
|
<view class="foot">
|
||||||
|
<view class="qr">
|
||||||
|
<image src="/static/qr-alx.png" mode="widthFix"></image>
|
||||||
|
<view class="tips">扫码关注<text>爱绿行</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="foot-logo">
|
||||||
|
<image src="/static/logo-02.png" mode="widthFix"></image>
|
||||||
|
<image src="/static/logo-03.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -63,15 +103,41 @@
|
||||||
average: 0, //平均值
|
average: 0, //平均值
|
||||||
treeNum: 0, //树数量
|
treeNum: 0, //树数量
|
||||||
money: 0, //捐款额
|
money: 0, //捐款额
|
||||||
|
ifShow:false, //是否显示证书
|
||||||
|
code:'', //证书编码
|
||||||
|
experients:0, //体验者编号
|
||||||
|
difference:0, //补齐位数
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
if(uni.getStorageSync('newUser')!=='newUser'){
|
||||||
|
if(uni.getStorageSync('experients')){
|
||||||
|
this.experients = uni.getStorageSync('experients')+1;
|
||||||
|
}else{
|
||||||
|
this.experients = 1;
|
||||||
|
}
|
||||||
|
uni.setStorageSync('experients',this.experients);
|
||||||
|
uni.setStorageSync('newUser','newUser');
|
||||||
|
}else{
|
||||||
|
this.experients = uni.getStorageSync('experients');
|
||||||
|
}
|
||||||
|
this.difference = 6-this.experients.toString().length;
|
||||||
|
|
||||||
if (uni.getStorageSync('allTotal') && uni.getStorageSync('average')) {
|
if (uni.getStorageSync('allTotal') && uni.getStorageSync('average')) {
|
||||||
this.total = uni.getStorageSync('allTotal');
|
this.total = uni.getStorageSync('allTotal');
|
||||||
this.average = uni.getStorageSync('average');
|
this.average = uni.getStorageSync('average');
|
||||||
this.treeNum = this.average/220.00*1;
|
this.treeNum = this.average/440.00*1;
|
||||||
this.money = this.treeNum*30*1
|
this.money = this.treeNum*67.6*1
|
||||||
}
|
}
|
||||||
|
const date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
let day = date.getDate();
|
||||||
|
let hour = date.getHours();
|
||||||
|
let minute = date.getMinutes();
|
||||||
|
let second = date.getSeconds();
|
||||||
|
let random = Math.ceil(Math.random() * 99 + 1);
|
||||||
|
this.code = `${year.toString().substr(2)}${month<10?'0'+month:month}${day<10?'0'+day:day}${hour<10?'0'+hour:hour}${minute<10?'0'+minute:minute}${second<10?'0'+second:second}${random<10?'0'+random:random}`
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 去捐款
|
// 去捐款
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="tips" v-if="allowMac!==macStr">当前设备不可以</view>
|
<view class="tips" v-if="!allowMac.includes(macStr)">当前设备不可用{{macStr}}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -9,8 +9,7 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
macStr:'', //设备mac
|
macStr:'', //设备mac
|
||||||
allowMac:'B0:CC:FE:9E:D3:4A', //允许设备mac
|
allowMac:['B0:CC:FE:9E:D3:4A','F2:6E:B1:A7:3B:B1','00:81:d2:63:0F:80','00:DB:19:F0:1A:F6','00:DB:8A:DB:71:69'], //允许设备mac
|
||||||
randomMac:'F2:6E:B1:A7:3B:B1', //允许设备mac
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -40,8 +39,7 @@
|
||||||
// 赋值MAC
|
// 赋值MAC
|
||||||
this.macStr = finalMac;
|
this.macStr = finalMac;
|
||||||
// #endif
|
// #endif
|
||||||
|
if(this.allowMac.includes(this.macStr)){
|
||||||
if(this.macStr == this.allowMac || this.macStr == this.randomMac){
|
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:'/pages/count/count'
|
url:'/pages/count/count'
|
||||||
})
|
})
|
||||||
|
|
Before Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 556 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 556 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 556 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 60 KiB |