站点分类问题 #300

pull/310/head
midoks 2 years ago
parent 6f069c715a
commit f7b688d6bf
  1. 3
      .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md
  2. 12
      class/core/site_api.py
  3. 6
      route/static/app/site.js

@ -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 = '';

Loading…
Cancel
Save