Commit 52b0e259 authored by 吕祺's avatar 吕祺 ⛹🏽

fix

parent c9414892
...@@ -21,11 +21,13 @@ export default class PostPage extends React.Component { ...@@ -21,11 +21,13 @@ export default class PostPage extends React.Component {
componentDidMount() { componentDidMount() {
// let date = document.location.href.match(/d=[^=&]*/) // let date = document.location.href.match(/d=[^=&]*/)
// let type = document.location.href.match(/t=[^=&]*/) // let type = document.location.href.match(/t=[^=&]*/)
let title = document.location.href.match(/t=[^=&]*/) let title = document.location.href.match(/t=([^=&]*)/)
title = decodeURI(title)
if (!date || date.length === 0 || !type || type.length === 0) { if (!title || title.length === 0) {
return null return null
} }
title = decodeURI(title[1])
// date = date[0].slice(2) // date = date[0].slice(2)
// type = type[0].slice(2) // type = type[0].slice(2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment