diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md index 30ab509c4..992c716dc 100644 --- a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md +++ b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md @@ -11,8 +11,7 @@ Debian x, Centos x, Centos x stream, Ubuntu x? Ex: ```bash -................start mw success -bash: line 149: ./scripts/init.d/mw: No such file or directory +一个issue,一个问题。多余问题,视情况而答。 ``` ## 错误截图 ? diff --git a/class/core/site_api.py b/class/core/site_api.py index 60930b94e..c59d96cd2 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -76,16 +76,16 @@ class site_api: def listApi(self): limit = request.form.get('limit', '10') p = request.form.get('p', '1') - type_id = request.form.get('type_id', '') + type_id = request.form.get('type_id', '0').strip() start = (int(p) - 1) * (int(limit)) - siteM = mw.M('sites') - if type_id != '' and type_id == '-1' and type_id == '0': - siteM.where('type_id=?', (type_id)) + siteM = mw.M('sites').field('id,name,path,status,ps,addtime,edate') + if type_id != '' and int(type_id) >= 0: + siteM.where('type_id=?', (type_id,)) - _list = siteM.field('id,name,path,status,ps,addtime,edate').limit( - (str(start)) + ',' + limit).order('id desc').select() + _list = siteM.limit((str(start)) + ',' + + limit).order('id desc').select() for i in range(len(_list)): _list[i]['backup_count'] = mw.M('backup').where( diff --git a/route/static/app/site.js b/route/static/app/site.js index ed0218520..3e0fe671b 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -15,7 +15,7 @@ var type = ''; if ( typeof(type_id) == 'undefined' ){ - type = '&type_id=0'; + type = '&type_id=-1'; } else { type = '&type_id='+type_id; } @@ -2538,7 +2538,6 @@ function changeDefault(type){ },'json'); } - function getClassType(){ var select = $('.site_type > select'); $.post('/site/get_site_types',function(rdata){ @@ -2557,9 +2556,6 @@ function getClassType(){ } getClassType(); - - - function setClassType(){ $.post('/site/get_site_types',function(rdata){ var list = '';