适应PC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.9 KiB

export default [
{
path: '/tasks',
handler: (req, res) => {
return res.json({
code: 200,
msg: 'ok',
success: true,
data: {
plugins: [
`<button onclick="location.href='https://www.tall.wiki/wl/1'">js打开物流页面</button>`,
`<a href="https://www.tall.wiki/wl/5">a链接打开现海园区</a>`,
`<div class="p-3 my-4 text-2xl bg-yellow-400 text-white" onclick="alert(123)">样式继承及简单脚本</div>`,
`<div class="p-3 my-4 text-2xl bg-red-400 text-white" onclick="openModal()">先是modal, 函数执行</div>
<div style="display: none" id="modal">modal</div>
<script>
function openModal() {
const modal = document.getElementById('modal');
if (modal.style.display === 'block') {
modal.style.display = 'none';
} else {
modal.style.display = 'block';
}
console.log('modal显示了');
}
</script>`,
],
},
});
},
},
4 years ago
{
path: '/users/userId',
handler: (req, res) => {
return res.json({
code: 200,
msg: 'ok',
success: true,
data: {
account: 'wally',
id: 123,
phone: '18603454788',
refresh_token: 'string',
token: 'string',
wxInfo: {
city: 'string',
country: 'string',
headImgUrl: 'string',
language: 'string',
nickname: 'string',
province: 'string',
sex: 0,
},
},
});
},
},
{
path: '/test1',
method: 'post',
handler: (req, res) => {
return res.json({
code: 200,
msg: 'ok',
success: true,
data: { account: 'wally' },
});
},
},
];