新增报告弹窗,反馈修改

master
Lee 2023-02-16 10:18:20 +08:00
parent 5d50d311e0
commit 98d89b9623
45 changed files with 1514 additions and 801 deletions

View File

@ -271,11 +271,13 @@ image{
.interface-btns .operate .btn{
width: 90px;
height: 153px;
height: 71px;
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{
height: 153px;
background-image: url('/static/icon-btn-02.png');
writing-mode: tb-rl;
}
@ -466,22 +468,31 @@ image{
.assess-txt text{
color: #327531;
}
.assess-contrast>image{
.assess-contrast .assess-contrast-bg{
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{
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 16px;
border-top: 1px solid #31742f;
align-items: flex-end;
margin-top: -220px;
}
.assess-contrast .item{
text-align: center;
font-size: 16px;
line-height: 1.2;
}
.assess-contrast .item image{
margin-bottom: 25px;
}
.assess-contrast .item:nth-of-type(1) text{
color: #327531;
}
@ -541,6 +552,10 @@ image{
height: 27px;
margin-top: 9px;
}
.eliminate-img .payment-btn-other{
right: auto;
left: 0;
}
/* 在线支付 */
.contribution{
@ -557,4 +572,119 @@ image{
.iframe-box iframe{
width: 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;
}

View File

@ -25,7 +25,7 @@
backHome(){
plus.runtime.launchApplication({
//app
pname: "io.feihouyun.cs", //Bapp
pname: "com.samton", //Bapp
});
},
}

View File

@ -26,13 +26,13 @@
toPage(index) {
switch (index){
case 0:
uni.reLaunch({
uni.navigateTo({
url: this.navList[index]
})
break;
case 1:
if (uni.getStorageSync('subTotal')) {
uni.reLaunch({
uni.navigateTo({
url: this.navList[index]
})
} else {
@ -45,7 +45,7 @@
break;
case 2:
if (uni.getStorageSync('average')) {
uni.reLaunch({
uni.navigateTo({
url: this.navList[index]
})
} else {

View File

@ -81,25 +81,32 @@
<view class="">人均碳足迹为<text>{{average}}</text>kg</view>
</view>
<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="item">
<image src="/static/footprint.png" mode="heightFix" :style="{height: averageHeight+'px'}"></image>
<view>您的碳足迹为</view>
<view><text>{{average}}</text>kg</view>
</view>
<view class="item">
<image src="/static/footprint.png" mode="heightFix" style="height: 92px;"></image>
<view>中国人均碳足迹为</view>
<view><text>6230</text>kg</view>
<view><text>7100</text>kg</view>
</view>
<view class="item">
<view>工业国家人均碳足迹为</view>
<view><text>11460</text>kg</view>
<image src="/static/footprint.png" mode="heightFix" style="height: 207px;"></image>
<view>美国人均碳足迹为</view>
<view><text>16100</text>kg</view>
</view>
<view class="item">
<image src="/static/footprint.png" mode="heightFix" style="height: 60px;"></image>
<view>全球人均碳足迹为</view>
<view><text>4840</text>kg</view>
<view><text>4700</text>kg</view>
</view>
<view class="item">
<image src="/static/footprint.png" mode="heightFix" style="height: 30px;"></image>
<view>应对气候变化全球人均目标碳足迹为</view>
<view><text>2330</text>kg</view>
</view>
@ -143,6 +150,7 @@
histogram: {}, //
pie: {}, //
heightList: [], //
averageHeight:0, //icon
}
},
onLoad() {
@ -243,6 +251,7 @@
averageEv() {
let averageNum = this.total / this.member * 1;
this.average = averageNum.toFixed(2);
this.averageHeight = Math.ceil((this.average*30)/2330*1);
uni.setStorageSync('average', this.average);
},
}

View File

@ -71,23 +71,23 @@
setTimeout(function() {
let wv = currentWebview.children()[0];
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)=>{
let wxCode = e.url.substr(e.url.indexOf('=')+1);
console.log(wxCode+'微信证书编号')
uni.navigateTo({
url:'/pages/count/count'
})
});
wv.addEventListener('titleUpdate',({title}) => {
console.log(title+'标题url')
if(title.indexOf('show.aspx?no=')!==-1){
let zfbCode = title.substr(title.indexOf('show.aspx?no=')+1);
console.log(zfbCode+'支付宝编号');
uni.navigateTo({
url:'/pages/assess/assess'
})
}
})
// wv.overrideUrlLoading({mode:"reject",match:'.*www\.thjj\.org/list.html#key.*'}, (e)=>{
// let wxCode = e.url.substr(e.url.indexOf('=')+1);
// console.log(wxCode+'')
// uni.navigateTo({
// url:'/pages/eliminate/eliminate'
// })
// });
// wv.addEventListener('titleUpdate',({title}) => {
// console.log(title+'url')
// if(title.indexOf('show.aspx?no=')!==-1){
// let zfbCode = title.substr(title.indexOf('show.aspx?no=')+1);
// console.log(zfbCode+'');
// uni.navigateTo({
// url:'/pages/eliminate/eliminate'
// })
// }
// })
}, 1000);
},
methods: {

View File

@ -84,7 +84,7 @@
<!-- 导航 -->
<tabbar :current='0'></tabbar>
<!-- 操作说明 -->
<view class="explain">操作说明点击图标计算您的碳足迹</view>
<view class="explain">友情提醒计算前请先按AC键消除上一用户数据</view>
</view>
</view>
<!-- 轮播 -->
@ -130,7 +130,7 @@
'食': [{
'title': '吸烟数量',
'company': '包',
'carbon': 0.00591,
'carbon': 0.1182,
'num': '',
'tag': 'b1'
},
@ -315,7 +315,7 @@
]
},
numlist: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '00', '.'],
operateList: ['CE', '计算'],
operateList: ['DEL','AC', '计算'],
cateTagList: [], //
subTotal: [0, 0, 0, 0, 0], //
total: 0, //
@ -325,14 +325,17 @@
}
},
onLoad() {
if (uni.getStorageSync('subTotal')) {
uni.removeStorageSync('subTotal');
if(uni.getStorageSync('cateTagList')){
this.cateTagList = uni.getStorageSync('cateTagList');
}
if (uni.getStorageSync('allTotal')) {
uni.removeStorageSync('allTotal');
if(uni.getStorageSync('cacheTotal')){
this.total = uni.getStorageSync('cacheTotal');
}
if (uni.getStorageSync('average')) {
uni.removeStorageSync('average');
if(uni.getStorageSync('cacheSubTotal')){
this.subTotal = uni.getStorageSync('cacheSubTotal');
}
if(uni.getStorageSync('cateList')){
this.cateList = uni.getStorageSync('cateList');
}
},
methods: {
@ -341,6 +344,8 @@
this.cateTagList.push(this.cateList[index][index1].tag);
this.focusIndex = index;
this.focusIndex1 = index1;
//
uni.setStorageSync('cateTagList',this.cateTagList)
},
//
@ -368,14 +373,34 @@
if (this.cateTagList.length > 0) {
if (index == 0) {
this.cateList[this.focusIndex][this.focusIndex1].num = '';
//
this.calculationEv();
}else if(index == 1){
//
this.clearEv();
} else {
//
this.calculationEv();
}
}
},
//
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() {
@ -424,6 +449,8 @@
subTotalNum5 += item.num * item.carbon * 1;
})
this.subTotal[4] = parseFloat(subTotalNum5);
uni.setStorageSync('cacheSubTotal', this.subTotal);
//
let totalArr = this.subTotal.filter(item => {
@ -434,6 +461,7 @@
totalNum += item * 1;
})
this.total = parseFloat(totalNum);
uni.setStorageSync('cacheTotal', this.total);
//
let cacheTotal = [];
@ -446,6 +474,9 @@
//
uni.setStorageSync('allTotal', this.total.toFixed(2));
//
uni.setStorageSync('cateList', this.cateList);
},
}
}

View File

@ -28,6 +28,9 @@
<view class="payment-btn" @tap="toEliminate">
<image src="/static/icon-tabbar-04.png" mode="heightFix"></image>
</view>
<view class="payment-btn payment-btn-other" @tap="ifShow=true">
<image src="/static/icon-tabbar-05.png" mode="heightFix"></image>
</view>
</view>
</view>
<!-- 导航 -->
@ -42,6 +45,43 @@
<view class="footer">
<text>中国绿色碳汇基金会低碳旅游专项基金监制北京凯来美气候技术咨询有限公司开发</text>
</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>
</template>
@ -63,15 +103,41 @@
average: 0, //
treeNum: 0, //
money: 0, //
ifShow:false, //
code:'', //
experients:0, //
difference:0, //
}
},
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')) {
this.total = uni.getStorageSync('allTotal');
this.average = uni.getStorageSync('average');
this.treeNum = this.average/220.00*1;
this.money = this.treeNum*30*1
this.treeNum = this.average/440.00*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: {
//

View File

@ -1,6 +1,6 @@
<template>
<view>
<view class="tips" v-if="allowMac!==macStr"></view>
<view class="tips" v-if="!allowMac.includes(macStr)">{{macStr}}</view>
</view>
</template>
@ -9,8 +9,7 @@
data() {
return {
macStr:'', //mac
allowMac:'B0:CC:FE:9E:D3:4A', //mac
randomMac:'F2:6E:B1:A7:3B:B1', //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
}
},
onLoad() {
@ -40,8 +39,7 @@
// MAC
this.macStr = finalMac;
// #endif
if(this.macStr == this.allowMac || this.macStr == this.randomMac){
if(this.allowMac.includes(this.macStr)){
uni.reLaunch({
url:'/pages/count/count'
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

BIN
static/certificate-bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 KiB

BIN
static/code-title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
static/footprint.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
static/icon-btn-03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/icon-tabbar-05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/logo-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/logo-02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
static/logo-03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
static/qr-alx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB