Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小程序跳转 appid #3

Open
ZhuPeng opened this issue Mar 6, 2019 · 3 comments
Open

小程序跳转 appid #3

ZhuPeng opened this issue Mar 6, 2019 · 3 comments

Comments

@ZhuPeng
Copy link

ZhuPeng commented Mar 6, 2019

试用了小程序,觉得浏览代码做的很好。
我这边也做了一个小程序 https://github.com/ZhuPeng/mp-githubtrending 收集了 Trending 的项目,我这边希望能在查看代码直接跳转到你的小程序。

if (wx.navigateToMiniProgram) {
  wx.navigateToMiniProgram({
    appId: '',
    path: 'pages/index/index?repos=https://github.com/xx/xx'
  })
} 

appid 能提供一下嘛?

@Youjingyu
Copy link
Owner

@ZhuPeng appid 是: wx8c7028f9dcd29c99
如果跳转失败,可以联系我调试

@Youjingyu
Copy link
Owner

Youjingyu commented Mar 10, 2019

@ZhuPeng 另外,你跳转过来的时候,最好带上仓库信息,否则我会再请求一遍相关数据,降低打开速度。需要提供的信息是:

star number - star 数量
forks number - fork 数量
branch string - 仓库分支
filePath string - 文件路径,可选,如果指定,就会直接打开指定的文件

示例:

wx.navigateToMiniProgram({
    appId: '',
    path: 'pages/index/index?repos=https://github.com/xx/xx&star=20&forks=20&branch=master&filePath=xxx'
})

@ZhuPeng
Copy link
Author

ZhuPeng commented Mar 27, 2019

感谢,目前通过 markdown 展示代码简单支持了,后续我看一下怎么集成。

From WeChat Mini Programe: GitHub Trending Hub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants