<li class="treeview" ng-model="agriForm" ng-show="agriForm.show.true">
<a href="#">
<i class="fa fa-folder"></i>
<span>农事填报</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li id="typyId">
<a href="type_manage.html" target="iframe" ><!--ng-show="type.show"-->
<i class="fa fa-circle-o"></i> 种类维护
</a>
</li>
<li id="varietiesId">
<a href="varieties_manage.html" target="iframe" ><!--ng-show="varieties.show"-->
<i class="fa fa-circle-o"></i> 品种信息
</a>
</li>
<li id="adminId">
<a href="main_manage.html" target="iframe" ><!--ng-show="main.show"-->
<i class="fa fa-circle-o"></i> 产收成录入
</a>
</li>
</ul>
</li>
$scope.userInfo={};
$scope.login=function (username,password,check) {
if(username && password && check) {
userService.login(username, password,check).success(
function (response) {
if (response.flag) {
$scope.userInfo=response.data;
$scope.name=$scope.userInfo.name;
var roleName = $scope.userInfo.roleName;
if(roleName=='农户'){
location.href = "admin/index2.html";
}
if(roleName=='区管理员'){
location.href = "admin/index3.html";
}
if(roleName=='管理员'){
$scope.agriForm={
show:true
};
location.href = "admin/index.html";
}
} else {
alert(response.errorMsg);
}
}
)
}else{
alert("请输入用户名和密码");
}
}