reza changed qr tail

master
RezaAshrafi77 3 years ago
parent 6d0e852267
commit 6f05664810
  1. 7
      src/AppRouter.js
  2. 5
      src/views/QR/index.js

@ -98,7 +98,12 @@ class AppRouter extends Component {
<Redirect
to={{
pathname: "/qr",
search: "?id=" + window.location.pathname,
search:
"?id=" +
window.location.pathname.slice(
window.location.pathname.lastIndexOf("/") + 1,
window.location.pathname.length
),
}}
/>
</Route>

@ -50,10 +50,7 @@ class QR extends Component {
componentDidMount() {
if (window.location.search) {
let tail = window.location.search.slice(
window.location.search.lastIndexOf("/") + 1,
window.location.search.length
);
let tail = window.location.search;
this.props.info({ tail: tail });
}
}

Loading…
Cancel
Save