gcz 4 lat temu
rodzic
commit
0c5eada650

+ 4 - 4
pages/confirmOrder/confirmOrder.css

@@ -2,15 +2,15 @@ page{background: #F5F5F8;padding-bottom: 160rpx;}
 .order-list{background: #fff;margin-bottom: 30rpx;}
 .order-list-item{padding: 20rpx 50rpx;border-bottom: 1px solid #eee;display: flex;}
 .order-list .order-list-item:last-of-type{border-bottom: 0;}
-.order-list-item .image-content{width: 202rpx;height: 202rpx;padding-right: 60rpx;}
+.order-list-item .image-content{width: 202rpx;height: 202rpx;padding-right: 24rpx;}
 .order-list-item image{width:100%;height: 100%;background:#DDDDDD;}
 .order-list-item .text-content{flex: 1;position: relative;}
 .order-list-item .title{width:350rpx;font-size:30rpx;margin-bottom:20rpx;overflow: hidden;text-overflow: ellipsis;display: -webkit-box; -webkit-line-clamp:3;-webkit-box-orient: vertical;font-weight:bold;}
 .order-list-item .totalcarbon,
 .order-list-item .oId{font-size: 28rpx;color: #999;font-weight: 300;}
-/* .order-list-item .text-content .price{position:absolute;top:0;right:-20rpx;font-weight: 500;font-size:30rpx;color:#999;} */
-/* .order-list-item .total{position:absolute;left: 0;bottom: 0;width: 100%;font-size:40rpx;} */
-.order-list-item .total uni-text{font-size:24rpx;}
+.order-list-item .text-content .price{display: flex;justify-content: space-between;align-items: center;margin-bottom: 24rpx;}
+.order-list-item .price .price-total{color: #26D18B;font-weight: 600;}
+.order-list-item .price .price-unit{font-size: 28rpx;color: #999;}
 .order-list-item .nums{position:absolute;right:-20rpx;bottom:0;}
 .order-list-item .nums .countNum{display:flex;width:152rpx;height:50rpx;border:1px solid #E5E5E5;margin-left:134rpx;}
 .order-list-item .nums .countNum .countNum-action{width:230rpx;height:100%;line-height:44rpx;color:#26D18B;text-align:center;}

+ 5 - 2
pages/confirmOrder/confirmOrder.vue

@@ -9,9 +9,12 @@
 				<view class="text-content">
 					<view class="title">{{item.goodsName}} </view>
 					<!-- <view class="oId">产品编号: {{ item.oId }}</view> -->
-					<view class="price">{{item.price}}元 / KG</view>
+					<view class="price">
+						<view class="price-total"><text>¥</text>{{item.totalPrice | keepTwoNum}}</view>
+						<view class="price-unit">{{item.price}}元 / KG</view>						
+					</view>
 					<view class="totalcarbon">累计碳汇量{{item.carbonVal}}kg</view>
-					<view class="total"><text>¥</text>{{item.totalPrice | keepTwoNum}}</view>
+					<!-- <view class="total"><text>¥</text>{{item.totalPrice | keepTwoNum}}</view> -->
 					<view class="nums">
 						 <view class="countNum">
 							 <view class="countNum-action reduce" @click="calcValue('reduce',item)">-</view>

+ 23 - 9
pages/index/guide.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="pages">
-		<view class="hold-status-bar">
+		<view class="hold-status-bar show">
 			<!-- 占据了状态栏位置 -->
 		</view>
-		<view class="guide-img">
+		<view class="guide-img" :class="{isheight:isheight}">
 			<swiper class="swiper" 
 			:indicator-dots="swiper.indicatorDots" 
 			:indicator-color="swiper.indicatorColor"  
@@ -11,17 +11,17 @@
 			:autoplay="swiper.autoplay" 			
 			:interval="swiper.interval" :duration="swiper.duration">
 				<swiper-item>
-					<view class="adv-item"><image :src="$getimg +'guide01.png'" class="pic" mode="scaleToFill"></image></view>
+					<view class="adv-item"><image :src="$getimg +'guide01-s1.png'" class="pic" mode="widthFix"></image></view>
 				</swiper-item>
 				<swiper-item>
-					<view class="adv-item"><image :src="$getimg +'guide02.png'" class="pic" mode="scaleToFill"></image></view>
+					<view class="adv-item" style="background-color: #26C896;"><image :src="$getimg +'guide02.png'" class="pic" mode="widthFix"></image></view>
 				</swiper-item>
 				<swiper-item>
-					<view class="adv-item"><image :src="$getimg +'guide03.png'" class="pic" mode="scaleToFill"></image></view>
+					<view class="adv-item" style="background-color: #26C896;"><image :src="$getimg +'guide03.png'" class="pic" mode="widthFix"></image></view>
 				</swiper-item>
 				<swiper-item>
-					<view class="adv-item" @click="goIndex">
-						<image :src="$getimg +'guide04.png'" class="pic" mode="scaleToFill"></image>
+					<view class="adv-item" style="background-color: #26C896;" @click="goIndex">
+						<image :src="$getimg +'guide04.png'" class="pic" mode="widthFix"></image>
 						<view class="tip-btn-wrap">
 							<text class="tip-btn">立即体验</text>
 						</view>
@@ -43,6 +43,7 @@
 			return {
 				preloaderTime:5,
 				$getimg:this.$getimg,
+				isheight:false,
 				swiper: {
 					indicatorDots: true,
 					autoplay: false,
@@ -58,7 +59,19 @@
 		},
 		onLoad() {
 			// console.log(this.config.version);
-			 
+			let self = this;
+			uni.getSystemInfo({
+			    success: function (res) {
+					console.log('getSystemInfo',res);
+					let windowscale = res.windowHeight/res.screenWidth;//屏幕高宽比 
+					console.log('res.windowHeight',res.windowHeight);
+					console.log('res.screenWidth',res.screenWidth);
+					console.log('windowscale',windowscale);
+					if(res.windowHeight>800){
+						self.isheight = true;						
+					}
+			    }
+			}); 
 		},
 		onReady() {
 			// 从本地缓存中同步获取指定 key 对应的内容,用于判断是否是第一次打开应用
@@ -117,7 +130,8 @@
 </script>
 
 <style scoped>
-.guide-img{position: fixed;left: 0;right: 0;top: 0;bottom: 0;display: block;}
+.guide-img{position: fixed;left: 0;right: 0;top:40rpx;bottom: 0;display: block;}
+.guide-img.isheight{top: 115rpx;}
 .swiper{height: 100%;}
 .adv-item{height: 100%;position: relative;}
 .guide-img .pic{width: 100%;height: 100%;/* max-height: 100%; */}

+ 1 - 1
pages/index/modal/quickBuy.css

@@ -20,7 +20,7 @@
 .amount .num{font-size: 70rpx;}
 .amount-btn{margin-right: 0;height: 98rpx;line-height: 98rpx;width: 240rpx;background-color: #26D18B;border-radius: 6rpx;text-align: center;color: #fff;}
 
-.tip{padding: 0 40rpx 50rpx;font-size: 28rpx;color: #999;}
+.tip{padding: 0 40rpx 68rpx;font-size: 28rpx;color: #999;}
 
 
 

+ 233 - 0
pages/usercenter/certificateList/certificate/certificate - 副本.vue

@@ -0,0 +1,233 @@
+<template>
+	<view class="pages">
+		<web-view :src="certificateUrl
+		+'credentialNo='+item.credentialNo
+		+'&customerName='+item.customerName
+		+'&year='+item.year
+		+'&carbonAmount='+item.carbonAmount
+		+'&orderAmount='+item.orderAmount
+		+'&buyDate='+item.buyDate
+		"></web-view>
+<!-- 		<view class="save-tip">
+			长按保存
+		</view> -->
+		<!-- 画板 -->		
+		<!-- <l-painter ref="painter" :board="base"/>
+		<view class="bottom-btn-wrap">
+			<view class="bottom-btn-wrap-bg">
+				<view class="bottom-btn btn" @click="download">
+					下载图片
+				</view>
+			</view>
+		</view> -->
+		<!-- <button class="generate-btn" id="mycanvas" @click="download()"></button> -->
+		<!-- <view class="container" id="wrapper">
+			<view class="image-wrapper draw">
+			  <image :src="$getimg+'cqtanhui-cert.jpg'" class="draw page-bg" mode="scaleToFill"></image>
+			</view>
+			<view class="draw cart-no">证书编号:{{item.credentialNo}}</view>
+			<view class="cart-text cart-name">
+				尊敬的 {{item.customerName}}:
+			</view>
+			<view class="cart-text">
+				感谢您对“碳汇+”生态产品价值实现的支持,您购买了{{item.year}}年度碳汇量{{item.carbonAmount}}kg,您购碳资金{{item.orderAmount}}元,已全额转入{{item.farmerName}}的银行账户。
+			</view>
+			<view class="cart-text">
+				该笔碳汇可用于抵消您的碳排放
+			</view>
+			<view class="cart-text">
+				感谢您为生态文明建设和全球应对气候变化所做出的贡献
+			</view>
+		</view> -->
+	</view>
+</template>
+
+<script>
+	import lPainter from '@/components/lime-painter/index.vue';	
+	export default {
+		components:{
+			lPainter
+		},
+		data() {
+			return {
+				$getimg:this.$getimg,
+				certificateUrl:this.config.certificateUrl,
+				thetoken:'',
+				orderid:'',
+				item:[],
+				path:'',
+				params:{
+				},
+				base: {
+					width: '750rpx',
+					height: '1130rpx',
+					views: [
+						{
+							type: 'image',
+							src: 'http://fqn.hongweisoft.com/cqcarbon/wxapp/cqtanhui-cert.jpg',
+							css: {
+								left: '0rpx',
+								top: '0rpx',
+								width: '100%',
+								height: '1130rpx'
+							}
+						},
+						{
+							type: 'text',
+							text: '',
+							css: {
+								left: '100rpx',
+								top: '350rpx',
+								width: '550rpx',
+								color:'#26D18B',
+								textAlign: 'center',
+								display:'block',
+							}
+						},
+						{
+							type: 'text',
+							text: '',
+							css: {
+								left: '100rpx',
+								top: '398rpx',
+								width: '550rpx',
+								fontSize: '28rpx',
+								lineHeight: '36rpx',
+								color:'#333',
+								textAlign: 'left',
+							}
+						},
+						{
+							type: 'text',
+							text: '',
+							css: {
+								width: '550rpx',
+								left: '100rpx',
+								top: '446rpx',
+								fontSize: '28rpx',
+								lineHeight: '36rpx',
+								color:'#333',
+								textAlign: 'left',
+								textIndent: '2em'
+							}
+						},
+						{
+							type: 'text',
+							text: '该笔碳汇可用于抵消您的碳排放',
+							css: {
+								width: '550rpx',
+								left: '100rpx',
+								top: '566rpx',
+								fontSize: '28rpx',
+								lineHeight: '36rpx',
+								color:'#333',
+								textAlign: 'left',
+								textIndent: '2em'
+							}
+						},
+						{
+							type: 'text',
+							text: '感谢您为生态文明建设和全球应对气候变化所做出的贡献',
+							css: {
+								width: '550rpx',
+								left: '100rpx',
+								top: '614rpx',
+								fontSize: '28rpx',
+								lineHeight: '36rpx',
+								color:'#333',
+								textAlign: 'left',
+								textIndent: '2em'
+							}
+						},
+					]
+				}
+				
+			}
+		},
+		onShow() {
+		
+		},
+		onLoad(e) {
+			console.log('config',this.config);
+			this.thetoken = 'Bearer' + ' ' + this.$store.state.token;
+			this.orderid = e.orderid;
+			uni.showLoading({
+				title: '正在获取证书信息'
+			});
+			this.$api.http.get(this.config.apiBaseurl + '/carbon-h5/wap/order/getCredentialByOrderId?orderId='+this.orderid,{
+				header: {
+				Accept:'application/json',
+				Authorization: this.thetoken, 
+			},
+			}).then(res => {
+				uni.hideLoading();
+				// this.info = Object.assign(this.info, data);
+				// this.info.url = '/static/html2canvas/index.html?key=' + this.orderid;
+				this.item = res.data.retBody;
+				console.log('this.base.views',this.base.views);
+				this.base.views[1].text = `证书编号:${res.data.retBody.credentialNo}`;
+				this.base.views[2].text = `尊敬的 ${res.data.retBody.customerName}:`;
+				this.base.views[3].text = `感谢您对“碳汇+”生态产品价值实现的支持,您购买了 ${res.data.retBody.year}年度碳汇量${res.data.retBody.carbonAmount}kg,您购碳资金${res.data.retBody.orderAmount}元,已全额转入${res.data.retBody.farmerName}的银行账户。`;
+				console.log('res',JSON.parse(JSON.stringify(res.data.retBody)));
+			}).catch(err =>{
+				console.log('err',err)
+			});
+
+		},
+		methods: {
+			onRender() {
+				// 支持通过调用render传入参数
+				const painter = this.$refs.painter
+				painter.render(this.base)
+			},
+			// canvasToTempFilePath() {
+			// 	const painter = this.$refs.painter
+			// 	// 支持通过调用canvasToTempFilePath方法传入参数 调取生成图片
+			// 	painter.canvasToTempFilePath().then(res => this.path = res.tempFilePath)
+			// },
+			// // 支持通过调用canvasToTempFilePath方法传入参数 调取生成图片
+			// onCanvasToTempFilePath() {
+			// 	const painter = this.$refs.custom
+			// 	painter.canvasToTempFilePath({dpr:2}).then(res => this.path = res.tempFilePath)
+				
+			// },
+			download(){
+				let self = this;
+				const painter = this.$refs.painter;
+				painter.canvasToTempFilePath().then(res => this.path = res.tempFilePath);
+				console.log('this.path',this.path);
+				uni.showLoading({
+					title: '生成中'
+				});
+				setTimeout(this.saveImg,500);
+			},
+			saveImg(){
+				let self = this;
+				uni.saveImageToPhotosAlbum({
+					filePath:this.path,
+					success:function(res){
+						uni.hideLoading();
+						self.$api.msg('生成成功');
+					},
+					fail:function(err){						
+						uni.hideLoading();
+						if(err.errMsg =="saveImageToPhotosAlbum:fail cancel"){
+							return true;
+						}
+						self.$api.msg('生成失败请重试!');
+						// self.$api.msg(err.errMsg);
+						// if(err.errMsg == 'saveImageToPhotosAlbum:fail The "path" argument must be of type string. Received type object'){
+						// 	self.$api.msg('生成失败请重试!')
+						// }
+						console.log('err',err)
+					}
+				});				
+			}
+
+		}
+	}
+</script>
+
+<style>
+	@import url("./certificate.css");
+</style>

+ 1 - 1
pages/usercenter/certificateList/certificate/certificate.css

@@ -3,7 +3,7 @@
 .cart-no{margin-top: 333rpx;text-align: center;font-size: 24rpx;color: #26D18B;}
 .cart-text{margin: 10rpx 100rpx;line-height: 40rpx;font-size: 28rpx;color: #666;text-indent: 2em;}
 
-.save-tip{text-align: center;margin-top: 24rpx;color: #666;font-size: 30rpx;}
+/* .save-tip{text-align: center;margin-top: 24rpx;color: #666;font-size: 30rpx;position: fixed;bottom: 24rpx;left: 0;right: 0;} */
 
 
 

+ 7 - 168
pages/usercenter/certificateList/certificate/certificate.vue

@@ -7,46 +7,18 @@
 		+'&carbonAmount='+item.carbonAmount
 		+'&orderAmount='+item.orderAmount
 		+'&buyDate='+item.buyDate
-		"></web-view>
-<!-- 		<view class="save-tip">
-			长按保存
-		</view> -->
-		<!-- 画板 -->		
-		<!-- <l-painter ref="painter" :board="base"/>
-		<view class="bottom-btn-wrap">
-			<view class="bottom-btn-wrap-bg">
-				<view class="bottom-btn btn" @click="download">
-					下载图片
-				</view>
-			</view>
-		</view> -->
-		<!-- <button class="generate-btn" id="mycanvas" @click="download()"></button> -->
-		<!-- <view class="container" id="wrapper">
-			<view class="image-wrapper draw">
-			  <image :src="$getimg+'cqtanhui-cert.jpg'" class="draw page-bg" mode="scaleToFill"></image>
-			</view>
-			<view class="draw cart-no">证书编号:{{item.credentialNo}}</view>
-			<view class="cart-text cart-name">
-				尊敬的 {{item.customerName}}:
-			</view>
-			<view class="cart-text">
-				感谢您对“碳汇+”生态产品价值实现的支持,您购买了{{item.year}}年度碳汇量{{item.carbonAmount}}kg,您购碳资金{{item.orderAmount}}元,已全额转入{{item.farmerName}}的银行账户。
-			</view>
-			<view class="cart-text">
-				该笔碳汇可用于抵消您的碳排放
-			</view>
-			<view class="cart-text">
-				感谢您为生态文明建设和全球应对气候变化所做出的贡献
-			</view>
-		</view> -->
+		+'&nickName='+item.nickName
+		+'&companyName='+item.companyName
+		+'&isH5='+true
+		">
+		</web-view>
 	</view>
 </template>
 
 <script>
-	import lPainter from '@/components/lime-painter/index.vue';	
 	export default {
 		components:{
-			lPainter
+			
 		},
 		data() {
 			return {
@@ -56,92 +28,7 @@
 				orderid:'',
 				item:[],
 				path:'',
-				params:{
-				},
-				base: {
-					width: '750rpx',
-					height: '1130rpx',
-					views: [
-						{
-							type: 'image',
-							src: 'http://fqn.hongweisoft.com/cqcarbon/wxapp/cqtanhui-cert.jpg',
-							css: {
-								left: '0rpx',
-								top: '0rpx',
-								width: '100%',
-								height: '1130rpx'
-							}
-						},
-						{
-							type: 'text',
-							text: '',
-							css: {
-								left: '100rpx',
-								top: '350rpx',
-								width: '550rpx',
-								color:'#26D18B',
-								textAlign: 'center',
-								display:'block',
-							}
-						},
-						{
-							type: 'text',
-							text: '',
-							css: {
-								left: '100rpx',
-								top: '398rpx',
-								width: '550rpx',
-								fontSize: '28rpx',
-								lineHeight: '36rpx',
-								color:'#333',
-								textAlign: 'left',
-							}
-						},
-						{
-							type: 'text',
-							text: '',
-							css: {
-								width: '550rpx',
-								left: '100rpx',
-								top: '446rpx',
-								fontSize: '28rpx',
-								lineHeight: '36rpx',
-								color:'#333',
-								textAlign: 'left',
-								textIndent: '2em'
-							}
-						},
-						{
-							type: 'text',
-							text: '该笔碳汇可用于抵消您的碳排放',
-							css: {
-								width: '550rpx',
-								left: '100rpx',
-								top: '566rpx',
-								fontSize: '28rpx',
-								lineHeight: '36rpx',
-								color:'#333',
-								textAlign: 'left',
-								textIndent: '2em'
-							}
-						},
-						{
-							type: 'text',
-							text: '感谢您为生态文明建设和全球应对气候变化所做出的贡献',
-							css: {
-								width: '550rpx',
-								left: '100rpx',
-								top: '614rpx',
-								fontSize: '28rpx',
-								lineHeight: '36rpx',
-								color:'#333',
-								textAlign: 'left',
-								textIndent: '2em'
-							}
-						},
-					]
-				}
-				
+				params:{},
 			}
 		},
 		onShow() {
@@ -175,54 +62,6 @@
 
 		},
 		methods: {
-			onRender() {
-				// 支持通过调用render传入参数
-				const painter = this.$refs.painter
-				painter.render(this.base)
-			},
-			// canvasToTempFilePath() {
-			// 	const painter = this.$refs.painter
-			// 	// 支持通过调用canvasToTempFilePath方法传入参数 调取生成图片
-			// 	painter.canvasToTempFilePath().then(res => this.path = res.tempFilePath)
-			// },
-			// // 支持通过调用canvasToTempFilePath方法传入参数 调取生成图片
-			// onCanvasToTempFilePath() {
-			// 	const painter = this.$refs.custom
-			// 	painter.canvasToTempFilePath({dpr:2}).then(res => this.path = res.tempFilePath)
-				
-			// },
-			download(){
-				let self = this;
-				const painter = this.$refs.painter;
-				painter.canvasToTempFilePath().then(res => this.path = res.tempFilePath);
-				console.log('this.path',this.path);
-				uni.showLoading({
-					title: '生成中'
-				});
-				setTimeout(this.saveImg,500);
-			},
-			saveImg(){
-				let self = this;
-				uni.saveImageToPhotosAlbum({
-					filePath:this.path,
-					success:function(res){
-						uni.hideLoading();
-						self.$api.msg('生成成功');
-					},
-					fail:function(err){						
-						uni.hideLoading();
-						if(err.errMsg =="saveImageToPhotosAlbum:fail cancel"){
-							return true;
-						}
-						self.$api.msg('生成失败请重试!');
-						// self.$api.msg(err.errMsg);
-						// if(err.errMsg == 'saveImageToPhotosAlbum:fail The "path" argument must be of type string. Received type object'){
-						// 	self.$api.msg('生成失败请重试!')
-						// }
-						console.log('err',err)
-					}
-				});				
-			}
 
 		}
 	}

+ 4 - 7
pages/usercenter/question/question.vue

@@ -5,9 +5,9 @@
 				<view class="questions-item" v-for="(item,index) in questionlist" :key="index">
 					<view class="questions-item-til">
 						<image :src="$getimg + 'icon-questions.png'" class="questions-item-img" mode="scaleToFill"></image>
-						<view class="questions-item-text">{{item.title}}</view>
+						<view class="questions-item-text">{{item.problemName}}</view>
 					</view>
-					<view class="questions-item-con">{{item.content}}</view>
+					<view class="questions-item-con">{{item.problemAnswer}}</view>
 				</view>
 			</view>
 		</mescroll-body>
@@ -44,10 +44,7 @@
 						tip: '暂无相关数据'
 					}
 				},
-				questionlist:[
-					{title:'1.如何获得碳积分',content:'如何获得碳积分'},
-					{title:'2.如何获得碳积分',content:'如何获得碳积分'},
-				],
+				questionlist:[],
 				
 			}
 		},
@@ -89,7 +86,7 @@
 				this.params = Object.assign(this.params,{pageNum:pageNum,pageSize:pageSize});				
 				let thetoken = 'Bearer ' + this.token;
 				// console.log('thetoken',thetoken);
-				this.$api.http.post(this.config.apiBaseurl + '/carbon-h5/wap/order/searchByPage',this.params,{
+				this.$api.http.post(this.config.apiBaseurl + '/carbon-h5/carbon/problem/list',this.params,{
 					header: {
 					Accept:'application/json',
 					Authorization: 'Bearer '+ this.token, //注意Bearer后面有一空格