Files
orico-official-website-old/app/index/view/blog/details.phtml
2024-10-29 14:04:59 +08:00

285 lines
12 KiB
PHTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/weben/css/style2.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/weben/css/theme.css">
<script type="text/javascript" src="__PUBLIC__/web/scripts/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/m_web/js/mshare.js"></script>
<!-- twitter分享 -->
<meta property="twitter:url" content="<?php echo $curUrl;?>"/>
<meta name="twitter:title" content="This is title"/>
<meta name="twitter:description" content="This is desc"/>
<meta name="twitter:site" content="<?php echo $curUrl;?>">
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="http://gg.chendahai.cn/static/image/apple.jpg"/>
<!-- facebook分享 -->
<meta property="og:url" content="<?php echo $curUrl;?>"/>
<meta property="og:title" content="This is my plan,let's play together"/>
<meta property="og:description" content="This is my plan,let's play together"/>
<meta property="og:image" content="http://gg.chendahai.cn/static/image/apple.jpg"/>
<meta property="og:type" content="website"/>
</head>
<style>
.Footer_icon_orico {
position: absolute;
left: 0% !important;
top: 12%;
height: 50px;
margin-top: -25px;
}
</style>
<body>
{include file="include/top-head2023" /}
<!--top-->
<header class="header-PC header-Product">
<div id="header" class="theme-black">
</div>
</header>
<!--top End-->
<!-- 详情页 s -->
<div class="content">
<input type="hidden" value="<?php echo $blog['id'];?>" class="b_id">
<div class="detail_box clearfix">
<div class="blog_detail" style="margin-top:.625rem">
<div class="blog_title">
<h2><?php if($blog['title']) {echo $blog['title'];} else{echo "Best USB-C Docking Station for PC/Laptop/IOS/Windows in 2021";}?></h2>
<p>刊登于<?php if($blog['add_time']) {echo date("M d, Y",strtotime($blog['add_time']));} else{echo "May 17, 2021";}?></p>
</div>
<div class="blog_content">
<?php echo $blog['content'];?>
</div>
</div>
<div class="share_box">
<div class="blog_share">
<h3>分享</h3>
<ul class="share_list clearfix">
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $curUrl;?>&t=<?php echo time();?>"><img src="/frontend/weben/images/blog/share1.png"/></a></li>
<li><a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&ro=true&title=<?php echo $seo_title;?>&url=<?php echo $curUrl;?>&source=&summary=&armin=armin"><img src="/frontend/weben/images/blog/share2.png"/></a></li>
<li><a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=<?php echo $curUrl;?>"><img src="/frontend/weben/images/blog/share3.png"/></a></li>
<li><img class="wxchart" click="jumpWx()" src="/frontend/weben/images/blog/share4.png"/></li>
</ul>
</div>
<div class="repply">
<h3>留言</h3>
<form>
<span>名字</span>
<input class="new_name" type="text" name="name" style="text-indent: 10px;"/>
<span>电邮地址</span>
<input class="new_email" type="email" name="email" style="text-indent: 10px; margin-bottom:0;"/>
<p style="color: #C6C7C9; font-size: 0.75rem; margin-bottom: 0.625rem;">你的电邮地址不会被分享</p>
<span>评论</span>
<textarea class="new_comment" rows="3" style="text-indent: 10px;width: 98%; margin-top: 0.625rem;margin-bottom: 0.625rem;border: 1px solid #DBDBDB !important;" name="comment"></textarea>
<div class="comment_btn" style="color:#ffffff;">发布评论</div>
</form>
</div>
</div>
</div>
<div class="comment">
<h3>请留下评论</h3>
<form class="comment_form clearfix">
<div style="margin-right: 2.5rem;">名字:<br/>
<input class="new_name" type="text" name="name" style="text-indent: 10px;"/>
</div>
<div>电邮地址:<br/>
<input class="new_email" type="email" name="email" style="text-indent: 10px;"/>
<p style="color: #C6C7C9; font-size: 0.75rem; margin-bottom: 0.625rem; font-weight: 400;">你的电邮地址不会被分享</p>
</div>
<div class="comment_area">评论:<br/>
<textarea class="new_comment" style="text-indent: 10px;height: 8.125rem;border: 1px solid #DBDBDB !important;" name="comment"></textarea>
</div>
<div class="comment_btn" style="width: 21.25rem; margin-left: 2.5rem;color:#ffffff;">发布评论</div>
</form>
</div>
<?php if ($list): ?>
<div class="comment_list">
<h3>Showing <?php echo $total;?> Comments</h3>
<ul>
<?php foreach ($list as $ks=> $detail): ?>
<li class="clearfix">
<div><img src="/frontend/weben/images/avatar/<?php echo $counts[$ks];?>.png" /></div>
<div>
<p style=" font-weight: bold;"><?php echo $detail['name'];?><span style="font-size: 0.75rem; color: #A9A9A9; margin-left: 0.625rem;">· <?php echo date("M d, Y", strtotime($detail['add_time'])); ?></span></p>
<p style=" font-weight: 400; margin-top: 0.625rem;"><?php echo $detail['content'];?></p>
</div>
</li>
<?php endforeach; ?>
</ul>
<!-- 分页 s -->
<?php
if ($page) {
echo $page;
}
?>
<!-- 分页 e -->
</div>
<?php endif; ?>
</div>
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script>
var mshare = new mShare({
title: '<?php echo $blog["title"]; ?>', // 分享标题
desc: '<?php echo $blog["title"]; ?>',
url: window.location.href, // 分享链接该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
img: '__ORICOROOT__<?php echo $blog["icon"]; ?>', // 分享图标
});
wx.config({
debug: true,
appId: '<?php echo $singpackage["appId"];?>',
timestamp: <?php echo $singpackage["timestamp"];?>,
nonceStr: '<?php echo $singpackage["nonceStr"];?>',
signature: '<?php echo $singpackage["signature"];?>',
jsApiList: [
// 所有要调用的 API 都要加到这个列表中
"checkJsApi",
'updateAppMessageShareData',
"onMenuShareTimeline",
"onMenuShareAppMessage"
]
});
var shareConfig = {
"share": {
title: '<?php echo $blog["title"]; ?>', // 分享标题
desc: '<?php echo $blog["title"]; ?>',
link: location.href.split('#')[0], // 分享链接该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: '__ORICOROOT__<?php echo $blog["icon"]; ?>', // 分享图标
success: function () {
// 设置成功
console.log('分享成功');
},
canel: function(){
console.log('取消分享');
}
}
}
function jumpWx(){
mshare.init(0);
wx.checkJsApi({
jsApiList: ['onMenuShareTimeline'], // 需要检测的JS接口列表所有JS接口列表见附录2,
success: function(res) {
alert(res);
debugger;
}
});
wx.updateAppMessageShareData(shareConfig.share);
wx.onMenuShareAppMessage(shareConfig.share);
wx.onMenuShareTimeline(shareConfig.share);
wx.error(function (res) {
alert(res.errMsg); //打印错误消息。及把 debug:false,设置为debug:ture就可以直接在网页上看到弹出的错误提示
});
}
</script>
<script>
$(function(){
//悬浮表单
$(window).scroll(function(){
var s_top = Number($(this).scrollTop()); // 获取滚动条,滚动刻度
var showTop = Number($(".share_box").height());
var pTop = Number($(".comment").offset().top);
if((pTop-s_top-80) >= showTop ){
$(".share_box").removeAttr("style"); // 删除属性,让他释放
}else{
//nsole.log(s_top,showTop,pTop,$(window).scrollTop());
$('.share_box').css("position","absolute"); // 添加属性,让他固定
$('.share_box').css('top',pTop-showTop-20);
}
});
// 提交表单
$('.comment_btn').click(function(){
var new_name = $(this).parents('form').find('.new_name').val();
var new_email = $(this).parents('form').find('.new_email').val();
var new_comment = $(this).parents('form').find('.new_comment').val();
if(new_name=='') {
alert("The Name is Empty!");
return false;
}
if(new_comment=='') {
alert("The Comment is Empty!");
return false;
}
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if(reg.test(new_email) == false) {
alert("The Email format is not correct!");
return false;
}
var bid = "<?php echo $blog['id'];?>";
//点击创建申请块
if(new_name && new_email && new_comment && bid) {
var type = 'Agent';
$.ajax({
type: "POST",
url: "/us/blog/addcomment",
data: {'name':new_name, 'email':new_email,'comment':new_comment,'b_id':bid},
dataType: "json",
success: function(data){
if(data.code == 200) {
alert(data.msg);
$(".content input").val("");
$(".new_comment").val("");
}
else{
alert(data.msg);
}
}
});
}
})
})
</script>
<!-- bottom s -->
{include file="include/bottom2023" /}
<!-- bottom e -->
</body>
</html>