@using ZoomLa.Model.Extend @using ZoomLa.BLL.Extend @model ZoomLa.Model.Extend.M_AD_Info @{ /* * 1.必须引用boot4 * * */ string id = "carousel_"+Model.ID; DataTable imgDT = new DataTable(); imgDT.Columns.Add(new DataColumn("pic", typeof(string))); // https://www.z01.com/Template/office/style/images/home17_banner2.jpg|https://www.z01.com/Template/office/style/images/190218bg.jpg Model.Images = "https://www.z01.com/Template/office/style/images/home17_banner2.jpg|https://www.z01.com/Template/office/style/images/190218bg.jpg"; //后期改为json格式存储 foreach (string img in Model.Images.Split('|', StringSplitOptions.RemoveEmptyEntries)) { DataRow dr = imgDT.NewRow(); dr["pic"] = img; imgDT.Rows.Add(dr); } } @if (imgDT.Rows.Count < 1) {