Giter VIP home page Giter VIP logo

cnblog_vue's Introduction

vue做的博客园webapp

详情可以看这边博客:我用Vue写了个博客园WebApp 博主在main.js嵌入了百度统计的js代码。若是下载运行的话,请将该代码移出,谢谢。

var _hmt = _hmt || [];
window._hmt = _hmt; // 必须把_hmt挂载到window下,否则找不到
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?6d8339456d3f0b72fa50baaedefbc549";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();

如何运行:

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

如何配置

1.配置CLIENT_ID,CLIENT_SECRET 配置CLIENT_ID,CLIENT_SECRET,首先你要有,可以去博客园开发者申请。接着在src/config/conf.js中配置,如下:

export const CLIENT_ID = "XXXX";
export const CLIENT_SECRET ="XXXX";

2.配置环境

配置环境,主要是针对登录这个点,因为获取授权码的回调地址是博客园这边,但我们联系管理,帮我们改掉,所以这边的回调地址是根据你的实际情况的填写的,接着的登录环境也需要配置,若是你没办法改掉上诉所说的回调地址,意味着我们没有办法拿到授权码,所以登录环境设置为开发,可以引导用户去自己拿到授权码,自己登录,或是你像我改好了回调地址的话,那么就会自动登录。文件路径还是上个点的路径。

export const DEVELOPMENT = "development";
export const PRODUCTION = "production"
export const LOGIN_ENV = PRODUCTION; //development|production
export const LOGIN_REDIRECT_URI = "http://域名/auth/callback";//https://oauth.cnblogs.com/auth/callback

回调地址没有改变的情况,引导式

cnblog_vue's People

Contributors

xhl592576605 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.