wangkailang 最近的时间轴更新
wangkailang

wangkailang

V2EX 第 130878 号会员,加入于 2015-08-05 16:28:30 +08:00
wangkailang 最近回复了
2015-08-06 12:02:31 +08:00
回复了 xiaobetty 创建的主题 推广 晒出你最蠢的一段代码,送 Cherry 鼠标垫
取数据遇到7层循环的尴尬(ajax,vuejs)
qwest.get(url).then(processRequest(function(data) {
self.mountain_dropdown.options = data.map(function(mountain) {
mountain.text = mountain.name;
mountain.value = mountain.id;

self.season_dropdown.options = mountain.seasonList.map(function(season){
season.text = season.name;
season.value = season.id;

self.position_dropdown.options = season.positionList.map(function(position){
position.text = position.name;
position.value = position.id;

self.craft_dropdown.options = position.craftList.map(function(craft){
craft.text = craft.name;
craft.value = craft.id;

self.maker_dropdown.options = craft.makerList.map(function(maker){
maker.text = maker.name;
maker.value = maker.id;

self.step1Len = maker.processList.length;

self.dropdown_options = maker.processList.map(function(process){
process.text = process.ratio;
process.value = process.id;

return process;
});

return maker;
});

return craft;
});

return position;
});

return season;
});
return mountain;
});
for(var i=0;i<self.step1Len;i++){
self.step1.push({list:false});
}
}));
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2682 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 15:47 · PVG 23:47 · LAX 07:47 · JFK 10:47
Developed with CodeLauncher
♥ Do have faith in what you're doing.