Commit 3ed1d837 by hanpeng

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

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