ValueError: invalid literal for int() with base 10: 'undefined'
来源:11-2 小程序美食列表和 上拉刷新分页
慕神5332881
2020-05-21
File “D:\imooc\order\web\controllers\api\Food.py”, line 55, in foodSearch
def foodSearch():
resp = {‘code’: 200, ‘msg’: ‘操作成功~’, ‘data’: {}}
req = request.values
cat_id = int( req[‘cat_id’] ) if ‘cat_id’ in req else 0
mix_kw = str(req[‘mix_kw’]) if ‘mix_kw’ in req else ''
p = int(req[‘p’]) if ‘p’ in req else 1
if p < 1:
p = 1
page_size = 10
ValueError: invalid literal for int() with base 10: ‘undefined’
写回答
1回答
-
慕神5332881
提问者
2020-05-21
老师好,我已经解决了,但是我又遇到了新的问题,就是分类栏点击无效,他既不切换也不高亮
00
相似问题