Commit 854f87ee by 施宇

21212

parent ceb5207d
...@@ -54,9 +54,10 @@ $(function () { ...@@ -54,9 +54,10 @@ $(function () {
}, },
rendChatSection: function (data) { rendChatSection: function (data) {
this.addUser(this.defaultName); this.addUser(this.defaultName);
for (var key in data) {
this.addUser(data[key]); for(var i=0;i<data.length;i++){
}; this.addUser(data[i].im_username)
}
}, },
singleChat: function () { singleChat: function () {
if (JSON.stringify(this.templateObj) == '{}') { if (JSON.stringify(this.templateObj) == '{}') {
......
...@@ -57,19 +57,19 @@ $(function () { ...@@ -57,19 +57,19 @@ $(function () {
$('.zz').on('click', '.fl', function () { $('.zz').on('click', '.fl', function () {
var index = $(this).index(); var index = $(this).index();
var spOrXj = 1; var spOrXj = 1;
var time = new Date(Util.getDay(0)); var time = Util.getDay(0);
$(this).addClass('active').siblings().removeClass('active'); $(this).addClass('active').siblings().removeClass('active');
if ($('.search_xj').hasClass('active')) { if ($('.search_xj').hasClass('active')) {
spOrXj = 2 spOrXj = 2
} }
if (index == 0) { if (index == 0) {
self.getData(spOrXj, time.getTime() / 1000) self.getData(spOrXj, time)
} else if (index == 1) { } else if (index == 1) {
time = new Date(Util.getDay(-3)); time = Util.getDay(-3);
self.getData(spOrXj, time.getTime() / 1000) self.getData(spOrXj, time)
} else { } else {
time = new Date(Util.getDay(-7)); time = Util.getDay(-7);
self.getData(spOrXj, time.getTime() / 1000) self.getData(spOrXj, time)
} }
}) })
} }
......
...@@ -88,7 +88,8 @@ $(function () { ...@@ -88,7 +88,8 @@ $(function () {
num = parent.find('.num').find('span').text(), num = parent.find('.num').find('span').text(),
hq = parent.find('.hq').find('span').text(), hq = parent.find('.hq').find('span').text(),
time = parent.find('.time').find('span').text(), time = parent.find('.time').find('span').text(),
img = $('.xj_img').attr('src'); img = $('.xj_img').attr('src'),
name = parent.find('.name').text();
obj = { obj = {
userId: userId, userId: userId,
type: type, type: type,
...@@ -98,8 +99,10 @@ $(function () { ...@@ -98,8 +99,10 @@ $(function () {
num: num, num: num,
hq: hq, hq: hq,
time: time, time: time,
image: img image: img,
userName:name
}; };
console.log(obj)
Util.setCookie('template', JSON.stringify(obj), 1, cookieHostname) Util.setCookie('template', JSON.stringify(obj), 1, cookieHostname)
window.location.href = '/chat' window.location.href = '/chat'
} else { } else {
......
...@@ -72,19 +72,19 @@ $(function () { ...@@ -72,19 +72,19 @@ $(function () {
$('.zz').on('click', '.fl', function () { $('.zz').on('click', '.fl', function () {
var index = $(this).index(); var index = $(this).index();
var spOrXj = 1; var spOrXj = 1;
var time = new Date(Util.getDay(0)); var time = Util.getDay(0);
$(this).addClass('active').siblings().removeClass('active'); $(this).addClass('active').siblings().removeClass('active');
if ($('.search_xj').hasClass('active')) { if ($('.search_xj').hasClass('active')) {
spOrXj = 2 spOrXj = 2
} }
if (index == 0) { if (index == 0) {
self.getData(spOrXj, 1,time.getTime() / 1000) self.getData(spOrXj, 1,time)
} else if (index == 1) { } else if (index == 1) {
time = new Date(Util.getDay(-3)); time = Util.getDay(-3);
self.getData(spOrXj, 1,time.getTime() / 1000) self.getData(spOrXj, 1,time)
} else { } else {
time = new Date(Util.getDay(-7)); time = Util.getDay(-7);
self.getData(spOrXj, 1,time.getTime() / 1000) self.getData(spOrXj, 1,time)
} }
}); });
$('.goods_data_list').on('click','.xj_item',function(){ $('.goods_data_list').on('click','.xj_item',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