Commit 33f370e3 by 施宇

1

parent 474ed02b
......@@ -84,7 +84,7 @@
<div class="bj_status fl ellipsis boxsiz dd bold">等待报价</div>
{{# } }}
{{# if(item['audit_status'] == 1){ }}
{{# if(item['status/eq'] !== 1){ }}
{{# if(item['status'] == 1){ }}
<div class="data_status fl boxsiz zs">
<span class="mark lineBlock"></span><span class="text">展示中</span>
</div>
......
......@@ -28,21 +28,6 @@
</div>
<include file="public/foot" />
<script>
$('.gt_div ').on('click', function () {
var obj = {
userId: '18589050841',
type: "STM32F103ZET6",
price: "67.9800",
brand: "Texas Instruments",
fz: "LQFP-144",
num: "100,000",
hq: "现货",
}
Util.setCookie('template', JSON.stringify(obj), 1, cookieHostname)
window.location.href = '/chat'
})
</script>
<script src="__PUBLIC__/js/quoteprice/inquirydetail.js"></script>
<script type="text/html" id="navTpl">
<!-- 导航的详情 -->
......@@ -62,7 +47,7 @@
<h3 class="bold fl">{{d.goods_name}}</h3>
<div class="fr">
{{# if(d['audit_status'] == 1){ }}
{{# if(d['status/eq'] !== 1){ }}
{{# if(d['status'] == 1){ }}
<span class="mark lineBlock zs"></span><span class="text">展示中</span>
{{# } else { }}
<span class="mark lineBlock xj"></span><span class="text">已下架</span>
......@@ -121,34 +106,47 @@
</div>
<div class="center">
<div class="center_left boxsiz clr" style="padding-right:0">
{{# if(item.auth_type!==""){ }}
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
公司认证
</div>
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
贸易商
</div>
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
贸易商
</div>
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
贸易商
{{# if(item.auth_type==0){ }}
未认证
{{# } }}
{{# if(item.auth_type==1){ }}
个人认证
{{# } }}
{{# if(item.auth_type==2){ }}
企业认证
{{# } }}
</div>
{{# } }}
{{# if(item.company_type!==""){ }}
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
{{# if(item.company_type==1){ }}
贸易商
{{# } }}
{{# if(item.company_type==2){ }}
代理商
{{# } }}
{{# if(item.company_type==3){ }}
原厂
{{# } }}
{{# if(item.company_type==4){ }}
制造商
{{# } }}
{{# if(item.company_type==5){ }}
个人用户
{{# } }}
</div>
{{# } }}
</div>
<!-- <div class="center_right ellipsis">
报价:<span class="bold">21</span>
</div> -->
</div>
<div class="bottom clr">
<div class="gt_div fl btn btn_yellow">
<div class="gt_div fl btn btn_yellow" imid="{{item.im_username}}">
<span class="icon iconfont iconjuxing7 va-m"></span>
在线沟通
</div>
......@@ -163,7 +161,7 @@
</div>
<div class="item_left boxsiz" style="padding-right:474px;">
<div class="item_left_top">
<h3 class="bold fl ellipsis boxsiz">{{item.goods_name}}</h3>
<h3 class="bold fl ellipsis boxsiz goods_name">{{item.goods_name}}</h3>
<div class="price fl bold ellipsis boxsiz">
{{# if(item.currency == 1){ }}
......
......@@ -15,7 +15,7 @@ $(function () {
},
getUserInfo: function () { //获取用户的基本信息
var self = this;
IcController.getData(apis.authme, 'POST', {
IcController.getData(apis.authme, 'GET', {
"token": Util.getCookie('token') || '',
}, function (res) {
if (res.err_code == 0) {
......@@ -24,7 +24,7 @@ $(function () {
console.log('获取用户名失败');
layer.msg('聊天系统出错');
}
}, true, true)
}, true, false)
},
getHistoryUsers: function () {
//获取用户聊天的成员记录
......@@ -40,6 +40,18 @@ $(function () {
}
});
},
addChatMember:function(id){
IcController.getData(apis.addrecord, 'GET', {
"token": Util.getCookie('token') || '',
"im_username":id
}, function (res) {
if (res.errcode === 0) {
} else {
console.log('添加聊天成员失败')
}
});
},
rendChatSection: function (data) {
this.addUser(this.defaultName);
for (var key in data) {
......@@ -363,6 +375,7 @@ $(function () {
}, //收到表情消息;
onCmdMessage: function (message) {
self.receiveData(1, message, true);
self.addChatMember(message.from)
}, //收到命令消息;
onPictureMessage: function (message) {
var options = {
......@@ -452,6 +465,7 @@ $(function () {
time: self.curentTime()
}),
success: function () {
self.addChatMember(userId)
$('#' + userId).find('.notice_item_content').append(self.messageHtml(1,
templateObj, true));
var contentHeight = $('#' + userId).find('.notice_item_content')
......
......@@ -3,6 +3,7 @@ $(function () {
init: function () {
this.getUserData();
this.getBjData(1);
this.bindFun();
},
getUserData: function () {
IcController.getData(apis.inquiryInfo, 'GET', {
......@@ -36,7 +37,7 @@ $(function () {
"inquiry_items_id/eq": Util.getRequest('id') || '',
"token": Util.getCookie('token') || "",
"p": page,
"offset":"5",
"offset": "5",
}, function (res) {
var getBj = bjTpl.innerHTML;
if (res.errcode == 0) {
......@@ -72,6 +73,29 @@ $(function () {
});
}
})
},
bindFun: function () {
$('.inquiry_detail_content ').on('click', '.gt_div', function () {
var userId = $(this).attr('imid'),
parent = $(this).parents('.bj_item'),
type = parent.find('.goods_name').text(),
price = parent.find('.price').text(),
brand = parent.find('.brand').find('span').text(),
fz = parent.find('.fz').find('span').text(),
num = parent.find('.num').find('span').text(),
hq = parent.find('.hq').find('span').text(),
obj = {
userId: userId,
type: type,
price: price,
brand: brand,
fz: fz,
num: num,
hq: hq,
};
Util.setCookie('template', JSON.stringify(obj), 1, cookieHostname)
window.location.href = '/chat'
})
}
};
inquiryDetail.init();
......
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