Commit 78cf55c2 by zujiaozhang

'修改了点击回复出现空白页面问题'

parent db33be67
......@@ -7,6 +7,7 @@ define(['zepto', 'medtap'], function($, medtap) {
init: function() {
myCard.getUserInfo();
myCard.getMyCard();
// myCard.getMyReply();
myCard.bindEve();
myCard.getWechatTicket();
......@@ -139,7 +140,7 @@ define(['zepto', 'medtap'], function($, medtap) {
offset: myCard.offset
},
success: function(res) {
console.log('我的帖子',res)
console.log('获取我的帖子数据',res)
medtap.loading(0);
if (res.success == true) {
var list = res.content.list;
......@@ -165,7 +166,7 @@ define(['zepto', 'medtap'], function($, medtap) {
var picUrl = list[i].picUrls || '';
//单张
if (picUrl.length != 0 && picUrl.length < 2) {
str += '<div class="list_item" data-id="' + list[i].publishId + '">' +
str += '<div class="list_item" data-id="' + list[i].id + '">' +
'<div class="list_item_header clearfix">' +
'<img src="' + list[i].profile + '" class="user_profile">' +
'<div class="user_info">' +
......@@ -253,7 +254,7 @@ define(['zepto', 'medtap'], function($, medtap) {
'</div>' +
'</div>';
} else {
str += '<div class="list_item" data-id="' + list[i].publishId + '">' +
str += '<div class="list_item" data-id="' + list[i].id + '">' +
'<div class="list_item_header clearfix">' +
'<img src="' + list[i].profile + '" class="user_profile">' +
'<div class="user_info">' +
......@@ -303,6 +304,7 @@ define(['zepto', 'medtap'], function($, medtap) {
$('.delete_btn').on('click', function(e) {
e.stopPropagation();
var id = $(this).parents('.list_item').attr('data-id');
console.log(id)
$('#showDialog').show();
$('.dialog-content-bd').html('确定要删除这条帖子吗?')
$('.dialog-btn-confirm').on('click', function() {
......@@ -375,7 +377,7 @@ define(['zepto', 'medtap'], function($, medtap) {
if (picUrl.length != 0 && picUrl.length < 2) {
str +=
'<div class="list_item" data-id="' +
list[i].id +
list[i].publishId +
'">' +
'<div class="list_item_header clearfix">' +
'<img src="' +
......@@ -439,7 +441,7 @@ define(['zepto', 'medtap'], function($, medtap) {
}
str +=
'<div class="list_item" data-id="' +
list[i].id +
list[i].publishId +
'">' +
'<div class="list_item_header clearfix">' +
'<img src="' +
......@@ -496,7 +498,7 @@ define(['zepto', 'medtap'], function($, medtap) {
} else {
str +=
'<div class="list_item" data-id="' +
list[i].id +
list[i].publishId +
'">' +
'<div class="list_item_header clearfix">' +
'<img src="' +
......@@ -568,12 +570,12 @@ define(['zepto', 'medtap'], function($, medtap) {
$('#showDialog').hide();
});
});
//帖子详情
$('.list_item').on('click', function(e) {
e.stopPropagation();
var id = $(this).attr('data-id');
medtap.pushWindow('cardDetail.html?cardId=' + id);
});
//帖子详情
$('.list_item').on('click',function(e){
e.stopPropagation();
var id = $(this).attr('data-id');
medtap.pushWindow('cardDetail.html?cardId=' + id);
})
myCard.previewImage();
}
......
......@@ -124,6 +124,7 @@ define(['zepto', 'medtap'], function($, medtap) {
var res = data.content;
var imgKey = res.ossKey;
newCard.imgList.push(imgKey);
console.log('上传后图片的imgKey',imgKey)
var html = '<div class="image_files_item">' +
'<img src="' + localId + '" class="image_files_img" imgkey="' + imgKey + '">' +
'<img src="../images/post_delete_btn@2x.png" class="image_del" >' +
......@@ -138,9 +139,11 @@ define(['zepto', 'medtap'], function($, medtap) {
var urls = [],
picUrl = "";
[].forEach.call($('#ImgUp .image_files_img'), function(item) {
alert($(item).attr('imgkey'))
urls.push($(item).attr('imgkey'));
});
var picUrl = urls.join(',');
// console.log('新建的图片数据',picUrl)
medtap.loading(1);
medtap.submitAjax({
url: 'https://testdevgw.medtap.cn/operation/pubbbs/publish',
......@@ -180,6 +183,7 @@ define(['zepto', 'medtap'], function($, medtap) {
urls.push($(item).attr('imgkey'));
});
var picUrl = urls.join(',');
// console.log('更新的图片数据',picUrl)
medtap.loading(1);
medtap.submitAjax({
url: 'https://testdevgw.medtap.cn/operation/pubbbs/publish/mineUpdate',
......@@ -192,6 +196,7 @@ define(['zepto', 'medtap'], function($, medtap) {
picUrls: picUrl
},
success: function(res) {
// console.log(res)
medtap.loading(0);
if (res.success == true) {
setTimeout(function() {
......@@ -200,7 +205,7 @@ define(['zepto', 'medtap'], function($, medtap) {
time: 2000
})
setTimeout(function(){
//medtap.pushWindow('myCardList.html');
// medtap.pushWindow('myCardList.html');
window.history.go(-1)
},1000)
}, 1000)
......
......@@ -139,8 +139,8 @@ body {
}
/* 图片消息中图片的大小*/
.chat_nopadding img {
height: 1.5rem;
width: 2rem;
height: 2rem;
/* width: 2rem; */
}
.chat_message {
......
......@@ -342,9 +342,9 @@ define([ 'zepto', 'medtap' ], function($, medtap) {
chat.doctorProfile +
'" class="chat_profile from_profile">' +
'<div class="chat_message_warp">' +
'<p class="chat_from_name">' +
chat.doctorName +
'医生</p>' +
// '<p class="chat_from_name">' +
// chat.doctorName +
// '医生</p>' +
'<div class="chat_message chat_message_from">' +
record[i].content +
'</div>' +
......@@ -447,9 +447,9 @@ define([ 'zepto', 'medtap' ], function($, medtap) {
chat.doctorProfile +
'" class="chat_profile from_profile">' +
'<div class="chat_message_warp">' +
'<p class="chat_from_name">' +
chat.doctorName +
'医生</p>' +
// '<p class="chat_from_name">' +
// chat.doctorName +
// '医生</p>' +
'<div class="chat_message chat_message_from chat_nopadding">' +
// 图片消息
'<img src="' +
......
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 to comment