Commit dd142026 by 施宇

123123

parent fbb0cd4b
......@@ -18,7 +18,7 @@ return array(
//非必须登录
//询价中心、后台首页(部分接口)、抢单专区、后台搜索、前台搜索
'soapi' => 'http://soapi.icsales.cc',
'offerapi' => 'http://offerapi.icsales.cc',
//必须登录
//登录会员信息、会员认证(包含但不限于新增认证、认证列表)、积分、账户设置、站内消息通知
'userapi' => 'http://userapi.icsales.cc',
......@@ -37,7 +37,7 @@ return array(
'passporticsales' => 'http://passport.icsales.cc',
//商品搜索、询价搜索
'searchicsales' => 'http://offerapi.icsales.cc',
'searchicsales' => 'http://search.icsales.cc',
//业务助手后台
'homeicsales' => 'http://home.icsales.cc',
......
......@@ -237,7 +237,7 @@
<div class="new_xj">
<div class="new_xj_title xj_title">
<span class="lineBlock"></span>
<b>我的询报价</b>
<b>最新询价动态</b>
<a class="icon iconfont iconjuxing2"></a>
</div>
<div class="new_xj_list">
......
......@@ -263,7 +263,7 @@
});
$('.input_btn').click(function () {
window.location.href = '/indexsearch'
window.location.href = search_url+'/indexsearch'
})
$('.mobile_wrapper .lb_nav span').click(function () {
var index = $(this).index();
......
......@@ -23,22 +23,19 @@
</div>
</div>
<div class="nav_title">
首页 > 搜索 > 搜索结果 > <span>300</span>信息
首页 > 搜索 > 搜索结果 > <span>0</span>信息
</div>
<div class="search_condition">
<ul class="search_nav clr">
<li class="search_sp fl active">商品</li>
<li class="search_sp fl ">商品</li>
<li class="search_xj fl">询价</li>
</ul>
<div class="zz condition_content">
<span class="bold">资质</span>
<span class="bold">时间</span>
<div class="condition_right_content clr">
<div class="fl active">贸易商</div>
<div class="fl">代理商</div>
<div class="fl">分销商</div>
<div class="fl">分销商</div>
<div class="fl">贸易分销商商</div>
<div class="fl">贸分销商易商</div>
<div class="fl active">今天</div>
<div class="fl">三天之内</div>
<div class="fl">本周</div>
</div>
</div>
<div class="fz condition_content ">
......@@ -51,169 +48,47 @@
</div>
</div>
<div class="goods_data_list search_data_list">
<div class="my_xj_list clr ">
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">
TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR
</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司</div>
</div>
</div>
</div>
<div class="btn_div">
<a class="btn" href="passporticsales/login">登录,查看更多结果</a>
</div>
<div class="no_data" style="display: none">
<img src="__PUBLIC__/images/nosearchdata.png" alt="">
<p class="bold">未搜索到相关信息</p>
</div>
</div>
</div>
</div>
<include file="public/indexfoot" />
</div>
<include file="public/foot" />
<script src="__PUBLIC__/js/index/search.js"></script>
<!-- 页面模板 -->
<script type="text/html" id="htmlTp">
<div class="my_xj_list clr ">
{{# layui.each(d, function(index, item){ }}
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">{{item.goods_name}}</div>
</div>
<div class="item_middle clr">
<div class="fl price">{{item.price}}</div>
<div class="fr time">{{layui.util.toDateString(item.update_time * 1000,'yyyy-MM-dd HH:mm')}}</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>{{item.brand_name}}</span></div>
<div class="total">数量:<span class="bold">{{item.stock}} PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">{{item.company_name||''}}</div>
</div>
</div>
{{# }); }}
</div>
{{# if(d.length === 0){ }}
<div class="no_data" style="padding:60px 0 60px">
<img src="__PUBLIC__/images/nosearchdata.png" alt="">
<p class="bold">未搜索到相关信息</p>
</div>
{{# } }}
<div class="btn_div">
<a class="btn" href="passporticsales/login">登录,查看更多结果</a>
</div>
</script>
</body>
</html>
\ No newline at end of file
......@@ -32,7 +32,7 @@
<div class="input_div fl">
<span class="lineBlock">询价型号:</span>
<div>
<input type="text" placeholder="请输入型号" class="boxsiz">
<input type="text" placeholder="请输入型号" class="boxsiz" id="goodName">
</div>
</div>
......@@ -59,8 +59,8 @@
</div>
<div class="inquiry_data">
<div class="data_list">
<!-- <div class="data_list">
<div class="data_item">
<div class="data_detail">
<div class="type fl bold ellipsis boxsiz">STM32F103ZET6</div>
......@@ -148,26 +148,16 @@
<a class="icon iconfont iconjuxing2 fr"></a>
<a class="fl xj_status fr">下架</a>
</div>
<div class="data_item">
<div class="data_detail">
<div class="type fl bold ellipsis boxsiz">STM32F103ZET6</div>
<div class="brand fl ellipsis boxsiz">品牌:<span>Texas Instrument</span></div>
<div class="num fl ellipsis boxsiz">数量:<span>PCS10,000</span></div>
<div class="bj_status fl ellipsis boxsiz dd bold">等待报价</div>
<div class="data_status fl boxsiz zs"><span class="mark lineBlock"></span><span
class="text">展示中</span></div>
<div class="time fr ellipsis boxsiz">2019-05-22 15:35</div>
</div>
<a class="icon iconfont iconjuxing2 fr"></a>
<a class="fb xj_status fr">发布</a>
</div>
</div>
<div class="no_data" style="display: none">
</div> -->
<!-- <div class="no_data" style="display: none">
<img src="__PUBLIC__/images/nosearchdata.png" alt="">
<p class="bold">未搜索到询价信息</p>
<div class="fb_command">您可以发布一条询价信息。</div>
</div>
</div> -->
</div>
<div class="pagination-with" id="pagination" style="text-align: right;margin-top: 25px;display:none" ></div>
</div>
</div>
</div>
......@@ -175,6 +165,33 @@
</div>
<include file="public/foot" />
<script src="__PUBLIC__/js/quoteprice/inquiry.js"></script>
<!-- 页面模板 -->
<script type="text/html" id="htmlTp">
<div class="data_list">
{{# layui.each(d, function(index, item){ }}
<div class="data_item">
<div class="data_detail">
<div class="type fl bold ellipsis boxsiz">{{item.goods_name}}</div>
<div class="brand fl ellipsis boxsiz">品牌:<span>{{item.brand_name}}</span></div>
<div class="num fl ellipsis boxsiz">数量:<span>PCS{{item.number}}</span></div>
<div class="bj_status fl ellipsis boxsiz dd bold">等待报价</div>
<div class="data_status fl boxsiz zs"><span class="mark lineBlock"></span><span
class="text">展示中</span></div>
<div class="time fr ellipsis boxsiz">{{layui.util.toDateString(item.update_time * 1000)}}</div>
</div>
<a class="icon iconfont iconjuxing2 fr"></a>
<a class="fb xj_status fr">发布</a>
</div>
{{# }); }}
</div>
{{# if(d.length === 0){ }}
<div class="no_data">
<img src="__PUBLIC__/images/nosearchdata.png" alt="">
<p class="bold">未搜索到询价信息</p>
<div class="fb_command">您可以发布一条询价信息。</div>
</div>
{{# } }}
</script>
</body>
......
......@@ -25,7 +25,7 @@
</div>
</div>
<div class="nav_title">
首页 > 搜索 > 搜索结果
首页 > 搜索 > 搜索结果 > <span>0</span>信息
</div>
<div class="search_condition">
<ul class="search_nav clr">
......@@ -33,14 +33,11 @@
<li class="search_xj fl">询价</li>
</ul>
<div class="zz condition_content">
<span class="bold">资质</span>
<span class="bold">时间</span>
<div class="condition_right_content clr">
<div class="fl active">贸易商</div>
<div class="fl">代理商</div>
<div class="fl">分销商</div>
<div class="fl">分销商</div>
<div class="fl">贸易分销商商</div>
<div class="fl">贸分销商易商</div>
<div class="fl active">今天 </div>
<div class="fl">三天之内</div>
<div class="fl">本周</div>
</div>
</div>
<div class="fz condition_content ">
......@@ -53,169 +50,49 @@
</div>
</div>
<div class="goods_data_list">
<div class="my_xj_list clr ">
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">
TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR
</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司</div>
</div>
</div>
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">TMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDRTMP75CIDR</div>
</div>
<div class="item_middle clr">
<div class="fl price">¥10.1241</div>
<div class="fr time">05-10 17:38</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>future</span></div>
<div class="total">数量:<span class="bold">10000 PCS</span></div>
<div class="date">货期:<span class="bold">现货</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">深圳猎芯科技有限公司</div>
</div>
</div>
</div>
<div class="no_data" style="display: none">
<img src="__PUBLIC__/images/nosearchdata.png" alt="">
<p class="bold">未搜索到相关信息</p>
<div class="customer">
<img src="__PUBLIC__/icons/customer.png" alt="" class="va-m">
<span class="lx_cus">联系客服帮您找</span>
</div>
</div>
</div>
<div class="pagination-with" id="pagination" style="text-align: right;margin: 25px 20px 0 0 ;display:none" ></div>
</div>
</div>
</div>
</div>
<include file="public/foot" />
<script src="__PUBLIC__/js/search/index.js"></script>
<!-- 页面模板 -->
<script type="text/html" id="htmlTp">
<div class="my_xj_list clr ">
{{# layui.each(d, function(index, item){ }}
<div class="my_xj_item fl boxsiz">
<div class="item_top clr">
<div class="fl num ellipsis">{{item.goods_name}}</div>
</div>
<div class="item_middle clr">
<div class="fl price">{{item.price}}</div>
<div class="fr time">{{layui.util.toDateString(item.update_time * 1000)}}</div>
</div>
<div class="item_bottom">
<div class="brand">品牌:<span>{{item.brand_name}}</span></div>
<div class="total">数量:<span class="bold">{{item.stock}} PCS</span></div>
<div class="date">货期:<span class="bold">{{item.delivery_time||''}}</span></div>
</div>
<div class="item_user">
<span class="fl type mystype lineBlock">贸易商</span>
<div class="fl name ellipsis">{{item.company || ''}}</div>
</div>
</div>
{{# }); }}
</div>
{{# if(d.length === 0){ }}
<div class="no_data">
<img src="__PUBLIC__/images/nosearchdata.png" alt="">
<p class="bold">未搜索到相关信息</p>
<div class="customer">
<img src="__PUBLIC__/icons/customer.png" alt="" class="va-m">
<span class="lx_cus">联系客服帮您找</span>
</div>
</div>
{{# } }}
</script>
</body>
</html>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1; user-scalable=0;"/>
<meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1; user-scalable=0"/>
<title>IC业务助手</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common/base.css">
<!--[if IE 8]>
......@@ -15,6 +15,7 @@
var auth_url = 'authapi',
so_url = 'soapi',
offer_url = "offerapi"
user_url = 'userapi',
goods_url = 'goodsapi',
inquiry_url = 'inquiryapi',
......
.search_content .nav_title {
padding: 20px 20px 0 20px;
}
.search_content .nav_title span {
color: #61A0F2;
}
.search_content .search_section {
width: 690px;
margin: 30px auto 0;
......@@ -88,4 +91,3 @@
.search_content .search_condition .condition_content .condition_right_content div:hover {
color: #0D84D1;
}
/*# sourceMappingURL=search.css.map */
\ No newline at end of file
.search_content {
.nav_title{
padding:20px 20px 0 20px;
span{
color: #61A0F2;
}
}
.search_section {
width: 690px;
......
......@@ -69,11 +69,11 @@
/****
* 询价搜索 不需要token
*/
inquirySearch:search_url+'/inquiry/search',
inquirySearch:offer_url+'/inquiry/search',
/***
* 会员中心询价列表 需要token
*/
inquiryInfo:search_url+"/inquiry/info"
inquiryInfo:offer_url+"/inquiry/info"
};
if (typeof define === "function" && define.amd) {
return apis;
......
$(function () {
var indexSearch = {
init: function () {
this.bindFun();
$('.search_sp').click();
},
getData: function (type) {
var url = type==1?apis.goodsSearch:apis.inquirySearch;
IcController.getData(url, 'GET', {
"offset": 8,
"p": 1,
}, function (res) {
var getTpl = htmlTp.innerHTML;
if (res.errcode == 0) {
$('.nav_title').find('span').text(res.total)
layui.laytpl(getTpl).render(res.goods_list, function (html) {
$(".search_data_list").html(html);
});
} else if (res.errcode == 110001) {
$('.nav_title').find('span').text(0)
layui.laytpl(getTpl).render([], function (html) {
$(".search_data_list").html(html);
});
}
})
},
bindFun:function(){
var self = this;
$('.search_nav li').on('click',function(){
var index = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
$(".search_data_list").empty();
$('.nav_title').find('span').text(0)
if(index == 0){//商品
self.getData(1)
}else{//询价
self.getData(2)
}
})
}
};
indexSearch.init();
})
\ No newline at end of file
......@@ -268,9 +268,7 @@
opt.isClick = true;
IcController.getData(apis.authlogin, 'POST', data.field, function (res) {
if (res.err_msg == 0) {
if (res.err_code == 0) {
//注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname);
......
......@@ -10,22 +10,52 @@ $(function () {
theme: '#0D84D1'
});
this.bindFun();
this.getData()
this.getData(1);
},
getData: function () {
IcController.getData(apis.inquiryInfo, 'get', {
'goods_name': "",
"start_time": "",
"end_time": "",
"user_id": "",
"offset": "10",
"p": "1",
"token":Util.getCookie('token')
getData: function (page) {
let self = this;
IcController.getData(apis.inquiryInfo, 'GET', {
'goods_name': $('#goodName').val() || "",
"start_time": $('#start_date').val() || "",
"end_time": $('#end_date').val() || "",
"offset": 7,
"p": page,
"token": Util.getCookie('token') || ""
}, function (res) {
var getTpl = htmlTp.innerHTML;
if (res.errcode == 0) {
$('#pagination').show();
layui.laytpl(getTpl).render(res.inquiry_list, function (html) {
$(".inquiry_data").empty().html(html);
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.total,
limit: 7,
curr: page,
jump: function (obj, first) {
if (!first) {
//分页回调调用
self.getData(obj.curr)
}
}
});
});
} else if (res.errcode == 105001) {
console.log('hahahah')
layui.laytpl(getTpl).render([], function (html) {
$(".inquiry_data").empty().html(html);
$('#pagination').hide();
});
}
})
},
bindFun: function () {
var self = this;
$('.edit_div').click(function () {
window.location.href = "/releaseinquiry"
});
......@@ -39,8 +69,16 @@ $(function () {
}
})
$('.data_item').click(function () {
$('.inquiry_data').on('click','.data_item',function () {
window.location.href = "/inquirydetail"
});
$('.cx').on('click', function () {
self.getData(1);
});
$('.cz').on('click', function () {
$('#goodName').val('');
$('#start_date').val('');
$('#end_date').val('');
})
}
};
......
$(function () {
var search = {
init: function () {
this.bindFun();
$('.search_sp').click();
},
getData: function (type, p) {
var self = this;
var url = type == 1 ? apis.goodsSearch : apis.inquirySearch;
IcController.getData(url, 'GET', {
"offset": 10,
"p": p,
}, function (res) {
var getTpl = htmlTp.innerHTML;
if (res.errcode == 0) {
$('#pagination').show();
$('.nav_title').find('span').text(res.total)
layui.laytpl(getTpl).render(res.goods_list, function (html) {
$(".goods_data_list").html(html);
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.total,
limit: 10,
curr: p,
jump: function (obj, first) {
if (!first) {
//分页回调调用
self.getData(type, obj.curr)
}
}
});
});
} else if (res.errcode == 105001) {
$('.nav_title').find('span').text(0)
layui.laytpl(getTpl).render([], function (html) {
$(".goods_data_list").html(html);
$('#pagination').hide();
});
}
})
},
bindFun: function () {
var self = this;
$('.search_nav li').on('click', function () {
var index = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
$(".goods_data_list").empty();
$('.nav_title').find('span').text(0);
$('#pagination').hide();
if (index == 0) { //商品
self.getData(1, 1)
} else { //询价
self.getData(2, 1)
}
})
}
};
search.init();
})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment