@dzhai
2016-01-12T05:09:54.000000Z
字数 2924
阅读 1272
评论
memberPath=127.0.0.1:8080/member
<div id="commentReplyDiv" params="userType|moduleType|moduleId" showType="1"> </div>showType=1 前端访问showType=2 后端管理
url: /image/validcode.htm
url: /image/getCode/jsonp.json参数:callbackfun返回:{code:’XXXX’}
url: /commentReply/list.json参数:moduleId 视频/观点/调查 idmoduleTypeuserTypepagenum 页码 从1开始pagesize 每页显示的数据量callbackfun返回:JsonObject
JsonObject数据结构
{'list': [],'totalCount': '','currentPage': '','pageSize': '','totalPage': ''}
list中的数据
{id: '',moduleId: '',moduleType:1/2/3/4/5/6,userType: 0/1/2,content: '',createDate: '',isReply: true/false,user: {},reply: {content: '',createDate: '',user: {}}}
user对象数据
用户{userId:''headImg: '',showName: '',userType: 1,role: '',level: ''}品牌{userId:''headImg: '',showName: '',userType: 2}美试{userId:'' //美试IDheadImg: '',showName: '',userType: 0,employeeCode:'' //员工编号}
url: /commentReply/add.jsonp参数:moduleTypemoduleIduserTypecontentcallbackfun返回:{code:200,user:{}}code=200 成功code=201 内容变更,请稍后操作code=500 异常
url: /commentReply/reply.json参数:idcontentcallbackfun返回:{code:200,user:{}}code=200 成功code=201 内容变更,请稍后操作code=500 异常
url: /commentReply/del.json参数:idtype=1callbackfun返回:{code:200}code=200 成功code=201 内容变更,请稍后操作code=500 异常
url: /commentReply/del.json参数:idtype=2callbackfun返回:{code:200}code=200 成功code=201 内容变更,请稍后操作code=500 异常
<a datasource="commentCount" params="userType|moduleType|moduleId"></a>
url: /commentReply/count.jsonp参数:moduleIds 视频/观点/调查 ids 数组moduleTypeuserTypecallbackfun返回:JsonArray[{moduleId:'',count:1},{}]
数据字典
userType0 美试1 用户2 品牌moduleType1 调查2 观点3 视频4 评价报告5 申请拉赞6 产品详情
数据模型
id //主键moduleType //模块名称moduleId //详情页IDuserType //用户类型content //评论内容createDate //创建时间userId //评论人IdisDelete //是否删除 1 删除 0 未删除isReply //是否恢复 1 回复 0 未回复user:{ //评论人信息...}replyUserId //回复人Idreply:{ //回复信息content //回复内容createDate //回复时间isDelete //是否删除user:{ //回复人信息...}}用户数据userId -- user_id //用户IDshowName -- nickname //用户昵称headImg -- head_url //用户头像urluserType=1 //用户类型固定1role //会员类型level //会员等级品牌数据userId -- brandId //品牌IDshowName -- expName //品牌体验中心名称headImg -- logo_url //品牌logouserType -- 2 //用户类型固定2brandName -- brandName //品牌名称categoryName -- categoryName //品牌主营类目名称美试数据userId -- 美试ID //回复人美试IDshowName -- 美试网 //固定美试网headImg -- 美试固定logo //美试固定logoUrluserType -- 0 //用户类型固定0employeeCode -- employeeCode //员工编号
1.举报用户
var opts={};opts.reportTargetObject='0';opts.targetUserId=''; //用户idopts.contentId='';//评论IDopts.reprotType='1';opts.reportContentType='10'; //10评论 11回复opts.contentPublishTime='';//时间格式 yyyy/MM/dd HH:mm:ssopts.contentUrlPage=''+document.location.href+'';opts.contentDetails='';//举报内容 评论 or 回复内容reportDivPage(3,opts);
2.举报品牌
var opts={};opts.reportTargetObject='1';opts.targetUserId=''; //品牌idopts.contentId='';//评论IDopts.reprotType='1';opts.reportContentType='10'; //10评论 11回复opts.contentPublishTime='';//时间格式opts.contentUrlPage=''+document.location.href+'';opts.contentDetails='';//举报内容 评论 or 回复内容opts.brandId='';//品牌IDopts.brandName='';opts.brandExpName='';//showNameopts.brandLogoUrl='';//headImageopts.brandCategory='';reportDivPage(3,opts);