ylztest

1.4.2 • Public • Published

小程序授权插件

si-auth

安装

npm i ylztest || cnpm i ylztest

使用方式

props 参数

  1. mobile 手机号 (必须传,授权要用)
  2. token 参数 (必须传,授权要用)
  3. type 环境类型,默认正式环境,'test':测试环境

回调事件

onAuthBack(result)

参数:result 为授权网络请求数据

demo

<template lang="wxml" minapp="wepy">
    <Auth :mobile.sync="mobile" :token.sync="token" @onAuthBack.user="onAuthBack"></Auth>
</template>

<script>
import wepy from 'wepy'
import Auth from 'ylztest/Auth'
export default class Demo extends wepy.page {
    components = {
        Auth
    };
    data = {
        mobile: '18511580429',
        token: 'test-token'
    }
    onShow () {
    }
    methods = {
        onAuthBack (result) {
            console.info(result)
        }
    }
}
</script>

Readme

Keywords

Package Sidebar

Install

npm i ylztest

Weekly Downloads

39

Version

1.4.2

License

MIT

Unpacked Size

1.21 MB

Total Files

96

Last publish

Collaborators

  • suki22