Commit 78cf55c2 by zujiaozhang

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

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