随笔分类 -  小程序

摘要:Page({ /** * 页面的初始数据 */ data: { showUploadTip: false, haveGetOpenId: false, envId: '', openId: '' }, onLoad(options) { this.setData({ envId: options.e 阅读全文
posted @ 2024-01-22 23:46 西北逍遥 阅读(13) 评论(0) 推荐(0) 编辑
摘要:Page({ /** * 页面的初始数据 */ data: { }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { this.repeatRun(); }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周 阅读全文
posted @ 2024-01-21 23:57 西北逍遥 阅读(7) 评论(0) 推荐(0) 编辑
摘要:*/5 * * * * * * 表示每5秒触发一次 0 0 2 1 * * * 表示在每月的1日的凌晨2点触发 0 15 10 * * MON-FRI * 表示在周一到周五每天上午10:15触发 0 0 10,14,16 * * * * 表示在每天上午10点,下午2点,4点触发 0 */30 9-1 阅读全文
posted @ 2024-01-20 10:28 西北逍遥 阅读(226) 评论(0) 推荐(0) 编辑
摘要:wx.request({ url: 'https://example.com/api/data', // 替换为你的目标URL method: 'POST', data: { key1: 'value1', // 提交的数据 key2: 'value2' }, success(res) { cons 阅读全文
posted @ 2024-01-05 21:29 西北逍遥 阅读(122) 评论(0) 推荐(0) 编辑
摘要:wx.getImageInfo({ src: '图片路径', success: function (res) { // 获取图片信息 console.log(res.width, res.height); // 压缩图片 wx.compressImage({ src: res.path, quali 阅读全文
posted @ 2023-10-04 21:22 西北逍遥 阅读(75) 评论(0) 推荐(0) 编辑
摘要:在小程序中,可以使用Date对象来获取当前的年、月和日 const now = new Date(); const year = now.getFullYear(); // 获取当前年份 const month = now.getMonth() + 1; // 获取当前月份,注意月份是从0开始的,因 阅读全文
posted @ 2023-09-14 07:58 西北逍遥 阅读(1196) 评论(0) 推荐(0) 编辑
摘要:小程序中格式化JSON数据中的日期 // 假设原始JSON数据为 const originalJson = { name: 'John Doe', birthdate: '1990-01-01' }; // 将日期格式化为标准的ISO 8601格式 const formattedJson = {}; 阅读全文
posted @ 2023-09-06 17:03 西北逍遥 阅读(81) 评论(0) 推荐(0) 编辑
摘要:小程序 swiper swiper-item <swiper class="banner_swiper" indicator-dots="true" indicator-color="white" indicator-active-color="gray" autoplay="true" inter 阅读全文
posted @ 2023-04-19 10:16 西北逍遥 阅读(48) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示