master
			
			
		
		
							parent
							
								
									35e359caef
								
							
						
					
					
						commit
						7b12aef6c2
					
				|  | @ -2,11 +2,7 @@ var host = "https://carbonneutral.bjfs.org.cn";//线上 | ||||||
| // var host = "https://carbon.my-footprint.cn";//线上域名2
 | // var host = "https://carbon.my-footprint.cn";//线上域名2
 | ||||||
| 
 | 
 | ||||||
| // var host = "https://tanzhonghe-admin.com";//本地
 | // var host = "https://tanzhonghe-admin.com";//本地
 | ||||||
| <<<<<<< HEAD | 
 | ||||||
| // var host = "https://carbon.scdxtc.cn";//大向天诚服务器
 |  | ||||||
| ======= |  | ||||||
| // var host = "http://carbon.scdxtc.cn";//大向天诚服务器
 |  | ||||||
| >>>>>>> 7aeb254a85a161e4f3eef68e01a6674b00a20fb1 |  | ||||||
| var config = { | var config = { | ||||||
| 	host: host, | 	host: host, | ||||||
| 	appkey: '8c10f27733333fef726885b08ff9d858',//appkey 碳中和Y
 | 	appkey: '8c10f27733333fef726885b08ff9d858',//appkey 碳中和Y
 | ||||||
|  |  | ||||||
|  | @ -60,11 +60,11 @@ Page({ | ||||||
| 	casesChange(event) { | 	casesChange(event) { | ||||||
| 		if(this.data.threeList[event.detail.value].type=='forest_management'){ | 		if(this.data.threeList[event.detail.value].type=='forest_management'){ | ||||||
| 			this.setData({ | 			this.setData({ | ||||||
| 				isXiangm:true | 				isXiangm:true, | ||||||
| 			}) | 			}) | ||||||
| 		} else { | 		} else { | ||||||
| 			this.setData({ | 			this.setData({ | ||||||
| 				isXiangm:false | 				isXiangm:false, | ||||||
| 			}) | 			}) | ||||||
| 		} | 		} | ||||||
| 		this.setData({ | 		this.setData({ | ||||||
|  | @ -79,6 +79,11 @@ Page({ | ||||||
| 			carbon_neutralization: 0, | 			carbon_neutralization: 0, | ||||||
| 			carbon_efficiency: "0.00", | 			carbon_efficiency: "0.00", | ||||||
| 		}) | 		}) | ||||||
|  | 		if(this.data.senList[event.detail.value].name=='补植补造'){ | ||||||
|  | 			this.setData({ | ||||||
|  | 				newDo_type:'afforestation', | ||||||
|  | 			}) | ||||||
|  | 		} | ||||||
| 		if (event.detail.value == 1) { | 		if (event.detail.value == 1) { | ||||||
| 			this.setData({ | 			this.setData({ | ||||||
| 				newDo_type: this.data.senList[this.data.senIndex].type, | 				newDo_type: this.data.senList[this.data.senIndex].type, | ||||||
|  | @ -86,7 +91,7 @@ Page({ | ||||||
| 			}) | 			}) | ||||||
| 		} else { | 		} else { | ||||||
| 			this.setData({ | 			this.setData({ | ||||||
| 				newDo_type: this.data.threeList[this.data.curCaseIndex].type, | 				newDo_type: this.data.senList[this.data.curCaseIndex].type, | ||||||
| 				cases_position_id:this.data.threeList[this.data.curCaseIndex].address[0].id | 				cases_position_id:this.data.threeList[this.data.curCaseIndex].address[0].id | ||||||
| 			}) | 			}) | ||||||
| 		} | 		} | ||||||
|  | @ -167,6 +172,7 @@ Page({ | ||||||
| 		}) | 		}) | ||||||
| 	}, | 	}, | ||||||
| 	setMoney: function(e) { | 	setMoney: function(e) { | ||||||
|  | 		console.log('e',e); | ||||||
| 		//数量= 排放量 / 植物的碳汇量基数
 | 		//数量= 排放量 / 植物的碳汇量基数
 | ||||||
| 		// ,价格 = 每棵树价格 * 数量
 | 		// ,价格 = 每棵树价格 * 数量
 | ||||||
| 		var that = this | 		var that = this | ||||||
|  | @ -278,7 +284,8 @@ Page({ | ||||||
| 					that.setData({ | 					that.setData({ | ||||||
| 						threeList: threeList, | 						threeList: threeList, | ||||||
| 						newDo_type: threeList[that.data.curCaseIndex].type, | 						newDo_type: threeList[that.data.curCaseIndex].type, | ||||||
| 						cases_position_id: threeList[that.data.curCaseIndex].address[that.data.addressIndex].id | 						cases_position_id: threeList[that.data.curCaseIndex].address[that.data.addressIndex].id, | ||||||
|  | 						newDo_type:that.data.senList[0].type, | ||||||
| 						//TODO 这里赋值应该用数组
 | 						//TODO 这里赋值应该用数组
 | ||||||
| 						// curThreeCode: [JSON.parse(res.data.data).trees[0].coding],
 | 						// curThreeCode: [JSON.parse(res.data.data).trees[0].coding],
 | ||||||
| 						// carbon:JSON.parse(res.data.data).trees[0].carbon_base,
 | 						// carbon:JSON.parse(res.data.data).trees[0].carbon_base,
 | ||||||
|  | @ -329,6 +336,7 @@ Page({ | ||||||
| 		var that = this | 		var that = this | ||||||
| 		var tree_items = [] | 		var tree_items = [] | ||||||
| 		var management_items = [] | 		var management_items = [] | ||||||
|  | 		console.log(this.data.newDo_type); | ||||||
| 		if (this.data.newDo_type == 'afforestation') { | 		if (this.data.newDo_type == 'afforestation') { | ||||||
| 			for (var p in this.data.priceList) { | 			for (var p in this.data.priceList) { | ||||||
| 				tree_items.push({ | 				tree_items.push({ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue