12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <{include file="header.html"}>
- <{include file="nav.html"}>
- <style>
- .praise {cursor: pointer;}
- </style>
- <!--公用标题居中显示-->
- <{include file="common_header.html"}>
- <div class="wrapper clear">
- <div class="arti_body">
- <div class="arti_title"><{$article.article_title}></div>
- <div class="arti_info">
- <span><{$article.begin_time|date_format:'%Y-%m-%d'}></span><span><{if $article.article_author}>作者:<{$article.article_author}><{/if}></span>
- </div>
- <div class="arti_content clear"><{$article.article_text}></div>
-
- <div class="clear"></div>
- <div class="vogue_read"><{if $article.article_original_url}><a href="<{$article.article_original_url}>">阅读原文</a> <{/if}>阅读 <{$clickNum}> <span class="praise"><i class="fa <{if $isHasLikes}>fa-thumbs-up<{else}>fa-thumbs-o-up<{/if}>"></i> <em><{$likes}></em></span></div>
- <div class="clear"></div>
- </div>
- </div>
- <input name="events_id" type="hidden" value="<{$article.id}>"/>
- <script>
- KISSY.use('node, io', function (S, Node, IO) {
- var $ = S.all;
-
- //视频自适应
- var screenWidth = $(window).width();
- var baseWidth = 510;
- var video_scale = screenWidth / baseWidth;
- $(".video_iframe").each(function () {
- var new_width = $(this).width() * video_scale;
- $(this).width(new_width - 20);
- var new_height = $(this).height() * video_scale;
- $(this).height(new_height - 20);
- });
-
- $('.vogue_add_btn').on('click', function() {
- $('#add_tips').show();
- });
-
- $('.add_join_btn').on('click', function () {
- $('#add_tips').hide();
- });
-
- $(".praise").on('click', function () {
- var num = $('em', $(this)).text();
- if ($('i', $(this)).hasClass('fa-thumbs-up')) { //已赞过
- $('em', $(this)).text(--num);
- submit(2);
- $('i', $(this)).replaceClass('fa-thumbs-up', 'fa-thumbs-o-up');
- } else { //未赞过
- $('em', $(this)).text(++num);
- submit(1);
- $('i', $(this)).replaceClass('fa-thumbs-o-up', 'fa-thumbs-up');
- }
- });
-
- function submit(type) {
- var events_id = $("input[name=events_id]").val();
- new IO({
- type: "post"
- , url: VG.conf.root_domain + '/?c=EventsArticle&a=Likes'
- , data: {'events_id':events_id, 'type': type}
- , success: function (data) {}
- , error: function (NULL, textStatus) {
- alert("请求服务器失败,原因:"+textStatus);
- }
- , dataType: "json"
- });
- }
- });
- </script>
- <{include file="bottom.html"}>
|