摘要: 在wxml引入过滤方法,创建一个.wxs文件filters.wxs,然后在文件导出方法 var filters = { obj: function (value) { var arr = [1,2,4] return arr.findIndex(value) } }; module.exports 阅读全文
posted @ 2025-03-28 11:18 微宇宙 阅读(20) 评论(0) 推荐(0)
摘要: 小程序登录的操作,先通过 wx.login回调方法,然后通过code在自己的服务器调openId接口获取用户信息和设备信息,然后在自己的服务器调用login登录接口获取sessionId和token。 另一种情况是,先通过 wx.login 获取code,然后调后端接口获取手机号 phone。然后再 阅读全文
posted @ 2025-03-27 10:13 微宇宙 阅读(16) 评论(0) 推荐(0)
摘要: 辅助功能,就是平时需要用到的小功能。icon图标功能,可以调用小程序内置的<icon type="warn">警告</icon> 阅读全文
posted @ 2025-03-26 15:48 微宇宙 阅读(13) 评论(0) 推荐(0)
摘要: 小程序页面返回传参,返回上一页之前先调用上一页的trigPageBack函数方法,通过回调的方式把参数传入。 const options = {}; const index = 2; const pages = getCurrentPages(); const indexTP = pages.len 阅读全文
posted @ 2025-03-26 15:40 微宇宙 阅读(39) 评论(0) 推荐(0)
摘要: 小程序开发页面有多个内容,其中滚动区域自动填充布局 <view class="flex container" style="padding: 0 !important"> <view class="flex-auto"> 111 </view> <view class="flex-auto"> 22 阅读全文
posted @ 2025-03-24 14:57 微宇宙 阅读(11) 评论(0) 推荐(0)
摘要: 微信小程序-底部弹出框案例如下: <view class="dialog" wx:if="{{isShow}}"> <view aria-label="关闭" role="button" aria-role="button" bindtap="close" data-type="tap" data- 阅读全文
posted @ 2025-03-12 12:01 微宇宙 阅读(154) 评论(0) 推荐(0)
摘要: 中文转拼音首字母简化版,不管是PC端,移动端,小程序上已验证均可运行。 代码如下: // 拼音声母可能的首字母 const PINYIN_INITIAL_CONSONANT_LETTERS = 'ABCDEFGHJKLMNOPQRSTWXYZ'.split(''); // 拼音声母对应的边界中文 c 阅读全文
posted @ 2025-02-10 22:16 微宇宙 阅读(107) 评论(0) 推荐(1)
摘要: 创建表 mysql> create table test(name varchar(20) not null); mysql> alter table test add column id int auto_increment not null, add primary key(id); mysql 阅读全文
posted @ 2021-07-02 16:27 微宇宙 阅读(73) 评论(0) 推荐(0)
摘要: co-dialog theme 访问git:co-dialog 版本v2.0.0 主题2 主题3 主题4 以下访问官网:https://koringz.github.io/co-dialog/index 浏览器默认的alert弹出框 这是一个基础的弹出框 co-dialog弹出框 你可以拖动我一下 阅读全文
posted @ 2018-09-13 13:38 微宇宙 阅读(379) 评论(0) 推荐(0)
摘要: 既然躲不开,为何还抓不回来。 其实,生活看似简单,那只是我们把生活简单化了,但是很多事情并非我们所想的那么简单,只是我们太需要被肯定,这就好像万物一样,世间万物存在的理由,万物都有万物存在的理由,那么我们何尝不是呢,所以我们都有一个存在的理由,以及一个被肯定的理由。(以上说明了二点,一生活其实不简单 阅读全文
posted @ 2018-03-14 19:14 微宇宙 阅读(335) 评论(0) 推荐(0)