第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

下面的代碼如何優(yōu)化一下

下面的代碼如何優(yōu)化一下

?var?moduleModel?=?new?Bb.Model({}); ????????????????????????var?data1?=?_.find(m.get('data'),?function(d)?{ ????????????????????????????return?d.elementCode?==?'usagetype' ????????????????????????}); ????????????????????????var?data2?=?_.find(m.get('data'),?function(d)?{ ????????????????????????????return?d.elementCode?==?'policystatus' ????????????????????????}); ????????????????????????var?data3?=?_.find(m.get('data'),?function(d)?{ ????????????????????????????return?d.elementCode?==?'riskname' ????????????????????????}); ????????????????????????var?data4?=?_.find(m.get('data'),?function(d)?{ ????????????????????????????return?d.elementCode?==?'businessnature' ????????????????????????}); ????????????????????????var?data5?=?_.find(m.get('data'),?function(d)?{ ????????????????????????????return?d.elementCode?==?'chnltype' ????????????????????????}); ????????????????????????var?data6?=?_.find(m.get('data'),?function(d)?{ ????????????????????????????return?d.elementCode?==?'paymethod' ????????????????????????}); ????????????????????????var?data7?=?_.find(m.get('data'),?function(d)?{ ????????????????????????????return?d.elementCode?==?'traveltaxmark' ????????????????????????}); ????????????????????????if?(data1.dataList?&&?data2.dataList?&&?data3.dataList?&&?data4.dataList?&&?data5.dataList?&&?data6.dataList?&&?data7.dataList)?{ ????????????????????????????moduleModel.set('usagetype',?data1.dataList); ????????????????????????????moduleModel.set('policystatus',?data2.dataList); ????????????????????????????moduleModel.set('riskname',?data3.dataList); ????????????????????????????moduleModel.set('businessnature',?data4.dataList); ????????????????????????????moduleModel.set('chnltype',?data5.dataList); ????????????????????????????moduleModel.set('paymethod',?data6.dataList); ????????????????????????????moduleModel.set('traveltaxmark',?data7.dataList); ????????????????????????????that.showChildView('policystatus',?new?policystatusView({ ????????????????????????????????model:?moduleModel, ????????????????????????????????el:?that.getUI('policystatus') ????????????????????????????})); ????????????????????????????that.getChildView('policystatus').render(); ????????????????????????????that.showChildView('businessnature',?new?businessnatureView({ ????????????????????????????????model:?moduleModel, ????????????????????????????????el:?that.getUI('businessnature') ????????????????????????????})); ????????????????????????????that.getChildView('businessnature').render(); ????????????????????????????that.showChildView('chnltype',?new?chnltypeView({ ????????????????????????????????model:?moduleModel, ????????????????????????????????el:?that.getUI('chnltype') ????????????????????????????})); ????????????????????????????that.getChildView('chnltype').render(); ????????????????????????????that.showChildView('traveltaxmark',?new?traveltaxmarkView({ ????????????????????????????????model:?moduleModel, ????????????????????????????????el:?that.getUI('traveltaxmark') ????????????????????????????})); ????????????????????????????that.getChildView('traveltaxmark').render(); ????????????????????????????that.showChildView('paymethod',?new?paymethodView({ ????????????????????????????????model:?moduleModel, ????????????????????????????????el:?that.getUI('paymethod') ????????????????????????????})); ????????????????????????????that.getChildView('paymethod').render(); ????????????????????????????that.showChildView('usagetype',?new?usagetypeView({ ????????????????????????????????model:?moduleModel, ????????????????????????????????el:?that.getUI('usagetype') ????????????????????????????})); ????????????????????????????that.getChildView('usagetype').render(); ????????????????????????????that.showChildView('riskname',?new?risknameView({ ????????????????????????????????model:?moduleModel, ????????????????????????????????el:?that.getUI('riskname') ????????????????????????????})); ????????????????????????????that.getChildView('riskname').render(); ????????????????????????}?else?{ ????????????????????????????layer.alert('查詢(xún)失?。?); ????????????????????????????return?false; ????????????????????????} ????????????????????}, ????????????????????error:?function(e)?{ ????????????????????????layer.close(idx); ????????????????????????if?(e.responseText?===?'logout')?{ ????????????????????????????window.location.href?=?'/login.html'; ????????????????????????} ????????????????????????layer.alert('請(qǐng)求失??!'); ????????????????????}
查看完整描述

1 回答

已采納
?
習(xí)慣受傷

TA貢獻(xiàn)885條經(jīng)驗(yàn) 獲得超1144個(gè)贊

用循環(huán)搞定,你看重復(fù)的語(yǔ)句很多的。現(xiàn)在在手機(jī)上,完了有時(shí)間上電腦給你代碼

查看完整回答
2 反對(duì) 回復(fù) 2017-11-08
  • 1 回答
  • 0 關(guān)注
  • 1293 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)