Code Monkey home page Code Monkey logo

wechatpivot's Introduction

wechat-pivot

pivot

common wechat integration

  1. 通过内部接口获得微信的授权页面
POST /private-api/oauth/snsapi-base:url HTTP/1.1
Host: pivot.private
Content-Type: application/json

{ "r": "https://app.example.com/wechat-login/page" }
{
    "url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wechatappid&redirect_uri=http%3A%2F%2F127.0.0.1%3A7002%2Foauth%3Fr%3Dhttps%253A%252F%252Fapp.example.com%252Fwechat-login%252Fpage&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
}
  1. 授权后回跳 pivot http://127.0.0.1:7002/oauth?code=access-token&r=https%3A%2F%2Fapp.example.com%2Fwechat-login%2Fpage,pivot 通过 code=access-token 获取用户信息,并保存在 session 里,仍然用 code 做 key

  2. pivot 回跳应用的 /wechat-login/{page} 页面,通过内部接口通过 code 获取用户信息,pivot 将 session 中的用户信息返回,并清空该 key

mockup

and the corresponding mockup

debugger

即原 wechat-api-debug 项目

WeChat API Debug

Electron App:微信公众平台接口调试工具 http://mp.weixin.qq.com/debug/ 增强版(可调试本地,对码农友好、等)

由于 Google will kill chrome apps,原 Chrome App 不再维护。

Contributor Guidelines

  1. 本项目基于 Element-UI,尽量不在样式上做额外调整。

  2. 代码框架和结构来自于 Electron Vue Template,关于开发方式暂时详见其文档。

  3. 目前处于从 Chrome App + Vue@1Electron + Vue@2 的迁移过程中,如需使用需要通过开发的方式,即 npm run dev,迁移过程完成后会提供 macOS 下的安装包.

  4. 未来有可能提供或不提供 macOS App Store 下载,看情况。

  5. 目前只实现了我工作中最常用的一些场景,会渐渐补全,如有急需请提 issue 或 pr

wechatpivot's People

Contributors

hbrls avatar

Stargazers

 avatar leeho avatar 田渣渣 avatar Alin avatar 远哥制造 avatar  avatar xuming avatar  avatar ZCDC_Ren avatar stanhua avatar  avatar burlinchen avatar Xiaonan Cui avatar 阮涛 avatar copper lee avatar alwayrun avatar  avatar DanielLam avatar Larry Zhao avatar  avatar elegance code avatar Jianming Guo avatar  avatar Gkjiale avatar venjiang avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

wechatpivot's Issues

Vue@2 Roadmap

终于等到了 Vue@2 的发布,借着国庆假期把迁移工作开了个头,过程中遇到了一些问题,和大家分享一下、讨论一下。

免责 1:我是倾向性很强的 React + JSX 党,这显然会影响到我对一些心智模型的看法
免责 2:我大部分的经验来自于 [email protected],而且当时选中 Vue 的主要原因是要在手机上找一个糙快猛的小型解决方案,所以对 Vue 的不少高阶用法并不熟悉。并且由于小右反复对“渐进架构”的鼓励,特意没有使用诸如 vue-router,vuex 等社区方案。

  1. 在使用 JSX 的时候踩了不少坑,但是考虑到这是 2016 年前端配置员的日常,并没有太在意。直到遇到了这个 Compile error kebabcase event name,感觉直接判了死缓。
  2. 在做上一版的时候我造了一个轮子 vue-lite-loader,思路是完全按 .vue 的语法来,只是允许文件名以 .jsx 结尾并且在 html 部分使用 jsx 的高亮。现在 template 不让用了,所以这个轮子暂时不能无缝对接,但是感觉这个思路比 transform 更靠谱,后续有空我会继续跟进。
  3. 不能把 component 传来传去很不爽,比如典型 element/dialog 的 title 只能传 String,而我想传一个 <h1>Hello<i /></h1> 进去就不行。目前还不好说把责任完全归咎于 Vue,主观上感觉可以用 slot 之类的去解决,但是没有相关经验。
  4. 代码结构是从 Electron-Vue-Template 生成出来的,我生成的时候虽然号称支持 Vue@2,但从结果来看可能还是半成品,大部分还是 Vue@1。vuex 感觉对标的是 redux,而我在实践中还需要的是一个 dva。有群友推荐了 eva,还没有来得及看,但是看目前的星星数量不想去做小白鼠。所以你们平常都用什么?

```gulp build``` fails

I found the build command fails, prompts:

[18:46:56] Task 'lint' is not in your gulp file

参考资料

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.