[stability]Update main.js
[Detailed commit message (if have)]
add loop control
Impacted TCs num(approved):New 0,Update 1
UT result: Pass 1,Fail 0, Block 0
Merge pull request #1210 from linshen/shenlin/update-loop

[stability]Update main.js