GithubHelp home page GithubHelp logo

bs_wechat_mini_program's Introduction

Setup

Create folder and clone project:

mkdir engines && cd engines && git clone https://github.com/beansmile/bs_wechat_mini_program.git

Edit your Gemfile:

gem "bs_wechat_mini_program", path: "engines/bs_wechat_mini_program"

Generate your configuration file:

rails g bs_wechat_mini_program:install

Usage

Mount Grape API

mount ::API::WechatMiniProgram

Get mini program access token

BsWechatMiniProgram.client.get_access_token

Other mini program API

Model methods

set_unlimited_wxacode

生成无限制小程序码并上传到OSS(需要配置oss_adapter和oss_config)

用法

set_unlimited_wxacode :wxacode, page: "page/index/index", scene: -> { "id=#{id}" }

第一个参数为需要保存OSS文件路径的属性

第二个参数为Hash类型

  • page为小程序码页面(缺省则为主页)
  • scene为参数,缺省则为 id=#{id}

bs_wechat_mini_program's People

Contributors

dependabot[bot] avatar iceskyl 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.