GithubHelp home page GithubHelp logo

iotjin / jh-weapp-demo Goto Github PK

View Code? Open in Web Editor NEW
87.0 2.0 28.0 7.28 MB

微信小程序项目- 实现一些常用效果、封装通用组件和工具类

License: MIT License

JavaScript 100.00%
listview echarts aes alert utils loading toast picker nav search gridview table toptabs weapp tree echart rsa map lunar

jh-weapp-demo's Introduction

jh-weapp-demo

A new weapp project - 实现一些常用效果、封装通用组件和工具类

代码不定期更新

注:真实开发项目注意按需引用。例如:组件、工具类、app.json的引用,可通过代码依赖分析做优化。


小程序码




实现的一些效果

  • ListView相关
  • GridView相关
  • eCharts分包导入,异步加载,多图表延时加载,**地图效果
  • 腾讯地图使用,定位、地图选点、标注点连线计算距离
  • 上下拉刷新、分组吸顶ListView
  • 答题功能
  • excel导入导出
  • 表格、表单录入
  • 树结构数据展示
  • 热门搜索和历史搜索框
  • 侧滑筛选
  • 顶部搜索+分栏+侧滑、底部tabbar
  • custom-tabbar(动态设置、不闪屏)
  • 波浪背景动画
  • 登录页、功能页等UI页面

组件

  • 自定义导航条,支持设置左侧文字图片,网络本地背景图,渐变背景色,左侧和标题slot,返回home主页,导航条加搜索框(jh-navbarjh-custom-navbarjh-capsule-navbar
  • 公农历通用时间选择器。支持同步切换,设置默认选中时间、设置最大最小时间(公历范围:1901/01/01 ~ 2100/12/31),标题栏颜色(jh-lunar-picker
  • 年月日和年月日时分选择器(jh-ymd-time-picker
  • 月日周时分选择器(jh-time-picker
  • 字符串选择器(jh-string-picker
  • 中间输入弹框(jh-input-alert
  • 底部输入弹框(jh-input-picker
  • 自定义加载框(jh-loading-toast
  • 树形结构数据组件(jh-tree
  • 轮播图组件(jh-swiper-view
  • 左右时间切换(jh-time-switch
  • 下拉菜单(jh-dropdown-menu
  • 上下拉刷新组件(base-refresh-viewrefresh

工具类

  • wx.request网络请求封装(httpUtils.js
  • API管理(apiCongfig.js
  • 用户管理云函数请求Promise封装(dataManager文件夹)
  • AES、RSA加解密,SHA256、MD5加密,base64编码解码(encryptUtils.js
  • 时间格式转换、周岁计算(timeUtils.js
  • 公历农历转换、星座、属相、虚岁计算(lunarTimeUtils.js
  • 正则校验(checkUtils.js
  • 权限判断(authUtils.js
  • 安全随机数(commonUtils.js
  • 全局常量、变量(app.jsprojectConfig.js
  • 公共样式(styles文件夹
  • 网络监听,设备类型和刘海屏判断(app.js

注:

组件在jh-components文件夹
工具类在utils文件夹
网络请求和API管理在http文件夹
数据管理在dataManager文件夹
公共样式在styles文件夹


三方组件库

建议通过扩展库引入,不占用小程序包体积
# 通过 npm 安装
npm i @vant/weapp -S --production
需下载源码手动导入
# 通过 npm 安装
npm i wux-weapp -S --production

预览

部分页面效果如下:

jh-weapp-demo's People

Contributors

iotjin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jh-weapp-demo's Issues

感谢作者提供的组件,想请教一下关于lunarTimePicker问题

我参考你的代码对其进行改装使其在uniapp里面使用,现在遇到一个问题是pickerYearArr的值必须在data的return中实现,后面再去修改pickerYearArr,滚动条不会滚动到指定的位置,好像是因为picker-view中的value值是一开始是根据现有的picker-view-column子项的下标进行滚动

在小程序里面你是在ready里面进行初始化的
lifetimes: { detached: function () { // 页面销毁时执行 // console.info('---JhLunarPicker unloaded!---') }, attached: function () { // 页面创建时执行 // console.info('---JhLunarPicker loaded!---') }, ready: function () { this.initData() }, },
请问这个生命周期请问对应uniapp里面的哪个周期?

经过测试公历农历日期转换的时候选择特定日期出错

经过测试公历农历日期转换的时候选择特定日期出错
使用默认的公历农历,转换器选择1970年1月到4月的某一天,返回的公历时间出错,

例如我选择1970年4月1日,返回的时间戳,自动到7920000000000 2222年12月23日,选择其他年份和日期没有错误。

用微信扫官方体验码,选择1970年4月1日也会出错,如果没有出错,再多选几遍或者选择1月-4月之间的日期也会出错。其他时间没有问题。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.