提交 639fb64182791c11a29bd0aa25e1dda17eb6f599

作者 wangyu
1 个父辈 2292a2ef

优化

... ... @@ -202,13 +202,6 @@ Page({
202 202 // shareMethodData: shareMethod_Data
203 203 // })
204 204 } else if (that.data.cur_status == "support_duty") {
205   - var issinglechild_Data = this.data.issinglechildData;
206   - issinglechild_Data.disabled = true;
207   - issinglechild_Data.selected = data.is_single == 'y' ? "是" : "否";
208   -
209   - var shareMethod_Data = this.data.shareMethodData;
210   - shareMethod_Data.disabled = true;
211   - shareMethod_Data.selected = data.share_method ? data.share_method : "";
212 205
213 206 var supportlist = newdata[0].support_duties
214 207 if (supportlist && supportlist.length > 0) {
... ... @@ -229,9 +222,21 @@ Page({
229 222 }
230 223 }
231 224 }
232   - if (supportlist.length1 < 1 && supportlist.length<1){
  225 +
  226 + var issinglechild_Data = this.data.issinglechildData;
  227 + var shareMethod_Data = this.data.shareMethodData;
  228 + if (supportlist.length < 1 && cosupportlist.length<1){
233 229 btn_show = true
  230 + issinglechild_Data.disabled = false;
  231 + shareMethod_Data.disabled = false;
  232 + }else{
  233 + issinglechild_Data.disabled = true;
  234 + issinglechild_Data.selected = data.is_single == 'y' ? "是" : "否";
  235 +
  236 + shareMethod_Data.disabled = true;
  237 + shareMethod_Data.selected = data.share_method ? data.share_method : "";
234 238 }
  239 +
235 240 this.setData({
236 241 issinglechildData: issinglechild_Data,
237 242 shareMethodData: shareMethod_Data,
... ...
注册登录 后发表评论