Git Product home page Git Product logo

blog's Introduction

Blog

vue-cli+express+mongodb

  1. import router from './router' 这里注意命名,一开始命名routes,发现会报错,改成router就可以

  2. view-router ()[https://router.vuejs.org/zh-cn/essentials/nested-routes.html]

  3. 在server.js文件里引入了router.js文件,router.js里接口api里,查看发送的请求数据也有,返回也有,但是无法通过req.body获取到请求数据。

        app.use(express.static(path.resolve(__dirname, '../dist')));
        app.use(bodyParser.json());
        app.use(bodyParser.urlencoded({ extended: false }));
        //注意这个顺序,应该先在前面对req进行解析,再引入router,因为解析是对router文件进行的
        app.use(router);
    
  4. 304缓存加时间戳'&t=' + (new Date()).getTime().toString()

  5. https://segmentfault.com/a/1190000008010666 看vue生命周期

  6. 登录注册,session确定是否过期

  7. 子组件与父组件动态传值

  8. localStorage存储的类型默认是string型

blog's People

Contributors

munan2 avatar

Stargazers

lin yan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.