This commit is contained in:
2024-10-29 14:04:59 +08:00
commit 48bf3e6f33
2839 changed files with 762707 additions and 0 deletions

88
app/mobile/view/blog/blog.phtml Executable file
View File

@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-seo" /}
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/m_weben/css/style2.css">
</head>
<body>
<div id="content">
<!--头部-->
{include file="include/top_back1" /}
<!-- 轮播 s -->
<div class="homeban banner-other" style="margin-top: 40px;">
<div class="bd">
<ul>
<li><a href="#"><img style="width:100%" src="__PUBLIC__/m_web/images/news/news-banner.jpg"/></a></li>
</ul>
</div>
</div>
<!-- 轮播 e -->
<div class="m_Container">
<!-- Blog列表 s -->
<div class="search_box">
<i class="search_icon"></i>
<input type="text" placeholder="Search blog articles" class="search" id="bg-search-in" value="<?php if(isset($search['name'])){ echo $search['name'];}?>"/>
</div>
<div class="blog_list">
<?php if ($list): ?>
<ul class="clearfix">
<?php foreach ($list as $detail): ?>
<li>
<a href="<?php echo '/mobile/blog/detail/id/'.$detail['id'];?>.html">
<img src="<?php echo getImage($detail['icon'], 951, 459, 6); ?>" />
<h3><?php echo $detail['title']; ?></h3>
<p><?php echo $detail['seo_description']; ?></p>
</a>
<span class="blue"><?php echo date("M d, Y", strtotime($detail['add_time'])); ?></span>
</li>
<?php endforeach; ?>
<!-- 分页 s -->
<?php
if ($page) {
echo $page;
}
?>
<!-- 分页 e -->
</ul>
<?php else: ?>
<div class="clearfix">No Result!</div>
<?php endif; ?>
</div>
<!-- Blog列表 e -->
<script>
var type = 'Blog';
$(function(){
$("#bg-search-in").keyup(function(event) {
if (event && event.keyCode === 13) {
var keywords = $("#bg-search-in").val();
var href = "?name=" + encodeURIComponent(keywords);
location.href = href;
}
});
});
</script>
</div>
<br class="bottom-margin">
<!--底部-->
{include file="include/bottom1" /}
</div>
</body>
</html>

159
app/mobile/view/blog/detail.phtml Executable file
View File

@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-seo" /}
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/m_weben/css/style2.css">
</head>
<body>
<div id="content">
<!--头部-->
{include file="include/top_back1" /}
<!--top End-->
<!-- 详情页 s -->
<div class="content" style="margin-top: 60px;">
<input type="hidden" value="<?php echo $blog['id'];?>" class="b_id">
<div class="clearfix">
<div class="blog_detail">
<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><img src="/frontend/weben/images/blog/share1.png"/></li>
<li><img src="/frontend/weben/images/blog/share2.png"/></li>
<li><img src="/frontend/weben/images/blog/share3.png"/></li>
<li><img 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"/>
<span>电邮地址</span>
<input class="new_email" type="email" name="email" />
<p style="color: #C6C7C9; font-size: 0.75rem; margin-bottom: 0.625rem;">你的电邮地址不会被分享</p>
<span>评论</span>
<textarea class="new_comment" rows="3" style="width: 98%; margin-top: 0.625rem;" 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: 0.625rem; margin-bottom: 0.5rem;">名字:<br/>
<input class="new_name" type="text" name="name"/>
</div>
<div>电邮地址:<br/>
<input class="new_email" type="email" name="email" />
<p style="color: #C6C7C9; font-size: 0.5rem; margin-bottom: 0.5rem; font-weight: 400;">你的电邮地址不会被分享</p>
</div>
<div class="comment_area">评论:<br/>
<textarea class="new_comment" style="height: 3rem;border: 1px solid #DBDBDB !important;" name="comment"></textarea>
</div>
</form>
<div class="comment_btn" style="color:#ffffff;">发布评论</div>
</div>
<?php if ($list): ?>
<div class="comment_list">
<h3>Showing <?php echo $total;?> 评论</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>
$(function(){
// 提交表单
$('.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: "/mobile/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/bottom1" /}
<!-- bottom e -->
</body>
</html>