Commit 3ed1d837 by hanpeng

-mark- 获取论坛帖子列表参数调整;发布帖子接口参数调整

parent df65daba
...@@ -42,7 +42,7 @@ define(['zepto', 'medtap' /* ,'https://review-formal.iplusmed.com/Common/javaScr ...@@ -42,7 +42,7 @@ define(['zepto', 'medtap' /* ,'https://review-formal.iplusmed.com/Common/javaScr
} else if (id == 'newest') { } else if (id == 'newest') {
index.firstLoad = false; index.firstLoad = false;
index.offset = 1; index.offset = 1;
type = 2; type = '';
} }
index.getForumList(type) index.getForumList(type)
}); });
...@@ -63,7 +63,7 @@ define(['zepto', 'medtap' /* ,'https://review-formal.iplusmed.com/Common/javaScr ...@@ -63,7 +63,7 @@ define(['zepto', 'medtap' /* ,'https://review-formal.iplusmed.com/Common/javaScr
} else if ($('#newest').hasClass('on')) { } else if ($('#newest').hasClass('on')) {
index.firstLoad = true; index.firstLoad = true;
index.offset += 1; index.offset += 1;
type = 2; type = '';
} }
index.getForumList(type) index.getForumList(type)
} else { } else {
...@@ -189,7 +189,7 @@ define(['zepto', 'medtap' /* ,'https://review-formal.iplusmed.com/Common/javaScr ...@@ -189,7 +189,7 @@ define(['zepto', 'medtap' /* ,'https://review-formal.iplusmed.com/Common/javaScr
data: { data: {
offset: index.offset, offset: index.offset,
limit: index.limit, limit: index.limit,
good: listType || '1', good: listType,
}, },
success: function(res) { success: function(res) {
medtap.loading(0); medtap.loading(0);
......
...@@ -7,8 +7,8 @@ define(['zepto', 'medtap'], function($, medtap) { ...@@ -7,8 +7,8 @@ define(['zepto', 'medtap'], function($, medtap) {
newCard.getWechatTicket(); newCard.getWechatTicket();
newCard.bindEve(); newCard.bindEve();
}, },
bindEve:function(){ bindEve: function() {
$('.footer_btn').on('click',function(){ $('.footer_btn').on('click', function() {
newCard.postPubbbs(); newCard.postPubbbs();
}) })
}, },
...@@ -120,34 +120,34 @@ define(['zepto', 'medtap'], function($, medtap) { ...@@ -120,34 +120,34 @@ define(['zepto', 'medtap'], function($, medtap) {
}) })
}, },
postPubbbs:function(){ postPubbbs: function() {
var urls = [], var urls = [],
picUrl = ""; picUrl = "";
[].forEach.call($('#ImgUp .image_files_img'), function (item) { [].forEach.call($('#ImgUp .image_files_img'), function(item) {
urls.push($(item).attr('imgkey')); urls.push($(item).attr('imgkey'));
}); });
var picUrl = urls.join(','); var picUrl = urls.join(',');
alert(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',
type:"POST", type: "POST",
asynv:false, asynv: false,
contentType: 'application/json', contentType: 'application/json',
data:{ data: {
groupId:1, groupId: 1,
content:$('.content').val(), content: $('.card_content').val(),
picUrls:picUrl picUrls: picUrl
}, },
success:function(res){ success: function(res) {
medtap.loading(0); medtap.loading(0);
setTimeout(function() { if (res.success == true) {
medtap.toast({ setTimeout(function() {
message: '发布成功', medtap.toast({
time: 2000 message: '发布成功',
}) time: 2000
medtap.pushWindow('myCardList.html') })
}, 1000) }, 1000)
}
} }
}) })
} }
......
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