Commit 24b51e58 by 梁建民

Merge branch 'master' into ljm_home

parents 80d34604 0907c987
Showing with 571 additions and 363 deletions
/Application/Runtime
/.idea
......@@ -2,3 +2,4 @@
<script src="__PUBLIC__/js/global/api.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/global/global.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/layui/layui.all.js"></script>
<script type="text/javascript" src="https://tajs.qq.com/stats?sId=66480203" charset="UTF-8"></script>
......@@ -26,6 +26,4 @@
home_url = 'homeicsales',
item_url = 'itemicsales',
dist = '__PUBLIC__';
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/layui/css/layui.css">
\ No newline at end of file
</script>
\ No newline at end of file
......@@ -12,15 +12,13 @@
<p>
<span>工作日服务时间:<i>9:00-18:00</i></span>
&nbsp; &nbsp;
<span>联系电话:<i>0755-23940717</i></span>
<span>联系电话:<i>0755-89589986、0755-89589962</i></span>
&nbsp; &nbsp;
<span>电子邮箱:<i>service@icsales.com </i></span>
</p>
<h5>copyright &#169; 2019 www.ICsales.com</h5>
</div>
<div class="fl qrcode">
<img src="__PUBLIC__/images/gzhqr.jpg" alt="">
<p>微信公众号</p>
</div>
</div>
</div>
......
......@@ -20,6 +20,9 @@ class IndexController extends BaseController
*/
public function index()
{
$datas['roll_banners'] = $this->apiBaseCache('pc_home_roll_banner', '', ''); // 合作平台
$this->assign('roll_banners', $datas['roll_banners']);
$this->display('Home/index');
}
......
......@@ -18,7 +18,7 @@
<h3 class="bold">基本设置</h3>
<div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span>
<span>如需更改手机账户,请联系在线客服。</span>
<span>如需更改绑定手机号,请联系在线客服</span>
</div>
<div class="form_content clr">
<div class="form_left fl layui-form" lay-filter="account">
......@@ -49,7 +49,7 @@
<div class="brand input_div">
<span class="input_title lineBlock">详细地址:</span>
<div class="input_parent">
<input type="text" placeholder="请输入详细地址" class="input boxsiz"
<input type="text" placeholder="请输入真实详细地址,有助于使发布的信息排名靠前" class="input boxsiz"
name="detail_address" lay-verify="required">
</div>
</div>
......
......@@ -21,7 +21,7 @@
</div>
<div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span>
<span>如实填写认证信息,不符合的认证将被拒绝</span>
<span>按要求提交真实认证信息,否则将审核不通过</span>
</div>
<div class="certis certification-show clr" style="display: none"></div>
<div class="certisno form_content clr layui-form" style="display: none;" lay-filter="editauth">
......@@ -45,7 +45,7 @@
<div class="xh input_div ">
<span class="input_title lineBlock">个人名称:</span>
<div class="input_parent">
<input type="text" placeholder="请输入个人名称" class="input boxsiz"
<input type="text" placeholder="请输入姓名或昵称" class="input boxsiz"
name="company_name">
</div>
</div>
......@@ -87,7 +87,7 @@
<i class="icon iconfont iconjuxing18 deleteicon"></i>
</div>
</div>
<p style="width: 197px;text-align: left;">*请上传名片/工作,任意材料, 证明您的身份信息</p>
<p id="tsv" style="width: 197px;text-align: left;">*请上传身份证、驾驶证、工牌、名片等扫描图片或照片,所提交资料越详尽,审核通过越快(单张图片大小不超过2M)</p>
</div>
</div>
</div>
......@@ -108,14 +108,14 @@
<div class="xh input_div ">
<span class="input_title lineBlock">个人名称:</span>
<div class="input_parent">
<input type="text" placeholder="请输入个人名称" class="input boxsiz" name="company_name">
<input type="text" placeholder="请输入姓名或昵称" class="input boxsiz" name="company_name">
</div>
</div>
{{# } else { }}
<div class="hq input_div ">
<span class="input_title lineBlock">经营性质:</span>
<div class="input_parent">
<input type="radio" name="company_type" value="1" title="贸易商" checked />
<input type="radio" name="company_type" value="1" title="经销商" checked />
<input type="radio" name="company_type" value="2" title="代理商" />
<input type="radio" name="company_type" value="3" title="原厂" />
<input type="radio" name="company_type" value="4" title="制造商" />
......@@ -124,7 +124,7 @@
<div class="xh input_div ">
<span class="input_title lineBlock">个人名称:</span>
<div class="input_parent">
<input type="text" placeholder="请输入公司名称" class="input boxsiz" name="company_name">
<input type="text" placeholder="请输入营业执照上完整的公司名称" class="input boxsiz" name="company_name">
</div>
</div>
{{# } }}
......
......@@ -23,13 +23,13 @@
</div>
<div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span>
<span>上传的商品有图片,搜索排名会优先排</span>
<span>请提供真实的商品信息和图片,有助于使搜索排名靠</span>
</div>
<div class="upload_jr">
<!-- 正常浏览器使用layui的上传插件上传 -->
<div class="upload_section" id="upload_section" style="display: none">
<div class="icon iconfont iconjuxing16"></div>
<p>将商品表格拖拽或点击到此处上传</p>
<p>点击“+”添加本地文件上传</p>
</div>
<!-- 低版本ie使用form+iframe上传 -->
<form enctype="multipart/form-data" id="fileLoad" method="post" target="test"
......@@ -54,9 +54,9 @@
<a class="btn btn_border xz lineBlock" href="__PUBLIC__/ic_templet.xls">下载商品模板</a>
</div>
<div class="upload_text">
<p>1、请保证文件名后缀为xls、xlsx </p>
<p>2、请下载模板,并根据模板格式上传 </p>
<p>3、为加快匹配速度,请保证每份文件型号数不超过200</p>
<p>1、下载商品模板,按模板内格式要求上传</p>
<p>2、仅支持后缀为xls, xlsx的EXCEL表格文件 </p>
<p>3、为保证精确匹配和加快上传,建议文件模板内商品数量不超过500个,如有更多商品,请分次上传</p>
</div>
</div>
......
......@@ -64,7 +64,7 @@
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
{{# if(d.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(d.company_type==2){ }}
代理商
......
......@@ -66,6 +66,10 @@
</div>
</div>
</div>
<div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span>
<span>目前商品sku上限为2000条,超出部分将上传失败。</span>
</div>
<div class="btn_group clr">
<div class="dgsc fl btn btn_blue">
<span class="icon iconfont iconjuxing16"></span>
......
......@@ -24,7 +24,7 @@
</div>
<div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span>
<span>上传的商品有图片,搜索排名会优先排</span>
<span>请提供真实的商品信息和图片,有助于使搜索排名靠</span>
</div>
<div class="form_content layui-form clr" lay-filter="goodsave">
<div class="form_left fl">
......@@ -52,7 +52,7 @@
<span class="input_title lineBlock">*库存:</span>
<div class="input_parent">
<input type="text" name="stock" placeholder="请输入需求数量" class="input boxsiz"
lay-verify="required|number">
lay-verify="required|number|limitStock">
</div>
</div>
<div class="price input_div ">
......@@ -117,7 +117,7 @@
<i class="icon iconfont iconjuxing18 deleteicon"></i>
</div>
</div>
<p>* 支持png、jpg等图片格式</p>
<p>* 目前仅支持png, jpg 图片格式</p>
</div>
</div>
</div>
......
......@@ -4,6 +4,7 @@
<head>
<include file="Common@public/header" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/home.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common/swiper.min.css">
</head>
<body>
......@@ -48,16 +49,30 @@
<div class="search_div clr">
<div class="input_div fl">
<span class="icon iconfont iconjuxing"></span>
<input type="text" placeholder="请输入要搜索的内容" class="search-input">
<input type="text" placeholder="输入型号,搜一下" class="search-input">
</div>
<div class="btn fl btn_60 btn_fz_18 input_btn bold btn_blue">
搜索
</div>
</div>
<div class="search_command clr">
</div>
</div>
</div>
<!-- 轮播部分 -->
<if condition="!empty($roll_banners['data'])">
<div class="sy-carousel">
<div class="swiper-wrapper">
<volist name="roll_banners['data']" id="vo">
<a class="swiper-slide" href="{$vo['url']}"
style="background:url({$vo['images']}) center center no-repeat;"
target="{$vo['window_open'] > 0 ? '_blank' : '_self'}"
title="{$vo['title']}"></a>
</volist>
</div>
<!-- Add Pagination -->
<div class="sy-pagination"></div>
</div>
</if>
<div class="my_xj">
<div class="my_xj_title xj_title">
<span class="lineBlock"></span>
......@@ -81,6 +96,7 @@
</div>
</div>
<include file="Common@public/foot" />
<script src="__PUBLIC__/js/global/swiper.jquery.min.js"></script>
<script src="__PUBLIC__/js/home/index.js"></script>
<script type="text/html" id="hotTpl">
{{# if(d.length != 0){ }}
......@@ -181,7 +197,7 @@
<div class="company fl ellipsis boxsiz"><span class="mark">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......
......@@ -14,6 +14,7 @@
<div class="right_content inquiry_content">
<div class="edit_div">
<span class=" icon iconfont iconjuxing14"></span>
<p>发布询价</p>
</div>
<div class="content">
<div class="nav_title">询报价 > 我的询价</div>
......@@ -144,7 +145,7 @@
<div class="company fl ellipsis boxsiz"><span class="mark">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......
......@@ -129,7 +129,7 @@
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......
......@@ -134,7 +134,7 @@
<span class="mark">
{{# if(item.company_type){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......
......@@ -34,7 +34,7 @@
<h3 class="bold">新增报价</h3>
<div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span>
<span>请回复真实价格,否则将会影响您的排名</span>
<span>请回复真实价格,更容易被采纳</span>
</div>
<div class="form_content layui-form">
<div class="xh input_div ">
......@@ -59,10 +59,10 @@
</div>
</div>
<div class="num input_div ">
<span class="input_title lineBlock">*需求数量:</span>
<span class="input_title lineBlock">*供应数量:</span>
<div class="input_parent">
<input type="text" name="number" placeholder="请输入需求数量" class="input boxsiz"
lay-verify="required|number">
<input type="text" name="number" placeholder="请输入实际供应数量" class="input boxsiz"
lay-verify="required|number|limitStock">
</div>
</div>
<div class="price input_div ">
......@@ -85,7 +85,7 @@
<input type="radio" name="delivery_time" lay-filter="delivery" value="期货" title="期货" checked
id="daytext">
<div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input"
<input type="text" placeholder="输入数字或范围" class="boxsiz day_input input"
lay-verify="required" name="day">
<i class="day"></i>
</div>
......@@ -235,7 +235,7 @@
</script>
<script type="text/html" id="deliveryHtml">
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required" name="day">
<input type="text" placeholder="输入数字或范围" class="boxsiz day_input input" lay-verify="required" name="day">
<i class="day"></i>
{{# } }}
</script>
......
......@@ -20,7 +20,7 @@
</div>
<div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span>
<span>上传的商品有图片,搜索排名会优先排</span>
<span>请提供真实的商品信息和图片,有助于使搜索排名靠</span>
</div>
<div class="form_content clr">
<form id="xj_form">
......@@ -49,7 +49,7 @@
<span class="input_title lineBlock">*库存:</span>
<div class="input_parent">
<input type="text" name="number" placeholder="请输入需求数量" class="input boxsiz"
lay-verify="required|number">
lay-verify="required|number|limitStock">
</div>
</div>
<div class="price input_div ">
......@@ -71,7 +71,7 @@
<input type="radio" name="delivery_time" lay-filter="delivery" value="现货" title="现货"/>
<input type="radio" name="delivery_time" lay-filter="delivery" value="期货" title="期货" checked id="daytext"/>
<div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required" name="day" />
<input type="text" placeholder="输入数字或范围" class="boxsiz day_input input" lay-verify="required" name="day" />
<i class="day"></i>
</div>
</div>
......@@ -120,7 +120,7 @@
</div>
<p>* 支持png、jpg等图片格式</p>
<p>* 目前仅支持png, jpg 图片格式</p>
</div>
</div>
</div>
......@@ -132,7 +132,7 @@
<script src="__PUBLIC__/js/quoteprice/releaseinquiry.js"></script>
<script type="text/html" id="deliveryHtml">
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required" name="day">
<input type="text" placeholder="输入数字或范围" class="boxsiz day_input input" lay-verify="required" name="day">
<i class="day"></i>
{{# } }}
</script>
......
......@@ -12,9 +12,9 @@
<div class="wrapper_right">
<include file="Common@public/top" />
<div class="right_content roborder_content">
<div class="edit_div">
<!-- <div class="edit_div">
<span class=" icon iconfont iconjuxing14"></span>
</div>
</div> -->
<div class="content">
<div class="nav_title">
首页 > 抢单专区
......@@ -64,7 +64,7 @@
<span class="fl type mystype lineBlock">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......
......@@ -17,7 +17,7 @@
<div class="search_div clr">
<div class="input_div fl">
<span class="icon iconfont iconjuxing"></span>
<input type="text" placeholder="请输入要搜索的内容" class="input-search">
<input type="text" placeholder="输入型号,搜一下" class="input-search">
</div>
<div class="input_btn fl btn_48 btn bold btn_blue">
搜索
......@@ -32,20 +32,20 @@
<li class="search_sp fl">商品</li>
<li class="search_xj fl">询价</li>
</ul>
<div class="zz condition_content">
<!-- <div class="zz condition_content">
<span class="bold">时间:</span>
<div class="condition_right_content clr">
<div class="fl jt">今天 </div>
<div class="fl st">三天之内</div>
<div class="fl qt">七天之内</div>
</div>
</div>
</div> -->
<!-- <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 class="fl">经销商</div>
<div class="fl">经销商</div>
<div class="fl">经销商</div>
</div>
</div> -->
</div>
......@@ -87,7 +87,7 @@
<span class="fl type mystype lineBlock">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......@@ -105,7 +105,7 @@
--
{{# } }}
</span>
<div class="fl name ellipsis">{{item.company || ''}}</div>
<div class="fl name ellipsis">{{item.company_name || ''}}</div>
</div>
</div>
{{# }); }}
......@@ -146,7 +146,7 @@
<span class="fl type mystype lineBlock">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......
......@@ -22,12 +22,12 @@
<div class="top_section">
<div class="search_section">
<div class="width_1190">
<h3 class="bold">专注芯片交易,让交易更简单</h3>
<h3 class="bold">专注芯片交易,让元器件交易更简单</h3>
<p> 输入型号,搜一下</p>
<div class="search_div clr">
<div class="input_div fl">
<span class="icon iconfont iconjuxing"></span>
<input type="text" placeholder="请输入要搜索的型号" class="search-input">
<input type="text" placeholder="输入型号,搜一下" class="search-input">
</div>
<div class="input_btn fl btn_48 btn bold btn_blue">
搜索
......@@ -162,6 +162,10 @@
<img src="__PUBLIC__/images/gzhqr.jpg" alt="">
<p>微信公众号</p>
</div>
<div class="qrcode">
<img src="__PUBLIC__/images/dyqr.jpg" alt="">
<p>微信订阅号</p>
</div>
</div>
</div>
</div>
......@@ -169,7 +173,6 @@
<include file="Common@public/indexfoot" />
</div>
<!-- pc下的页面 -->
<!-- 移动端下的页面 -->
<div class="mobile_wrapper">
<div class="mobile_top">
......@@ -259,8 +262,14 @@
</div>
<div class="bottom_section">
<p class="bottom_top">
<span class="time">工作日服务时间:<i>9:00-18:00</i></span>
<span class="phone">联系电话: <i>0755-23940717</i></span>
<span>工作日服务时间:<i>9:00-18:00</i></span>
</p>
<p class="bottom_center">
<span>联系电话: <i>0755-89589986、0755-89589962</i></span>
</p>
<p class="bottom_center">
<span>电子邮箱: <i>service@icsales.com</i></span>
</p>
<p class="bottom_center">copyright &#169 2019 www.ICsales.com</p>
<div class="bottom_bottom">
......@@ -305,117 +314,7 @@
</div>
</div>
<include file="Common@public/foot" />
<!-- 移动端下的页面 -->
<script>
$(function () {
if (!$('.mobile_wrapper').is(':hidden')) {
//移动端
var type = Util.getRequest('type');
if (type == 1) {
//小程序
$('.mobile_wrapper .lb_nav span').eq(1).addClass('active');
$('.mobile_wrapper .xcx_img').show();
$('.mobile_wrapper .xcx_item').show()
} else if (type == 2) {
//app
$('.mobile_wrapper .lb_nav span').eq(2).addClass('active');
$('.mobile_wrapper .app_img').show();
$('.mobile_wrapper .app_item').show()
} else {
//web
$('.mobile_wrapper .lb_nav span').eq(0).addClass('active');
$('.mobile_wrapper .web_img').show()
}
scrollFun()
};
// pc逻辑
$('.index_wrapper .lb_nav span').click(function () {
var index = $(this).index();
$('.index_wrapper .lb_div_content').css('left', -(index * 1190) + 'px');
$(this).addClass('active').siblings().removeClass('active')
});
$('.input_btn').click(function () {
var val = $.trim($('.search-input').val());
if (!val.length) {
layer.msg('搜索内容不能为空')
} else
if (val.length < 3) {
layer.msg('请至少输入3个字符')
} else {
var token = Util.getCookie('token') || "";
if (token) {
window.location.href = home_url + '/search?key=' + val + '&type=1&time=1';
} else {
window.location.href = search_url + '/' + decodeURIComponent(val) + '_1_1';
}
}
});
// h5逻辑
$('.mobile_wrapper .lb_nav span').click(function () {
var index = $(this).index();
window.location.replace(window.location.origin + '?type=' + index)
});
$('.mobile_wrapper .lb_nav span').click(function () {
var index = $(this).index();
window.location.replace(window.location.origin + '?type=' + index)
});
$('.mobile_wrapper').on('click', '.app_item_div', function () {
var index = $(this).index();
if (index == 0) {
//ios下载
window.location.href = 'https://itunes.apple.com/us/app/id1481750196'
} else {
//安卓下载
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") { //微信环境
$('.share_mask').show();
} else {
window.location.href =
'https://img.icsales.com/down/ICSales_release_1_v1.0_2019_10_12_14_42_57.apk'
}
}
});
$('.mobile_wrapper').on('click', '.xcx_item', function () {
$('.xcx_mask').show();
});
$('.mobile_wrapper').on('click', '.xcx_mask', function () {
$(this).hide()
});
$('.mobile_wrapper').on('click', '.share_mask', function () {
$(this).hide()
});
$('.mobile_wrapper').on('click', '.mask_img_div', function (e) {
if (e && e.stopPropagation) {
e.stopPropagation();
} else {
window.event.cancelBubble = true;
}
});
Util.showOrHideQrcode('xcx_btn', 'xcx_qrcode');
Util.showOrHideQrcode('app_btn', 'app_qrcode');
Util.showOrHideQrcode('ios', 'ios_qrcode');
Util.showOrHideQrcode('android', 'android_qrcode');
function scrollFun() {
var scrollHeight = $('.mobile_wrapper .lb_nav').offset().top;
$(document).scroll(function () {
var scroH = $(document).scrollTop(); //滚动高度
if (scroH > scrollHeight) {
$('.mobile_wrapper .lb_nav').addClass('fixed_lb_nav').addClass('clr');
$('.mobile_wrapper .lb_nav span').addClass('fl')
}else{
$('.mobile_wrapper .lb_nav').removeClass('fixed_lb_nav').removeClass('clr');
$('.mobile_wrapper .lb_nav span').removeClass('fl')
}
});
}
})
</script>
<script src="__PUBLIC__/js/index/index.js"></script>
</body>
</html>
\ No newline at end of file
......@@ -41,9 +41,9 @@
<!-- <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 class="fl">经销商</div>
<div class="fl">经销商</div>
<div class="fl">经销商</div>
</div>
</div> -->
</div>
......@@ -83,7 +83,7 @@
<span class="fl type mystype lineBlock">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......@@ -141,7 +141,7 @@
<span class="fl type mystype lineBlock">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......
......@@ -13,7 +13,7 @@
<div class="top">
<i class="logo"></i>
<p class="t1">芯掌柜</p>
<p class="t2">询报价更轻松、便捷</p>
<p class="t2">元器件询报价更便捷</p>
</div>
<!--微信绑定-->
<div class="wechat">
......
<?php
return array(
'URL_ROUTE_RULES' => array(//动态路由
'/^(\w+)_(\d+)_(\d+)$/' => 'Index/index?key=:1&type=:2&time=:3',
'/^(\w+)_(\d+)$/' => 'Index/index?key=:1&type=:2',
)
);
......@@ -15,7 +15,7 @@
<div class="search_div clr">
<div class="input_div fl">
<span class="icon iconfont iconjuxing"></span>
<input type="text" placeholder="请输入要搜索的内容" class="input-search">
<input type="text" placeholder="输入型号,搜一下" class="input-search">
</div>
<div class="input_btn fl btn_48 btn bold btn_blue">
搜索
......@@ -30,20 +30,20 @@
<li class="search_sp fl ">商品</li>
<li class="search_xj fl">询价</li>
</ul>
<div class="zz condition_content">
<!-- <div class="zz condition_content">
<span class="bold">时间:</span>
<div class="condition_right_content clr">
<div class="fl jt">今天</div>
<div class="fl st">三天之内</div>
<div class="fl qt">七天之内</div>
</div>
</div>
</div> -->
<!-- <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 class="fl">经销商</div>
<div class="fl">经销商</div>
<div class="fl">经销商</div>
</div>
</div> -->
</div>
......@@ -83,7 +83,7 @@
<span class="fl type mystype lineBlock">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......@@ -141,7 +141,7 @@
<span class="fl type mystype lineBlock">
{{# if(item.company_type!==""){ }}
{{# if(item.company_type==1){ }}
贸易
经销
{{# } }}
{{# if(item.company_type==2){ }}
代理商
......
......@@ -197,7 +197,7 @@
top: 90px;
left: 0;
right: 0;
bottom: 160px;
bottom: 170px;
overflow: auto;
padding: 10px 20px;
}
......
......@@ -236,7 +236,7 @@
top: 90px;
left: 0;
right: 0;
bottom: 160px;
bottom: 170px;
overflow: auto;
padding: 10px 20px;
......
......@@ -234,22 +234,26 @@ body {
font-size: 14px;
}
.edit_div {
height: 80px;
height: 75px;
width: 80px;
border-radius: 50% 50%;
border-radius: 10px;
background: rgba(234, 173, 55, 0.9);
box-shadow: 0px 2px 9px 0px rgba(242, 191, 97, 0.5);
position: fixed;
top: 160px;
right: 20px;
top: 180px;
right: 40px;
cursor: pointer;
text-align: center;
line-height: 80px;
z-index: 3;
color: #fff;
padding-top: 5px;
}
.edit_div .icon {
font-size: 40px;
color: #fff;
}
.edit_div p {
font-size: 12px;
margin-top: 5px;
}
.no_data {
text-align: center;
......@@ -508,20 +512,20 @@ body {
bottom: 0;
right: 0;
left: 0;
height: 210px;
height: 141px;
border-top: 2px solid #F5F9FC;
background-color: #fff;
}
.index_wrapper .index_footer .footer_content img {
margin-top: 50px;
margin-top: 41px;
}
.index_wrapper .index_footer .footer_content .text {
margin-top: 56px;
margin-top: 47px;
}
.index_wrapper .index_footer .footer_content .fw_desc {
font-size: 14px;
color: #ADB6BF;
margin-top: 74px;
margin-top: 47px;
}
.index_wrapper .index_footer .footer_content .fw_desc i {
color: #686E73;
......@@ -530,20 +534,6 @@ body {
text-align: right;
margin-top: 4px;
}
.index_wrapper .index_footer .footer_content .qrcode {
margin: 0 20px 0 30px;
}
.index_wrapper .index_footer .footer_content .qrcode img {
height: 80px;
width: 80px;
margin-top: 50px;
}
.index_wrapper .index_footer .footer_content .qrcode p {
font-size: 12px;
color: #ADB6BF;
text-align: center;
margin-top: 5px;
}
.pull_qrcode {
display: none;
height: 130px;
......
......@@ -277,22 +277,25 @@ body {
}
.edit_div {
height: 80px;
height: 75px;
width: 80px;
border-radius: 50% 50%;
border-radius:10px;
background: rgba(234, 173, 55, 0.9);
box-shadow: 0px 2px 9px 0px rgba(242, 191, 97, 0.5);
position: fixed;
top: 160px;
right: 20px;
top: 180px;
right: 40px;
cursor: pointer;
text-align: center;
line-height: 80px;
z-index: 3;
color: #fff;
padding-top:5px;
.icon {
font-size: 40px;
color: #fff;
}
p{
font-size: 12px;
margin-top:5px;
}
}
......@@ -635,24 +638,24 @@ body {
bottom: 0;
right: 0;
left: 0;
height: 210px;
height:141px;
border-top: 2px solid #F5F9FC;
background-color: #fff;
.footer_content {
img {
margin-top: 50px;
margin-top: 41px;
}
.text {
margin-top: 56px
margin-top: 47px
}
.fw_desc {
font-size: 14px;
color: #ADB6BF;
margin-top: 74px;
margin-top: 47px;
i {
color: #686E73;
......@@ -663,23 +666,6 @@ body {
margin-top: 4px;
}
}
.qrcode {
margin: 0 20px 0 30px;
img {
height: 80px;
width: 80px;
margin-top: 50px;
}
p {
font-size: 12px;
color: #ADB6BF;
text-align: center;
margin-top: 5px;
}
}
}
}
}
......
......@@ -134,6 +134,18 @@
.good_manage_content .btn_group div.xz {
margin-left: 20px;
}
.good_manage_content .gb {
height: 34px;
line-height: 34px;
background-color: #FFF6E6;
margin: 16px 0;
color: #EAA217;
font-size: 14px;
}
.good_manage_content .gb .icon {
font-size: 15px;
margin: 0 6px 0 12px;
}
.good_manage_content .good_data .data_list {
margin-top: 10px;
}
......@@ -276,4 +288,3 @@
.good_manage_content .good_data .data_list .data_item .xj_status.fb {
color: #0D84D1;
}
/*# sourceMappingURL=goodmanage.css.map */
\ No newline at end of file
......@@ -176,6 +176,19 @@
}
}
}
.gb {
height: 34px;
line-height: 34px;
background-color: #FFF6E6;
margin: 16px 0;
color: #EAA217;
font-size: 14px;
.icon {
font-size: 15px;
margin: 0 6px 0 12px;
}
}
.good_data {
.data_list {
......
......@@ -43,6 +43,9 @@
text-align: center;
width: 477px;
}
.home_content .user_info .price_info div {
cursor: pointer;
}
.home_content .user_info .price_info .hf {
margin: 0 80px;
}
......@@ -120,6 +123,34 @@
.home_content .search_section .search_command .command_name div:hover {
color: #0D84D1;
}
.home_content .sy-carousel {
width: 690px;
height: 200px;
margin: 30px auto 0;
overflow: hidden;
position: relative;
border-radius: 4px;
}
.home_content .sy-carousel .swiper-slide {
cursor: pointer;
display: block;
}
.home_content .sy-carousel .sy-pagination {
position: absolute;
bottom: 14px;
z-index: 99;
text-align: center;
}
.home_content .sy-carousel .sy-pagination span {
width: 30px;
height: 4px;
border-radius: 0;
background: #fff;
opacity: 1;
}
.home_content .sy-carousel .sy-pagination span.swiper-pagination-bullet-active {
background: #0D84D1;
}
.home_content .xj_title {
padding-left: 20px;
}
......
......@@ -53,6 +53,10 @@
text-align: center;
width: 477px;
div {
cursor: pointer;
}
.hf {
margin: 0 80px;
}
......@@ -118,7 +122,7 @@
.input_btn {
width: 118px;
border-radius: 0px 4px 4px 0px;
}
}
......@@ -141,7 +145,9 @@
cursor: pointer;
transition: all 0.2s ease-in-out;
display: block;
div.active ,&:hover{
div.active,
&:hover {
color: #0D84D1;
}
}
......@@ -150,6 +156,35 @@
}
}
.sy-carousel {
width:690px;
height:200px;
margin:30px auto 0;
overflow: hidden;
position: relative;
border-radius:4px;
.swiper-slide {
cursor: pointer;
display: block;
}
.sy-pagination{
position: absolute;
bottom: 14px;
z-index:99;
text-align: center;
span{
width:30px;
height:4px;
border-radius: 0;
background: #fff;
opacity: 1;
&.swiper-pagination-bullet-active{
background:#0D84D1;
}
}
}
}
.xj_title {
padding-left: 20px;
......@@ -173,6 +208,7 @@
.my_xj_list {
max-height: 415px;
overflow: hidden;
.my_xj_item {
.item_top {
.type {
......@@ -205,25 +241,30 @@
}
}
.index_tab{
height:74px;
line-height:74px;
padding:0 25px;
.index_tab {
height: 74px;
line-height: 74px;
padding: 0 25px;
font-size: 16px;
background-color: #fff;
color:#686E73;
margin:20px 20px 0;
div{
color: #686E73;
margin: 20px 20px 0;
div {
cursor: pointer;
}
.active{
color:#0D84D1;
.active {
color: #0D84D1;
font-weight: 600;
}
.xj{
margin-left:44px;
.xj {
margin-left: 44px;
}
}
.new_xj {
margin-top: 35px;
......@@ -314,7 +355,7 @@
cursor: pointer;
}
&:hover{
&:hover {
box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5);
}
}
......
......@@ -168,7 +168,7 @@
}
.index_content .top_section .search_section .lb_div .lb_div_content .lb_item .btn_div p.text {
font-size: 12px;
opacity: .65;
opacity: 0.65;
}
.index_content .top_section .search_section .lb_div .lb_div_content .lb_item img {
height: 100%;
......@@ -484,13 +484,13 @@
.mobile_wrapper .bottom_section .bottom_top i {
color: #686E73;
}
.mobile_wrapper .bottom_section .bottom_top .phone {
margin-left: 1.42857143vw;
}
.mobile_wrapper .bottom_section .bottom_center {
font-size: 3.14285714vw;
margin-top: 1.71428571vw;
}
.mobile_wrapper .bottom_section .bottom_center i {
color: #686E73;
}
.mobile_wrapper .bottom_section .bottom_bottom {
margin-top: 7.14285714vw;
}
......@@ -556,7 +556,7 @@
}
.mobile_wrapper .bottom_fixed_item.app_item .app_item_div .text {
font-size: 2.85714286vw;
opacity: .65;
opacity: 0.65;
}
.mobile_wrapper .xcx_mask {
position: fixed;
......
......@@ -600,15 +600,14 @@
color: #686E73;
}
.phone {
margin-left: 10vw/@fixedNum;
}
}
.bottom_center {
font-size: 22vw/@fixedNum;
margin-top: 12vw/@fixedNum;
i{
color: #686E73;
}
}
.bottom_bottom {
......

101 KB | W: | H:

83.7 KB | W: | H:

dist/images/mlb2.png
dist/images/mlb2.png
dist/images/mlb2.png
dist/images/mlb2.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -32,7 +32,7 @@
$('#fileLoad').hide();
$('.sc_div').hide();
$('.upload_result').show();
$('.upload_result img').attr('src',res.data.auth_img)
$('.upload_result img').attr('src', res.data.auth_img)
}
layui.form.render();
......@@ -73,7 +73,6 @@
},
mounted: function (opt) {
return this;
},
uploadFun: function () {
......@@ -84,8 +83,8 @@
data: {
token: Util.getCookie('token'),
source: 2,
},
field: "upload",
before: function () {
......@@ -108,10 +107,10 @@
err: function () {
layer.closeAll('loading');
layer.msg('上传失败');
}
});
},
isIe: function (opt) {
if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) {
......@@ -123,7 +122,8 @@
iframe.attachEvent("onload", opt.iframeOnload);
} else {
iframe.onload = opt.iframeOnload;
};
}
;
opt.formSubmit();
$('#mineFiles').on('change', function () {
layer.load(1, {
......@@ -163,7 +163,7 @@
console.log(e)
layer.closeAll('loading');
layer.msg('上传失败');
}
if (json) {
layer.closeAll('loading');
......@@ -174,7 +174,7 @@
CertificationController.imgUrl = json.data[0] || '';
} else {
layer.msg(json.errmsg)
}
}
},
......@@ -183,6 +183,14 @@
//认证类型
layui.form.on('radio(auth_type)', function (data) {
var value = data.value;
if (value == 1) {
$("#tsv").text('*请上传身份证、驾驶证、工牌、名片等扫描图片或照片,所提交资料越详尽,审核通过越快(单张图片大小不超过2M)');
} else if (value == 2) {
$("#tsv").text('*请上传企业营业执照、商用租赁合同、相关证明资料等扫描图片或照片,所提交资料越详尽,审核通过越快(单张图片大小不超过2M)');
}
var getTpl = certtHtml.innerHTML;
layui.laytpl(getTpl).render(data.value, function (html) {
......@@ -204,7 +212,7 @@
opt.isClick = true;
var params = $.extend({}, data.field, {token: opt.token,auth_img:opt.imgUrl}); //新增参数
var params = $.extend({}, data.field, {token: opt.token, auth_img: opt.imgUrl}); //新增参数
IcController.getData(apis.addAuth, 'GET', params, function (res) {
......@@ -229,6 +237,7 @@
}
});
//更新认证信息按钮
$(document).on('click', '.edit_info', function (e) {
......@@ -238,8 +247,9 @@
});
$('.certification_content').on('click', '.deleteicon', function () {
if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) {
//ie版本
$('#fileLoad').show();
......@@ -250,10 +260,9 @@
$('.upload_result').hide();
$('.upload_result img').attr('src', '');
opt.imgUrl = "";
})
return this;
},
}, $(function () {
......
......@@ -3,9 +3,11 @@ $(function () {
conn: {},
orgName: "1113190618181018",
appName: "icsales",
defaultName: "001",
defaultName: "001",//客服im账号
defaultUserId:"36",//客服ID
customerNum: "",
customerP: "",
isAddCustomer:false,
templateObj: JSON.parse(Util.getCookie('template') || "{}"),
customerText: Util.getCookie('customer') || "",
isLoginSuccess: false,
......@@ -45,7 +47,6 @@ $(function () {
}, function (res) {
if (res.errcode == 0) {
self.img = res.data.avatar || (res.data.wechat_oauth ? (res.data.wechat_oauth.oauth_head || '') : '');
console.log(self.img)
self.name = res.data.company_name || '--';
self.id = res.data.user_id + '';
self.customerNum = res.data.im_username || '';
......@@ -77,24 +78,31 @@ $(function () {
}
});
},
addChatMember: function (id) {
addChatMember: function (id,isCustomer) {
var self = this;
IcController.getData(apis.addrecord, 'GET', {
"token": Util.getCookie('token') || '',
"user_id": id
}, function (res) {
if (res.errcode === 0) {
if(isCustomer){
self.isAddCustomer = true
}
} else {
// console.log('添加聊天成员失败')
}
}, false);
},
rendChatSection: function (data) {
if (this.customerNum !== this.defaultName) {
if (this.customerNum !== this.defaultName) {//加客服
this.addUser({}, true);
}
for (var i = 0; i < data.length; i++) {
this.addUser(data[i])
if(data[i].im_username !== this.defaultName){
this.addUser(data[i])
}else{
this.isAddCustomer = true;
}
}
},
singleChat: function () {
......@@ -131,7 +139,7 @@ $(function () {
if (isDefault) {
id = this.defaultName;
name = '芯掌柜客服';
touserid = "";
touserid = this.defaultUserId;
img = dist + "/images/timg.jpg";
img1 = dist + "/images/timg.jpg";
} else {
......@@ -527,10 +535,10 @@ $(function () {
time: message.ext.time,
touserid: message.ext.touserid
}, true);
var index = self.chatList.indexOf(message.from);
if (index == -1) {
self.addChatMember(message.ext.id)
}
// var index = self.chatList.indexOf(message.from);
// if (index == -1) {
// self.addChatMember(message.ext.id)
// }
} else { //普通消息
self.receiveData(1, {
......@@ -541,12 +549,12 @@ $(function () {
from: message.from,
touserid: message.ext.touserid
}, false);
if (self.customerNum == self.defaultName) {
var index = self.chatList.indexOf(message.from);
if (index == -1) {
self.addChatMember(message.ext.id)
}
}
// if (self.customerNum == self.defaultName) {
// var index = self.chatList.indexOf(message.from);
// if (index == -1) {
// self.addChatMember(message.ext.id)
// }
// }
}
}, //收到文本消息;
......@@ -559,12 +567,12 @@ $(function () {
from: message.from,
touserid: message.ext.touserid
}, false);
if (self.customerNum == self.defaultName) {
var index = self.chatList.indexOf(message.from);
if (index == -1) {
self.addChatMember(message.ext.id)
}
}
// if (self.customerNum == self.defaultName) {
// var index = self.chatList.indexOf(message.from);
// if (index == -1) {
// self.addChatMember(message.ext.id)
// }
// }
}, //收到表情消息;
// onCmdMessage: function (message) {
......@@ -599,12 +607,12 @@ $(function () {
url: message.url,
touserid: message.ext.touserid
}, false);
if (self.customerNum == self.defaultName) {
var index = self.chatList.indexOf(message.from);
if (index == -1) {
self.addChatMember(message.ext.id)
}
}
// if (self.customerNum == self.defaultName) {
// var index = self.chatList.indexOf(message.from);
// if (index == -1) {
// self.addChatMember(message.ext.id)
// }
// }
};
options.onFileDownloadError = function () {
// 图片下载失败
......@@ -749,6 +757,9 @@ $(function () {
}, false));
self.scrollToTop(userId)
$('#chat_textarea').val('');
if(userId == self.defaultName && !self.isAddCustomer){
self.addChatMember(touserid,true)
}
},
fail: function (e) {
......@@ -776,12 +787,12 @@ $(function () {
touserid: touserid,
name1: name,
img1: img,
isTemplate: '1'
isTemplate: '1',
custom: "custom"
});
delete params.targetId;
delete params.userImg;
delete params.userName;
// console.log(params)
if (status == 2) {
layer.msg('该用户已被拉黑');
self.scrollToTop(userId)
......
......@@ -194,7 +194,11 @@
/**
* 标记会员通知(已读)
*/
userMarkmsg: user_url + '/user/markmsg'
userMarkmsg: user_url + '/user/markmsg',
/**
* 获取最新版本信息
*/
getVersion: user_url + '/get/version'
};
if (typeof define === "function" && define.amd) {
return apis;
......
......@@ -85,19 +85,21 @@
this.getData(apis.userInfo, 'GET', {
token: Util.getCookie('token') || ''
}, function (res) {
if (res.errcode === 0) {
var avatar = ""
//消息数量
$("#count_num").empty().html(res.data['msg_notification']);
//设置头像
if (res.data.avatar) {
$("#head_pic").find('img').attr('src', res.data['avatar']);
$(".info_logo").attr('src', res.data['avatar']);
if (!res.data.avatar) {
avatar = res.data.wechat_oauth ? res.data.wechat_oauth.oauth_head : ''
}else{
avatar = res.data.avatar
}
if(avatar){
$("#head_pic").find('img').attr('src', avatar);
$(".info_logo").attr('src',avatar);
}
//首页信息
......
......@@ -310,6 +310,11 @@
return '品牌不能小于2个字符'
}
},
limitStock:function(value, item){
if(value>10000000){
return '库存最大为10000000(一千万)'
}
},
limitLengthLgThree: function (value, item) {
if (value.length > 6) {
return '货期不能大于6个字符'
......@@ -317,7 +322,10 @@
},
pointLimit: function (value, item) {
if(!Util.fourPoint(value)){
return '价格为整数或不超过4位小数'
return '单价为整数或不超过4位小数'
}
if(value>1000000){
return '单价最大为1000000(一百万)'
}
},
});
......
$(function () {
var homeObj = {
sySwiper: new Swiper('.sy-carousel', {
loop: true,
autoplay: 3000,
pagination: '.sy-pagination',
paginationClickable: true,
autoplayDisableOnInteraction: false
}),
init: function () {
var me = this;
this.bindFun();
this.getXbData(1);
this.getNewXj();
this.getHotGoods()
this.getHotGoods();
$('.sy-carousel').hover(function () {
me.sySwiper.stopAutoplay();
}, function () {
me.sySwiper.startAutoplay();
})
},
getHotGoods: function () {
var obj = Util.dataEncryption();
......@@ -94,6 +107,16 @@ $(function () {
},
bindFun: function () {
var self = this;
$('.price_info').on('click', '.xj', function () {
console.log(111)
window.location.href = "/inquiry";
});
$('.price_info').on('click', '.hf', function () {
window.location.href = "/quote";
});
$('.price_info').on('click', '.sp', function () {
window.location.href = "/goodmanage";
});
$('.index_tab div').on('click', function () {
var i = $(this).attr('data-i');
$(".goods_data_list").empty()
......@@ -107,7 +130,8 @@ $(function () {
} else if (val.length < 3) {
layer.msg('请至少输入3个字符')
} else {
window.location.href = "/search?key=" + val + '&type=1&time=1';
// window.location.href = "/search?key=" + val + '&type=1&time=1';
window.location.href = "/search?key=" + val + '&type=1';
}
});
......@@ -128,8 +152,9 @@ $(function () {
window.location.href = "/quotedetail?id=" + userid + '&offerid=' + offerid
});
$('.search_command').on('click', '.hot_item', function () {
var title = $(this).attr('title');
window.location.href = "/search?key=" + title + '&type=1&time=1';
var title = $(this).attr('title');
// window.location.href = "/search?key=" + title + '&type=1&time=1';
window.location.href = "/search?key=" + title + '&type=1';
});
......
$(function () {
var indexObj = {
versionUrl:"",
init: function () {
this.bindFun();
Util.showOrHideQrcode('xcx_btn', 'xcx_qrcode');
Util.showOrHideQrcode('app_btn', 'app_qrcode');
Util.showOrHideQrcode('ios', 'ios_qrcode');
Util.showOrHideQrcode('android', 'android_qrcode');
},
scrollFun: function () {
var scrollHeight = $('.mobile_wrapper .lb_nav').offset().top;
$(document).scroll(function () {
var scroH = $(document).scrollTop(); //滚动高度
if (scroH > scrollHeight) {
$('.mobile_wrapper .lb_nav').addClass('fixed_lb_nav').addClass('clr');
$('.mobile_wrapper .lb_nav span').addClass('fl')
} else {
$('.mobile_wrapper .lb_nav').removeClass('fixed_lb_nav').removeClass('clr');
$('.mobile_wrapper .lb_nav span').removeClass('fl')
}
});
},
getVersion: function () {
var me = this;
//获取安卓下载的版本链接
IcController.getData(apis.getVersion, 'GET', {
source:'3',
version_code:'0'
}, function (res) {
if(res.errcode==0){
me.versionUrl = res.data.url
}
},false)
},
bindFun: function () {
if (!$('.mobile_wrapper').is(':hidden')) {
//移动端
this.bindFunH5()
} else {
// pc逻辑
this.bindFunWeb()
}
},
bindFunH5: function () {
//移动端
var me = this;
me.getVersion();
var type = Util.getRequest('type');
if (type == 1) {
//小程序
$('.mobile_wrapper .lb_nav span').eq(1).addClass('active');
$('.mobile_wrapper .xcx_img').show();
$('.mobile_wrapper .xcx_item').show()
} else if (type == 2) {
//app
$('.mobile_wrapper .lb_nav span').eq(2).addClass('active');
$('.mobile_wrapper .app_img').show();
$('.mobile_wrapper .app_item').show()
} else {
//web
$('.mobile_wrapper .lb_nav span').eq(0).addClass('active');
$('.mobile_wrapper .web_img').show()
}
me.scrollFun();
$('.mobile_wrapper .lb_nav span').click(function () {
var index = $(this).index();
window.location.replace(window.location.origin + '?type=' + index)
});
$('.mobile_wrapper .lb_nav span').click(function () {
var index = $(this).index();
window.location.replace(window.location.origin + '?type=' + index)
});
$('.mobile_wrapper').on('click', '.app_item_div', function () {
var index = $(this).index();
if (index == 0) {
//ios下载
window.location.href = 'https://itunes.apple.com/us/app/id1481750196'
} else {
//安卓下载
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") { //微信环境
$('.share_mask').show();
} else {
if(me.versionUrl){
window.location.href = me.versionUrl
}
}
}
});
$('.mobile_wrapper').on('click', '.xcx_item', function () {
$('.xcx_mask').show();
});
$('.mobile_wrapper').on('click', '.xcx_mask', function () {
$(this).hide()
});
$('.mobile_wrapper').on('click', '.share_mask', function () {
$(this).hide()
});
$('.mobile_wrapper').on('click', '.mask_img_div', function (e) {
if (e && e.stopPropagation) {
e.stopPropagation();
} else {
window.event.cancelBubble = true;
}
});
},
bindFunWeb: function () {
// pc逻辑
$('.index_wrapper .lb_nav span').click(function () {
var index = $(this).index();
$('.index_wrapper .lb_div_content').css('left', -(index * 1190) + 'px');
$(this).addClass('active').siblings().removeClass('active')
});
$('.input_btn').click(function () {
var val = $.trim($('.search-input').val());
if (!val.length) {
layer.msg('搜索内容不能为空')
} else
if (val.length < 3) {
layer.msg('请至少输入3个字符')
} else {
var token = Util.getCookie('token') || "";
if (token) {
window.location.href = home_url + '/search?key=' + val + '&type=1';
} else {
window.location.href = search_url + '/' + decodeURIComponent(val) + '_1';
}
}
});
}
};
indexObj.init()
})
\ No newline at end of file
......@@ -11,27 +11,29 @@ $(function () {
},
renderPage: function () {
if (this.type == 2) {
$('.search_nav ').find('.search_xj').addClass('active').siblings().removeClass('active');
$('.search_nav').find('.search_xj').click()
// $('.search_nav ').find('.search_xj').addClass('active').siblings().removeClass('active');
} else {
$('.search_nav ').find('.search_sp').addClass('active').siblings().removeClass('active');
$('.search_nav').find('.search_sp').click()
// $('.search_nav ').find('.search_sp').addClass('active').siblings().removeClass('active');
}
if (this.time == 2) {
$('.condition_right_content').find('.st').click()
} else if (this.time == 3) {
$('.condition_right_content').find('.qt').click()
} else {
$('.condition_right_content').find('.jt').click()
};
// if (this.time == 2) {
// $('.condition_right_content').find('.st').click()
// } else if (this.time == 3) {
// $('.condition_right_content').find('.qt').click()
// } else {
// $('.condition_right_content').find('.jt').click()
// };
$('.input-search').val(this.key);
},
getData: function (type, time) {
getData: function (type) {
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
// "start_time": time
}, function (res) {
var getTpl = "";
if (type == 1) {
......@@ -74,7 +76,7 @@ $(function () {
} else {
self.type = 2
}
$('.jt').click();
self.getData(self.type)
});
$('.input_btn').on('click', function () {
var val = $.trim($('.input-search').val());
......@@ -84,7 +86,7 @@ $(function () {
layer.msg('搜索内容太短')
} else {
console.log(self.type, self.time)
window.location.replace("/" + decodeURIComponent(val) + '_' + self.type + '_' + self.time);
window.location.replace("/" + decodeURIComponent(val) + '_' + self.type);
}
});
$('.zz').on('click', '.fl', function () {
......
......@@ -306,8 +306,8 @@
if (res.errcode === 0) {
//注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname);
Util.setCookie('user_id', res.data.user_id, 1, cookieHostname);
Util.setCookie('token', res.data.access_token, 15, cookieHostname);
Util.setCookie('user_id', res.data.user_id, 15, cookieHostname);
window.location.href = home_url;
......@@ -360,8 +360,8 @@
if (res.errcode === 0) {
//注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname);
Util.setCookie('user_id', res.data.user_id, 1, cookieHostname);
Util.setCookie('token', res.data.access_token, 15, cookieHostname);
Util.setCookie('user_id', res.data.user_id, 15, cookieHostname);
window.location.href = home_url;
......
......@@ -270,8 +270,8 @@
if (res.errcode === 0) {
//注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname);
Util.setCookie('user_id', res.data.user_id, 1, cookieHostname);
Util.setCookie('token', res.data.access_token, 15, cookieHostname);
Util.setCookie('user_id', res.data.user_id, 15, cookieHostname);
window.location.href = home_url;
......
......@@ -212,6 +212,11 @@ $(function () {
return '品牌不能小于2个字符'
}
},
limitStock:function(value, item){
if(value>10000000){
return '数量最大为10000000(一千万)'
}
},
limitLengthLgThree: function (value, item) {
if (value.length > 6) {
return '货期不能大于6个字符'
......@@ -219,7 +224,10 @@ $(function () {
},
pointLimit: function (value, item) {
if(!Util.fourPoint(value)){
return '价格为整数或不超过4位小数'
return '报价为整数或不超过4位小数'
}
if(value>1000000){
return '报价最大为1000000(一百万)'
}
},
});
......
......@@ -211,6 +211,11 @@
return '品牌不能小于2个字符'
}
},
limitStock:function(value, item){
if(value>10000000){
return '库存最大为10000000(一千万)'
}
},
limitLengthLgThree: function (value, item) {
if (value.length > 6) {
return '货期不能大于6个字符'
......@@ -220,7 +225,10 @@
if(!Util.fourPoint(value)){
return '价格为整数或不超过4位小数'
}
},
if(value>1000000){
return '价格最大为1000000(一百万)'
}
}
});
......
......@@ -62,9 +62,9 @@ $(function () {
window.location.href = "/quotedetail?id=" + userid
});
//编辑
$('.edit_div').click(function () {
window.location.href = "/releaseinquiry"
});
// $('.edit_div').click(function () {
// window.location.href = "/releaseinquiry"
// });
}
};
roborderObj.init();
......
......@@ -9,28 +9,30 @@ $(function () {
},
renderPage: function () {
if (this.type == 2) {
$('.search_nav ').find('.search_xj').addClass('active').siblings().removeClass('active');
// $('.search_nav ').find('.search_xj').addClass('active').siblings().removeClass('active');
$('.search_nav').find('.search_xj').click()
} else {
$('.search_nav ').find('.search_sp').addClass('active').siblings().removeClass('active');
$('.search_nav').find('.search_sp').click()
// $('.search_nav ').find('.search_sp').addClass('active').siblings().removeClass('active');
}
if (this.time == 2) {
$('.condition_right_content').find('.st').click()
} else if (this.time == 3) {
$('.condition_right_content').find('.qt').click()
} else {
$('.condition_right_content').find('.jt').click()
};
// if (this.time == 2) {
// $('.condition_right_content').find('.st').click()
// } else if (this.time == 3) {
// $('.condition_right_content').find('.qt').click()
// } else {
// $('.condition_right_content').find('.jt').click()
// };
$('.input-search').val(this.key);
},
getData: function (type, p, time) {
getData: function (type, p) {
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,
// "start_time": time,
"token": Util.getCookie('token') || ""
}, function (res) {
var getTpl = "";
......@@ -59,7 +61,8 @@ $(function () {
jump: function (obj, first) {
if (!first) {
//分页回调调用
self.getData(type, obj.curr, self.key, time)
// self.getData(type, obj.curr, self.key, time)
self.getData(type, obj.curr)
}
}
});
......@@ -88,9 +91,9 @@ $(function () {
if (index == 0) {
self.type = 1
} else {
self.type = 2
self.type = 2;
}
$('.jt').click();
self.getData(self.type, 1)
});
$('.input_btn').on('click', function () {
var val = $.trim($('.input-search').val());
......@@ -99,7 +102,7 @@ $(function () {
} else if (val.length < 3) {
layer.msg('请至少输入3个字符');
} else {
window.location.replace("/search?key=" + val + '&type=' + self.type + '&time=' + self.time);
window.location.replace("/search?key=" + val + '&type=' + self.type);
}
});
$('.zz').on('click', '.fl', function () {
......
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