Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ wxapi Public

微信小程序接口工具包,无需服务器,无需开发后台,开箱即用,轻松开发小程序

Notifications You must be signed in to change notification settings

gooking/wxapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

30 Commits

Repository files navigation

迁移说明

本项目已迁移至新地址

https://github.com/gooking/apifm-wxapi

"apifm-wxapi" 将采用目前主流的 npm 安装插件的形式,方便安装、升级,对现有代码无侵入,整体项目会更加简洁,强烈推荐大家升级!

apifm-wxapi 使用方法

安装

npm install apifm-wxapi

如果你的项目还不支持 npm (检查根目录下有没有 package.json 文件),请先初始化:

npm init

小程序中可直接使用

  1. 头部引入插件:

    const WXAPI = require('apifm-wxapi')
    WXAPI.init('gooking')
    
  2. 直接调用方法:

    WXAPI.banners().then(res => {
     if (res.code == 0) {
     this.setData({
     banners: res.data
     })
     }
    })
    

上述例子完成了读取后台的 banner 轮播图片的数据,后台发布轮播图,小程序端直接这样简单调用即可~

具体请移步至新项目地址!

有傻瓜教程、功能文档等着你!

About

微信小程序接口工具包,无需服务器,无需开发后台,开箱即用,轻松开发小程序

Resources

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /