|
|
|
@ -60,11 +60,11 @@ Page({
|
|
|
|
|
casesChange(event) {
|
|
|
|
|
if(this.data.threeList[event.detail.value].type=='forest_management'){
|
|
|
|
|
this.setData({
|
|
|
|
|
isXiangm:true
|
|
|
|
|
isXiangm:true,
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setData({
|
|
|
|
|
isXiangm:false
|
|
|
|
|
isXiangm:false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.setData({
|
|
|
|
@ -79,6 +79,11 @@ Page({
|
|
|
|
|
carbon_neutralization: 0,
|
|
|
|
|
carbon_efficiency: "0.00",
|
|
|
|
|
})
|
|
|
|
|
if(this.data.senList[event.detail.value].name=='补植补造'){
|
|
|
|
|
this.setData({
|
|
|
|
|
newDo_type:'afforestation',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (event.detail.value == 1) {
|
|
|
|
|
this.setData({
|
|
|
|
|
newDo_type: this.data.senList[this.data.senIndex].type,
|
|
|
|
@ -86,7 +91,7 @@ Page({
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -167,6 +172,7 @@ Page({
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
setMoney: function(e) {
|
|
|
|
|
console.log('e',e);
|
|
|
|
|
//数量= 排放量 / 植物的碳汇量基数
|
|
|
|
|
// ,价格 = 每棵树价格 * 数量
|
|
|
|
|
var that = this
|
|
|
|
@ -278,7 +284,8 @@ Page({
|
|
|
|
|
that.setData({
|
|
|
|
|
threeList: threeList,
|
|
|
|
|
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 这里赋值应该用数组
|
|
|
|
|
// curThreeCode: [JSON.parse(res.data.data).trees[0].coding],
|
|
|
|
|
// carbon:JSON.parse(res.data.data).trees[0].carbon_base,
|
|
|
|
@ -329,6 +336,7 @@ Page({
|
|
|
|
|
var that = this
|
|
|
|
|
var tree_items = []
|
|
|
|
|
var management_items = []
|
|
|
|
|
console.log(this.data.newDo_type);
|
|
|
|
|
if (this.data.newDo_type == 'afforestation') {
|
|
|
|
|
for (var p in this.data.priceList) {
|
|
|
|
|
tree_items.push({
|
|
|
|
|