1.目录 homework add.html online.html offline.html res script action homework add.js 2.add.html
3.add.js bingo.action('homework/add', function ($view, $var, $model, homeworkSrv, commonSrv) { console.log('homework/add', homeworkSrv); $view.defaultUrl = ''; var urlArr = ['view/homework/online','view/homework/offline']; for(i in urlArr){ if(location.href.indexOf(urlArr[i])>=0){ // $('.b li').eq(i).find('a').trigger('click'); $view.defaultUrl = urlArr[i]; // if(i!=0) $('body').animate({'scrollTop':$('.wrap-content').offset().top},1000); break; }; }; if(!$view.defaultUrl) $view.defaultUrl=urlArr[0]; $view.$update(); });