当前位置: 首页 > news >正文

uniapp 开发一个密码管理app

密码管理app

介绍

最近发现自己的账号密码真的是太多了,各种网站,系统,公司内网的,很多站点在登陆的时候都要重新设置密码或者通过短信或者邮箱重新设置密码,真的很麻烦

所以准备开发一个app用来记录这些站好和密码

uniapp

经过初步筛选,准备使用uniapp,比较简单,

开发步骤

  1. 注册dcloud账号
  2. 下载开发工具hbuilderx
  3. 创建项目
  4. 云打包
  5. 安装到手机

这就完事了,是不是很简单

下面分享下核心代码

路由
{"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages{"path" : "pages/tab/home/home","style" : {"navigationBarTitleText" : "密码管理","enablePullDownRefresh" : false}},{"path" : "pages/tab/my/my","style" : {"navigationBarTitleText" : "我的","enablePullDownRefresh" : false}},{"path" : "pages/tab/home/add","style" : {"navigationBarTitleText" : "添加内容","enablePullDownRefresh" : false}},{"path" : "pages/tab/home/show","style" : {"navigationBarTitleText" : "查看内容","enablePullDownRefresh" : false}}],"tabBar": {"color": "#CCC","selectedColor": "#3cc51f","borderStyle": "black","backgroundColor": "#ffffff","list": [{"pagePath": "pages/tab/home/home","iconPath": "static/image/shouye.png","selectedIconPath": "static/image/shouye_1.png","text": "管理"}, {"pagePath": "pages/tab/my/my","iconPath": "static/image/wode.png","selectedIconPath": "static/image/wode_1.png","text": "我的"}]},"globalStyle": {"navigationBarTextStyle": "#FFFFFF","navigationBarTitleText": "密码管理","navigationBarBackgroundColor": "#32CD32","backgroundColor": "#32CD32"},"uniIdRouter": {}
}
主页
<template><view class="content"><view class="allNum">总数量{{list.length}}</view><view class="list"><view class="list-item"  v-for="(item,index) in list"><view class="item-text" @click="show(item)">{{item.name}}</view><view class="time">时间:{{item.time}}</view><view class="deleteBtn" @click="deleteById(index)">删除</view></view></view></view><view class="bottom"><view class="addBtn" @click="add">+</view></view>
</template><script>export default {data() {return {list: []}},onLoad() {this.read()},onShow() {this.read()},methods: {read() {var _that = thisuni.getStorage({key:"datajson",success(res) {var _list = res.data_list.sort((e1,e2)=>e2.id - e1.id)_that.list = _list},fail(err) {}})},add() {uni.navigateTo({url: 'add'})},show(item) {var param = ''param += '?name=' + item.nameparam += '&id=' + item.idparam += '&account=' + item.accountparam += '&password=' + item.passwordparam += '&remark=' + item.remarkuni.navigateTo({url: 'show' + param})},deleteById(index){this.list.splice(index,1)var _that = thisuni.setStorage({key: 'datajson',data: _that.list})}}}
</script><style>.content {height: 100%;background-color: #ccc;}.list-item {width: 100%;background-color: #fff;box-shadow: 5px 5px 5px #c3c3c3;margin: 0.5rem 0rem;padding: 0.5rem 1rem;position: relative;}.item-text {padding: 1rem 0rem;}.time {font-size: 15px;color: #ccc;}.allNum {background-color: coral;font-size: 26px;width: auto;padding: 15px;text-align: center;margin: 5px;}.bottom {position: fixed;bottom: 0px;left: 0px;height: 50px;width: 100%;display: flex;justify-content: center;align-items: center;}.addBtn {color: #fff;font-size: 40px;width: 50px;height: 50px;background-color: green;border-radius: 50%;text-align: center;}.deleteBtn{position: absolute;top: 30%;right: 15%;color: red;font-size: 18px;background-color: #c3c3c3;padding: 3% 5%;}
</style>

代码仓库

pass-mgr: 密码管理app (gitee.com)

app 预览

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

http://www.lryc.cn/news/302817.html

相关文章:

  • Postman详细攻略
  • 如何在本地服务器部署TeslaMate并远程查看特斯拉汽车数据无需公网ip
  • 如何在CentOS安装SQL Server数据库并实现无公网ip环境远程连接
  • 备战蓝桥杯 Day5
  • 爬虫学习笔记-scrapy爬取电影天堂(双层网址嵌套)
  • Unity笔记:数据持久化的几种方式
  • MySQL 基础知识(八)之用户权限管理
  • QT编写工具基本流程(自用)
  • 代码随想录算法训练营第三六天 | 无重叠区间、划分字母区间、合并区间
  • DP读书:《openEuler操作系统》(十)套接字 Socket 数据传输的基本模型
  • 抓住母亲节销售机会:Shopee 平台选品策略大揭秘
  • Mysql如何优化数据查询方案
  • SwiftUI 更自然地向自定义视图传递参数的“另类”方式
  • Word第一课
  • 【Vue3】路由传参的几种方式
  • 突破编程_C++_面试(高级特性(1))
  • django请求生命周期流程图,路由匹配,路由有名无名反向解析,路由分发,名称空间
  • @ 代码随想录算法训练营第8周(C语言)|Day54(动态规划)
  • Flask 学习100-Flask-SocketIO 结合 xterm.js 实现网页版Xshell
  • Springboot AOP开发
  • office的excel中使用,告诉我详细的解决方案,如何变成转化为金额格式
  • 灾后重建中GIS技术的关键作用与案例分析
  • java环境安装
  • 如何在iStoreOS软路由系统中安装cpolar实现公网远程本地电脑桌面
  • appium实现自动化测试原理
  • Linux:docker搭建redis集群(3主3从扩容缩容 哈希槽分配)
  • Linux程序性能分析60秒+
  • mmap映射文件使用示例
  • Linux命令:stat命令
  • 学会自幂数