We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//登录 $http.post('/api/v1.0/sessions', {username: username, password: password, rememberMe: rememberMe}, (rep)-> data.ferror = false data.loading = false #返回的user数据 $state.user = rep try localStorage.setItem('username', username) //把菜单权限存到localStorage localStorage.setItem("permissions", stateman.user.permissions) catch e data.password = null component.$update() #跳转 $state.go("app.order"); )
//app模块的菜单数据 菜单组件 <app-menu ref="appMenu" menus={menus} state={@(this.$state)}></app-menu> config: (data)-> data.menus = [ {url: '/', name: '首页', icon: 'home', state: 'app.index'} ] try permissions = localStorage.getItem("permissions") catch e if permissions permissions=permissions.split(",") for permission in permissions switch permission when 'P_ORDER' then data.menus.push({url: '/order', name: '订单', icon: 'table', state: 'app.order'}) when 'P_SALE' then data.menus.push({url: '/sale', name: '销售', icon: 'strikethrough', state: 'app.sale'}) when 'P_FINANCE' then data.menus.push({url: '/finance', name: '财务', icon: 'yen', state: 'app.finance'}) when 'P_SETTING' then data.menus.push({url: '/setting', name: '设置', icon: 'configure', state: 'app.setting'})
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: