Closed Aiome closed 1 year ago
sidArr数据 ["213456653","213456650","213456652","213456649","213456648","213456651","213441245","213441246","213441244","212971114","212971113","212971100"] stateArr数据 ["01","01","01","01","01","01","02","02","02","02","02","02"] sidArr与stateArr 数据一一对应
诉求
{% for sid in sidArr %} {% if stateArr[当前循环下标] == "01" %} 发送请求 {% endif %} {% endfor %} jinja语法可以通过loop.index拿到下标,但是咱这框架不支持,我这种诉求可以通过什么样的方式来满足?
{% for sid in sidArr %}
{% if stateArr[当前循环下标] == "01" %}
发送请求
{% endif %}
{% endfor %}
如上
No response
Feat 86b04cec293f14c8860bcc803e3712dee1f911b3
是否支持for 循环嵌套,或者说,我有三个一一对应的数组,如何循环提交包含多个变量的请求
支持for循环嵌套
Verify steps
Describe the Feature
sidArr数据 ["213456653","213456650","213456652","213456649","213456648","213456651","213441245","213441246","213441244","212971114","212971113","212971100"] stateArr数据 ["01","01","01","01","01","01","02","02","02","02","02","02"] sidArr与stateArr 数据一一对应
诉求
{% for sid in sidArr %}
{% if stateArr[当前循环下标] == "01" %}
发送请求
{% endif %}
{% endfor %}
jinja语法可以通过loop.index拿到下标,但是咱这框架不支持,我这种诉求可以通过什么样的方式来满足?Describe the solution
如上
Describe alternatives
No response
Additional context
No response