qd-today / qd

QD [v20240210] —— HTTP请求定时任务自动执行框架 base on HAR Editor and Tornado Server
https://qd-today.github.io/qd/
MIT License
4.46k stars 577 forks source link

[Bug] if 判断的条件数字在两位及以上时会只取首位数字进行判断 #368

Closed NineHolic closed 1 year ago

NineHolic commented 1 year ago

Verify steps

QianDao Version

20230111

Bug on OS

Linux

Bug on Platform

Docker/Linux 64位

To Reproduce

例:添加控制语句 if 判断 {% if num > "56" %} api://util/unicode?content=success {% else %} api://util/unicode?content=failed {% endif %} 当 num = 3 时,页面输出 failed; --判断正确 当 num = 8 时,页面输出 success; --判断错误 当 num = 120 时,页面输出 failed. --判断错误

Describe the Bug

if 判断的条件数字在两位及以上时会只取首位数字进行判断

QianDao config

No response

QianDao log

无需日志

Expected behavior

if 判断逻辑正确

Screenshots

No response

a76yyyy commented 1 year ago

{% if num > "56" %}

字符串判断规则本来就是这样,

使用这个

{% if int(num) > 56 %}

NineHolic commented 1 year ago

ok