mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
24 lines
415 B
JavaScript
24 lines
415 B
JavaScript
|
module.exports = function (req, res) {
|
||
|
let repeat = 2 + Math.round(Math.random() * 5);
|
||
|
const options = [];
|
||
|
|
||
|
while (repeat--) {
|
||
|
const value = Math.round(Math.random() * 1000000);
|
||
|
const label = value + '';
|
||
|
|
||
|
options.push({
|
||
|
label: label,
|
||
|
value: value,
|
||
|
defer: Math.random() > 0.7
|
||
|
});
|
||
|
}
|
||
|
|
||
|
res.json({
|
||
|
status: 0,
|
||
|
msg: '',
|
||
|
data: {
|
||
|
options: options
|
||
|
}
|
||
|
});
|
||
|
};
|