添加文章内容

目前文章添加仅支持普通文字数据添加,不支持图片上传,若需使用图片,请通过其它方式完成图片上传后在内容或缩略图中引用图片地址。

接口地址:<gateway>?app=article&controller=article&action=add

接受参数:

参数

名称

传递类型

值类型

备注

catid

栏目编号

POST

整型

必填

title

标题

POST

字符串

必填

subtitle

副标题

POST

字符串

可选

color

标题颜色

POST

字符串

可选,#XXXXXX 6位的标准颜色代码

tags

标签

POST

字符串

可选,多个标签以英文空格隔开

source

来源

POST

字符串

可选

author

作者

POST

字符串

可选

editor

编辑

POST

字符串

可选

content

内容

POST

字符串

必填

description

描述

POST

字符串

可选

saveremoteimage

是否下载远程图片

POST

整型

可选,1为下载,0为不处理

thumb

缩略图

POST

字符串

可选,图片HTTP路径,绝对或相对

proids

属性

POST

字符串

可选,多个属性编号以英文逗号隔开

weight

权重

POST

整型

可选,默认为60

sectionids

页面

POST

字符串

可选,多个区块编号以英文逗号隔开

placeid

专题

POST

字符串

可选,多个区块编号以英文逗号隔开

published

发布时间

POST

字符串

可选,标准的时间格式,2012-12-12 00:00:00

unpublished

下线时间

POST

字符串

可选,标准的时间格式,2012-12-12 00:00:00

related_keywords

相关内容关键词

POST

字符串

可选,多个关键词以英文空格分开

allowcomment

是否允许评论

POST

整型

可选,允许评论为1,不允许为0

status

状态

POST

整型

可选,1为草稿,3为待审,6为发布

返回数据:

添加成功,但未发布时:

{

            "state": true,

            "contentid": 183

}

或,发布成功时返回URL

{

            "state": true,

            "contentid": 183,

            "url":"http:\/\/ent.cmstop.dev\/2012\/0712\/184.shtml"

}

添加失败时,返回标准错误。



Copyright ©2009 - 2014 CmsTop.Com.All rights reserved.
思拓合众