You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
182 lines
6.1 KiB
182 lines
6.1 KiB
{include file="page_header"}
|
|
<div class="con mb-7">
|
|
<div id="loading"><img src="img/loading.gif" /></div>
|
|
<!--晒单列表-->
|
|
<section class="com-nav article-list">
|
|
<div class="art-tit-box padding-all">
|
|
<h4 class="com-cont-box art-cont-box">{$article.title}</h4>
|
|
<small><time>{$article.add_time}</time><span>{$article.author}</span></small>
|
|
</div>
|
|
<div class="com-deta-img dis-n-detail">{$article.content}</div>
|
|
<div class="padding-all b-color-f m-top06 fx-deta-box">
|
|
<ul class="dis-box com-list-1">
|
|
<li class="box-flex">
|
|
<div class="yuan oncle-color-1" onclick="dianzan({$article.article_id})">
|
|
<a href="javascript:;" id="red{$article.article_id}" {if $islike} class="active"{else}{/if}>
|
|
<i class="iconfont icon-zan icon-yuan1"></i>
|
|
<p id="like_num">{$like_num}</p>
|
|
<input id="like" type="hidden" name="article_id" value="{$article.article_id}" />
|
|
<input id="islike" type="hidden" id="{$article.article_id}" name="islike" value="{$islike}" />
|
|
<input id="isclick" type="hidden" name="isclick" value="0" />
|
|
</a>
|
|
</div>
|
|
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section>
|
|
<div class="dis-box padding-all my-bottom b-color-f my-nav-box m-top06">
|
|
<h3 class="box-flex text-all-span my-u-title-size-1">关联商品</h3>
|
|
</div>
|
|
|
|
<ul class="dis-box b-color-f padding-all">
|
|
<li class="write-add-img-box b-color-f">
|
|
<div class="write-add-img"><a href="{$acticle_goods.url}"><img src="{$acticle_goods.thumb}"></a></div>
|
|
</li>
|
|
<li class="box-flex gl-com">
|
|
<p><a href="{$acticle_goods.url}">{$acticle_goods.name}</a></p>
|
|
</li>
|
|
<div class="my-dete-box">
|
|
<span class="t-jiantou fr"></span></div>
|
|
</ul>
|
|
|
|
</section>
|
|
<section>
|
|
<div class="dis-box padding-all my-bottom b-color-f my-nav-box m-top06">
|
|
<h3 class="box-flex text-all-span my-u-title-size-1">评论列表</h3>
|
|
</div>
|
|
<!--评论列表-->
|
|
{foreach $commentfirst as $key => $cf}
|
|
<ul class="padding-all b-color-f my-com-max-box">
|
|
<li class="com-img-left">
|
|
<div class="com-left-box"><img src="{$cf.user_picture}"></div>
|
|
</li>
|
|
<li class="com-con-right">
|
|
<ul class="dis-box">
|
|
<li class="box-flex">
|
|
<div class="com-adm-box">
|
|
<h4 id="{$cf.comment_id}">{$cf.user_name}</h4>
|
|
<p>{$cf.comment_time}</p>
|
|
</div>
|
|
</li>
|
|
<li class="not">
|
|
<div class="com-data-right com-list-1">
|
|
<span class="oncle-color" onclick="comment2({$cf.comment_id})"><span class="my-right1">{if $cf.count > 0}{$cf.count}{else}0{/if}<i class="iconfont icon-daipingjia"></i></span>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<p class="com-con-m">{$cf.content}</p>
|
|
{foreach $cf.second as $ke => $cs}
|
|
{if $ke <10}
|
|
<div class="pl-hf-box padding-all">
|
|
<p><span>{$cs.user_name} : </span>{$cs.content}</p>
|
|
<div class="x-jiant"></div>
|
|
</div>
|
|
{/if}
|
|
{/foreach}
|
|
</li>
|
|
</ul>
|
|
{/foreach}
|
|
</section>
|
|
</div>
|
|
<section class="filter-btn consult-filter-btn padding-all" style="display:list-item; height:5rem;">
|
|
<div class="dis-box">
|
|
<div class="box-flex text-all">
|
|
<input class="j-input-text" type="text" name='comment' placeholder="回复文章:" value="">
|
|
</div>
|
|
<button type="button" class="btn-submit">发送</button>
|
|
</div>
|
|
</section>
|
|
<input type="hidden" name="article_id" value="{$article.article_id}" />
|
|
<input type="hidden" name="cid" value="" />
|
|
<div class="mask-filter-div"></div>
|
|
<!--引用js-->
|
|
<script type="text/javascript" src="{__TPL__}js/jquery-2.1.4.min.js"></script>
|
|
<script type="text/javascript" src="{__TPL__}js/swiper-3.2.5.min.js"></script>
|
|
<script type="text/javascript" src="{__TPL__}js/ectouch.js"></script>
|
|
<script>
|
|
$(function($) {
|
|
//分享弹框
|
|
$(".goods-share-img").click(function() {
|
|
$(".share-bg-box-y").addClass("display-current");
|
|
$(".share-ts-title-y").addClass("display-current");
|
|
});
|
|
$(".share-bg-box-y").click(function() {
|
|
$(".share-bg-box-y").removeClass("display-current");
|
|
$(".share-ts-title-y").removeClass("display-current");
|
|
});
|
|
|
|
});
|
|
$('.mb-7').click(function(){
|
|
$(".j-input-text").attr('placeholder','回复文章:');
|
|
$("input[name='cid']").val('');
|
|
})
|
|
function comment2(cid){
|
|
c_id = cid;
|
|
event.stopPropagation();
|
|
cname = document.getElementById(cid).innerHTML;
|
|
$(".j-input-text").attr('placeholder','回复'+cname+':');
|
|
$("input[name='cid']").val(c_id);
|
|
}
|
|
|
|
$('.btn-submit').click(function(){
|
|
$.ajax({
|
|
type: "post",
|
|
url: "{U('article/index/commnet')}",
|
|
data: {content:$("input[name='comment']").val(),article_id:$("input[name='article_id']").val(),cid:$("input[name='cid']").val()},
|
|
dataType: "json",
|
|
success: function(data){
|
|
status(data);
|
|
}
|
|
});
|
|
function status (json) {
|
|
window.location.href = json;
|
|
}
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
<script>
|
|
function dianzan(id){
|
|
if($("#red" + id).hasClass("active")){
|
|
$("#red" + id).removeClass("active");
|
|
}else{
|
|
$("#red" + id).addClass("active");
|
|
}
|
|
var islike = document.getElementById('islike').value;
|
|
var article_id = document.getElementById('like').value;
|
|
var isclick = document.getElementById('isclick').value;
|
|
$("#isclick").val(new Date().getTime());
|
|
if(isclick < (new Date().getTime()-1000)){
|
|
$.ajax({
|
|
type: "post",
|
|
url: "{U('article/index/like')}",
|
|
data: {article_id: article_id, islike: islike},
|
|
dataType: "json",
|
|
success: function (data) {
|
|
$("#like_num").html(data.like_num);
|
|
$("#islike").val(data.is_like);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
<script>
|
|
/*店铺信息商品滚动*/
|
|
var swiper = new Swiper('.j-g-s-p-con', {
|
|
scrollbarHide: true,
|
|
slidesPerView: 'auto',
|
|
centeredSlides: false,
|
|
grabCursor: true
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|