mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-06 05:58:25 +08:00
28 lines
586 B
JavaScript
28 lines
586 B
JavaScript
|
|
const tpls = {
|
|
tpl1: {
|
|
name: 'Amis Renderer',
|
|
author: 'fex',
|
|
},
|
|
tpl2: {
|
|
name: 'Renderer',
|
|
author: 'amis',
|
|
},
|
|
tpl3: {
|
|
name: 'Amis',
|
|
author: 'renderer',
|
|
}
|
|
};
|
|
|
|
|
|
module.exports = function(req, res) {
|
|
res.json({
|
|
status: 0,
|
|
msg: '',
|
|
data: Object.assign({}, (tpls[req.query.tpl] || tpls.tpl1), {
|
|
infoId: req.query.id,
|
|
date: Math.round(Date.now() / 1000),
|
|
info: req.query.keywords ? `你输入的关键子是 ${req.query.keywords}` : ''
|
|
})
|
|
});
|
|
} |