const { BlankType } = require('../../../public/common_constants'); function getCardHtml(info, btn) { return `

${info}

${btn ? `` : ''}
`; } module.exports = function (app) { app.get('/blank', function (req, res) { const { type } = req.query; let html = ''; switch (+type) { case BlankType.SHARE_CANCEL: html = getCardHtml('分享设置已被修改,当前项目无权查看。', { href: '/pm', title: '返回项目管理' }); break; case BlankType.NOT_FOUND: default: html = getCardHtml('很抱歉,您要访问的页面不存在。'); break; } res.render('common/components/blank/index.html', { html }); }); }