Skip to content

xiaozhi1218/shopping-mall

Repository files navigation

shopping-mall

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Project deploy(Github Page)

  1. 先添加404.html页面
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
  <script>
    sessionStorage.redirect = location.href;
  </script>
  <meta http-equiv="refresh" content="0;URL='/'"/>
</head>
<body>

</body>
</html>
  1. index.html中添加下面的代码
// 这段代码要放在其他js的前面
(function(){
    const redirect = sessionStorage.redirect;
    delete sessionStorage.redirect;
    if (redirect && redirect !== location.href) {
      history.replaceState(null, null, redirect);
    }
  })();

About

shopping-mall是一个基于Vue.js实现的移动端购物商城。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages