articledetail.js 998 B

12345678910111213141516171819202122232425262728293031
  1. (function () {
  2. var page = {
  3. isScroll: true,
  4. init: function ($page,$param) {
  5. var array = JSON.parse( $param );
  6. var html = '';
  7. userinfo = renlian.storage.get('userinfo');
  8. renlian.httpget(config.webapi + "/?s=api/get_article_detail&id="+array.ID, {}, function(res) {
  9. //console.log(res.data.Content);
  10. if(res.success == true){
  11. html += '<div class="lr-list-item"><span class="lr-article-title">'+res.data.Title+'</span></div>\
  12. <div class="lr-list-item"><span class="lr-badge" style="background-color:white">发布时间: '+res.data.AddTime+'</span></div>\
  13. <div class="lr-card-content">\
  14. <div class="lr-card-content-inner">\
  15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+res.data.Content+'\
  16. </div>\
  17. </div>\
  18. ';
  19. $page.find('.detail').html(html);
  20. }else{
  21. renlian.layer.warning("详情信息出错", function () { }, '提示', '关闭');
  22. }
  23. })
  24. }
  25. };
  26. return page;
  27. })();