Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
38b60c08
authored
Jul 15, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
111
parent
3c2e6093
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
538 additions
and
411 deletions
Application/Home/View/Home/index.html
Application/Home/View/Index/index.html
Application/Home/View/Index/search.html
Application/Home/View/QuotePrice/inquiry.html
Application/Home/View/QuotePrice/releaseinquiry.html
Application/Home/View/RobOrder/index.html
Application/Home/View/Search/index.html
dist/css/common/base.css
dist/css/common/base.less
dist/js/global/api.js
dist/js/global/global.min.js
dist/js/home/index.js
dist/js/index/search.js
dist/js/quoteprice/inquiry.js
dist/js/roborder/index.js
dist/js/search/index.js
Application/Home/View/Home/index.html
View file @
38b60c08
...
...
@@ -48,7 +48,7 @@
<div
class=
"search_div clr"
>
<div
class=
"input_div fl"
>
<span
class=
"icon iconfont iconjuxing"
></span>
<input
type=
"text"
placeholder=
"请输入要搜索的内容"
>
<input
type=
"text"
placeholder=
"请输入要搜索的内容"
class=
"search-input"
>
</div>
<div
class=
"btn fl btn_60 btn_fz_18 input_btn bold btn_blue"
>
搜索
...
...
Application/Home/View/Index/index.html
View file @
38b60c08
...
...
@@ -27,7 +27,7 @@
<div
class=
"search_div clr"
>
<div
class=
"input_div fl"
>
<span
class=
"icon iconfont iconjuxing"
></span>
<input
type=
"text"
placeholder=
"请输入要搜索的型号"
>
<input
type=
"text"
placeholder=
"请输入要搜索的型号"
class=
"search-input"
>
</div>
<div
class=
"input_btn fl btn_48 btn bold btn_blue"
>
搜索
...
...
@@ -174,83 +174,83 @@
</div>
</div>
<div
class=
"jy_div"
>
<div
class=
"jy_div_content"
>
<div
class=
"w_yuan"
>
<div
class=
"l_yuan"
></div>
<div
class=
"jy_div_content"
>
<div
class=
"w_yuan"
>
<div
class=
"l_yuan"
></div>
</div>
<h3
class=
"bold mobile_h3_common"
>
您的交易,是我们最重要的
</h3>
<p>
对于交易每个环节,都是非常重要的。从询价到报价,从商品资讯到在线沟通,每条数据我们都替你保
<br
/>
护,所有记录均加密保存至云端供查阅。
</p>
<div
class=
"jy_ul clr"
>
<div
class=
"jy_li fl"
>
<img
src=
"__PUBLIC__/images/jy1.png"
alt=
""
>
<h4
class=
"bold"
>
一键询价
</h4>
<div>
提交您要的需求信息,一键全网发布。剩下的交给我们来处理。
</div>
</div>
<h3
class=
"bold mobile_h3_common"
>
您的交易,是我们最重要的
</h3>
<p>
对于交易每个环节,都是非常重要的。从询价到报价,从商品资讯到在线沟通,每条数据我们都替你保
<br
/>
护,所有记录均加密保存至云端供查阅。
</p>
<div
class=
"jy_ul clr"
>
<div
class=
"jy_li fl"
>
<img
src=
"__PUBLIC__/images/jy1.png"
alt=
""
>
<h4
class=
"bold"
>
一键询价
</h4>
<div>
提交您要的需求信息,一键全网发布。剩下的交给我们来处理。
</div>
</div>
<div
class=
"jy_li fl no_margin"
>
<img
src=
"__PUBLIC__/images/jy2.png"
alt=
""
>
<h4
class=
"bold"
>
快速报价
</h4>
<div>
询价中心,支持询价内容筛选,快速找到自己擅长的询价,快速完成报价。
</div>
</div>
<div
class=
"jy_li fl"
>
<img
src=
"__PUBLIC__/images/jy3.png"
alt=
""
>
<h4
class=
"bold"
>
一键发布商品
</h4>
<div>
只要使用微信或手机登录,无需经过复杂的流程,即可手机一键免费发布商品。
</div>
</div>
<div
class=
"jy_li fl no_margin"
>
<img
src=
"__PUBLIC__/images/jy4.png"
alt=
""
>
<h4
class=
"bold"
>
无延迟沟通
</h4>
<div>
询价内容,自动发送到当前消息对话。询报价消息实时同步推送,零延迟沟通。
</div>
</div>
<div
class=
"jy_li fl no_margin"
>
<img
src=
"__PUBLIC__/images/jy2.png"
alt=
""
>
<h4
class=
"bold"
>
快速报价
</h4>
<div>
询价中心,支持询价内容筛选,快速找到自己擅长的询价,快速完成报价。
</div>
</div>
<div
class=
"jy_li fl"
>
<img
src=
"__PUBLIC__/images/jy3.png"
alt=
""
>
<h4
class=
"bold"
>
一键发布商品
</h4>
<div>
只要使用微信或手机登录,无需经过复杂的流程,即可手机一键免费发布商品。
</div>
</div>
<div
class=
"jy_li fl no_margin"
>
<img
src=
"__PUBLIC__/images/jy4.png"
alt=
""
>
<h4
class=
"bold"
>
无延迟沟通
</h4>
<div>
询价内容,自动发送到当前消息对话。询报价消息实时同步推送,零延迟沟通。
</div>
</div>
</div>
</div>
<div
class=
"hz_div"
>
<div
class=
"hz_div_content"
>
<div
class=
"w_yuan"
>
<div
class=
"l_yuan"
></div>
</div>
<div
class=
"hz_div"
>
<div
class=
"hz_div_content"
>
<div
class=
"w_yuan"
>
<div
class=
"l_yuan"
></div>
</div>
<h3
class=
"bold mobile_h3_common"
>
合作伙伴
</h3>
<p>
专注于优化交易,我们希望为用户提供更多的数据支持和服务体验,我们还在努力接入更多的数据...
</p>
<div
class=
"hz_list clr"
>
<div
class=
"hz_item fl"
>
<img
src=
"__PUBLIC__/images/hz1.png"
alt=
""
>
</div>
<h3
class=
"bold mobile_h3_common"
>
合作伙伴
</h3>
<p>
专注于优化交易,我们希望为用户提供更多的数据支持和服务体验,我们还在努力接入更多的数据...
</p>
<div
class=
"hz_list clr"
>
<div
class=
"hz_item fl"
>
<img
src=
"__PUBLIC__/images/hz1.png"
alt=
""
>
</div>
<div
class=
"hz_item fl no_margin"
>
<img
src=
"__PUBLIC__/images/hz2.png"
alt=
""
>
</div>
<div
class=
"hz_item fl"
>
<img
src=
"__PUBLIC__/images/hz3.png"
alt=
""
>
</div>
<div
class=
"hz_item fl no_margin"
>
<img
src=
"__PUBLIC__/images/hz4.png"
alt=
""
>
</div>
<div
class=
"hz_item fl"
>
<img
src=
"__PUBLIC__/images/hz5.png"
alt=
""
>
</div>
<div
class=
"hz_item fl no_margin"
>
<img
src=
"__PUBLIC__/images/hz6.png"
alt=
""
>
</div>
<div
class=
"hz_item fl "
>
<img
src=
"__PUBLIC__/images/hz7.png"
alt=
""
>
</div>
<div
class=
"hz_item fl no_margin"
>
<img
src=
"__PUBLIC__/images/hz8.png"
alt=
""
>
</div>
<div
class=
"hz_item fl no_margin"
>
<img
src=
"__PUBLIC__/images/hz2.png"
alt=
""
>
</div>
<div
class=
"hz_item fl"
>
<img
src=
"__PUBLIC__/images/hz3.png"
alt=
""
>
</div>
<div
class=
"hz_item fl no_margin"
>
<img
src=
"__PUBLIC__/images/hz4.png"
alt=
""
>
</div>
<div
class=
"hz_item fl"
>
<img
src=
"__PUBLIC__/images/hz5.png"
alt=
""
>
</div>
<div
class=
"hz_item fl no_margin"
>
<img
src=
"__PUBLIC__/images/hz6.png"
alt=
""
>
</div>
<div
class=
"hz_item fl "
>
<img
src=
"__PUBLIC__/images/hz7.png"
alt=
""
>
</div>
<div
class=
"hz_item fl no_margin"
>
<img
src=
"__PUBLIC__/images/hz8.png"
alt=
""
>
</div>
</div>
</div>
<div
class=
"bottom_section"
>
<p
class=
"bottom_top
"
>
<span
class=
"time"
>
服务时间
<i>
9:00-22:00
</i></span
>
<span
class=
"phone"
>
联系电话:
<i>
400-888-1688
</i></span>
<
/p
>
<p
class=
"bottom_center"
>
copyright
&
#169 2019 www.ICsales.com
</p>
<div
class=
"bottom_bottom"
>
<img
src=
"__PUBLIC__/icons/wx.png"
alt=
""
class=
"wx
"
>
<img
src=
"__PUBLIC__/icons/wb.png"
alt=
""
class=
"wb
"
>
<
/div
>
</div
>
<div
class=
"bottom_section
"
>
<p
class=
"bottom_top"
>
<span
class=
"time"
>
服务时间
<i>
9:00-22:00
</i></span>
<
span
class=
"phone"
>
联系电话:
<i>
400-888-1688
</i></span
>
</p>
<p
class=
"bottom_center"
>
copyright
&
#169 2019 www.ICsales.com
</p
>
<div
class=
"bottom_bottom
"
>
<img
src=
"__PUBLIC__/icons/wx.png"
alt=
""
class=
"wx
"
>
<
img
src=
"__PUBLIC__/icons/wb.png"
alt=
""
class=
"wb"
>
</div>
</div>
</div>
</div>
<include
file=
"public/foot"
/>
...
...
@@ -263,11 +263,18 @@
});
$
(
'.input_btn'
).
click
(
function
()
{
window
.
location
.
href
=
search_url
+
'/indexsearch'
})
var
key
=
$
(
'.search-input'
).
val
();
if
(
key
)
{
window
.
location
.
href
=
search_url
+
'/indexsearch?key='
+
key
;
}
else
{
window
.
location
.
href
=
search_url
+
'/indexsearch'
}
});
$
(
'.mobile_wrapper .lb_nav span'
).
click
(
function
()
{
var
index
=
$
(
this
).
index
();
$
(
'.mobile_wrapper .lb_div_content'
).
css
(
'left'
,
-
(
index
*
700
/
7
)
+
'vw'
);
$
(
'.mobile_wrapper .lb_div_content'
).
css
(
'left'
,
-
(
index
*
700
/
7
)
+
'vw'
);
$
(
this
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
)
});
...
...
Application/Home/View/Index/search.html
View file @
38b60c08
...
...
@@ -15,7 +15,7 @@
<div
class=
"search_div clr"
>
<div
class=
"input_div fl"
>
<span
class=
"icon iconfont iconjuxing"
></span>
<input
type=
"text"
placeholder=
"请输入要搜索的内容"
>
<input
type=
"text"
placeholder=
"请输入要搜索的内容"
class=
"input-search"
>
</div>
<div
class=
"input_btn fl btn_48 btn bold btn_blue"
>
搜索
...
...
@@ -33,19 +33,19 @@
<div
class=
"zz condition_content"
>
<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
jt
"
>
今天
</div>
<div
class=
"fl
st
"
>
三天之内
</div>
<div
class=
"fl
qt"
>
七天之内
</div>
</div>
</div>
<div
class=
"fz condition_content "
>
<
!-- <
div class="fz condition_content ">
<span class="bold">封装:</span>
<div class="condition_right_content clr">
<div class="fl">贸易商</div>
<div class="fl">贸易商</div>
<div class="fl">贸易商</div>
</div>
</div>
</div>
-->
</div>
<div
class=
"goods_data_list search_data_list"
>
</div>
...
...
Application/Home/View/QuotePrice/inquiry.html
View file @
38b60c08
...
...
@@ -101,7 +101,7 @@
<
div
class
=
"time fr ellipsis boxsiz"
>
{{
layui
.
util
.
toDateString
(
item
.
update_time
*
1000
)}}
<
/div
>
<
/div
>
<
a
class
=
"icon iconfont iconjuxing2 fr"
><
/a
>
{{
#
if
(
item
[
'status
/eq'
]
!
==
1
){
}}
{{
#
if
(
item
[
'status
'
]
==
1
){
}}
{{
#
if
(
item
[
'audit_status'
]
==
1
){
}}
<
a
class
=
"xj xj_status fr"
>
下架
<
/a
>
{{
#
}
else
{
}}
...
...
Application/Home/View/QuotePrice/releaseinquiry.html
View file @
38b60c08
...
...
@@ -13,7 +13,7 @@
<include
file=
"public/top"
/>
<div
class=
"right_content release_inquiry_content"
>
<div
class=
"content"
>
<div
class=
"nav_title"
>
商品管理 > 发布商品 > 上传商品
</div>
<div
class=
"nav_title"
>
询报价 > 发布询价
</div>
<div
class=
"inquiry_form"
>
<div
class=
"top_title clr"
>
<h3
class=
"bold fl"
>
发布询价
</h3>
...
...
Application/Home/View/RobOrder/index.html
View file @
38b60c08
...
...
@@ -20,171 +20,61 @@
首页 > 抢单专区
</div>
<div
class=
"condition_content"
>
<span
class=
"bold"
>
资质
:
</span>
<span
class=
"bold"
>
类型
:
</span>
<span
class=
"all_xj active filter_span"
>
最新询价
</span>
<span
class=
"today_xj filter_span"
>
今日询价
</span>
<
!-- <span class="num_xj filter_span"><i>0</i>回复询价</span> --
>
<
span
class=
"num_xj filter_span"
>
0回复询价
</span
>
</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>
</div>
<div
class=
"pagination-with"
id=
"pagination"
style=
"text-align: right;margin: 25px 25px 0 0;display:none"
></div>
</div>
</div>
</div>
</div>
<include
file=
"public/foot"
/>
<script
src=
"__PUBLIC__/js/roborder/index.js"
></script>
<script
type=
"text/html"
id=
"zqTpl"
>
<
div
class
=
"my_xj_list clr "
>
{{
#
layui
.
each
(
d
,
function
(
index
,
item
){
}}
<
div
class
=
"my_xj_item fl boxsiz"
style
=
"cursor:pointer"
userid
=
"{{item.inquiry_items_id}}"
offerid
=
"{{item.offer_id}}"
>
<
div
class
=
"item_top clr"
>
<
div
class
=
"fl num ellipsis"
>
{{
item
.
goods_name
}}
<
/div
>
<
/div
>
<
div
class
=
"item_middle clr"
>
<
div
class
=
"fl price"
>
{{
#
if
(
item
.
currency
==
1
){
}}
¥
{{
#
}
else
{
}}
$
{{
#
}
}}
{{
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
.
number
}}
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_name
||
'--'
}}
<
/div
>
<
/div
>
<
/div
>
{{
#
});
}}
<
/div
>
{{
#
if
(
d
.
length
===
0
){
}}
<
div
class
=
"no_data"
>
<
img
src
=
"__PUBLIC__/images/nosearchdata.png"
alt
=
""
>
<
p
class
=
"bold"
>
未搜索到询价信息
<
/p
>
<
/div
>
{{
#
}
}}
</script>
</body>
</html>
\ No newline at end of file
Application/Home/View/Search/index.html
View file @
38b60c08
...
...
@@ -17,7 +17,7 @@
<div
class=
"search_div clr"
>
<div
class=
"input_div fl"
>
<span
class=
"icon iconfont iconjuxing"
></span>
<input
type=
"text"
placeholder=
"请输入要搜索的内容"
>
<input
type=
"text"
placeholder=
"请输入要搜索的内容"
class=
"input-search"
>
</div>
<div
class=
"input_btn fl btn_48 btn bold btn_blue"
>
搜索
...
...
@@ -29,25 +29,25 @@
</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>
<div
class=
"condition_right_content clr"
>
<div
class=
"fl
active
"
>
今天
</div>
<div
class=
"fl"
>
三天之内
</div>
<div
class=
"fl
"
>
本周
</div>
<div
class=
"fl
jt
"
>
今天
</div>
<div
class=
"fl
st
"
>
三天之内
</div>
<div
class=
"fl
qt"
>
七天之内
</div>
</div>
</div>
<div
class=
"fz condition_content "
>
<
!-- <
div class="fz condition_content ">
<span class="bold">封装:</span>
<div class="condition_right_content clr">
<div class="fl">贸易商</div>
<div class="fl">贸易商</div>
<div class="fl">贸易商</div>
</div>
</div>
</div>
-->
</div>
<div
class=
"goods_data_list"
>
</div>
...
...
dist/css/common/base.css
View file @
38b60c08
...
...
@@ -550,6 +550,9 @@ body {
display
:
none
;
}
}
.layui-icon
{
display
:
none
!important
;
}
@font-face
{
font-family
:
"iconfont"
;
src
:
url('../../fonts/iconfont.eot?t=1561691322757')
;
...
...
@@ -846,4 +849,3 @@ body {
color
:
#ADB6BF
;
cursor
:
pointer
;
}
/*# sourceMappingURL=base.css.map */
\ No newline at end of file
dist/css/common/base.less
View file @
38b60c08
...
...
@@ -684,6 +684,9 @@ body {
display: none;
}
}
.layui-icon{
display: none !important;
}
// 字体样式
@import "./fonts.less";
...
...
dist/js/global/api.js
View file @
38b60c08
...
...
@@ -108,7 +108,7 @@
/***
* 询价上下架
*/
inquir
ysave
:
offer_url
+
"/inquiry
/save"
,
inquir
statusysave
:
offer_url
+
"/inquiry/status
/save"
,
/***
* 询价统计
*/
...
...
dist/js/global/global.min.js
View file @
38b60c08
!
function
()
{
!
function
()
{
window
.
IcController
=
{
init
:
function
()
{
this
.
created
(
this
).
mounted
(
this
).
handleBind
(
this
);
},
getData
:
function
(
url
,
type
,
param
,
callback
,
isload
,
isheader
)
{
//是否启动loadin效果
if
(
isload
==
undefined
)
{
var
index
=
layer
.
load
(
1
,
{
offset
:
[
'50%'
,
"50%"
],
shade
:
false
});
}
var
platform
=
{
source
:
2
};
var
params
=
$
.
extend
({},
platform
,
param
);
//跨域模式切换 兼容
var
dataTypeXpx
=
"json"
;
if
((
navigator
.
userAgent
.
indexOf
(
'MSIE'
)
>=
0
)
&&
(
navigator
.
userAgent
.
indexOf
(
'Opera'
)
<
0
))
{
...
...
@@ -33,7 +33,7 @@
},
});
}
$
.
ajax
({
type
:
type
,
url
:
url
,
...
...
@@ -43,136 +43,144 @@
withCredentials
:
true
},
success
:
function
(
data
)
{
//处理token失效的情况
if
(
data
.
errcode
===
501
||
data
.
err_code
===
501
)
{
layer
.
msg
(
'登录已失效,请重新登录'
,
{
time
:
600
},
function
()
{
layer
.
msg
(
'登录已失效,请重新登录'
,
{
time
:
600
},
function
()
{
window
.
location
.
href
=
passport_url
+
'/login'
;
});
}
else
{
typeof
callback
==
'function'
&&
callback
(
data
);
layer
.
close
(
index
);
}
return
false
;
},
error
:
function
()
{
layer
.
close
(
index
);
layer
.
msg
(
'网络出现问题,请重试!'
);
return
false
;
}
});
},
created
:
function
(
opt
)
{
if
(
$
(
'#head_pic'
).
length
>
0
)
{
//获取用户信息
this
.
getData
(
apis
.
userInfo
,
'GET'
,
{
token
:
Util
.
getCookie
(
'token'
)
||
''
},
function
(
res
)
{
this
.
getData
(
apis
.
userInfo
,
'GET'
,
{
token
:
Util
.
getCookie
(
'token'
)
||
''
},
function
(
res
)
{
if
(
res
.
errcode
===
0
)
{
//消息数量
$
(
"#count_num"
).
empty
().
html
(
res
.
data
[
'msg_notification'
]);
//设置头像
if
(
res
.
data
.
avatar
)
{
$
(
"#head_pic"
).
find
(
'img'
).
attr
(
'src'
,
res
.
data
[
'avatar'
]);
}
//首页
if
(
$
(
".user_home"
).
length
>
0
)
{
$
(
".user_home"
).
find
(
".company"
).
empty
().
html
(
res
.
data
[
'company_name'
]);
$
(
".user_home"
).
find
(
".tel"
).
empty
().
html
(
res
.
data
[
'mobile'
]);
$
(
".user_home"
).
find
(
".last_login_time"
).
empty
().
html
(
res
.
data
[
'last_login_time'
]);
$
(
".user_home"
).
find
(
".info_desc"
).
children
(
'p'
).
empty
().
html
(
'Hi,'
+
Util
.
getTimeState
());
$
(
".user_home"
).
find
(
".info_desc"
).
children
(
'p'
).
empty
().
html
(
'Hi,'
+
Util
.
getTimeState
());
}
}
});
}
return
this
;
},
mounted
:
function
(
opt
)
{
//导航栏
var
isShow
=
$
(
'.xbj_li'
).
find
(
'dl'
).
css
(
'display'
);
if
(
isShow
==
'none'
)
{
$
(
'.xbj_li'
).
find
(
'.li_right'
).
removeClass
(
'iconjuxing15'
).
addClass
(
'iconjuxing12'
);
}
else
{
$
(
'.xbj_li'
).
find
(
'.li_right'
).
removeClass
(
'iconjuxing12'
).
addClass
(
'iconjuxing15'
);
}
return
this
;
},
handleBind
:
function
(
opt
)
{
//导航栏
$
(
'.xbj_li'
).
on
(
'click'
,
function
()
{
var
isShow
=
$
(
this
).
find
(
'dl'
).
css
(
'display'
);
if
(
isShow
==
'none'
)
{
$
(
this
).
find
(
'dl'
).
slideDown
();
$
(
'.xbj_li'
).
find
(
'.li_right'
).
removeClass
(
'iconjuxing12'
).
addClass
(
'iconjuxing15'
);
}
else
{
$
(
this
).
find
(
'dl'
).
slideUp
();
$
(
'.xbj_li'
).
find
(
'.li_right'
).
removeClass
(
'iconjuxing15'
).
addClass
(
'iconjuxing12'
);
}
});
//退出
$
(
".nav_end"
).
on
(
'click'
,
function
()
{
layer
.
confirm
(
'您确定退出系统嘛'
,
{
icon
:
3
,
title
:
'提示'
,
move
:
false
},
function
(
index
)
{
layer
.
confirm
(
'您确定退出系统嘛'
,
{
icon
:
3
,
title
:
'提示'
,
move
:
false
},
function
(
index
)
{
opt
.
getData
(
apis
.
authLogout
,
'POST'
,
null
,
function
(
res
)
{
if
(
res
.
err_code
===
0
)
{
Util
.
delCookie
(
'token'
,
cookieHostname
);
window
.
location
.
href
=
index_url
;
}
else
{
layer
.
msg
(
res
.
err_msg
);
}
},
undefined
,
true
);
layer
.
close
(
index
);
})
});
return
this
;
},
},
$
(
function
()
{
...
...
@@ -192,17 +200,17 @@
* @returns {boolean}
*/
setCookie
:
function
(
name
,
value
,
time
,
domain
)
{
domain
=
domain
?
";domain="
+
domain
:
""
;
var
Days
=
time
;
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
+
Days
*
24
*
60
*
60
*
1000
);
document
.
cookie
=
name
+
"="
+
value
+
";expires="
+
exp
.
toGMTString
()
+
";path=/"
+
domain
;
return
true
;
},
/**
...
...
@@ -211,19 +219,19 @@
* @returns {*}
*/
getCookie
:
function
(
name
)
{
var
strCookie
=
document
.
cookie
;
var
arrCookie
=
strCookie
.
split
(
"; "
);
for
(
var
i
=
0
;
i
<
arrCookie
.
length
;
i
++
)
{
var
arr
=
arrCookie
[
i
].
split
(
"="
);
if
(
name
==
arr
[
0
])
{
return
arr
[
1
];
}
}
return
""
;
...
...
@@ -233,17 +241,17 @@
* @param name
*/
delCookie
:
function
(
name
,
domain
)
{
domain
=
domain
?
";domain="
+
domain
:
""
;
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
-
10000
);
document
.
cookie
=
name
+
"="
+
''
+
";expires="
+
exp
.
toGMTString
()
+
";path=/"
+
domain
;
return
true
;
},
/**
* 获取参数
...
...
@@ -251,28 +259,28 @@
* @returns {*}
*/
getRequest
:
function
(
value
)
{
if
(
window
.
location
.
pathname
==
"/s/"
)
{
var
url
=
unescape
(
location
.
search
);
}
else
{
var
url
=
decodeURI
(
location
.
search
);
}
var
object
=
{};
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
{
var
str
=
url
.
substr
(
1
);
var
strs
=
str
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
object
[
strs
[
i
].
split
(
"="
)[
0
]]
=
strs
[
i
].
split
(
"="
)[
1
];
}
}
return
object
[
value
];
...
...
@@ -283,91 +291,128 @@
* @returns {string}
*/
getDateStr
:
function
(
val
)
{
var
dd
=
new
Date
();
dd
.
setDate
(
dd
.
getDate
()
+
val
);
var
y
=
dd
.
getFullYear
();
var
m
=
(
dd
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
dd
.
getMonth
()
+
1
)
:
(
dd
.
getMonth
()
+
1
);
var
d
=
dd
.
getDate
()
<
10
?
"0"
+
dd
.
getDate
()
:
dd
.
getDate
();
return
y
+
"-"
+
m
+
"-"
+
d
;
},
/**
* 时间问候语
*/
getTimeState
:
function
()
{
var
timeNow
=
new
Date
();
// 获取当前小时
var
hours
=
timeNow
.
getHours
();
// 设置默认文字
var
text
=
''
;
// 判断当前时间段
if
(
hours
>=
0
&&
hours
<=
10
)
{
text
=
'早上好'
;
}
else
if
(
hours
>
10
&&
hours
<=
14
)
{
text
=
'中午好'
;
}
else
if
(
hours
>
14
&&
hours
<=
18
)
{
text
=
'下午好'
;
}
else
if
(
hours
>
18
&&
hours
<=
24
)
{
text
=
'晚上好'
;
}
return
text
;
},
/**获取前几天的日期 */
getDay
:
function
(
day
)
{
var
today
=
new
Date
();
var
targetday_milliseconds
=
today
.
getTime
()
+
1000
*
60
*
60
*
24
*
day
;
today
.
setTime
(
targetday_milliseconds
);
//注意,这行是关键代码
var
tYear
=
today
.
getFullYear
();
var
tMonth
=
today
.
getMonth
();
var
tDate
=
today
.
getDate
();
tMonth
=
this
.
doHandleMonth
(
tMonth
+
1
);
tDate
=
this
.
doHandleMonth
(
tDate
);
return
tYear
+
"-"
+
tMonth
+
"-"
+
tDate
+
' 00:00:00'
;
},
/**对月份进行处理 */
doHandleMonth
:
function
(
month
)
{
var
m
=
month
;
if
(
month
.
toString
().
length
==
1
)
{
m
=
"0"
+
month
;
52
}
return
m
;
}
};
if
(
typeof
define
===
"function"
&&
define
.
amd
)
{
return
Util
;
}
else
{
window
.
Util
=
Util
;
}
})(
window
);
//form序列化json
$
.
fn
.
serializeJson
=
function
()
{
var
serializeObj
=
{};
var
array
=
this
.
serializeArray
();
var
str
=
this
.
serialize
();
$
(
array
).
each
(
function
()
{
if
(
serializeObj
[
this
.
name
])
{
if
(
$
.
isArray
(
serializeObj
[
this
.
name
]))
{
serializeObj
[
this
.
name
].
push
(
this
.
value
);
}
else
{
serializeObj
[
this
.
name
]
=
[
serializeObj
[
this
.
name
],
this
.
value
];
}
}
else
{
serializeObj
[
this
.
name
]
=
this
.
value
;
}
});
return
serializeObj
;
...
...
dist/js/home/index.js
View file @
38b60c08
...
...
@@ -72,7 +72,14 @@ $(function () {
$
(
this
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
)
});
$
(
'.input_btn'
).
click
(
function
()
{
window
.
location
.
href
=
"/search"
var
key
=
$
(
'.search-input'
).
val
();
if
(
key
){
window
.
location
.
href
=
"/search?key="
+
key
;
}
else
{
window
.
location
.
href
=
"/search"
}
});
$
(
'.home_content'
).
on
(
'click'
,
'.newXjIcon'
,
function
()
{
window
.
location
.
href
=
"/roborder"
...
...
dist/js/index/search.js
View file @
38b60c08
// $(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 = "";
// if(type == 1){
// getTpl = sphtml.innerHTML
// }else{
// getTpl = xjhtml.innerHTML
// }
// if (res.errcode == 0) {
// $('.nav_title').find('span').text(res.total);
// var list = [];
// if(type == 1){
// list = res.goods_list
// }else{
// list = res.inquiry_list
// }
// layui.laytpl(getTpl).render(list, function (html) {
// $(".search_data_list").html(html);
// });
// } else if (res.errcode == 105001) {
// $('.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();
// })
$
(
function
()
{
var
indexSearch
=
{
key
:
Util
.
getRequest
(
'key'
)
||
""
,
init
:
function
()
{
$
(
'.input-search'
).
val
(
this
.
key
);
this
.
bindFun
();
$
(
'.
search_sp
'
).
click
();
$
(
'.
input_btn
'
).
click
();
},
getData
:
function
(
type
)
{
var
url
=
type
==
1
?
apis
.
goodsSearch
:
apis
.
inquirySearch
;
getData
:
function
(
type
,
time
)
{
var
self
=
this
;
var
url
=
type
==
1
?
apis
.
goodsSearch
:
apis
.
inquirySearch
;
IcController
.
getData
(
url
,
'GET'
,
{
"offset"
:
8
,
"p"
:
1
,
"goods_name/like"
:
self
.
key
,
"start_time"
:
time
},
function
(
res
)
{
var
getTpl
=
""
;
if
(
type
==
1
)
{
if
(
type
==
1
)
{
getTpl
=
sphtml
.
innerHTML
}
else
{
}
else
{
getTpl
=
xjhtml
.
innerHTML
}
if
(
res
.
errcode
==
0
)
{
$
(
'.nav_title'
).
find
(
'span'
).
text
(
res
.
total
)
;
$
(
'.nav_title'
).
find
(
'span'
).
text
(
res
.
total
)
var
list
=
[];
if
(
type
==
1
)
{
if
(
type
==
1
)
{
list
=
res
.
goods_list
}
else
{
}
else
{
list
=
res
.
inquiry_list
}
layui
.
laytpl
(
getTpl
).
render
(
list
,
function
(
html
)
{
$
(
".
search
_data_list"
).
html
(
html
);
$
(
".
goods
_data_list"
).
html
(
html
);
});
}
else
if
(
res
.
errcode
==
105001
)
{
}
else
if
(
res
.
errcode
==
type
==
1
?
105013
:
105001
)
{
$
(
'.nav_title'
).
find
(
'span'
).
text
(
0
)
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
$
(
".
search
_data_list"
).
html
(
html
);
$
(
".
goods
_data_list"
).
html
(
html
);
});
}
})
},
bindFun
:
function
()
{
bindFun
:
function
()
{
var
self
=
this
;
$
(
'.search_nav li'
).
on
(
'click'
,
function
(){
var
index
=
$
(
this
).
index
();
$
(
'.search_nav li'
).
on
(
'click'
,
function
()
{
$
(
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
)
$
(
".goods_data_list"
).
empty
();
$
(
'.nav_title'
).
find
(
'span'
).
text
(
0
);
$
(
'.jt'
).
click
();
});
$
(
'.input_btn'
).
on
(
'click'
,
function
()
{
self
.
key
=
$
(
'.input-search'
).
val
();
$
(
'.search_sp'
).
click
();
});
$
(
'.zz'
).
on
(
'click'
,
'.fl'
,
function
()
{
var
index
=
$
(
this
).
index
();
var
spOrXj
=
1
;
var
time
=
new
Date
(
Util
.
getDay
(
0
));
$
(
this
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
if
(
$
(
'.search_xj'
).
hasClass
(
'active'
))
{
spOrXj
=
2
}
if
(
index
==
0
)
{
self
.
getData
(
spOrXj
,
time
.
getTime
()
/
1000
)
}
else
if
(
index
==
1
)
{
time
=
new
Date
(
Util
.
getDay
(
-
3
));
self
.
getData
(
spOrXj
,
time
.
getTime
()
/
1000
)
}
else
{
time
=
new
Date
(
Util
.
getDay
(
-
7
));
self
.
getData
(
spOrXj
,
time
.
getTime
()
/
1000
)
}
})
}
...
...
dist/js/quoteprice/inquiry.js
View file @
38b60c08
...
...
@@ -46,6 +46,7 @@ $(function () {
count
:
res
.
total
,
limit
:
7
,
curr
:
page
,
layout
:[
'prev'
,
'page'
,
'next'
,
'refresh'
],
jump
:
function
(
obj
,
first
)
{
if
(
!
first
)
{
//分页回调调用
...
...
@@ -97,7 +98,8 @@ $(function () {
},
sxj
:
function
(
id
,
type
)
{
//上下架 1上架 2下架
IcController
.
getData
(
apis
.
inquirysave
,
'GET'
,
{
var
self
=
this
;
IcController
.
getData
(
apis
.
inquirstatusysave
,
'GET'
,
{
"token"
:
Util
.
getCookie
(
'token'
)
||
""
,
"inquiry_items_id"
:
id
,
"status"
:
type
...
...
@@ -106,7 +108,8 @@ $(function () {
layer
.
msg
(
'操作成功'
,
{
time
:
600
},
function
()
{
console
.
log
(
'操作成功'
)
self
.
getCount
();
$
(
'.layui-icon-refresh'
).
click
();
});
}
else
{
layer
.
msg
(
'操作失败'
)
...
...
@@ -158,7 +161,7 @@ $(function () {
inquiry
.
getData
(
inquiry
.
params
,
1
);
});
//上架
$
(
'.inquiry_data'
).
on
(
'click'
,
'.
sj
'
,
function
(
e
)
{
$
(
'.inquiry_data'
).
on
(
'click'
,
'.
fb
'
,
function
(
e
)
{
e
.
stopPropagation
();
var
userId
=
$
(
this
).
parent
(
'.data_item'
).
attr
(
'userid'
);
if
(
$
(
this
).
hasClass
(
'disabled'
))
{
...
...
dist/js/roborder/index.js
0 → 100644
View file @
38b60c08
$
(
function
()
{
var
roborderObj
=
{
init
:
function
()
{
this
.
getData
(
1
,
1
);
this
.
bindFun
();
},
getData
:
function
(
type
,
p
)
{
var
self
=
this
;
var
params
=
{
"offset"
:
10
,
"p"
:
p
,
};
if
(
type
==
1
)
{
//最新询价
params
[
"add_time/order"
]
=
"desc"
;
}
else
if
(
type
==
2
)
{
//今日询价
params
[
"today"
]
=
"1"
;
}
else
{
//0回复询价
params
[
"offer_num/eq"
]
=
0
;
}
IcController
.
getData
(
apis
.
inquirySearch
,
'GET'
,
params
,
function
(
res
)
{
var
getTpl
=
zqTpl
.
innerHTML
;
if
(
res
.
errcode
===
0
)
{
$
(
'#pagination'
).
show
();
layui
.
laytpl
(
getTpl
).
render
(
res
.
inquiry_list
,
function
(
html
)
{
$
(
".goods_data_list"
).
empty
().
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
{
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
$
(
".goods_data_list"
).
empty
().
html
(
html
);
$
(
'#pagination'
).
hide
();
});
}
})
},
bindFun
:
function
(){
var
self
=
this
;
$
(
'.condition_content'
).
find
(
'.filter_span'
).
on
(
'click'
,
function
(){
var
index
=
$
(
this
).
index
();
$
(
this
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
$
(
".goods_data_list"
).
empty
();
$
(
'#pagination'
).
hide
();
self
.
getData
(
index
,
1
)
});
$
(
'.roborder_content'
).
on
(
'click'
,
'.my_xj_item'
,
function
(){
var
userid
=
$
(
this
).
attr
(
'userid'
);
window
.
location
.
href
=
"/quotedetail?id="
+
userid
});
//编辑
$
(
'.edit_div'
).
click
(
function
()
{
window
.
location
.
href
=
"/releaseinquiry"
});
}
};
roborderObj
.
init
();
})
\ No newline at end of file
dist/js/search/index.js
View file @
38b60c08
$
(
function
()
{
var
search
=
{
key
:
Util
.
getRequest
(
'key'
)
||
""
,
init
:
function
()
{
$
(
'.input-search'
).
val
(
this
.
key
);
this
.
bindFun
();
$
(
'.
search_sp
'
).
click
();
$
(
'.
input_btn
'
).
click
();
},
getData
:
function
(
type
,
p
)
{
getData
:
function
(
type
,
p
,
time
)
{
var
self
=
this
;
var
url
=
type
==
1
?
apis
.
goodsSearch
:
apis
.
inquirySearch
;
IcController
.
getData
(
url
,
'GET'
,
{
"offset"
:
10
,
"p"
:
p
,
"goods_name/like"
:
self
.
key
,
"start_time"
:
time
},
function
(
res
)
{
var
getTpl
=
""
;
if
(
type
==
1
)
{
if
(
type
==
1
)
{
getTpl
=
sphtml
.
innerHTML
}
else
{
}
else
{
getTpl
=
xjhtml
.
innerHTML
}
if
(
res
.
errcode
==
0
)
{
$
(
'#pagination'
).
show
();
$
(
'.nav_title'
).
find
(
'span'
).
text
(
res
.
total
)
var
list
=
[];
if
(
type
==
1
)
{
if
(
type
==
1
)
{
list
=
res
.
goods_list
}
else
{
}
else
{
list
=
res
.
inquiry_list
}
layui
.
laytpl
(
getTpl
).
render
(
list
,
function
(
html
)
{
...
...
@@ -37,12 +41,12 @@ $(function () {
jump
:
function
(
obj
,
first
)
{
if
(
!
first
)
{
//分页回调调用
self
.
getData
(
type
,
obj
.
curr
)
self
.
getData
(
type
,
obj
.
curr
,
self
.
key
,
time
)
}
}
});
});
}
else
if
(
res
.
errcode
==
105001
)
{
}
else
if
(
res
.
errcode
==
type
==
1
?
105013
:
105001
)
{
$
(
'.nav_title'
).
find
(
'span'
).
text
(
0
)
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
$
(
".goods_data_list"
).
html
(
html
);
...
...
@@ -55,15 +59,32 @@ $(function () {
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
)
$
(
'.jt'
).
click
();
});
$
(
'.input_btn'
).
on
(
'click'
,
function
()
{
self
.
key
=
$
(
'.input-search'
).
val
();
$
(
'.search_sp'
).
click
();
});
$
(
'.zz'
).
on
(
'click'
,
'.fl'
,
function
()
{
var
index
=
$
(
this
).
index
();
var
spOrXj
=
1
;
var
time
=
new
Date
(
Util
.
getDay
(
0
));
$
(
this
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
if
(
$
(
'.search_xj'
).
hasClass
(
'active'
))
{
spOrXj
=
2
}
if
(
index
==
0
)
{
self
.
getData
(
spOrXj
,
1
,
time
.
getTime
()
/
1000
)
}
else
if
(
index
==
1
)
{
time
=
new
Date
(
Util
.
getDay
(
-
3
));
self
.
getData
(
spOrXj
,
1
,
time
.
getTime
()
/
1000
)
}
else
{
time
=
new
Date
(
Util
.
getDay
(
-
7
));
self
.
getData
(
spOrXj
,
1
,
time
.
getTime
()
/
1000
)
}
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment