Browse Source

auto commit

gcz 4 years ago
parent
commit
e30e7a3246
73 changed files with 6828 additions and 2786 deletions
  1. 1 1
      components/custom-nodata/custom-nodata.vue
  2. 0 1
      config/config.js
  3. 0 1
      js_sdk/jweixin-1.4.0.js
  4. 6 0
      pages.json
  5. 54 45
      pages/confirmOrder/confirmOrder.vue
  6. 18 3
      pages/index/index.vue
  7. 39 6
      pages/index/modal/quickBuy.vue
  8. 1 1
      pages/login/loginType.vue
  9. 20 9
      pages/offlineBuy/offlineBuy.vue
  10. 2 2
      pages/product/product.css
  11. 37 10
      pages/product/product.vue
  12. 1 1
      pages/use/use.vue
  13. 118 0
      pages/usercenter/certificateList/certificate/certificate.vue
  14. 19 17
      pages/usercenter/certificateList/certificateList.vue
  15. 6 8
      pages/usercenter/orderList/orderList.vue
  16. 18 22
      pages/usercenter/orderList/orderdetails/orderdetails.vue
  17. 6 5
      pages/usercenter/subscribe/subscribe.css
  18. 10 6
      pages/usercenter/subscribe/subscribe.vue
  19. 11 1
      pages/usercenter/usercenter.vue
  20. 0 55
      pay.js
  21. BIN
      static/html2canvas/bg.png
  22. BIN
      static/html2canvas/bg.webp
  23. BIN
      static/html2canvas/code.png
  24. 368 0
      static/html2canvas/credTpl.html
  25. 3519 0
      static/html2canvas/html2canvas.js
  26. 128 0
      static/html2canvas/index.html
  27. BIN
      static/html2canvas/logo.png
  28. 1 1
      store/index.js
  29. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  30. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  31. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/mescroll-uni/components/mescroll-empty.js.map
  32. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/mescroll-uni/components/mescroll-top.js.map
  33. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/mescroll-uni/mescroll-body.js.map
  34. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-popup/uni-popup-dialog.js.map
  35. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-popup/uni-popup.js.map
  36. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-transition/uni-transition.js.map
  37. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/guide.js.map
  38. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  39. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/companyLogin.js.map
  40. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/loginType.js.map
  41. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/use/use.js.map
  42. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/certificateList/certificateList.js.map
  43. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/orderList/orderList.js.map
  44. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/orderList/orderdetails/orderdetails.js.map
  45. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/subscribe/subscribe.js.map
  46. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/usercenter.js.map
  47. 1 0
      unpackage/dist/dev/mp-weixin/app.json
  48. 2059 2060
      unpackage/dist/dev/mp-weixin/common/vendor.js
  49. 15 15
      unpackage/dist/dev/mp-weixin/components/mescroll-uni/components/mescroll-empty.js
  50. 14 14
      unpackage/dist/dev/mp-weixin/components/mescroll-uni/components/mescroll-top.js
  51. 22 22
      unpackage/dist/dev/mp-weixin/components/mescroll-uni/mescroll-body.js
  52. 14 14
      unpackage/dist/dev/mp-weixin/components/uni-popup/uni-popup-dialog.js
  53. 16 16
      unpackage/dist/dev/mp-weixin/components/uni-popup/uni-popup.js
  54. 14 14
      unpackage/dist/dev/mp-weixin/components/uni-transition/uni-transition.js
  55. 16 16
      unpackage/dist/dev/mp-weixin/pages/index/guide.js
  56. 35 20
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  57. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/index.wxml
  58. 16 16
      unpackage/dist/dev/mp-weixin/pages/login/companyLogin.js
  59. 17 17
      unpackage/dist/dev/mp-weixin/pages/login/loginType.js
  60. 21 16
      unpackage/dist/dev/mp-weixin/pages/use/use.js
  61. 1 1
      unpackage/dist/dev/mp-weixin/pages/use/use.wxml
  62. 36 33
      unpackage/dist/dev/mp-weixin/pages/usercenter/certificateList/certificateList.js
  63. 1 1
      unpackage/dist/dev/mp-weixin/pages/usercenter/certificateList/certificateList.wxml
  64. 21 23
      unpackage/dist/dev/mp-weixin/pages/usercenter/orderList/orderList.js
  65. 1 1
      unpackage/dist/dev/mp-weixin/pages/usercenter/orderList/orderList.wxml
  66. 42 46
      unpackage/dist/dev/mp-weixin/pages/usercenter/orderList/orderdetails/orderdetails.js
  67. 1 1
      unpackage/dist/dev/mp-weixin/pages/usercenter/orderList/orderdetails/orderdetails.wxml
  68. 25 21
      unpackage/dist/dev/mp-weixin/pages/usercenter/subscribe/subscribe.js
  69. 1 1
      unpackage/dist/dev/mp-weixin/pages/usercenter/subscribe/subscribe.wxml
  70. 6 1
      unpackage/dist/dev/mp-weixin/pages/usercenter/subscribe/subscribe.wxss
  71. 30 23
      unpackage/dist/dev/mp-weixin/pages/usercenter/usercenter.js
  72. 1 1
      unpackage/dist/dev/mp-weixin/pages/usercenter/usercenter.wxml
  73. 0 179
      wxapi.js

+ 1 - 1
components/custom-nodata/custom-nodata.vue

@@ -2,7 +2,7 @@
 	<view class="nodata">
 		<!-- <image src="../../static/images/order.png" class="orderIcon"></image> -->
 		<text class="notice">{{notice}}</text>
-		<text class="cp">贵州省单株碳汇精准扶贫平台</text>
+		<!-- <text class="cp">贵州省单株碳汇精准扶贫平台</text> -->
 	</view>
 </template>
 

+ 0 - 1
config/config.js

@@ -8,7 +8,6 @@ const config = {
 	
 	loginUrl:'http://wx.hw.hongweisoft.com/zddtest/forest-portal/wechat/h5/authorize?returnUrl=http://foresth5test.hw.hongweisoft.com/#/',//登录后跳转到测试链接 东东
 	
-	testToken:'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2NDY3NjM3NiIsImNyZWF0ZWQiOjE2MDYxMDY3NzE2MjcsImV4cCI6MTYwNjcxMTU3MX0.JP82ED8bjS8yFxjbVzsfOISrDDYyqOAouL9Z2NRjRBNcsKVmGz9ho8zouG-iWNStxuwqcvrebh_6WF3g9Ed9Vg',
 
 	//版本号:版本号升级将显示引导页
 	version:'1',

File diff suppressed because it is too large
+ 0 - 1
js_sdk/jweixin-1.4.0.js


+ 6 - 0
pages.json

@@ -65,6 +65,12 @@
 				"navigationBarTitleText": "我的证书"
 			}
 		},
+		{
+			"path": "pages/usercenter/certificateList/certificate/certificate",
+			"style": {
+				"navigationBarTitleText": "证书"
+			}
+		},
 		{
 			"path": "pages/usercenter/orderList/orderList",
 			"style": {

+ 54 - 45
pages/confirmOrder/confirmOrder.vue

@@ -10,13 +10,13 @@
 					<view class="title">{{item.goodsName}} </view>
 					<!-- <view class="oId">产品编号: {{ item.oId }}</view> -->
 					<view class="price">{{item.price}}元 / KG</view>
-					<view class="totalcarbon">累计碳汇量{{item.totalcarbon}}kg</view>
+					<view class="totalcarbon">累计碳汇量{{item.carbonVal}}kg</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>
 							 <view class="countNum-input">
-								 <input class="uni-input" v-model="item.total" type="number" @blur="onInput(item)"/>
+								 <input class="uni-input" v-model="item.carbonVal" type="number" @blur="onInput(item)"/>
 							 </view>
 							 <view class="countNum-action add" @click="calcValue('add',item)">+</view>
 						 </view>
@@ -55,7 +55,7 @@
 		onLoad(options) {
 			let self = this;
 			let arr = this.$store.state.cartListTmp
-			console.log('options',JSON.parse(JSON.stringify(options)));
+			// console.log('options',JSON.parse(JSON.stringify(options)));
 			console.log('this.$store.state.cartListTmp',JSON.parse(JSON.stringify(this.$store.state.cartListTmp)));
 			for(let i = 0; i < arr.length; i++){
 				this.cartList.push({
@@ -63,10 +63,10 @@
 					goodsImages:arr[i].goodsImages,
 					goodsId:arr[i].guid,
 					price:arr[i].price,
-					carbonVal:arr[i].carbonVal,
-					total:arr[i].carbonSkin,
+					carbonVal:arr[i].carbonSkin,
+					// total:arr[i].carbonSkin,
 					totalPrice:arr[i].carbonSkin * arr[i].price,
-					totalcarbon:arr[i].carbonSkin
+					// totalcarbon:arr[i].carbonSkin
 				})
 			};
 			uni.getStorage({
@@ -92,30 +92,31 @@
 		methods:{
 			...mapMutations(['clearCart']),
 			onInput(item){
-				console.log(item.total)
-				if(!(/(^[1-9]\d*$)/.test(item.total))){
-					item.total = 1
-					if(item.total < this.min){
-						item.total = 1
+				console.log(item.carbonVal)
+				if(!(/(^[1-9]\d*$)/.test(item.carbonVal))){
+					item.carbonVal = 1
+					if(item.carbonVal < this.min){
+						item.carbonVal = 1
 					}
 				}
-				item.totalPrice = item.price * item.total
+				item.totalPrice = item.price * item.carbonVal
 			},
 			//数量计算
 			calcValue(type,item){
 				if (type === "reduce") {
 					item.total-- 
-					if (item.total < this.min) {
-						item.total = 1
+					if (item.carbonVal < this.min) {
+						item.carbonVal = 1
 					}
-					item.totalPrice = item.price * item.total;
-					item.totalcarbon = item.total*10;
+					item.totalPrice = item.price * item.carbonVal;
+					// item.totalcarbon = item.carbonVal*10;
 				} else if (type === "add") {
 					// console.log('this.$store.state.cartListTmp',JSON.parse(JSON.stringify(this.$store.state.cartListTmp)));
 					// console.log('this.$store.state.cartListTmp.canSold',this.$store.state.cartListTmp[0].canSold);
-					item.total++
-					item.totalPrice = item.price * item.total
-					item.totalcarbon = item.total*10;
+					item.carbonVal++
+					item.totalPrice = item.price * item.carbonVal
+					console.log('this.cartList',this.cartList);
+					// item.totalcarbon = item.carbonVal*10;
 				}
 			},
 			//提交校验
@@ -130,7 +131,7 @@
 						return;
 					}else{ 
 						let userInfo = uni.getStorageSync("userInfo");
-						console.log( uni.getStorageSync("linkType") );
+						// console.log( uni.getStorageSync("linkType") );
 						let params = {
 							// customerId:userInfo.guid,
 							goods:this.cartList,
@@ -169,33 +170,41 @@
 				
 			},
 			//拉起微信支付
-			async pullWeichatPay(id){
-				console.log('订单ID',id);
-				
-				
+			pullWeichatPay(item){
+				let self = this;
+				console.log('pay item',item);
 				let userInfo = uni.getStorageSync("userInfo");
-				return;
+				console.log('userInfo',userInfo);
+				// return
 				let params = {
-					orderId:id,
-					openid:userInfo.wxId
-				}
-				this.$pay.wxPay(params).then(res =>{
-					if(res.code == 0){
-						uni.reLaunch({
-							url: '/pages/buySuccess/buySuccess?orderId=' + params.orderId
-						})
-					}else if(res.code == 1){
-						uni.navigateTo({
-							url: '/pages/userCenter/myOrder/myOrder'
-						})
-					}else if(res.code == 2){
-						this.$api.msg("支付失败,请检查!")
-						setTimeout(()=>{
-							uni.navigateTo({
-								url: '/pages/userCenter/myOrder/myOrder'
-							});
-						},1000)
-					}
+					orderId:item.guid,
+					// payType:item.payType,
+					openid:userInfo.wxId,
+					"tradeType":"test"
+				};
+				this.$api.http.post(this.config.apiBaseurl + "/carbon-h5/wechat/pay",params,{
+					header: {
+					Accept:'application/json',
+					Authorization: 'Bearer '+ this.token, //注意Bearer后面有一空格
+				},
+				}).then(res=>{
+					uni.requestPayment({
+					    provider: 'wxpay',
+					    timeStamp:res.data.retBody.timeStamp,
+					    nonceStr: res.data.retBody.nonceStr,
+					    package: res.data.retBody.packageValue,
+					    signType: 'MD5',
+					    paySign: res.data.retBody.paySign,
+					    success: function (res) {
+							self.$api.href('/pages/usercenter/orderList/orderList')
+					        console.log('success:' + JSON.stringify(res));
+					    },
+					    fail: function (err) {
+					        console.log('fail:' + JSON.stringify(err));
+					    }
+					});
+				}).catch( err =>{
+					console.log('pay err',err)
 				})
 			}
 		},

+ 18 - 3
pages/index/index.vue

@@ -78,7 +78,7 @@
 						<view class="product-text">{{item.goodsName}}</view>
 					</view>
 				</view>
-				<view class="common-content-blink">查看更多 ></view>
+				<!-- <view class="common-content-blink">查看更多 ></view> -->
 			</view>
 			<!-- 碳汇产品展示 结束 -->
 			<view class="title">购买排行榜</view>
@@ -147,6 +147,7 @@
 		data() {
 			return {
 				$getimg:this.$getimg,
+				thetoken:'',
 				modal: {
 					visibleModal: false
 				},
@@ -182,6 +183,7 @@
 			}
 		},
 		onLoad() {
+			this.thetoken = 'Bearer' + ' ' + this.$store.state.token;
 			this.getProductList();
 		},
 		methods: {
@@ -195,7 +197,7 @@
 				this.$api.http.post(this.config.apiBaseurl + '/carbon-h5/wap/goodsManage/pushGoods',{"pageNo":1,"pageSize":6},{
 					header: {
 					Accept:'application/json',
-					// Authorization: 'Bearer '+ this.token, //注意Bearer后面有一空格
+					Authorization: 'Bearer '+ this.thetoken, //注意Bearer后面有一空格
 				},
 				}).then(res => {
 					this.productList = res.data.retBody;
@@ -213,7 +215,20 @@
 			},
 			rankTab(type){
 				this.rankType = type;
-				console.log(type);
+				this.getRank(type);
+			},
+			getRank(type){
+				this.$api.http.post(this.config.apiBaseurl + '/carbon-h5/wap/goodsManage/pushGoods',{"pageNo":1,"pageSize":6},{
+					header: {
+					Accept:'application/json',
+					Authorization: 'Bearer '+ this.thetoken, //注意Bearer后面有一空格
+				},
+				}).then(res => {
+					// this.productList = res.data.retBody;
+					console.log('res',JSON.parse(JSON.stringify(res.data.retBody)))
+				}).catch(err =>{
+					console.log('err',err)
+				});
 			},
 			//开启多株购碳
 			randomPop() {

+ 39 - 6
pages/index/modal/quickBuy.vue

@@ -1,8 +1,9 @@
 <template>
 	<uni-popup ref="randomPop" type="bottom" class="randomPop">
 		<view class="popup-content">
-			<view class="popup-head">
-				线下认购
+			<view class="popup-head">				
+				<text v-if="customerType==1">购买碳汇</text>
+				<text v-else>线下认购</text>
 				<text class="close iconfont icon-shense" @click="closePop"></text>
 			</view>
 			<view class="popup-body">
@@ -12,7 +13,7 @@
 						 <input class="input" type="number" v-model="shoppingNum" placeholder="单次购买不超过1000株" placeholder-style="font-size:20rpx"/>
 					</view>
 				</view>
-				<view class="conditions-item remark-wrap" >
+				<view class="conditions-item remark-wrap" v-if="productType == 'all'">
 					<view class="conditions-item-til">备注说明:</view>
 					<view class="remark">
 						<textarea class="remark-textarea" maxlength="240" v-model="remark" placeholder="请输入您对认购的碳汇产品要求" />
@@ -56,14 +57,23 @@
 				key:'userInfo',
 				success: function (res) {
 					self.customerType = res.data.customerType;
-				   // console.log('userInfo',res);
+				   console.log('userInfo',res);
 				}
 			});
+			console.log('prohelpPeople',this.prohelpPeople);
 		},
 		props: {
 			visible: {
 				type: Boolean,
 				default: false
+			},
+			productType:{
+				type: String,
+				default: 'all'
+			},
+			prohelpPeople:{
+				type: Array,
+				default: () => []
 			}
 		},
 		data() {
@@ -81,6 +91,12 @@
 		methods: {
 			...mapMutations(['addCart']),
 			getHelpPeople:debounce(function(num){
+				if(this.productType=='self'){
+					console.log('this.prohelpPeople',this.prohelpPeople);
+					this.helpPeople = this.prohelpPeople;
+					this.helpPeople[0].carbonSkin = this.shoppingNum;
+					return ;
+				};
 				this.helpPeople = []
 				this.loading = true
 				this.$api.http.get(this.config.apiBaseurl + '/carbon-h5/wap/goodsManage/getGoodsInfoByCarbonNum?carbonNum='+this.shoppingNum,{
@@ -100,7 +116,9 @@
 			goCart(){
 				console.log('customerType',this.customerType);
 				if(this.customerType!=1){
-					this.$api.href('/pages/offlineBuy/offlineBuy');
+					this.$emit('closeModal',true);
+					this.offlineBuy();
+					// this.$api.href('/pages/offlineBuy/offlineBuy');
 					return;
 				};
 				if(this.helpPeople === undefined || this.helpPeople.length == 0){
@@ -108,7 +126,7 @@
 					return 
 				}else{
 					this.$refs.randomPop.close()
-					this.$emit('closeModal',true)
+					this.$emit('closeModal',true);
 					this.addCart(this.helpPeople);
 					this.$api.href('/pages/confirmOrder/confirmOrder')
 				}
@@ -125,6 +143,21 @@
 				this.$refs.randomPop.close()
 				this.$emit('closeModal', true)
 			},
+			offlineBuy(){
+				let self = this;
+				let offlineparams = {amount:this.shoppingNum,remark:this.remark};
+				self.$api.http.post(this.config.apiBaseurl + "/carbon-h5/wap/apply",offlineparams,{
+					header: {
+					Accept:'application/json',
+					Authorization: 'Bearer '+ this.token, //注意Bearer后面有一空格
+				},
+				}).then(res=>{
+					self.$api.href('/pages/usercenter/subscribe/subscribe')
+				}).catch( err =>{
+					console.log('err',err)
+				})
+				
+			}
 		},
 		watch: {
 			//碳汇购入量计算

+ 1 - 1
pages/login/loginType.vue

@@ -82,7 +82,7 @@
 							serf.login(res.data.retBody);
 							serf.upInfo();
 							let userKey = uni.getStorageSync('userInfo');
-							// console.log('userKey',userKey.phone);
+							console.log('userKey',userKey.phone);
 							if(userKey.phone){
 								serf.havePhone = true;
 							}else{

+ 20 - 9
pages/offlineBuy/offlineBuy.vue

@@ -7,7 +7,7 @@
 			<view class="step-wrap" v-if="status == 0||status == 1||status == 2||status == 3">
 				<view class="step-item" data-text="步骤一" :class="status == 0?'active':''"></view>
 				<view class="step-item" data-text="步骤二" :class="status == 1?'active':''"></view>
-				<view class="step-item" data-text="步骤三" :class="status == 2?'active':''"></view>
+				<!-- <view class="step-item" data-text="步骤三" :class="status == 2?'active':''"></view> -->
 			</view>
 			<view class="step-text">
 				<view class="step-text-item">
@@ -18,10 +18,10 @@
 					<view class="step-text-item-cn">步骤二</view>
 					<view class="step-text-item-en">Step 2</view>
 				</view>
-				<view class="step-text-item">
+				<!-- <view class="step-text-item">
 					<view class="step-text-item-cn">步骤三</view>
 					<view class="step-text-item-en">Step 3</view>
-				</view>
+				</view> -->
 			</view>
 			<!-- step end -->
 			<view class="step-content" v-if="status == 0">
@@ -30,7 +30,7 @@
 					步骤一
 				</view>
 				<view class="con">
-					说明:感谢您的认购,生态环境厅将收到您的申请,请尽快联系生态环境厅(联系电话:{{phone01}})签订认购协议
+					说明:感谢您的认购,生态环境厅将收到您的申请,请尽快联系生态环境厅(联系电话:84546545)签订认购协议
 				</view>				
 			</view>
 			<view class="step-content" v-if="status == 1">
@@ -39,10 +39,10 @@
 					步骤二
 				</view>
 				<view class="con">
-					说明:认购成功,请在{{time}}之前,打款到指定账户{{bankAccount}},完成购买,如有疑问可联系
+					说明:认购成功,订单已生成,请在2020年11月11日之前,打款完成后等待审核,如有疑问或需开具发票可联系08121212
 				</view>				
 			</view>
-			<view class="step-content" v-if="status == 2">
+			<!-- <view class="step-content" v-if="status == 2">
 				<view class="til">
 					<image :src="$getimg + 'icon-rengou.png'" class="til-img" mode="scaleToFill"></image>
 					步骤三
@@ -50,7 +50,7 @@
 				<view class="con">
 					说明:完成购买,如需开具发票可联系:{{phone03}}
 				</view>				
-			</view>
+			</view> -->
 			
 		</view>
 		<view class="bottom-btn-wrap">
@@ -73,6 +73,8 @@
 	export default {
 		data() {
 			return {
+				thetoken:'',
+				guid:'',
 				$getimg:this.$getimg,
 				status:0,
 				time:'2020年11月11日',
@@ -85,8 +87,10 @@
 		onShow() {
 	
 		},
-		onLoad() {
-
+		onLoad(option) {
+			this.guid = option.guid;
+			this.thetoken = 'Bearer' + ' ' + this.$store.state.token;
+			this.getDetails()
 		},
 		methods: {
 			//打电话
@@ -104,6 +108,13 @@
 				    phoneNumber: number 
 				});				
 			},
+			getDetails(){
+				this.$api.http.get(this.config.apiBaseurl+'/carbon-h5/wap/apply/'+this.guid,{header: {Authorization:this.thetoken}}).then( res =>{
+					console.log('this.status',res);
+					this.status = res.data.data.recordStatus;
+					console.log('this.status',this.status)
+				})
+			}
 
 		}
 	}

+ 2 - 2
pages/product/product.css

@@ -1,7 +1,7 @@
 page{background-color: #F5F5F5;}
 .goods-name{display: flex;align-items: center;justify-content: space-between;padding: 24rpx;background-color: #fff;border-bottom: 1px solid #ddd;}
-.goods-name .name{font-size: 30rpx;font-weight: 600;line-height: 40rpx;}
-.goods-name .type{font-size: 24rpx;color: #999;}
+.goods-name .name{flex: 1;font-size: 30rpx;font-weight: 600;line-height: 40rpx;}
+.goods-name .type{font-size: 24rpx;color: #999;width: 200rpx;text-align: right;}
 
 .goods-base-info{position: relative;margin-bottom: 24rpx;background-color: #fff;}
 .goods-base-info-item{font-size: 28rpx;color: #666;line-height: 40rpx;}

+ 37 - 10
pages/product/product.vue

@@ -13,16 +13,16 @@
 			</swiper>
 		</view>
 		<view class="goods-name">
-			<view class="name">{{product.goodsName ||'重庆市渝中区解放碑街道民生路成片林'}}</view>
+			<view class="name">{{product.goodsName}}</view>
 			<view class="type">类别:{{product.goodsType || "T001"}}</view>
 		</view>
 		<view class="goods-base-info padding24">
-			<view class="goods-base-info-item">产品编号:{{product.goodsCode || 'G0119000000000005468'}}</view>
+			<view class="goods-base-info-item">产品编号:{{product.goodsCode}}</view>
 			<view class="goods-base-info-item">认购期:{{time}}</view>
-			<view class="goods-base-info-item">预估总释放量:{{product.carbonVal || "49330"}}kg</view>
+			<view class="goods-base-info-item">预估总释放量:{{product.carbonVal}}kg</view>
 			<view class="goods-price">
 				<text class="rmb">¥</text>
-				<text class="price">{{product.price || "3.00"}}/kg</text>
+				<text class="price">{{product.price}}/kg</text>
 			</view>			
 		</view>
 		<view class="main-body">
@@ -65,20 +65,30 @@
 		</view>
 		<view class="bottom-btn-wrap">
 			<view class="bottom-btn-wrap-bg">
-				<view class="bottom-btn btn">
+				<view class="bottom-btn btn" @click="randomPop">
 					立即购碳
 				</view>
 			</view>
 		</view>
+		<quick-buy class="quickbuy" ref="quickBuy" @closeModal="closeModal" productType='self' :prohelpPeople='prohelpPeople' :visible="modal.visibleModal" v-if="modal.visibleModal"></quick-buy>
 	</view>
 </template>
 
 <script>
+	import quickBuy from '../index/modal/quickBuy';
 	export default {
+		components:{
+			quickBuy,
+			
+		},
 		data() {
 			return {
 				$getimg:this.$getimg,
-				token:this.config.testToken,
+				token:'',
+				thetoken:'',
+				modal: {
+					visibleModal: false
+				},
 				params:{
 					goodsId:'',
 				},
@@ -91,7 +101,8 @@
 					indicatorColor:"rgba(255, 255, 255, 0.7)",
 					indicatorActiveColor:"rgba(255, 255, 255, 1)",
 				},
-				product:[],
+				product:null,
+				prohelpPeople:[{'goodsName':'','goodsImages':'','guid':'','price':0,carbonSkin:0}],//要传递的数据
 				time:'2020',
 				
 				
@@ -101,7 +112,8 @@
 			
 		},
 		onLoad(option) {
-			console.log('option',option);
+			// console.log('option',option);
+			this.thetoken = 'Bearer' + ' ' + this.$store.state.token;
 			this.params.goodsId = option.guid;
 			this.getdetails();
 		},
@@ -110,16 +122,31 @@
 				this.$api.http.get(this.config.apiBaseurl + '/carbon-h5/wap/goods/getById?goodsId='+this.params.goodsId,{
 					header: {
 					Accept:'application/json',
-					Authorization: 'Bearer '+ this.token, //注意Bearer后面有一空格
+					Authorization: this.thetoken, //注意Bearer后面有一空格
 				},
 				}).then(res => {
 					this.bannerList = res.data.retBody.goodsImages.split(';');
 					this.product = res.data.retBody;
-					console.log('res',JSON.parse(JSON.stringify(res.data.retBody)));
+					this.prohelpPeople[0].goodsName=res.data.retBody.goodsName;
+					this.prohelpPeople[0].goodsImages=res.data.retBody.goodsImages;
+					this.prohelpPeople[0].guid=res.data.retBody.guid;
+					this.prohelpPeople[0].price=res.data.retBody.price;
+					// console.log('res',JSON.parse(JSON.stringify(res.data.retBody)));
 				}).catch(err =>{
 					console.log('err',err)
 				});
 			},
+			//开启多株购碳
+			randomPop() {
+				this.modal.visibleModal = true;
+				this.$nextTick(res => {
+					// console.log('this.$refs',this.$refs.quickBuy)
+					this.$refs.quickBuy.openPop();
+				});
+			},
+			closeModal() {
+				this.modal.visibleModal = false;
+			},
 
 		}
 	}

+ 1 - 1
pages/use/use.vue

@@ -6,7 +6,7 @@
 		<view class="use-wrap">
 			<view class="use-wrap-header">
 				<view class="til">价值实现</view>
-				<view class="subtil">
+				<view class="subtil"  @click="this.$api.msg('稍后展示')">
 					<text>关于价值实现</text>
 					<text class="iconfont icon-jiantou"></text>
 				</view>

+ 118 - 0
pages/usercenter/certificateList/certificate/certificate.vue

@@ -0,0 +1,118 @@
+<template>
+	<view class="content">
+		<web-view v-if="info.url" class="web-view" :src="info.url"></web-view>
+		<view class="btns">
+			<!-- <button class="my-btn" @click="$api.goto('/pages/home/home', '', true)">首页</button> -->
+			<!-- <button class="my-btn" type="gradient" @tap="$api.goto('/pages/usercenter/certificateList/certificateList')">我的证书</button> -->
+			<!--#ifdef H5-->
+			<!-- <button class="my-btn" type="gradient" @tap="share" v-show="$api.clientType.isWeiXin">分享证书</button> -->
+			<!--#endif-->
+		</view>
+		<!--#ifdef H5-->
+		<!-- <view v-show="showShare" class="share-bg" @tap="showShareFun"></view> -->
+		<!--#endif-->
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			info: {
+				url: ''
+			},
+			//#ifdef H5
+			showShare:false,
+			//#endif
+		};
+	},
+	onLoad(e) {
+		const data = this.$api.getE();
+		this.info = Object.assign(this.info, data);
+		//自定义证书ID字段  orderId
+		//通过订单id获取证书信息
+		uni.showLoading({
+			title: '正在获取证书信息'
+		});
+		this.$api
+			.$http({
+				url: '/wap/order/getCredentialByOrderId',
+				data: {
+					orderId: data.orderId
+				}
+			})
+			.then(res => {
+				const info = res.data instanceof Object ? res.data : {};
+				this.info = Object.assign(this.info, res.data);
+				if (res.code == 0) {
+					//更新缓存信息
+					uni.setStorageSync(data.orderId, info);
+					//调用生成
+					this.info.url = '/static/html2canvas/index.html?key=' + data.orderId;
+				} else {
+					uni.hideLoading();
+				}
+			});
+	},
+	//标题栏按钮监听
+	onNavigationBarButtonTap(e) {
+		this.$api.gohome(e);
+	},
+	methods: {
+		//#ifdef H5
+		showShareFun(){
+			this.showShare = !this.showShare;
+		},
+		share() {
+			//显示菜单
+			this.$wxApi.showMenu();
+			this.showShareFun();
+			//注册分享数据
+			this.$wxApi.share({
+				orderId: this.info.orderId
+			});
+		}
+		//#endif
+	}
+};
+</script>
+
+<style lang="scss">
+.content {
+	.btns {
+		position: absolute;
+		top: 88%;
+		width: 100%;
+		display: flex;
+		z-index: 1;
+		button {
+			flex: 1;
+			margin: 0 10% 10% 10%;
+		}
+	}
+}
+.web-view {
+	box-sizing: border-box;
+}
+.share-bg{
+	position: fixed;
+	z-index: 998;
+	top: 0;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	overflow: hidden;
+	background: rgba(0,0,0,.7);
+	box-sizing: border-box;
+	&::after{
+		content: "";
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		// background: url(../../../../static/img/share-bg.png) no-repeat top right;
+		background-size: 80% auto;
+	}
+}
+</style>

+ 19 - 17
pages/usercenter/certificateList/certificateList.vue

@@ -2,11 +2,11 @@
 	<view class="pages">
 		<mescroll-body class="certificateList-wrap" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 			<view class="certificate">
-				<view v-for="(item,index) in certificateList" :key="index" class="certificate-item">
+				<view v-for="(item,index) in certificateList" :key="index" class="certificate-item" @click="goDetails(item.id)">
 					<image :src="$getInnerImg + 'certificate.png'" class="certificate-item-img" mode="scaleToFill"></image>
 					<view class="certificate-item-text">
-						<view class="num">证书编号:{{item.num}}</view>
-						<view class="time">颁发日期:{{item.time}}</view>
+						<view class="num">证书编号:{{item.credentialNo}}</view>
+						<view class="time">颁发日期:{{item.createTime}}</view>
 					</view>
 					<view class="certificate-item-icon"><text class="iconfont icon-jiantou"></text></view>
 				</view>
@@ -48,16 +48,7 @@
 				params:{
 					
 				},
-				certificateList:[
-					{
-						num:"0999999",
-						time:'2019-01-02 12:32',
-					},
-					{
-						num:"0999999",
-						time:'2019-01-02 12:32',
-					},
-				],
+				certificateList:[],
 				
 			}
 		},
@@ -89,17 +80,22 @@
 				this.params = Object.assign(this.params,{pageNum:pageNum,pageSize:pageSize});				
 				let thetoken = this.tokenhead + ' ' + this.token;
 				console.log('thetoken',thetoken);
-				this.$api.http.get(this.config.apiBaseurl+'/carbon-h5/wap/order/searchCredentialList',{params:this.params,header: {Authorization:thetoken}}).then(data => {
-					console.log('1111111111',data);
+				// this.$api.http.post(this.config.apiBaseurl+'/carbon-h5/wap/order/searchCredentialList',{params:this.params,header: {Authorization:thetoken}})
+				this.$api.http.post(this.config.apiBaseurl + '/carbon-h5/wap/order/searchCredentialList',this.params,{
+					header: {
+					Accept:'application/json',
+					Authorization: 'Bearer '+ this.token, //注意Bearer后面有一空格
+				},
+				}).then(data => {
 					// 接口返回的当前页数据列表 (数组)
-					let curPageData = data.data.data.list; 
+					let curPageData = data.data.retBody; 
 					// console.log('curPageData',curPageData);
 					// 接口返回的当前页数据长度 (如列表有26个数据,当前页返回8个,则curPageLen=8)
 					let curPageLen = curPageData.length; 
 					// 接口返回的总页数 (如列表有26个数据,每页10条,共3页; 则totalPage=3)
 					// let totalPage = data.xxx; 
 					// 接口返回的总数据量(如列表有26个数据,每页10条,共3页; 则totalSize=26)
-					let totalSize = data.data.data.total; 
+					let totalSize = data.data.retHead.total; 
 					// this.mescrollList = curPageData;
 					// 接口返回的是否有下一页 (true/false)
 					// let hasNext = data.xxx; 
@@ -124,6 +120,12 @@
 				});
 				
 			},
+			goDetails(id){
+				console.log(id)
+				uni.navigateTo({
+					url: '/pages/usercenter/certificateList/certificate/certificate?orderid=' + id,
+				});
+			},
 
 			
 

+ 6 - 8
pages/usercenter/orderList/orderList.vue

@@ -4,7 +4,7 @@
 			<view class="status-bar-item" :class="params.orderStatus != 1&&params.orderStatus != 5&&params.orderStatus != 2?'active':''" @click="changestatus()">全部</view>
 			<view class="status-bar-item" :class="params.orderStatus == 1?'active':''" @click="changestatus(1)">未支付</view>
 			<view class="status-bar-item" :class="params.orderStatus == 2?'active':''" @click="changestatus(2)">已支付</view>
-			<view class="status-bar-item" :class="params.orderStatus == 5?'active':''" @click="changestatus(5)">已完成</view>
+			<!-- <view class="status-bar-item" :class="params.orderStatus == 5?'active':''" @click="changestatus(5)">已完成</view> -->
 		</view>
 		<mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 			<view class="orders">
@@ -15,7 +15,7 @@
 							<view class="order-info-text-item">订单时间:{{item.createTime}}</view>
 						</view>
 						<view class="order-info-status">
-							<view class="status" v-if="item.orderStatus == 1" @click="cancelOrder(item)">取消订单</view>					
+							<!-- <view class="status" v-if="item.orderStatus == 1" @click="cancelOrder(item)">取消订单</view> -->
 							<!-- <view class="status" v-if="item.orderStatus == 1">待支付</view> -->
 							<view class="status" v-if="item.orderStatus == 2">已支付</view>
 							<view class="status" v-if="item.orderStatus == 3">未审核</view>
@@ -35,7 +35,7 @@
 								<text class="amount">{{item.orderAmount}}</text>
 							</view>
 							<view class="order-product-carbon">共{{item.orderCarbonAmount}}kg碳汇量</view>
-							<view class="order-btn topay" v-if="item.orderStatus == 1" @click.stop="pay(item)">立即支付</view>
+							<view class="order-btn topay" v-if="item.orderStatus == 1&&item.state==1" @click.stop="pay(item)">立即支付</view>
 							<view class="order-btn" v-if="item.orderStatus == 2" @click.stop="$api.href('/pages/usercenter/certificateList/certificate?id='+item.id)">查看证书</view>	
 							<view class="order-btn" v-if="item.orderStatus == 5" @click.stop="$api.href('/pages/usercenter/certificateList/certificate?id='+item.id)">查看证书</view>							
 						</view>
@@ -259,6 +259,7 @@
 				});
 			},
 			pay(item){
+				let self = this;
 				console.log('pay item',item);
 				let userInfo = uni.getStorageSync("userInfo");
 				console.log('userInfo',userInfo);
@@ -283,6 +284,7 @@
 					    signType: 'MD5',
 					    paySign: res.data.retBody.paySign,
 					    success: function (res) {
+							self.downCallback();
 					        console.log('success:' + JSON.stringify(res));
 					    },
 					    fail: function (err) {
@@ -292,11 +294,7 @@
 				}).catch( err =>{
 					console.log('pay err',err)
 				})
-					
-					// this.$pay.wxPay(params).then(res =>{
-					// 	this.downCallback();
-					// 	// console.log('payres',res);
-					// }).catch(err =>{console.log('err',err);});
+
 			},
 
 		}

+ 18 - 22
pages/usercenter/orderList/orderdetails/orderdetails.vue

@@ -3,19 +3,25 @@
 		<view class="order">
 			<view class="order-info">订单编号:{{item.orderNo}}</view>
 			<view class="order-info">下单时间:{{item.createTime | formatDateTime}}</view>
-			<view class="order-info">支付方式:线下认购</view>
+			<view class="order-info">
+				支付方式:
+				<text v-if="item.payChannel == '1'">微信支付</text>
+				<text v-if="item.payChannel == '2'">支付宝</text>
+				<text v-if="item.payChannel == '3'">银联</text>
+				<text v-if="item.payChannel == '4'">线下支付</text>
+			</view>
 			<view class="order-info" v-if="item.payNo">支付流水号:{{item.payNo}}</view>
 			<view class="order-status">
-				<view class="status">
+				<view class="status" v-if="item.orderStatus == 1">
 					<image :src="$getInnerImg+'icon-vipcard.png'" class="status-img" mode="scaleToFill"></image>
 					<text class="status-text">待付款</text>
 				</view>
-				<view class="status">
+				<view class="status"  v-if="item.orderStatus == 2">
 					<image :src="$getInnerImg+'icon-vipcard-green.png'" class="status-img" mode="scaleToFill"></image>
 					<text class="status-text">已支付</text>
 				</view>
-				<view class="order-btn topay" @click.stop="pay">去支付</view>
-				<view class="order-btn done">查看证书</view>
+				<view class="order-btn topay" v-if="item.orderStatus == 1&&item.state==1" @click.stop="pay">去支付</view>
+				<view class="order-btn done"  v-if="item.orderStatus == 2">查看证书</view>
 			</view>
 		</view>
 		<!-- bottom-flex-btn-wrap end -->
@@ -36,8 +42,8 @@
 		data() {
 			return {
 				$getInnerImg:this.$getInnerImg,
-				token:this.config.testToken,
-				tokenhead:'',
+				token:'',
+				tokenhead:'Bearer',
 				params: {
 					orderid:'',
 				},
@@ -46,25 +52,15 @@
 		},
 		onShow() {
 			let serf = this;
+			this.token = this.$store.state.token;
 		},
 		onLoad(option) {
 			// console.log('option',option);
 			this.params.orderid = option.orderid;
-			let self = this;
-			uni.getStorage({
-				key:'token',
-				success: function (res) {
-					self.token = res.data;
-				   // console.log(res.data);
-				}
-			});
-			uni.getStorage({
-				key:'tokenhead',
-				success: function (res) {
-					self.tokenhead = res.data;
-				   // console.log(res.data);
-				}
-			});
+			this.token = this.$store.state.token;
+
+
+
 			this.getdetails();
 
 		},

+ 6 - 5
pages/usercenter/subscribe/subscribe.css

@@ -2,12 +2,13 @@ page{background-color: #F5F5F8;}
 .subscribe{margin: 24rpx;}
 .subscribe-item{display: flex;align-items: center;background-color: #fff;padding: 24rpx 24rpx 29rpx;margin-bottom: 24rpx;border-radius: 16rpx;}
 .subscribe-item-info{flex: 1;}
-.subscribe-item-info .time{margin-bottom: 17rpx;font-size: 26rpx;color: #666;line-height: 30rpx;}
+.subscribe-item-info .time{font-size: 26rpx;color: #666;line-height: 30rpx;}
 .subscribe-item-info .carbon{font-size: 30rpx;color: #000;font-weight: 400;}
-
-
-
-
+.subscribe-item-info .carbon .num {font-size: 40rpx;margin: 2rpx;}
+.subscribe-item-info .carbon{font-size: 24rpx;}
+.subscribe-item-status{font-size: 34rpx;color: #FFDA00;margin-right: 34rpx;}
+.subscribe-item-status .done{color: #26D18B;}
+.subscribe-item-icon .iconfont{color: #ccc;}
 
 
 

+ 10 - 6
pages/usercenter/subscribe/subscribe.vue

@@ -1,21 +1,22 @@
 <template>
 	<view class="pages">
-		<mescroll-body class="wrap" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+		<mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 			<view class="subscribe">
-				<view v-for="(item,index) in subscribeList" :key="index" class="subscribe-item">
+				<view v-for="(item,index) in subscribeList" :key="index" class="subscribe-item" @click="goDetails(item.guid)">
 					<view class="subscribe-item-info">
 						<view class="time">
 							认购申请时间:{{item.createTime || ""}}
 						</view>
 						<view class="carbon">
 							共计
-							<text></text>
-							<text>kg</text>
+							<text class="num">{{item.amount}}</text>
+							<text class="unit">kg</text>
 							碳汇量
 						</view>
 					</view>
 					<view class="subscribe-item-status">
-						
+						<text v-if="item.recordStatus == 0">认购中</text>
+						<text class="done" v-if="item.recordStatus == 1">认购完成</text>
 					</view>
 					<view class="subscribe-item-icon">
 						<text class="iconfont icon-jiantou"></text>
@@ -48,7 +49,7 @@
 					page: {
 						size: 10 // 每页数据的数量,默认10
 					},
-					noMoreSize: 5, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					noMoreSize: 7, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
 					empty: {
 						tip: '暂无相关数据'
 					}
@@ -155,6 +156,9 @@
 				});
 				
 			},
+			goDetails(id){
+				this.$api.href('/pages/offlineBuy/offlineBuy?guid=' + id)
+			}
 
 			
 

+ 11 - 1
pages/usercenter/usercenter.vue

@@ -61,7 +61,7 @@
 		</view>
 		<!-- usernav-list end -->
 		<view class="wrap40 question-nav">
-			<view class="question-item" @click="$api.href('/pages/usercenter/question/question')">
+			<view class="question-item" @click="goGuide">
 				<view class="question-item-text">
 					<view class="question-item-til">新手指南</view>
 					<view class="question-item-subtil">一看就懂</view>
@@ -106,6 +106,16 @@
 		},
 		methods: {
 			...mapMutations(['login', 'logout', 'upInfo']),
+			goGuide(){
+				let that = this;
+				uni.removeStorage({
+				    key: 'launchFlag',
+				    success: function (res) {
+				        that.$api.href('/pages/index/guide')
+				    }
+				});
+				
+			}
 
 		}
 	}

+ 0 - 55
pay.js

@@ -1,55 +0,0 @@
-/**
- * 订单支付
- */
-import Vue from "vue";
-//#ifdef H5
-import $wxApi from "./wxapi.js";
-//#endif
-import Request from '@/js_sdk/luch-request/luch-request/index.js';
-const $http = new Request();
-
-import {config} from './config/config.js';
-export default {
-	//微信支付
-	wxPay(obj = {}) {
-		uni.showLoading({
-			title: '支付中'
-		});
-		return new Promise(r => {
-			let token = uni.getStorageSync("token");
-			$http.post(config.apiBaseurl + "/app/pay",obj,{
-				header: {
-					Accept:'application/json',
-					Authorization: 'Bearer '+ token, //注意Bearer后面有一空格
-				},
-			}).then(res=>{
-				// console.log('res',res);
-					//#ifdef H5
-					$wxApi.JSAPI(res.data.data).then(r);
-					//#endif
-					this.payError(res);
-				})
-		});
-	},
-	//支付错误处理
-	payError(res){
-		uni.hideLoading();
-		// uni.navigateTo({
-		// 	url: '/pages/usercenter/myorder/myorder',
-		// 	fail:function(err){
-		// 		console.log(err)
-		// 	}
-		// });
-		// console.log('1',res);
-		if(res.code == 623){
-			setTimeout(i=>{
-				new Vue().$api.goto("/pages/userCenter/myorder/myorder");
-			},2000);
-			uni.showToast({
-				title:res.msg + "    即将跳转到订单页",
-				icon:"none",
-				duration:2000
-			});
-		}
-	}
-}

BIN
static/html2canvas/bg.png


BIN
static/html2canvas/bg.webp


BIN
static/html2canvas/code.png


+ 368 - 0
static/html2canvas/credTpl.html

@@ -0,0 +1,368 @@
+<!DOCTYPE html>
+<html>
+
+	<head>
+		<meta charset="utf-8" />
+		<meta name="viewport" content="width=device-width, initial-scale=1">
+		<!-- 强制让文档与设备的宽度保持1:1 -->
+		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
+		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+		<script type="text/javascript" src="http://cdn.webfont.youziku.com/wwwroot/js/wf/youziku.api.min.js"></script>
+		<script type="text/javascript">
+			$youziku.load(".title span", "94d4ba0acbef4c97b7abfecaa9a3e1a8", "cyjianxk");
+			$youziku.draw();
+		</script>
+		<style type="text/css">
+			* {
+				margin: 0;
+				padding: 0;
+				border: 0;
+			}
+
+			.ui-absolute {
+				position: absolute;
+				top: 0;
+				bottom: 0;
+				left: 0;
+				right: 0;
+				margin: auto;
+			}
+
+			.ui-relative {
+				position: relative;
+			}
+
+			.cred {
+				background: url(bg.png) no-repeat center center;
+				background-size: 100% 100%;
+				width: calc(908px/1.5);
+				height: calc(1304px/1.5);
+				font-size: calc(908px/1.5*0.11);
+				margin: 0 auto;
+			}
+
+			.cred .logo,
+			.cred .QR-code {
+				bottom: auto;
+				padding-top: 20%;
+				width: 20%;
+				border-radius: 50%;
+				overflow: hidden;
+				left: 50%;
+				right: auto;
+				transform: translateX(-50%);
+			}
+
+			.cred .logo {
+				top: 6%;
+				background: url(logo.png) no-repeat center center;
+				background-size: 100% 100%;
+			}
+
+			.cred .QR-code {
+				top: 68%;
+				background: url(code.png) no-repeat center center;
+				background-size: 100% 100%;
+				border-radius: 0;
+			}
+
+			.cred .title {
+				font-size: .40em;
+				top: 19%;
+				bottom: auto;
+				text-align: center;
+				line-height: 1.5em;
+				color: #00984C;
+			}
+
+			.cred .number {
+				top: 29%;
+				bottom: auto;
+				font-size: .28em;
+				text-align: center;
+				line-height: 1em;
+				color: #000;
+			}
+
+			.cred .content {
+				top: 33%;
+				bottom: auto;
+				font-size: .32em;
+				color: #333333;
+				margin: auto 12% auto 13%;
+				font-weight: 300;
+			}
+
+			.cred .content p {
+				text-indent: 2em;
+				line-height: 2em;
+				letter-spacing: .05em;
+				word-wrap: break-word;
+				word-break: break-all;
+			}
+
+			.cred .content .name {
+				text-indent: 0;
+			}
+
+			.cred .content p span {
+				border-bottom: 2px solid #010101;
+				overflow: hidden;
+			}
+
+			.cred .seal-1,
+			.cred .seal-2 {
+				top: 72%;
+				bottom: auto;
+				width: 26.22%;
+				padding-top: 26.22%;
+				border-radius: 50%;
+			}
+
+			.cred .seal-1 {
+				background: url(z1.png) no-repeat center center;
+				background-size: 100% 100%;
+				left: 20%;
+				right: auto;
+			}
+
+			.cred .seal-2 {
+				background: url(z2.png) no-repeat center center;
+				background-size: 100% 100%;
+				right: 20%;
+				left: auto;
+			}
+
+			.cred .seal-1-text {
+				top: 84%;
+				padding-top: 0;
+				background: none;
+				font-size: .25em;
+				bottom: auto;
+				line-height: 1em;
+				color: #000;
+				display: flex;
+				text-align: center;
+				width: 60%;
+				left: 10%;
+				right: 10%;
+			}
+
+			.cred .seal-1-text span {
+				flex: 1;
+			}
+
+			.cred .seal-1-text.time {
+				top: 90%;
+				right: 0;
+				left: 0;
+				margin: auto;
+				text-align: center;
+			}
+
+			.cred .foot-text {
+				top: auto;
+				bottom: 6.82%;
+				font-size: .23em;
+				line-height: 1.5em;
+				left: 13.43%;
+				right: 13.43%;
+				color: #595656;
+				text-indent: 2em;
+				letter-spacing: .1em;
+			}
+		</style>
+	</head>
+
+	<body>
+		<div class="ui-relative cred" id="cred">
+			<div class="ui-absolute logo"></div>
+			<div class="ui-absolute QR-code"></div>
+			<div class='ui-absolute title'>
+				<p><span>重庆</span>"<span>碳汇</span>+"<span>生态产品价值实现</span></p>
+				<p><span>碳信用证书</span></p>
+			</div>
+			<div class="ui-absolute number">
+				<!-- 证书编号:G18G0000001 -->
+			</div>
+			<div class="ui-absolute content">
+				<!-- <p class="name">
+				尊敬的
+				<span>雷</span><span>电</span>:</p>
+			<p>感谢您对贵州省单株碳汇精准扶贫的支持。您购买了
+				<span>2018</span>年度单株碳汇
+				<span>100</span>株,碳汇签发量
+				<span>1000</span>千克二氧化碳当量,帮助了来自
+				<span>贵</span>
+				<span>州</span>
+				<span>省</span>
+				<span>安</span>
+				<span>顺</span>
+				<span>市</span>
+				<span>平</span>
+				<span>坝</span>
+				<span>区</span>深度贫困村
+				<span>关口村</span>的
+				<span>刘兴莲</span>等
+				<span>15</span>户贫困户。您购碳资金
+				<span>30000</span>元,已全额转入
+				<span>刘兴莲</span>等
+				<span>15</span>户贫困户的个人银行账户。</p>
+			<p>※该笔碳汇可用于抵消您个人碳排放,为应对全球气候变化做出贡献。</p> -->
+			</div>
+			<div class="ui-absolute seal-1-text">
+				<span>重庆市生态环境局</span>
+				<span>中国质量认证中心</span>
+			</div>
+			<div class="ui-absolute seal-1-text time">
+				<!-- <span>2018年8月10日</span> -->
+			</div>
+			<!-- <div class="ui-absolute seal-1"></div> -->
+			<!-- <div class="ui-absolute seal-2"></div> -->
+			<!-- <div class="ui-absolute foot-text">※实名认购记录可作为个人(企业)优良信息,归集到全国信用信息共享平台(贵州)个人(企业)名下。</div> -->
+		</div>
+	</body>
+	<script src="html2canvas.js" type="text/javascript" charset="utf-8"></script>
+	<script type="text/javascript">
+		//下载图片
+		let downloadImg = function(obj) {
+			obj = obj || {};
+			this.imgData = obj.data.toDataURL((obj.format || 'image/jpg')) || null;
+			this.src = '';
+			this.init();
+		};
+		downloadImg.prototype.init = function() {
+			this.downloadImgFile(this.imgData);
+		};
+		//下载
+		downloadImg.prototype.downloadImgFile = function(content) {
+			var _this = this;
+			var blob = this.base64ToBlob(content);
+			this.src = URL.createObjectURL(blob);
+		};
+		downloadImg.prototype.base64ToBlob = function(code) {
+			let parts = code.split(';base64,');
+			let contentType = parts[0].split(':')[1];
+			let raw = window.atob(parts[1]);
+			let rawLength = raw.length;
+			let uInt8Array = new Uint8Array(rawLength);
+			for (let i = 0; i < rawLength; ++i) {
+				uInt8Array[i] = raw.charCodeAt(i);
+			}
+			return new Blob([uInt8Array], {
+				type: contentType
+			});
+		};
+
+		window.certificate = function(obj) {
+			var _this = this;
+			_this.obj = obj || {
+				elem: 'cred'
+			};
+			_this.contentData = obj.data || {};
+			_this.content();
+			_this.elem = _this.obj.elem || 'cred'; //要绘制的页面
+			_this.elemObj = document.getElementById(_this.elem);
+			_this.format = _this.obj.format || "jpg"; //下载格式
+			_this.success = obj.success || function(url, data) {
+				console.log("没有配置success接收函数");
+			};
+			_this.type = null;
+			_this.A0 = {
+				width: '1080px',
+				height: '1551px',
+				'font-size': '118.8px'
+			};
+			_this.A3 = {
+				width: '3058px',
+				'height': '4961px',
+				'font-size': '336.38px'
+			};
+			_this.A4 = {
+				'width': '2048px',
+				'height': '3508px',
+				'font-size': '225.28px'
+			};
+			// _this.down('A0');
+		};
+		certificate.prototype.content = function(obj) {
+			var _this = this;
+			this.contentData = obj || this.contentData;
+			let span = function(name, bool) {
+				let html = '';
+				let arr = (typeof(_this.contentData[name]) == 'undefined' ? [] : _this.contentData[name]) + '';
+				for (let i in arr) {
+					html += bool ? '<span>' + arr[i] + '</span>' : arr[i];
+				}
+				return html;
+			};
+			document.getElementsByClassName('number')[0].innerHTML = this.contentData.code == '0' ? '' : '普惠证书编号:' + this.contentData
+				.code;
+			document.getElementsByClassName('content')[0].innerHTML = '<p class="name">尊敬的' + span('name', true) +
+				':</p>\
+				<p>欢迎参与重庆“碳汇+”生态产品价值实现试点示范,您此单购买“碳汇+”生态产品' + span('co2') + 'kgCO2减排量,\
+				资金支出' + span('money') +
+				'元,生成碳信用额' + span('credit') + '个,可等量累计“碳汇+”积分' + span('integral') + '分。</p>\
+				<p>感谢您为生态文明建设做出的贡献!</p>';
+			document.getElementsByClassName('time')[0].innerHTML = "<span>" + this.contentData.date + "</span>";
+		};
+		certificate.prototype.generate = function() {
+			var _this = this;
+			_this.style(_this.elemObj, _this[_this.type]);
+			return _this;
+		};
+		certificate.prototype.style = function(elem, styleObj) {
+			for (let i in styleObj) {
+				elem.style[i] = styleObj[i];
+			}
+			return elem;
+		};
+		certificate.prototype.down = function(type) {
+			if (this.type == type) {
+				this.aLink.dispatchEvent(this.evt);
+				return -1;
+			} else {
+				this.type = type;
+				return this.generate().html2canvas();
+			}
+		};
+		certificate.prototype.html2canvas = function() {
+			var _this = this;
+			html2canvas(_this.elemObj).then(function(canvas) {
+				let img = new downloadImg({
+					data: canvas,
+					format: 'image/' + (_this.format || 'jpg'),
+				});
+				if (img.src) {
+					_this.src = img.src;
+					if (_this.success) {
+						_this.data = canvas.toDataURL('image/' + (_this.format || 'jpg'));
+						_this.aLink = document.createElement('a');
+						_this.evt = document.createEvent("MouseEvents");
+						_this.evt.initEvent("click", true, true);
+						_this.aLink.download = new Date().getTime() + '.' + (_this.format || 'jpg');
+						_this.aLink.href = _this.src;
+						_this.success(function(type) {
+							switch (type) {
+								case 'down':
+									_this.aLink.dispatchEvent(_this.evt);
+									return _this.src;
+									break;
+								case 'url':
+									return _this.src;
+									break;
+								case 'data':
+									return _this.data;
+									break;
+								default:
+									return _this.src;
+							}
+						}, _this.data);
+					}
+				}
+			});
+			return _this;
+		};
+	</script>
+
+</html>

File diff suppressed because it is too large
+ 3519 - 0
static/html2canvas/html2canvas.js


+ 128 - 0
static/html2canvas/index.html

@@ -0,0 +1,128 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="utf-8" />
+		<meta name="viewport" content="width=device-width, initial-scale=1">
+		<script type="text/javascript">
+			/**
+			 * URL参数转换为对象
+			 */
+			Location.prototype.searchObj = function(url) {
+				var obj = {};
+				var arr = (url || this.search).match(/[?&][^?&]+=[^?&]+/g);
+				if (arr) {
+					arr.forEach(function(item) {
+						var tempArr = item.substring(1).split('=');
+						obj[decodeURIComponent(tempArr[0])] = decodeURIComponent(tempArr[1]);
+						length++;
+					});
+				}
+				return obj;
+			}
+		</script>
+		<style type="text/css">
+			#credTpl {
+				overflow: hidden;
+				position: fixed;
+				padding: 0;
+				margin: 0;
+				border: 0;
+				height: 0;
+				width: 0;
+				top: 0;
+				left: 0;
+			}
+			.showImg{
+				position: fixed;
+				padding: 0;
+				margin: 0;
+				border: 0;
+				top: 1%;
+				left: 5%;
+				bottom: 18%;
+				right: 5%;
+			}
+			#showImg {
+				position: absolute;
+				padding: 0;
+				margin: 0;
+				border: 0;
+				top: 0;
+				left: 0;
+				bottom: 0;
+				right: 0;
+				width: 100%;
+				height: 100%;
+			}
+		</style>
+	</head>
+
+	<body>
+		<div class="showImg">
+			<img src="bg.png" id="showImg">
+		</div>
+		<iframe id="credTpl" name="credTpl" src="credTpl.html"></iframe>
+	</body>
+
+	<script type="text/javascript">
+		window.parent.uni && window.parent.uni.showLoading({
+			title: '证书生成中'
+		});
+		let imgSrcFun = function() {};
+		let showimg = function() {
+			window.parent.uni && window.parent.uni.previewImage({
+				current: 0,
+				urls: [imgSrcFun]
+			});
+		}
+		let iframeOnload = function() {
+			//框架加载成功
+			let getE = function(e) {
+				let data = {};
+				//获取参数
+				if (e.key) {
+					try {
+						const value = window.parent.uni.getStorageSync(e.key);
+						if (value) {
+							data = value;
+						}
+					} catch (e) {
+
+					}
+				}
+				return data;
+			}
+			//取得证书信息缓存
+			let obj = getE(location.searchObj());
+			let credTpl = window.frames['credTpl'].window; //获取证书框架window
+			let mycertificate = new credTpl.certificate({ //生成图片
+				format: 'jpg',
+				data: {
+					code: obj.credentialNo || '', //编号
+					name: obj.companyName || obj.customerName || obj.nickName || '匿名用户', //购买者名字
+					co2: obj.carbonAmount || 0, //碳汇量
+					credit: obj.carbonAmount || 0, //碳信用额
+					integral: obj.carbonAmount || 0, //碳积分
+					money: obj.orderAmount || 0, //购买多少钱
+					date: obj.buyDate || '' //购买日期
+				},
+				success: function(_function) {
+					imgSrcFun = _function('data');
+					document.getElementById('showImg').src = imgSrcFun; //预览图片
+					window.parent.uni && window.parent.uni.hideLoading();
+				}
+			});
+			mycertificate.down('A0');
+		};
+		/**
+		 * 证书框架加载完毕开始生成
+		 */
+		let iframe = document.getElementById("credTpl");
+		if (iframe.attachEvent) {
+			iframe.attachEvent("onload", iframeOnload);
+		} else {
+			iframe.onload = iframeOnload;
+		}
+	</script>
+
+</html>

BIN
static/html2canvas/logo.png


+ 1 - 1
store/index.js

@@ -151,7 +151,7 @@ export default new Vuex.Store({
 			//在线更新取得用户信息
 			then(await(
 					http.get(config.apiBaseurl + '/carbon-h5/wap/customer/getCustomerByToken',{header: {Authorization:thetoken}}).then(res => {
-						console.log('getCustomerByToken', res.data);
+						// console.log('getCustomerByToken', res.data);
 						if(res.data.retHead.errCode == 0){res.data.code = 0;}
 						// 处理非微信头像
 						let headImage = res.data.retBody.headImage;

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/mescroll-uni/components/mescroll-empty.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/mescroll-uni/components/mescroll-top.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/mescroll-uni/mescroll-body.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-popup/uni-popup-dialog.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-popup/uni-popup.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-transition/uni-transition.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/guide.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/companyLogin.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/loginType.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/use/use.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/certificateList/certificateList.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/orderList/orderList.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/orderList/orderdetails/orderdetails.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/subscribe/subscribe.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/usercenter/usercenter.js.map


+ 1 - 0
unpackage/dist/dev/mp-weixin/app.json

@@ -9,6 +9,7 @@
     "pages/use/use",
     "pages/usercenter/usercenter",
     "pages/usercenter/certificateList/certificateList",
+    "pages/usercenter/certificateList/certificate/certificate",
     "pages/usercenter/orderList/orderList",
     "pages/usercenter/orderList/orderdetails/orderdetails",
     "pages/usercenter/subscribe/subscribe",

File diff suppressed because it is too large
+ 2059 - 2060
unpackage/dist/dev/mp-weixin/common/vendor.js


File diff suppressed because it is too large
+ 15 - 15
unpackage/dist/dev/mp-weixin/components/mescroll-uni/components/mescroll-empty.js


File diff suppressed because it is too large
+ 14 - 14
unpackage/dist/dev/mp-weixin/components/mescroll-uni/components/mescroll-top.js


File diff suppressed because it is too large
+ 22 - 22
unpackage/dist/dev/mp-weixin/components/mescroll-uni/mescroll-body.js


File diff suppressed because it is too large
+ 14 - 14
unpackage/dist/dev/mp-weixin/components/uni-popup/uni-popup-dialog.js


File diff suppressed because it is too large
+ 16 - 16
unpackage/dist/dev/mp-weixin/components/uni-popup/uni-popup.js


File diff suppressed because it is too large
+ 14 - 14
unpackage/dist/dev/mp-weixin/components/uni-transition/uni-transition.js


File diff suppressed because it is too large
+ 16 - 16
unpackage/dist/dev/mp-weixin/pages/index/guide.js


File diff suppressed because it is too large
+ 35 - 20
unpackage/dist/dev/mp-weixin/pages/index/index.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


File diff suppressed because it is too large
+ 16 - 16
unpackage/dist/dev/mp-weixin/pages/login/companyLogin.js


File diff suppressed because it is too large
+ 17 - 17
unpackage/dist/dev/mp-weixin/pages/login/loginType.js


File diff suppressed because it is too large
+ 21 - 16
unpackage/dist/dev/mp-weixin/pages/use/use.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/use/use.wxml


File diff suppressed because it is too large
+ 36 - 33
unpackage/dist/dev/mp-weixin/pages/usercenter/certificateList/certificateList.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/usercenter/certificateList/certificateList.wxml


File diff suppressed because it is too large
+ 21 - 23
unpackage/dist/dev/mp-weixin/pages/usercenter/orderList/orderList.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/usercenter/orderList/orderList.wxml


File diff suppressed because it is too large
+ 42 - 46
unpackage/dist/dev/mp-weixin/pages/usercenter/orderList/orderdetails/orderdetails.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/usercenter/orderList/orderdetails/orderdetails.wxml


File diff suppressed because it is too large
+ 25 - 21
unpackage/dist/dev/mp-weixin/pages/usercenter/subscribe/subscribe.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/usercenter/subscribe/subscribe.wxml


+ 6 - 1
unpackage/dist/dev/mp-weixin/pages/usercenter/subscribe/subscribe.wxss

@@ -2,6 +2,11 @@ page{background-color: #F5F5F8;}
 .subscribe{margin: 24rpx;}
 .subscribe-item{display: -webkit-box;display: -webkit-flex;display: flex;-webkit-box-align: center;-webkit-align-items: center;align-items: center;background-color: #fff;padding: 24rpx 24rpx 29rpx;margin-bottom: 24rpx;-webkit-border-radius: 16rpx;border-radius: 16rpx;}
 .subscribe-item-info{-webkit-box-flex: 1;-webkit-flex: 1;flex: 1;}
-.subscribe-item-info .time{margin-bottom: 17rpx;font-size: 26rpx;color: #666;line-height: 30rpx;}
+.subscribe-item-info .time{font-size: 26rpx;color: #666;line-height: 30rpx;}
 .subscribe-item-info .carbon{font-size: 30rpx;color: #000;font-weight: 400;}
+.subscribe-item-info .carbon .num {font-size: 40rpx;margin: 2rpx;}
+.subscribe-item-info .carbon{font-size: 24rpx;}
+.subscribe-item-status{font-size: 34rpx;color: #FFDA00;margin-right: 34rpx;}
+.subscribe-item-status .done{color: #26D18B;}
+.subscribe-item-icon .iconfont{color: #ccc;}
 

File diff suppressed because it is too large
+ 30 - 23
unpackage/dist/dev/mp-weixin/pages/usercenter/usercenter.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/usercenter/usercenter.wxml


+ 0 - 179
wxapi.js

@@ -1,179 +0,0 @@
-//引入微信jssdk
-const wx = require('@/js_sdk/jweixin-1.4.0.js')
-
-//配置注册url
-const url = '/app/getJsapiTicket';
-
-//http方法
-import Request from '@/js_sdk/luch-request/luch-request/index.js';
-const $http = new Request();
-
-//系统域名url
-// encodeURIComponent
-const href = location.href.split('#')[0];
-// const href = location.href.split("?")[0];
-// console.log('href',href);
-
-
-let token = uni.getStorageSync("token");
-
-import { config } from './config/config';
-
-//系统域名url
-export default {
-	...wx,
-	isOk: false,
-	async config() {
-		wx.config({
-			debug: false,
-			jsApiList: [
-				"updateAppMessageShareData",
-				"updateTimelineShareData",
-				"onMenuShareTimeline",
-				"onMenuShareAppMessage",
-				"onMenuShareQQ",
-				"onMenuShareWeibo",
-				"onMenuShareQZone",
-				"startRecord",
-				"stopRecord",
-				"onVoiceRecordEnd",
-				"playVoice",
-				"pauseVoice",
-				"stopVoice",
-				"onVoicePlayEnd",
-				"uploadVoice",
-				"downloadVoice",
-				"chooseImage",
-				"previewImage",
-				"uploadImage",
-				"downloadImage",
-				"translateVoice",
-				"getNetworkType",
-				"openLocation",
-				"getLocation",
-				"hideOptionMenu",
-				"showOptionMenu",
-				"hideMenuItems",
-				"showMenuItems",
-				"hideAllNonBaseMenuItem",
-				"showAllNonBaseMenuItem",
-				"closeWindow",
-				"scanQRCode",
-				"chooseWXPay",
-				"openProductSpecificView",
-				"addCard",
-				"chooseCard",
-				"openCard",
-			],
-			...(await $http.get(config.apiBaseurl + url, {
-				params: {url: href},
-				header:{Accept:'application/json',
-				Authorization: 'Bearer '+ token},
-				dataType: 'json'})
-				).data.data,
-		});
-		wx.ready(e => {
-			this.isOk = true;
-			this.hideMenu();
-		});
-		wx.error(e => {
-			console.log("失败",e.errMsg);
-			this.isOk = false;
-		});
-	},
-	hideMenu() {
-		wx.hideAllNonBaseMenuItem();
-		wx.hideMenuItems({		
-		    menuList: [
-				"menuItem:share:appMessage",
-				"menuItem:profile",
-				"menuItem:addContact",
-				"menuItem:dayMode",
-				"menuItem:nightMode",
-				"menuItem:share:timeline",
-				"menuItem:favorite"				
-			] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3		
-		});
-	},
-	showMenu() {
-		wx.showMenuItems({
-			menuList: [
-				"menuItem:share:appMessage",
-				"menuItem:profile",
-				"menuItem:addContact",
-				"menuItem:dayMode",
-				"menuItem:nightMode",
-				"menuItem:share:timeline",
-				"menuItem:favorite"
-			] // 要显示的菜单项,所有menu项见附录3
-		});
-	},
-	/**
-	 * 分享配置
-	 * @param {Object} info
-	 */
-	share(data = {}, info = {}) {
-		//添加链接时间戳
-		// data.v = new Date().getTime();
-		// console.log("shareData",data)
-		// let search = [];
-		// for (const [key, value] of Object.entries(data)) {
-		// 	// search.push(`${key}=${encodeURIComponent(value)}`);
-		// 	search.push(`${key}=${value}`);
-		// }
-		// search = "?" + search.join("&");
-		
-		let afterEndUrl = config.afterEndUrl;
-		// let afterEndUrl = 'http://tanhui.hongweisoft.com/api/wechat/h5/authorize?returnUrl='
-		// let afterEndUrl = 'http://gzhjt.gzsdzth.com/api/wechat/h5/authorize?returnUrl='
-		
-		let fullUrl = afterEndUrl + location.href.split('?')[0] + '?togetherId=' + data.togetherId + '/#/' + data.routeUrl
-		const shareInfo = {
-			title: data.nickname + '邀请你参与贵州省单株碳汇精准扶贫',
-			link: fullUrl,
-			desc: "购碳扶贫,你我同行",
-			imgUrl: href + "/static/logo.png",
-			trigger(res) {},
-			success(res) {},
-			cancel(res) {},
-			fail(res) {},
-			...info
-		};
-		console.log('shareInfo',shareInfo,'fullUrl',fullUrl)
-		//自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
-		wx.updateAppMessageShareData(shareInfo);
-		//自定义“分享到朋友圈”及“分享到QQ空间”按钮的分享内容(1.4.0)
-		wx.updateTimelineShareData(shareInfo);
-	},
-	//拉起微信浏览器端支付
-	JSAPI(res) {
-		return new Promise(r => {
-			wx.chooseWXPay({
-				"appId": res.appId,
-				"timestamp": res.timeStamp, //时间戳,自1970年以来的秒数     
-				"nonceStr": res.nonceStr, //随机串     
-				"package": res.packageValue,
-				"signType": res.signType, //微信签名方式:
-				"paySign": res.paySign, //微信签名 
-				success() {
-					r({
-						code: 0,
-						msg: "成功"
-					});
-				},
-				cancel() {
-					r({
-						code: 1,
-						msg: "取消"
-					});
-				},
-				fail() {
-					r({
-						code: 2,
-						msg: "失败"
-					});
-				}
-			});
-		});
-	},
-}