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

[Feature] 如何取数组下标 #364

Closed Aiome closed 1 year ago

Aiome commented 1 year ago

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 数据一一对应

image

诉求

{% for sid in sidArr %} {% if stateArr[当前循环下标] == "01" %} 发送请求 {% endif %} {% endfor %} jinja语法可以通过loop.index拿到下标,但是咱这框架不支持,我这种诉求可以通过什么样的方式来满足?

Describe the solution

如上

Describe alternatives

No response

Additional context

No response

a76yyyy commented 1 year ago

Feat 86b04cec293f14c8860bcc803e3712dee1f911b3

jyz0501 commented 10 months ago

是否支持for 循环嵌套,或者说,我有三个一一对应的数组,如何循环提交包含多个变量的请求

a76yyyy commented 10 months ago

是否支持for 循环嵌套,或者说,我有三个一一对应的数组,如何循环提交包含多个变量的请求

支持for循环嵌套