zm-login-account
v1.1.3
Published
账号密码登录页面,验证码输入页面,组件依赖添加,插件开发案例
Downloads
5
Maintainers
Readme
zm-login-account
- 项目示例最好在gitee下载,为最新代码。
简介
- 账号密码登录页面
- 验证码输入页面
- 三方组件依赖添加
- 插件开发案例
1、导入
- 1、使用HBuilderX导入插件
- 2、下载插件ZIP
- 3、node 导入
- 3.1、在【package.json】文件中添加导入配置
"dependencies": {
"zm-login-account": "^1.1.3"
}
- 3.2、打开项目中的终端,输入:
npm install
- 3.3、下载成功后在【node_modules】中显示
2、简单引用
1、将组件导入到项目
2、在 pages.json 文件中添加页面路径,如下:
"pages": [
{
// 微信登录
"path": "uni_modules/zm-login-account/pages/login/auth",
"style": {
"navigationStyle": "custom"
}
},
{
// 验证码验证页面
"path": "uni_modules/zm-login-account/pages/login/captchaVerifyPage",
"style": {
"navigationStyle": "custom"
}
},{
// 账号密码登录页面
"path": "uni_modules/zm-login-account/pages/login/loginAccountPage",
"style": {
"navigationStyle": "custom"
}
}
],
Tips:
特别注意,导入方式不一致,页面路径也也不一致。
3、添加事件,实现跳转
<button class="logoutBtn" type="primary" @click="clickLogtoutAccount">退出登录</button>
// 点击账号退出登录
clickLogtoutAccount() {
uni.reLaunch({
url: "/uni_modules/zm-login-account/pages/login/auth"
})
},