si-auth
npm i ylztest || cnpm i ylztest
- mobile 手机号 (必须传,授权要用)
- token 参数 (必须传,授权要用)
- type 环境类型,默认正式环境,'test':测试环境
onAuthBack(result)
参数:result 为授权网络请求数据
<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>