init
This commit is contained in:
135
app/mobile/view/search/index.phtml
Executable file
135
app/mobile/view/search/index.phtml
Executable file
@@ -0,0 +1,135 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>search</title>
|
||||
<meta name="Keywords" content=""/>
|
||||
<meta name="Description" content=""/> {include file="include/head" /}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/m_web/css/search.css">
|
||||
|
||||
<style>
|
||||
.h_search_w {
|
||||
width: 95%;
|
||||
margin: 5.08rem auto 0.68rem;
|
||||
position: relative;
|
||||
}
|
||||
.search-button {
|
||||
border: none;
|
||||
font-size: 0.9rem;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 12.2rem;
|
||||
cursor: pointer;
|
||||
background: #0060ff;
|
||||
height: 2.5rem;
|
||||
border-radius: 20px;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
.search-input01
|
||||
{
|
||||
width: 98%;
|
||||
display: inline-block;
|
||||
}
|
||||
.search-input01 input
|
||||
{
|
||||
border-radius: 35px;
|
||||
background: #fff;
|
||||
height: 2rem;
|
||||
border: none;
|
||||
width: 60%;
|
||||
}
|
||||
.search-button01 {
|
||||
border: none;
|
||||
font-size: 0.9rem;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
background: #0060ff;
|
||||
height: 2rem;
|
||||
border-radius: 20px;
|
||||
padding: 0 1rem;
|
||||
display: inline-block;
|
||||
}
|
||||
.icon-small01
|
||||
{
|
||||
position: absolute;
|
||||
left: 0.5rem;
|
||||
top: 0.7rem;
|
||||
color: #9b9b9b;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<!--top-->
|
||||
<div id="content">
|
||||
|
||||
{include file="include/top_back1" /}
|
||||
<!--top End-->
|
||||
|
||||
<div class="h_search_w ">
|
||||
<div class="search-input01">
|
||||
<span class="icon-search-svg icon-small01"></span>
|
||||
<input id="search-ina" class="form-control form-text" name="keywords" placeholder="硬盘盒" value="" type="text">
|
||||
<button id="search-btna" class="search-button01">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-list" style="min-height:100px">
|
||||
<?php if (!empty($list)): ?>
|
||||
<ul>
|
||||
<?php foreach ($list as $key => $value): ?>
|
||||
<?php
|
||||
if ($value['link'] == 'videodetail') {
|
||||
$value['link'] = 'video/detail';
|
||||
} elseif ($value['link'] == 'productdetail') {
|
||||
$value['link'] = 'product/detail';
|
||||
} elseif ($value['link'] == 'articledetail') {
|
||||
$value['link'] = 'article/detail';
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="/mobile/<?php echo $value['link']; ?>/id/<?php echo $value['id']; ?>">
|
||||
<div class="search-list-img"><img src="<?php echo getImage($value['picture']); ?>"></div>
|
||||
<div class="search-trans-list ">
|
||||
<p class="search-list-title"><?php echo $value['name']; ?></p>
|
||||
<p class="search-list-subtitle"><?php echo $value['brand_id']; ?></p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<br clear="all">
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<div class="clear" style="margin-top:20px;"></div>
|
||||
<?php if ($page) echo $page;?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- bottom -->
|
||||
{include file="include/bottom1" /}
|
||||
<!-- bottom e -->
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#search-btna").bind("click", function(event) {
|
||||
var skeyword = $("#search-ina").val();
|
||||
if (skeyword) {
|
||||
var href = "/mobile/search/index?skeyword=" + encodeURIComponent(skeyword);
|
||||
location.href = href;
|
||||
}
|
||||
else{
|
||||
var href = "/mobile/search/index";
|
||||
location.href = href;
|
||||
}
|
||||
});
|
||||
$("#search-ina").keyup(function(event) {
|
||||
if (event && event.keyCode === 13) {
|
||||
$("#search-btna").trigger("click");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user