| @@ -90,8 +90,23 @@ define(['jquery', "template", "Tools", "newApi", 'swiper'], function ($, templat | |||||
| $("#newTime").html(content.newsTime); | $("#newTime").html(content.newsTime); | ||||
| $("#newCome").html(content.realname); | $("#newCome").html(content.realname); | ||||
| $("#newContent").html(content.content); | $("#newContent").html(content.content); | ||||
| if(content.attachment){ | |||||
| var content = content.attachment.split(','); | |||||
| let list = []; | |||||
| content.map(rr=>{ | |||||
| list.push({ | |||||
| fileUrl:rr, | |||||
| fileName:rr.substr(27,rr.length) | |||||
| }) | |||||
| }) | |||||
| module.data.attachmentList = list; | |||||
| var attachmentListData = template('attachmentListData', module.data); | |||||
| $("#attachmentListContent").html(attachmentListData); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| return module; | return module; | ||||
| }); | |||||
| }); | |||||
| @@ -101,8 +101,24 @@ define(['jquery', "template", "Tools", "newApi", 'swiper'], function ($, templat | |||||
| $("#newTime").html(content.newsTime); | $("#newTime").html(content.newsTime); | ||||
| $("#newCome").html(content.createBy); | $("#newCome").html(content.createBy); | ||||
| $("#newContent").html(content.content); | $("#newContent").html(content.content); | ||||
| if(content.attachment){ | |||||
| var content = content.attachment.split(','); | |||||
| let list = []; | |||||
| content.map(rr=>{ | |||||
| list.push({ | |||||
| fileUrl:rr, | |||||
| fileName:rr.substr(27,rr.length) | |||||
| }) | |||||
| }) | |||||
| module.data.attachmentList = list; | |||||
| var attachmentListData = template('attachmentListData', module.data); | |||||
| $("#attachmentListContent").html(attachmentListData); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| return module; | return module; | ||||
| }); | |||||
| }); | |||||
| @@ -149,6 +149,17 @@ | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="font16" id="newContent"></div> | <div class="font16" id="newContent"></div> | ||||
| <div id="attachmentListContent" style="margin-top: 2vh;"> | |||||
| <script id="attachmentListData" type="text/html"> | |||||
| {{each attachmentList as value i}} | |||||
| <a href="/api{{value.fileUrl}}" target="downloadFile" style="display: flex;align-items:center;margin-top: 1vh;"> | |||||
| <img src="../../static/images/file_icon.png" width="32" style="margin-right: 10px;" alt=""> | |||||
| {{value.fileName}} | |||||
| </a> | |||||
| {{/each}} | |||||
| </script> | |||||
| </div> | |||||
| <!-- <div class="share">--> | <!-- <div class="share">--> | ||||
| <!-- <p class="fl">分享到:</p>--> | <!-- <p class="fl">分享到:</p>--> | ||||
| <!-- <img src="../../static/images/icon5.png" alt=""/>--> | <!-- <img src="../../static/images/icon5.png" alt=""/>--> | ||||
| @@ -149,6 +149,17 @@ | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="font16" id="newContent"></div> | <div class="font16" id="newContent"></div> | ||||
| <div id="attachmentListContent" style="margin-top: 2vh;"> | |||||
| <script id="attachmentListData" type="text/html"> | |||||
| {{each attachmentList as value i}} | |||||
| <a href="/api{{value.fileUrl}}" target="downloadFile" style="display: flex;align-items:center;margin-top: 1vh;"> | |||||
| <img src="../../static/images/file_icon.png" width="32" style="margin-right: 10px;" alt=""> | |||||
| {{value.fileName}} | |||||
| </a> | |||||
| {{/each}} | |||||
| </script> | |||||
| </div> | |||||
| <!-- <div class="share">--> | <!-- <div class="share">--> | ||||
| <!-- <p class="fl">分享到:</p>--> | <!-- <p class="fl">分享到:</p>--> | ||||
| <!-- <img src="../../static/images/icon5.png" alt=""/>--> | <!-- <img src="../../static/images/icon5.png" alt=""/>--> | ||||