t-login
v1.0.0
Published
### 在需要使用的地方 import feedback from 't-login/t-login.vue'引入
Downloads
6
Readme
使用 npm i t-login或者 cnpm i t-login安装插件
在需要使用的地方 import feedback from 't-login/t-login.vue'引入
<t-login @getPhoneNumber='getPhoneNumber' @getCode='getCode' @login='login' :openPhoneLogin='openPhoneLogin' :config='config' :logoImg='logoImg'>
如使用config需要配置config中所有内容(请勿只使用config中一项)!!!!
const config = reactive({
buttonBgColor: string, //按钮背景颜色
buttonFontColor: string, //按钮字体颜色
bgColor: string, //页面背景颜色
checkedColor: string, //协议已阅读选中颜色
})
const agreementText = 'xxxx隐私协议'
const logoImg = '' //logo图
const openPhoneLogin = true //是否开启手机号验证码登录
//解密手机号
const getPhoneNumber = (e:any) =>{
console.log('获取解密手机号code',e)
//新api文档只需要code可解密手机号 https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html
}
//手机号验证码登录时
const getCode = () => {
console.log('获取验证码接口')
}
const login = (phone:any,yzm:any) => {
console.log('登录接口',phone,yzm)
}