mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 01:29:26 +08:00
站点分类问题 #300
This commit is contained in:
@@ -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,一个问题。多余问题,视情况而答。
|
||||
```
|
||||
|
||||
## 错误截图 ?
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
Reference in New Issue
Block a user