Commit a6cfca59 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsales

# Conflicts:
#	dist/js/global/global.min.js
parents b113195e 1840a1dd
......@@ -14,17 +14,36 @@ return array(
//非必须登录
//登录、注册、找回密码、登录状态、绑定第三方账户
'authapi' => 'http://authapi.icsales.cc',
//非必须登录
//询价中心、后台首页(部分接口)、抢单专区、后台搜索、前台搜索
'soapi' => 'http://soapi.icsales.cc',
//必须登录
//必须登录
//登录会员信息、会员认证(包含但不限于新增认证、认证列表)、积分、账户设置、站内消息通知
'userapi' => 'http://userapi.icsales.cc',
//非必须登录:商详
//必须登录:我的商品列表、编辑、新增、删除、下架、上架、批量上传、商品数量统计、批量上传任务状态
'goodsapi' => 'http://goodsapi.icsales.cc',
//必须登录:我的询价列表、询价下架and上架、询价详情、询价数量统计、发布询价 报价列表、报价详情(询报价相关)、报价数量统计、发布报价
'inquiryapi' => 'http://inquiryapi.icsales.cc'
'inquiryapi' => 'http://inquiryapi.icsales.cc',
//首页
'indexicsales' => 'http://www.icsales.cc',
//登录、注册 、绑定第三方账户、找回密码、注册成功
'passporticsales' => 'http://passport.icsales.cc',
//商品搜索、询价搜索
'searchicsales' => 'http://search.icsales.cc',
//业务助手后台
'homeicsales' => 'http://home.icsales.cc',
//商详页(预留,原型暂时没有看到这个页面)
'itemicsales' => 'http://item.icsales.cc'
),
'URL_MAP_RULES' => array(//静态路由
......
......@@ -49,16 +49,16 @@
<div class="num input_div ">
<span class="input_title lineBlock">*库存:</span>
<div class="input_parent">
<input type="text" name="stock" placeholder="请输入需求数量" class="input boxsiz" lay-verify="required">
<input type="text" name="stock" placeholder="请输入需求数量" class="input boxsiz" lay-verify="required|number">
</div>
</div>
<div class="price input_div ">
<span class="input_title lineBlock">*单价:</span>
<div class="input_parent">
<input type="text" name="price" placeholder="请输入接受价格" class="input boxsiz price_input" lay-verify="required">
<input type="text" name="price" placeholder="请输入接受价格" class="input boxsiz price_input" lay-verify="required|number">
<div class="rmb layui-form">
<select name="city" lay-verify="required">
<option value="1">RMB</option>
<select name="currency" lay-verify="required">
<option value="1">CNY</option>
<option value="2">USD</option>
</select>
</div>
......@@ -96,7 +96,7 @@
<include file="public/foot" />
<script src="__PUBLIC__/js/goodmanage/uploadsingle.js"></script>
<script type="text/html" id="deliveryHtml">
{{# if (d== 1) { }}
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number" name="day">
<i class="day"></i>
{{# } }}
......
......@@ -12,7 +12,7 @@
<div class="nav_left_content">
<ul class="content_ul">
<li class="content_ul_li <if condition="(ACTION_NAME eq 'home')">active</if>">
<a href="/homes" class="out">
<a href="homeicsales/homes" class="out">
<span class="li_icon icon iconfont iconjuxing4"></span>
<span class="li_title">首页</span>
</a>
......@@ -24,42 +24,42 @@
<span class="li_right icon iconfont">
</a>
<dl <if condition="(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail') || (ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')">style="display:block"</if>>
<dd <if condition="(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail')">class="active"</if>><a href="/inquiry">我的询价</a></dd>
<dd <if condition="(ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')">class="active"</if>><a href="/quote">我的报价</a></dd>
<dd <if condition="(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail')">class="active"</if>><a href="homeicsales/inquiry">我的询价</a></dd>
<dd <if condition="(ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')">class="active"</if>><a href="homeicsales/quote">我的报价</a></dd>
</dl>
</li>
<li class="content_ul_li <if condition="(ACTION_NAME eq 'roborder')">active</if>">
<a href="/roborder" class="out">
<a href="homeicsales/roborder" class="out">
<span class="li_icon icon iconfont iconjuxing6"></span>
<span class="li_title">抢单专区</span>
</a>
</li>
<li class="content_ul_li <if condition="(ACTION_NAME eq 'chat')">active</if>">
<a href="/chat" class="out">
<a href="homeicsales/chat" class="out">
<span class="li_icon icon iconfont iconjuxing7"></span>
<span class="li_title">在线沟通</span>
</a>
</li>
<li class="content_ul_li <if condition="(ACTION_NAME eq 'goodmanage') || (ACTION_NAME eq 'uploadsingle') || (ACTION_NAME eq 'bulkupload') || (ACTION_NAME eq 'gooddetail') || (ACTION_NAME eq 'uploadresult')">active</if>">
<a href="/goodmanage" class="out">
<a href="homeicsales/goodmanage" class="out">
<span class="li_icon icon iconfont iconjuxing8"></span>
<span class="li_title">商品管理</span>
</a>
</li>
<li class="content_ul_li <if condition="(ACTION_NAME eq 'integral')">active</if>">
<a href="/integral" class="out">
<a href="homeicsales/integral" class="out">
<span class="li_icon icon iconfont iconjuxing9"></span>
<span class="li_title">积分管理</span>
</a>
</li>
<li class="content_ul_li <if condition="(ACTION_NAME eq 'certification')">active</if>">
<a href="/cert" class="out">
<a href="homeicsales/cert" class="out">
<span class="li_icon icon iconfont iconjuxing10"></span>
<span class="li_title">认证管理</span>
</a>
</li>
<li class="content_ul_li <if condition="(ACTION_NAME eq 'account')">active</if>">
<a href="/account" class="out">
<a href="homeicsales/account" class="out">
<span class="li_icon icon iconfont iconjuxing11"></span>
<span class="li_title">账户设置</span>
</a>
......
{"version":3,"sources":["chat.less"],"names":[],"mappings":"AAAA,aACI;EACI,kBAAA;;AAFR,aACI,SAGI;EACI,kBAAA;EACA,SAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;;AAVZ,aACI,SAGI,aAQI;EACI,YAAA;EACA,+BAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;EACA,sBAAA;;AAEA,aAnBZ,SAGI,aAQI,aAQK;EACG,UAAA;;AArBpB,aACI,SAGI,aAQI,aAYI;EACI,gBAAA;EACA,0BAAA;;AA1BpB,aACI,SAGI,aAQI,aAkBI;EACI,uBAAA;EACA,eAAA;EACA,gBAAA;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aAiGI,cA+GI,aAaI,aAGK;EACG,gBAAA;;AADJ,aAnOpB,SAGI,aAiGI,cA+GI,aAaI,aAGK,KAGG;EACI,iBAAA;;AAJR,aAnOpB,SAGI,aAiGI,cA+GI,aAaI,aAGK,KAGG,gBAGI;EACI,yBAAA;;AAKZ,aA/OpB,SAGI,aAiGI,cA+GI,aAaI,aAeK;EACG,iBAAA;;AADJ,aA/OpB,SAGI,aAiGI,cA+GI,aAaI,aAeK,MAGG;EACI,kBAAA;;AAJR,aA/OpB,SAGI,aAiGI,cA+GI,aAaI,aAeK,MAGG,gBAGI;EACI,yBAAA;;AAvPpC,aACI,SAGI,aAiGI,cA+GI,aAaI,aA2BI;EACI,YAAA;EACA,WAAA;EACA,sBAAA;;AA/P5B,aACI,SAGI,aAiGI,cA+GI,aAaI,aAkCI,gBACI;EACI,qBAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,kBAAA;;AAzQhC,aACI,SAGI,aAiGI,cA+GI,aAaI,aAkCI,gBAUI;EACI,eAAA;EACA,cAAA;EACA,kBAAA","file":"chat.css"}
\ No newline at end of file
{"version":3,"sources":["chat.less"],"names":[],"mappings":"AAAA,aACI;EACI,kBAAA;;AAFR,aACI,SAGI;EACI,kBAAA;EACA,SAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;;AAVZ,aACI,SAGI,aAQI;EACI,YAAA;EACA,+BAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;EACA,sBAAA;;AAEA,aAnBZ,SAGI,aAQI,aAQK;EACG,UAAA;;AArBpB,aACI,SAGI,aAQI,aAYI;EACI,gBAAA;EACA,0BAAA;;AA1BpB,aACI,SAGI,aAQI,aAkBI;EACI,uBAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;;AAEA,aAnChB,SAGI,aAQI,aAkBI,iBAMK;AACD,aApChB,SAGI,aAQI,aAkBI,iBAOK;EACG,yCAAA;;AAtCxB,aACI,SAGI,aAQI,aAkBI,iBAW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;;AA/DxB,aArOpB,SAGI,aAiGI,cAiHI,aAaI,aAGK,KAGG,gBAQI,UAgBI,gBAmBI,uBAeI,OAGI;EACI,UAAA;;AACA,aAvShD,SAGI,aAiGI,cAiHI,aAaI,aAGK,KAGG,gBAQI,UAgBI,gBAmBI,uBAeI,OAGI,IAEK;EACG,UAAA;;AAnEhC,aArOpB,SAGI,aAiGI,cAiHI,aAaI,aAGK,KAGG,gBAQI,UAgBI,gBAmBI,uBA0BI;EACI,cAAA;EACA,UAAA;;AA1ExB,aArOpB,SAGI,aAiGI,cAiHI,aAaI,aAGK,KAGG,gBAQI,UAgBI,gBAmBI,uBA0BI,IAGI;EACI,cAAA;;AAW5B,aA5TpB,SAGI,aAiGI,cAiHI,aAaI,aA0FK;EACG,iBAAA;;AADJ,aA5TpB,SAGI,aAiGI,cAiHI,aAaI,aA0FK,MAGG;EACI,kBAAA;;AAJR,aA5TpB,SAGI,aAiGI,cAiHI,aAaI,aA0FK,MAGG,gBAGI;EACI,yBAAA;;AApUpC,aACI,SAGI,aAiGI,cAiHI,aAaI,aAsGI;EACI,YAAA;EACA,WAAA;EACA,sBAAA;;AA5U5B,aACI,SAGI,aAiGI,cAiHI,aAaI,aA6GI,gBACI;EACI,qBAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,kBAAA;;AAtVhC,aACI,SAGI,aAiGI,cAiHI,aAaI,aA6GI,gBAUI;EACI,eAAA;EACA,cAAA;EACA,kBAAA","file":"chat.css"}
\ No newline at end of file
......@@ -822,3 +822,4 @@ body {
color: #ADB6BF;
cursor: pointer;
}
/*# sourceMappingURL=base.css.map */
\ No newline at end of file
......@@ -237,3 +237,4 @@
.home_content .new_xj .new_xj_list .new_xj_item:hover {
box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5);
}
/*# sourceMappingURL=home.css.map */
\ No newline at end of file
;!function () {
window.IcController = {
init: function () {
this.mounted(this).handleBind(this);
window.IcController = {
init: function () {
this.mounted(this).handleBind(this);
},
getData: function (url, type, param, callback) {
var index = layer.load(1, {
offset: ['50%', "50%"], shade: false
})
var platform = {
source: 2,
token: '1298dc6f00a017d9e94fc1e57792625d'
}
var params = $.extend({}, platform, param);
//跨域模式切换 兼容
var dataTypeXpx = "json";
if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)) {
dataTypeXpx = "jsonp";
}
var cookieHostname = window.location.hostname.split(".")[1] + "." + window.location.hostname.split(".")[2];
$.ajax({
type: type,
url: url,
data: params,
dataType: dataTypeXpx,
xhrFields: {
withCredentials: true
},
getData: function (url, type, param, callback) {
var index = layer.load(1,{
offset: ['50%', "50%"], shade: false
})
var platform = {
pf: 20,
token: '1298dc6f00a017d9e94fc1e57792625d'
}
var params = $.extend({}, platform, param);
//跨域模式切换 兼容
var dataTypeXpx = "json";
if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)) {
dataTypeXpx = "jsonp";
}
var cookieHostname = window.location.hostname.split(".")[1] + "." + window.location.hostname.split(".")[2];
$.ajax({
type: type,
url: url,
data: params,
dataType: dataTypeXpx,
xhrFields: {
withCredentials: true
},
success: function (data) {
typeof callback == 'function' && callback(data);
layer.close(index);
return false;
},
error: function () {
layer.close(index);
layer.msg('网络出现问题,请重试!');
return false;
}
});
success: function (data) {
typeof callback == 'function' && callback(data);
layer.close(index);
return false;
},
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')
}
$ })
return this;
},
}, $(function () {
IcController.init();
})
error: function () {
layer.close(index);
layer.msg('网络出现问题,请重试!');
return false;
}
});
},
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')
}
$
})
return this;
},
}, $(function () {
IcController.init();
})
}();
//工具类
......@@ -151,43 +155,77 @@ $ })
var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();
return y + "-" + m + "-" + d;
}
};
if (typeof define === "function" && define.amd) {
return Util;
} else {
window.Util = Util;
}
})(window);
//api列表
(function (window) {
Api = {
login: "sy"
};
if (typeof define === "function" && define.amd) {
return Api;
} else {
window.Api = Api;
}
return "";
},
/**
* 删除cookie
* @param name
*/
delCookie: function (name) {
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval = this.getCookie(name);
if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
},
/**
* 获取参数
* @param value
* @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];
},
/**
* 根据参数获取时间
* @param val
* @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;
}
};
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;
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;
};
\ No newline at end of file
!function () {
window.GoodManage = {
window.GoodManageController = {
init: function () {
this.created(this).mounted(this).listData(this, {offset: 10, p: 1}, 1).handleBind(this);
this.created(this).mounted(this).render(this, {offset: 10, p: 1}, 1).handleBind(this);
},
created: function (opt) {
//日期控件初始化
layui.laydate.render({
elem: '#start_time',
theme: '#0D84D1'
});
layui.laydate.render({
elem: '#end_time',
theme: '#0D84D1'
......@@ -18,25 +20,34 @@
},
mounted: function (opt) {
//商品数量获取
IcController.getData(apis.goodsCount, 'POST', null, function (res) {
var getTpl = countHtml.innerHTML;
layui.laytpl(getTpl).render(res.count, function (html) {
$(".good_total").empty().html(html);
});
});
return this;
},
listData: function (opt, params, curr) {
render: function (opt, params, curr) {
//商品列表初始化
IcController.getData(apis.goodsInfo, 'POST', params, function (res) {
var getTpl = listHtml.innerHTML;
if (res.errcode == 0) {
layui.laytpl(getTpl).render(res.goods_list, function (html) {
$("#listData").empty().html(html);
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
......@@ -44,22 +55,30 @@
limit: 10,
curr: curr,
jump: function (obj, first) {
if (!first) {
//分页回调调用
var json = {
p: obj.curr
}
var param = $.extend({}, params, json);
opt.mounted(opt, param, obj.curr);
}
}
});
});
} else if (res.errcode == 110001) {
layui.laytpl(getTpl).render([], function (html) {
$("#listData").empty().html(html);
});
}
});
......@@ -70,6 +89,7 @@
//搜索
layui.form.on('submit(search)', function (data) {
IcController.getData(apis.goodsSearch, 'POST', data.field, function (res) {
});
......@@ -79,6 +99,6 @@
return this;
},
}, $(function () {
GoodManage.init();
GoodManageController.init();
})
}();
\ No newline at end of file
!function () {
window.UploadSingle = {
window.UploadSingleController = {
isClick: false,
init: function () {
this.created(this).mounted(this).handleBind(this);
},
created: function (opt) {
return this;
},
mounted: function (opt, params, curr) {
mounted: function (opt) {
return this;
......@@ -16,40 +17,58 @@
//货期选择
layui.form.on('radio(delivery)', function (data) {
var val = 1;
if (data.value == '期货') {
val = 1
} else if (data.value == '现货') {
val = 2;
}
var str = '期货';
data.value == '期货' ? str='期货':str='现货';
var getTpl = deliveryHtml.innerHTML;
layui.laytpl(getTpl).render(val, function (html) {
layui.laytpl(getTpl).render(str, function (html) {
$("#day").empty().html(html);
});
});
//天数同步数据
//天数同步期货
$(document).on('input propertychange', 'input[name="day"]', function () {
var val = $(this).val();
$("#daytext").val(val + '天');
});
//上传商品
//上传商品发布
layui.form.on('submit(add)', function (data) {
$(data.elem).addClass("layui-btn-disabled");
if (!opt.isClick) {
opt.isClick = true;
IcController.getData(apis.goodsAdd, 'POST', data.field, function (res) {
if (res.errcode == 0) {
layer.msg('上传商品成功', {time: 2000}, function () {
window.location.href = '/goodmanage';
});
} else {
layer.msg(res.errmsg);
opt.isClick = false;
$(data.elem).removeClass("layui-btn-disabled");
}
});
}
......@@ -57,6 +76,6 @@
return this;
},
}, $(function () {
UploadSingle.init();
UploadSingleController.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