mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
40 lines
877 B
JavaScript
40 lines
877 B
JavaScript
|
|
|
|
module.exports = function(req, res) {
|
|
const a = req.query.a;
|
|
|
|
setTimeout(function() {
|
|
if (!a) {
|
|
return res.json({
|
|
status: 0,
|
|
msg: '',
|
|
data: {
|
|
options: []
|
|
}
|
|
});
|
|
}
|
|
|
|
res.json({
|
|
status: 0,
|
|
msg: 'ok',
|
|
data: {
|
|
options: [
|
|
{
|
|
label: `选项${a} a`,
|
|
value: `${a}_a`
|
|
},
|
|
|
|
{
|
|
label: `选项${a} b`,
|
|
value: `${a}_b`
|
|
},
|
|
|
|
{
|
|
label: `选项${a} c`,
|
|
value: `${a}_c`
|
|
}
|
|
]
|
|
}
|
|
})
|
|
}, 1000);
|
|
}; |