Commit c02326f9 authored by 刘文胜's avatar 刘文胜

公告分享

parent 7596abfc
......@@ -16,6 +16,7 @@ var forumThreadService = require('../../service/forumThreadService'),
// forumLimitActionRefService = require('../../service/forumLimitActionRefService'),
forumLimitOperationService = require('../../service/forumLimitOperationService');
var Notice = mongoose.model('ForumNotice');
var redis=global.redis;
module.exports = function(app) {
......@@ -377,6 +378,16 @@ router.get('/sharev2.js', function(req, res, next) {
if(!type || !id){
console.error('请求参数错误')
res.json(_.assign({result:false},returnCode.WRONG_PARAM));
}else if(type === 'notice'){
Notice.findOne({_id:id},function(err,result){
if (err) {
console.error(err);
res.json(_.assign({result:false},returnCode.BUSY));
}
link = link + 'noticeDetail&infoId=' + (result.plate || '') + '&ent_code=' + ent_code + '&tId=' + result._id +'&uId='+uId;
title = result.title,desc = result.content,imgUrl = result.icon;
getWXV2(res, title, desc, link, imgUrl, mid,ent_code, id,type,null);
});
}else if (type === 'Info') {
//分享记录对象
share_log.type = 2;
......
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