codecamp

属性

框架有一些自定义的属性可以写在Controller或Controller中的方法上

ActionDescription

可以写在Controller或Controller中的方法上

框架会使用这里定义的名称作为Model名和Action名存在FrameworkModules和FrameworkActions表中

AllRight

可以写在Controller或Controller中的方法上

AllRight标记的Controller或者方法会跳过页面权限验证,只要用户登陆了就可以访问

Public

可以写在Controller或Controller中的方法上

Public标记的Controller或者方法为公开方法,不需要登陆就可以访问

DebugOnly

可以写在Controller或Controller中的方法上

DebugOnly标记的Controller或者方法只有在配置文件中IsQuickDebug为true时才可以访问

FixConnection

可以写在Controller或Controller中的方法上

FixConnection标记的Controller或者方法将使用指定的数据库作为默认DataContext,详情请见数据库分库

ReInit

可以写在Controller或Controller中的方法上

框架默认会在Post回来的VM验证失败时自动调用VM中的ReInitVM()方法,通过标记ReInit可以改变这种默认行为

StringNeedLTGT

可以写在Controller或Controller中的方法上

框架默认会自动过滤表单中<,>这种字符,如果你需要这些字符,比如富文本内容,请在Action上加上这个标记


介绍
介绍
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

控制器

数据层

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }