Code Monkey home page Code Monkey logo

ipgw_neu's Introduction

ipgw

通过vue实现东北大学ip控制网关

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test

技术实现:

 1.由于浏览器的同源策略,我们无法直接访问在http:\ipgw.neu.edu.cn下的PHP文件,所以首先解决的是跨域问题,在开发环境下,通过简单的配置http-proxy-middleware即可实现跨域。

 proxyTable: {
      '/include': {
    target: 'https://ipgw.neu.edu.cn',
    changeOrigin: true,
    headers: {
        Referer: 'https://ipgw.neu.edu.cn/srun_portal_phone.php?url=&ac_id=1'
    }

 在实际环境中,可能就需要另外配置。

 2.然后为了减少工作量,直接使用了原ip网关的函数,由于原ip网关使用的是jquery,但在vue中引入jquery总是感觉怪怪的。以后会考虑使用vue-resource发送http请求。

3.前端UI使用的mint-UI,一套适用于移动设配的vue前端UI组件。

4.数据存储方面采用html5的locakStorage,用户选择“记住我”时,写入用户名和密码,(遗憾的是没有实现加密),当用户不选择记住时,将用户名密码写入空。

效果截图:

效果截图

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

ipgw_neu's People

Contributors

xujingguo58 avatar

Stargazers

Raven Xu avatar

Watchers

 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.