Authored by zhangxiaoru

热搜

... ... @@ -11,10 +11,24 @@
</form>
</div>
<ul class="search-associate"></ul>
<div class="search-items">
<div class="hot-search-new">
<div class="search-content new-hot">
<ul class="clearfix swiper-wrapper">
<li class="swiper-slide hot-title">热搜</li>
{{# hotTerms}}
<li class="swiper-slide hot-term">
<a href='javascript:void(0);'>{{content}}</a>
</li>
{{/ hotTerms}}
</ul>
</div>
</div>
<div class="search-group history-search">
<div class="search-content-title">
<h3 class="left"><i class="ico-lately"></i>最近搜索</h3>
<h3 class="left">最近搜索</h3>
<i id="clear-history" class="right ico-del hide"></i>
</div>
<div class="search-content">
... ... @@ -23,7 +37,7 @@
</div>
{{#if hotTerms}}
<div class="search-group hot-search">
<h3><i class="ico-hot"></i>热门搜索</h3>
<h3>猜你想找</h3>
<div class="search-content">
<ul class="hot clearfix">
{{# hotTerms}}
... ...
... ... @@ -16,15 +16,15 @@ module.exports = {
siteUrl: '//m.yohobuy.com',
assetUrl: '//localhost:5001',
domains: {
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/'
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/'
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
// favApi: 'http://192.168.102.31:8092/brower',
// api: 'http://192.168.102.205:8080/gateway/',
... ...
'use strict';
const fs = require('fs');
let devHost = '127.0.0.1';
let devHost = '172.16.6.134';
fs.readFile('.devhost', (err, buf)=> {
if (!err) {
... ...
... ... @@ -8,7 +8,8 @@ var $ = require('yoho-jquery'),
security = require('../../plugin/security'),
tip = require('../../plugin/tip'),
Hammer = require('yoho-hammer'),
dialog = require('../../plugin/dialog');
dialog = require('../../plugin/dialog'),
Swiper = require('yoho-swiper');
var $input = $('#search-input input');
... ... @@ -29,7 +30,7 @@ var writeSearch = require('./write-search');
var ranToken = writeSearch.getRanToken();
var historyval = writeSearch.getHistoryval();
var chHammer, cHammer;
var chHammer, cHammer, navSwiper;
var C_ID, POS_ID, FLR_INDEX;
... ... @@ -199,6 +200,12 @@ $search.on('touchend', function() {
return false;
});
navSwiper = new Swiper('.new-hot', {
grabCursor: true,
slidesPerView: 'auto',
slideElement: 'li'
});
// 初始化历史搜索的内容
(function() {
var html = '',
... ...
.search-page {
/*.search-page {
.search-input {
position: relative;
padding: 14px 22px;
... ... @@ -83,7 +83,6 @@
}
.search-group {
border-bottom: 1px solid #e6e6e6;
.ico-hot {
width: 22px;
... ... @@ -132,7 +131,6 @@
.search-content{
clear: both;
padding-left: 47px;
box-sizing: border-box;
padding-bottom: 18px;
... ... @@ -150,7 +148,7 @@
}
}
}
}*/
.search-associate {
width: 100%;
... ...
... ... @@ -47,7 +47,8 @@
}
.search-items {
padding: 40px 20px;
/* margin: 40px 20px;*/
background: #f0f0f0;
h3 {
font-size: 24px;
... ... @@ -63,7 +64,7 @@
}
a {
display: block;
display: inline-block;
height: 68px;
line-height: 68px;
padding: 0 20px;
... ... @@ -75,6 +76,28 @@
white-space: nowrap;
}
.hot-search-new {
height: 120px;
background: #fff;
margin-bottom: 30px;
.new-hot {
overflow: hidden;
}
.hot-title {
font-size: 32px;
color: #000;
line-height: 130px;
height: 120px;
padding-left: 30px;
}
.hot-term {
padding-top: 30px;
}
}
.clear-icon {
float: right;
background: #fff;
... ... @@ -85,7 +108,8 @@
}
.search-group {
border-bottom: 1px solid #e6e6e6;
background: #fff;
padding: 30px;
.ico-hot {
width: 22px;
... ... @@ -134,7 +158,6 @@
.search-content {
clear: both;
padding-left: 47px;
box-sizing: border-box;
padding-bottom: 18px;
... ... @@ -144,13 +167,22 @@
background: #fff;
color: #b0b0b0;
font-size: 28px;
width: auto;
}
}
.hot-search {
/*.hot-search {
margin-top: 38px;
}*/
.history-search {
padding-top: 30px;
}
}
.swiper-slide {
width: auto;
}
}
.search-associate {
... ... @@ -195,11 +227,9 @@
position: relative;
padding: 14px 22px;
background: #f8f8f8;
form {
width: 100%;
}
.search-icon {
position: absolute;
font-size: 24px;
... ... @@ -266,7 +296,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border: 1px solid #b8b8b8;
border:1px solid #b8b8b8;
border-radius: 0.2rem;
}
... ... @@ -274,27 +304,27 @@
font-size: 28px;
}
.clear-icon {
.clear-icon{
float: right;
color: #b8b8b8;
border: none;
background: white;
}
span {
span{
margin-right: 10px;
font-size: 14px;
}
.history-search {
border-bottom: 1px solid #f3f3f3;
.history-search{
border-bottom:1px solid #f3f3f3;
}
.hot-search {
.hot-search{
margin-top: 20px;
}
.clearfix {
.clearfix{
margin-left: 30px;
}
... ... @@ -302,4 +332,4 @@
font-size: 24px;
}
}
}
}
\ No newline at end of file
... ...