大家过来看看我怎么遍历不了轮播图

先上代码:
function getHomeBanner() {
console.log(Base_JS.base_url);
api.ajax({
url: Base_JS.base_url + “home/getCiCarouselPicture”,
method: ‘post’,
headers: {
‘Content-Type’: ‘application/json;charset=utf-8’
},
data: {
body: {
carouselId:""
}
}
}, function(ret, err) {
console.log(JSON.stringify( ret ));
var divStr="";
if (ret.code == ‘200’) {
for (var i = 0; i < ret.data.length; i++) {
divStr = "

"
+ " " +

             console.log(divStr);
          // var divObj =
     var bannerDom = document.getElementById("bannerDiv");
     bannerDom.innerHTML = divStr;
        }
        console.log(bannerDom);
      } else {
    }
});

}

我返回的结果:
{“code”:“200”,“data”:[{“carouselId”:“1”,“picUrl”:“http://resources-app.oss-cn-beijing.aliyuncs.com/sand_pottery/png/2018112815043168734TIM截图20181114214350.png",“isHref”:1,“storeId”:“01”,“unitId”:“1”,“sort”:1,“createTime”:null,“updateTime”:null,“carouselCategoryId”:“1”},{“carouselId”:“1”,“picUrl”:“http://resources-app.oss-cn-beijing.aliyuncs.com/sand_pottery/png/2018112915375008658TIM截图20181114214421.png”,“isHref”:1,“storeId”:“01”,“unitId”:“1”,“sort”:1,“createTime”:"2018-12-06 10:05:18.0”,“updateTime”:null,“carouselCategoryId”:“1”}],“msg”:“success”} at main.js : 24

大家过来看看我怎么遍历不了轮播图_第1张图片
at main.js : 32
大家过来看看我怎么遍历不了轮播图_第2张图片
at main.js : 32 [object HTMLDivElement] at main.js : 39

但是我的轮播,他只打印一张图片出来

你可能感兴趣的:(大家过来看看我怎么遍历不了轮播图)