提交 2ca39bd205aeff4227cc78b99a58ca35def58c88

作者 wangyu
1 个父辈 4eae1302

优化

@@ -9,10 +9,10 @@ Page({ @@ -9,10 +9,10 @@ Page({
9 */ 9 */
10 data: { 10 data: {
11 cur_status: "", 11 cur_status: "",
12 - handle_finished: false,  
13 legal_entity_id: "", 12 legal_entity_id: "",
14 legal_entity: "", 13 legal_entity: "",
15 house_type: "", 14 house_type: "",
  15 + btn_show:false,
16 person_total_amount: 0, 16 person_total_amount: 0,
17 remaining_amount: 0, 17 remaining_amount: 0,
18 input_disable: false, 18 input_disable: false,
@@ -179,6 +179,7 @@ Page({ @@ -179,6 +179,7 @@ Page({
179 origindata: data 179 origindata: data
180 }) 180 })
181 if (newdata && newdata.length > 0) { 181 if (newdata && newdata.length > 0) {
  182 + var btn_show = this.data.btn_show
182 if (that.data.cur_status == "continuing_education") { 183 if (that.data.cur_status == "continuing_education") {
183 var professionlist = newdata[0].profession_items 184 var professionlist = newdata[0].profession_items
184 for (var i = 0; i < professionlist.length > 0; i++) { 185 for (var i = 0; i < professionlist.length > 0; i++) {
@@ -195,6 +196,7 @@ Page({ @@ -195,6 +196,7 @@ Page({
195 titlelist[i].education_end = this.formatDate(titlelist[i].education_end).substring(0, 7) 196 titlelist[i].education_end = this.formatDate(titlelist[i].education_end).substring(0, 7)
196 } 197 }
197 } 198 }
  199 + btn_show = true
198 // this.setData({ 200 // this.setData({
199 // issinglechildData: issinglechild_Data, 201 // issinglechildData: issinglechild_Data,
200 // shareMethodData: shareMethod_Data 202 // shareMethodData: shareMethod_Data
@@ -227,6 +229,9 @@ Page({ @@ -227,6 +229,9 @@ Page({
227 } 229 }
228 } 230 }
229 } 231 }
  232 + if (supportlist.length1 < 1 && supportlist.length<1){
  233 + btn_show = true
  234 + }
230 this.setData({ 235 this.setData({
231 issinglechildData: issinglechild_Data, 236 issinglechildData: issinglechild_Data,
232 shareMethodData: shareMethod_Data, 237 shareMethodData: shareMethod_Data,
@@ -302,7 +307,9 @@ Page({ @@ -302,7 +307,9 @@ Page({
302 housetype_new = newdata[0].type == 'loan' ? "house_fund_loan" : "house_fund_rent" 307 housetype_new = newdata[0].type == 'loan' ? "house_fund_loan" : "house_fund_rent"
303 } 308 }
304 console.log("housetype_new", housetype_new) 309 console.log("housetype_new", housetype_new)
305 - 310 + if (housetype_new !="house_fund_loan"){
  311 + btn_show = true
  312 + }
306 this.setData({ 313 this.setData({
307 house_type: housetype_new, 314 house_type: housetype_new,
308 }) 315 })
@@ -311,7 +318,7 @@ Page({ @@ -311,7 +318,7 @@ Page({
311 reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : 0, 318 reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : 0,
312 input_disable: true, 319 input_disable: true,
313 320
314 - handle_finished: true, 321 + btn_show: btn_show,
315 person_total_amount: data.person_total_amount ? data.person_total_amount : 0, 322 person_total_amount: data.person_total_amount ? data.person_total_amount : 0,
316 remaining_amount: data.remaining_amount ? data.remaining_amount : 0, 323 remaining_amount: data.remaining_amount ? data.remaining_amount : 0,
317 additionInfo: newdata 324 additionInfo: newdata
@@ -320,7 +327,7 @@ Page({ @@ -320,7 +327,7 @@ Page({
320 wx.hideLoading() 327 wx.hideLoading()
321 } else { 328 } else {
322 this.setData({ 329 this.setData({
323 - handle_finished: true, 330 + btn_show : true,
324 additionInfo: newdata 331 additionInfo: newdata
325 }) 332 })
326 } 333 }
@@ -381,8 +381,8 @@ @@ -381,8 +381,8 @@
381 </view> 381 </view>
382 </view> 382 </view>
383 383
384 - <view class='bottom_btn_wrap' hidden="{{handle_finished&&additionInfo.length>0&&((cur_status=='support_duty'&&(additionInfo[0].co_supporters.length>0||additionInfo[0].support_duties.length>0))||(cur_status=='house_fund'&&house_type=='house_fund_loan'))}}">  
385 - <!-- <view class='bottom_btn_wrap' wx:if="{{handle_finished&&(additionInfo.length<1||((!additionInfo[0].co_supporters||additionInfo[0].co_supporters.length<1)&&(!additionInfo[0].support_duties||additionInfo[0].support_duties.length<1))||((!additionInfo[0].profession_items||additionInfo[0].profession_items.length<1)&&(!additionInfo[0].title_items||additionInfo[0].title_items.length<1)))}}" > --> 384 + <!-- <view class='bottom_btn_wrap' hidden="{{additionInfo.length>0&&((cur_status=='support_duty'&&(additionInfo[0].co_supporters.length>0||additionInfo[0].support_duties.length>0))||(cur_status=='house_fund'&&house_type=='house_fund_loan'))}}"> -->
  385 + <view class='bottom_btn_wrap' wx:if="{{btn_show}}" >
386 <view class='btn_blue_radius' bindtap="goadd"> 386 <view class='btn_blue_radius' bindtap="goadd">
387 <view class='text_white_34'>添加</view> 387 <view class='text_white_34'>添加</view>
388 </view> 388 </view>
注册登录 后发表评论