Commit 8341f47b by 施宇

1321

parent f2f7fc4d
......@@ -92,9 +92,9 @@
</script>
<script type="text/html" id="detailTpl">
{{# if(d['goods_images']){ }}
<img src="{{d.goods_images}}" alt="" class="fr">
<img src="{{d.goods_images}}" alt="" class="fr sp_img">
{{# } else { }}
<img src="__PUBLIC__/images/defaultgood.png" alt="" class="fr">
<img src="__PUBLIC__/images/defaultgood.png" alt="" class="fr sp_img">
{{# } }}
<div class=" goods_desc boxsiz">
<div class="title">
......
......@@ -43,9 +43,9 @@
<!-- 商品详情 -->
{{# if(d['goods_images']){ }}
<img src="{{d.goods_images}}" alt="" class="fr">
<img src="{{d.goods_images}}" alt="" class="fr xj_img">
{{# } else { }}
<img src="__PUBLIC__/images/defaultgood.png" alt="" class="fr">
<img src="__PUBLIC__/images/defaultgood.png" alt="" class="fr xj_img">
{{# } }}
<div class=" goods_desc boxsiz">
<div class="title">
......
......@@ -355,7 +355,7 @@ body {
}
.goods_data_list .my_xj_list .my_xj_item .item_user .type {
border-radius: 5px 0px 5px 0px;
width: 48px;
width: 60px;
height: 20px;
text-align: center;
line-height: 20px;
......@@ -371,7 +371,7 @@ body {
.goods_data_list .my_xj_list .my_xj_item .item_user .name {
color: #8A9299;
margin-left: 10px;
width: calc(100% - 58px);
width: calc(100% - 70px);
}
.goods_data_list .my_xj_list .my_xj_item:hover {
box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5);
......@@ -849,4 +849,3 @@ body {
color: #ADB6BF;
cursor: pointer;
}
/*# sourceMappingURL=base.css.map */
\ No newline at end of file
......@@ -424,7 +424,7 @@ body {
.type {
border-radius: 5px 0px 5px 0px;
width: 48px;
width: 60px;
height: 20px;
text-align: center;
line-height: 20px;
......@@ -444,7 +444,7 @@ body {
.name {
color: #8A9299;
margin-left: 10px;
width: calc(~"100% - 58px");
width: calc(~"100% - 70px");
}
}
......
......@@ -216,7 +216,7 @@ $(function () {
var htmlp = '<p>' + html + '</p>';
if (isTemplate) {
var htmlp = '<div class="template lineBlock boxsiz">' +
'<img src="http://resic.liexin.com/images/defaultgood.png" alt="">' +
'<img src="'+html.image+'" alt="">' +
'<div class="template_right">' +
'<div class="template_right_top clr">' +
'<h3 class="bold fl">' + html.type + '</h3>' +
......
......@@ -3,6 +3,7 @@ $(function () {
type: Util.getRequest('type') || "",
token: Util.getCookie('token') || '',
id: Util.getRequest('id') || "",
isClick: true,
init: function () {
this.getDetail();
this.bindFun();
......@@ -33,17 +34,17 @@ $(function () {
});
layui.laytpl(getCompany).render(res.goods_list[self.id], function (html) {
$(".good_detail_content .bj_item").empty().html(html);
if(self.type==2){
if (self.type == 2) {
$('.gt_div').show();
}
});
layui.laytpl(getDetail).render(res.goods_list[self.id], function (html) {
$(".good_detail_content .goods_detail").empty().html(html);
if(self.type==1){
if (self.type == 1) {
$('.bj_btn').show();
}
});
} else {
layui.laytpl(getNav).render([], function (html) {
$(".good_detail_content .nav_title").empty().html(html);
......@@ -61,15 +62,18 @@ $(function () {
bindFun: function () {
var self = this;
$('.good_detail_content').on('click', '.gt_div', function () {
var userId = $(this).attr('imid'),
parent = $('.goods_detail'),
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(),
time = parent.find('.time').find('span').text(),
if (self.isClick) {
self.isClick = false;
var userId = $(this).attr('imid'),
parent = $('.goods_detail'),
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(),
time = parent.find('.time').find('span').text(),
img = $('.sp_img').attr('src')
obj = {
userId: userId,
type: type,
......@@ -78,13 +82,18 @@ $(function () {
fz: fz,
num: num,
hq: hq,
time:time
time: time,
image: img
};
Util.setCookie('template', JSON.stringify(obj), 1, cookieHostname)
window.location.href = '/chat'
Util.setCookie('template', JSON.stringify(obj), 1, cookieHostname)
window.location.href = '/chat'
} else {
return
}
});
$('.good_detail_content ').on('click', '.bj_btn', function () {
window.location.href = '/uploadsingle?id='+self.id
window.location.href = '/uploadsingle?id=' + self.id
})
}
};
......
$(function () {
var inquiryDetail = {
isClick: true,
init: function () {
this.getUserData();
this.getBjData(1);
......@@ -74,16 +75,20 @@ $(function () {
})
},
bindFun: function () {
var self = this;
$('.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(),
time = parent.find('.time').find('span').text(),
if (self.isClick) {
self.isClick = false;
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(),
time = parent.find('.time').find('span').text(),
img = $('.xj_img').attr('src');
obj = {
userId: userId,
type: type,
......@@ -92,10 +97,15 @@ $(function () {
fz: fz,
num: num,
hq: hq,
time:time
time: time,
image: img
};
Util.setCookie('template', JSON.stringify(obj), 1, cookieHostname)
window.location.href = '/chat'
Util.setCookie('template', JSON.stringify(obj), 1, cookieHostname)
window.location.href = '/chat'
} else {
return
}
})
}
};
......
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