新增加msg弹出框支持

This commit is contained in:
zhaoxiang 2016-11-04 18:19:56 +08:00
parent 7d1c0523b2
commit 92bea2a0d4
6 changed files with 81 additions and 19 deletions

View File

@ -17,7 +17,7 @@ class User extends Base {
$username = $request->post('username');
$password = $request->post('password');
if( !$username || !$password ){
$this->error();
$this->error('缺少关键数据!');
}
if( $request->post('name') ){

View File

@ -3,4 +3,7 @@
{/block}
{block name="myScript"}
<script>
$.AdminTemplate.alertMsg();
</script>
{/block}

View File

@ -586,6 +586,8 @@
<script src="__STATIC__/bootstrap/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="__ADMIN__/plugins/fastclick/fastclick.js"></script>
<!-- BootBox -->
<script src="__ADMIN__/plugins/bootBox/bootbox.min.js"></script>
<!-- AdminLTE App -->
<script src="__ADMIN__/dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->

View File

@ -8,4 +8,42 @@ return [
'API_USER_CODE' => 'api/user/code',
'API_USER_REGISTER' => 'api/user/register',
'API_USER_CHANGE_PWD' => 'api/user/changepwd',
'PROVINCE' => [
'',
'北京',
'天津',
'河北省',
'山西省',
'内蒙古自治区',
'辽宁省',
'吉林省',
'黑龙江省',
'上海',
'江苏省',
'浙江省',
'安徽省',
'福建省',
'江西省',
'山东省',
'河南省',
'湖北省',
'湖南省',
'广东省',
'广西壮族自治区',
'海南省',
'重庆',
'四川省',
'贵州省',
'云南省',
'西藏自治区',
'陕西省',
'甘肃省',
'青海省',
'宁夏回族自治区',
'新疆维吾尔自治区',
'台湾省',
'香港特别行政区',
'澳门特别行政区'
]
];

View File

@ -30,44 +30,57 @@ var formatDate = function ( timestamp ) {
};
function emptyList() {
var emptyList = function() {
}
};
function easyList( listObj ) {
var easyList = function( listObj ) {
}
};
function topButton( topObj ) {
var topButton = function( topObj ) {
}
};
function rightButton( rightObj ) {
var rightButton = function( rightObj ) {
}
};
function easyForm( formObj ) {
var easyForm = function( formObj ) {
}
};
function input( inputObj ) {
var input = function( inputObj ) {
}
};
function select( selectObj ) {
var select = function( selectObj ) {
}
};
function button( buttonObj ) {
var button = function( buttonObj ) {
}
};
function breadcrumb( ) {
/**
* 面包屑
*/
var breadcrumb = function( ) {
}
};
AdminTemplate.a = function () {
};
AdminTemplate.alertMsg = function( msg ){
var dialog = bootbox.dialog({
message: '<p class="text-center">'+msg+'</p>',
closeButton: false
});
setTimeout(function(){
dialog.modal('hide');
}, 3000);
}
})(jQuery, $.AdminTemplate);

File diff suppressed because one or more lines are too long