no message

Former-commit-id: 666caeae181eff9a6ab6e8ff81db442e8d0d3d89
Former-commit-id: e1df8e45d78d8d226b2543d8a00c863c2ff21534
Former-commit-id: fc2eafbfac803deb16c778afbfd94fa9eebc8cab
This commit is contained in:
李杨
2018-02-24 18:21:01 +08:00
parent 1566deb8b1
commit f5ff5dc433
2 changed files with 30 additions and 12 deletions

View File

@@ -93,14 +93,30 @@ export default {
} }
$baidupanHeight: 40px; $baidupanHeight: 40px;
.baidupan { .baidupan {
height: $baidupanHeight;
overflow: hidden; overflow: hidden;
margin-bottom: 16px; margin-bottom: 16px;
.l { .container {
float: left; height: $baidupanHeight + 10px;
} border-radius: 4px;
.r { border: 1px solid #dfe2e5;
padding: 5px;
padding-right: 15px;
float: left; float: left;
.icon {
float: left;
height: $baidupanHeight;
text-align: center;
width: 50px;
img {
width: 40px;
margin-top: 4px;
}
}
.url {
float: left;
height: $baidupanHeight;
line-height: $baidupanHeight;
}
} }
} }
</style> </style>

View File

@@ -4,13 +4,15 @@ export default (quote) => {
const bdShareUrlPwd = /^链接: https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+ 密码: [a-z0-9]{4}$/i const bdShareUrlPwd = /^链接: https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+ 密码: [a-z0-9]{4}$/i
if (bdShareUrl.test(_quote)) { if (bdShareUrl.test(_quote)) {
return `<div class="baidupan"> return `<div class="baidupan">
<div class="l"> <div class="container">
<img src="/static/image/baidu-pan-logo.png"> <div class="icon">
</div> <img src="/static/image/baidu-pan-logo.png">
<div class="r"> </div>
<a href="${_quote}">${_quote}</a> <div class="url">
</div> <a href="${_quote}">${_quote}</a>
</div>` </div>
</div>
</div>`
} else if (bdShareUrlPwd.test(_quote)) { } else if (bdShareUrlPwd.test(_quote)) {
const url = _quote.match(/https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+/i) const url = _quote.match(/https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+/i)
const pwd = _quote.match(/[a-z0-9]{4}$/i) const pwd = _quote.match(/[a-z0-9]{4}$/i)