@allan199409
2015-09-09T02:36:44.000000Z
字数 1491
阅读 420
{
err: true|false,
msg: '',
result: {}
}
当产生错误时【通常是运行/解析错误】,err=true
,msg
中包含错误信息,result=null
当一切正常时err=false,msg=''
result
包含所需传递数据
{
type: '*',
data1: '',
data2: 0,
...
}
{
err: false,
msg: '',
result: {
type: 'command',
command: 'next'
}
}
{
err: false,
msg: '',
result: {
type: 'command',
command: 'prev'
}
}
{
err: false,
msg: '',
result: {
type: 'inquire',
what: 'save',
id: 123
}
}
{
err: false,
msg: '',
result: {
type: 'return',
data: true|fasle,
origin: 'isSaying',
id: 123
}
}
{
err: false,
msg: '',
result: {
type: 'command',
command: 'load',
data: '' //当前课程进度数据
}
}
当前课程进度数据由Blackboard决定,GAL不做处理,只储存
{
err: false,
msg: '',
result: {
type: 'inquire',
what: 'isSaying',
id: 123
}
}
{
err: false,
msg: '',
result: {
type: 'command',
command: 'completeSaying'
}
}
{
err: false,
msg: '',
result: {
type: 'command',
command: 'setHead',
url: 'http://xxxxx'
}
}
{
err: false,
msg: '',
result: {
type: 'command',
command: 'say',
method: 'add'|'cover', //文字显示模式,add为现有基础上再增加,cover为删除已有
word: 'xxxx', //需要显示的文字
name: 'xxx', //说话人名称,没有就为空
needanimation: true|false //是否需要动画,当显示上一页时设为false
}
}
{
err: false,
msg: '',
result: {
type: 'finish',
courseID: xxx
}
}
{
err: false,
msg: '',
result: {
type: 'return',
origin: 'save',
courseID: xxxx,
data: ''//当前课程进度数据
}
}
{
err: false,
msg: '',
result: [
{
ID: xxxx, //课程id
name: 'xxx', //课程名称
introduce: 'xxx', //课程描述
disposition: xxx, //该课程所需好感度
img: "xxx", //课程图片url
url: "xxx" //课程url
}
]
}