top
关闭

开发者登录

主要使用场景:

1、微网站(平台/学校)最新资讯列表

前置条件

获取接口访问凭证:accessToken

请求说明

url https://opengate.huijiaoyun.com/portal/api/mobilenewestcontentlist
请求方式 POST
格式 json
是否需要鉴权
请求数限制
接口方向 第三方应用>开放平台

参数说明

序号 字段名 约束 位置 类型 长度 说明

1

schoolid

必选

Body(json)

string

-

该平台的所对应的编码code或该学校所对应的机构id

2

Token

可选

Body(json)

string

-

作为微网站独有接口的标识,可选填项(默认为'weiwz')

3

pagesize

可选

Body(json)

string

-

所要获取的资讯的条数默认为3条

返回说明

序号 字段名 约束 类型 长度 说明

1

retCode

可选

string

-

返回的编码标识(判断返回正确或错误的标识

2

result

可选

string

-

返回的是个json数组,是想要的数据信息

2.1

lists

可选

string

-

返回的是个json数组,是想要的数据信息

2.1.1

id

可选

string

-

返回该条资讯的id

2.1.2

title

可选

string

-

返回该条资讯的标题

2.1.3

content

可选

string

-

返回该条资讯的内容

2.1.4

categoryid

可选

string

-

返回该条资讯所在的分类栏目id

2.1.5

userid

可选

string

-

返回所编辑该条资讯的用户id

2.1.6

username

可选

string

-

返回编辑该条资讯的用户名

2.1.7

schoolid

可选

string

-

返回平台编码或学校id

2.1.8

schoolname

可选

string

-

返回平台名称或学校名称

2.1.9

publishdate

可选

string

-

返回编辑该资讯的时间

2.1.10

company

可选

string

-

返回发布单位

2.1.11

categoryname

可选

string

-

返回该资讯所在的分类的名称

2.1.12

clienttype

可选

string

-

终端类型(0电脑端,1移动端))

2.1.13

fromid

可选

string

-

所投稿的原始id

2.1.14

showhome

可选

string

-

是否推荐到首页(1推荐0不推荐)

2.1.15

ousernamestr

可选

string

-

原始作者

2.1.16

contributeid

可选

string

-

投稿ID

示例

							请求报文:
{
	"schoolid": "888888",
	"token": "weiwz",
	"pagesize":"3"
}
应答报文:
{
	"retCode": "000000",
	"result": {
		"lists": [{
			"id": 359482,
			"title": "\u7435\u7436\u884c-\u767d\u5c45\u6613",
			"content": null,
			"link": null,
			"categoryid": null,
			"modeid": null,
			"listorder": null,
			"status": null,
			"userid": null,
			"username": null,
			"schoolid": null,
			"schoolname": null,
			"company": null,
			"publishdate": 1519710438,
			"view_count": null,
			"categoryname": null,
			"provinceCode": null,
			"cityCode": null,
			"areaCode": null,
			"mongoId": null,
			"clienttype": null,
			"fromid": null,
			"fromtype": null,
			"orgtype": null,
			"isshow": 1,
			"oldid": null,
			"ousername": null,
			"ofromtype": null,
			"ofromid": null,
			"textcover": null,
			"istop": null,
			"showhome": null,
			"plateformcode": null,
			"isrecommend": null,
			"isclassbrand": null,
			"ousernamestr": null,
			"contributeid": null,
			"brandsynchroid": null,
			"hnauthor": null,
			"hnsource": null,
			"hneditor": null,
			"hnfilenumber": null,
			"atta
						

参数说明

请求参数消息体-文本类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:text

1.1

text

必选

Json

-

text消息体

1.1.1

content

必选

String

消息内容

示例

{
	"msgtype": "text",
	"text": {
		"content": "zhxy msg text test 12"
	}
}
											

参数说明

请求参数消息体-link类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:link

2

link

必选

Json

-

link消息体

2.1

pcUrl

必选

String

PC端消息点击链接地址

2.2

appUrl

必选

String

移动客户端点击消息时跳转到的H5地址

2.3

title

必选

String

消息标题

2.4

busiId

必选

String

对应业务的id

2.5

content

必选

String

消息描述

2.6

picUrl

必选

String

图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80。如不填,在客户端不显示图片

示例

{
	"msgtype": "link",
	"link": {
		"pcUrl": "http://www.baidu.com",
		"appUrl": "http://www.baidu.com",
		"picUrl": "http://xxx.yyy.com/zzz.jpg",
		"content": "百度一下",
		"title": "百度",
		"busiId":"AQWER1234"
	}
}
											

参数说明

请求参数消息体-oa类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:oa

2

busiId

必选

String

-

该条oa消息在业务系统对应的id

3

pcUrl

必选

String

消息点击链接地址

4

appUrl

必选

String

移动客户端点击消息时跳转到的H5地址

5

oa

必选

Json

-

oa类型消息体

5.1

head

必选

Json

255

消息头部Json

5.1.1

text

必选

String

255

消息的头部标题

5.1.2

bgColor

可选

String

消息头部的背景颜色。长度限制为8个英文字符,其中前2为表示透明度,后6位表示颜色值。不要添加0x。默认值:FFCC0000

5.2

body

可选

Json

消息体

5.2.1

title

可选

String

消息体的标题

5.2.2

content

可选

String

消息体的正文

5.2.3

imageUrl

可选

String

消息体中的图片url

5.2.4

fileCount

可选

String

自定义的附件数目。此数字仅供显示,不作验证

5.2.5

author

可选

String

自定义的作者名字

5.2.6

form

可选

Json数组

消息体的表单,最多6个

5.2.7

key

可选

String

消息体的关键字

5.2.8

value

可选

String

消息体的关键字对应的值