File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 22
33A fast wechat miniprogram/minigame development framework written in Golang
44
5- ## 演示 Demo
5+ ## 快速开始 & demo
6+
7+ ``` shell script
8+ go get github.com/fastwego/miniprogram
9+ ```
10+
11+ ``` go
12+ // 创建小程序/小游戏实例
13+ app := miniprogram.New (miniprogram.MiniprogramConfig {
14+ Appid : " APPID" ,
15+ Secret : " SECRET" ,
16+ })
17+
18+ var payload = []byte (` {
19+ "begin_date" : "20170313",
20+ "end_date" : "20170313"
21+ }` )
22+
23+ // 调用 api
24+ resp , err := datacube.GetDailyRetain (app, payload)
25+ fmt.Println (string (resp),err)
26+ ```
27+
28+
29+ 完整演示项目:
630
731[ https://github.com/fastwego/miniprogram-demo ] ( https://github.com/fastwego/miniprogram-demo )
832
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const ServerUrl = `https://developers.weixin.qq.com`
3131
3232var apiUniqMap = map [string ]bool {}
3333
34- func run () {
34+ func main () {
3535
3636 file , err := ioutil .ReadFile ("./data/doc_links.html" )
3737 if err != nil {
You can’t perform that action at this time.
0 commit comments