12 2019 档案

摘要:<?php $data = array( array( 'id' => 5698, 'first_name' => 'Bill', 'last_name' => 'Gates', ), array( 'id' => 4767, 'first_name' => 'Steve', 'last_name' 阅读全文
posted @ 2019-12-28 19:21 吴小明- 阅读(263) 评论(0) 推荐(0) 编辑
摘要:for of只能遍历数组,for in可以遍历数组和对象 推荐用for of遍历数组,for in遍历对象 阅读全文
posted @ 2019-12-28 14:26 吴小明- 阅读(855) 评论(0) 推荐(0) 编辑
摘要:function onet(){ // 得到时间戳 毫秒 var time=new Date().getTime() // 将时间戳转换为 Thu Dec 26 2019 11:22:22 GMT+0800 (中国标准时间) var timer=new Date(time) // 格式化为年月日等等 阅读全文
posted @ 2019-12-27 10:31 吴小明- 阅读(2656) 评论(0) 推荐(0) 编辑
摘要:<input type="checkbox" > <input type="checkbox" > <input type="checkbox" > <input type="checkbox" > <input type="checkbox" > <div></div> var inputs=$( 阅读全文
posted @ 2019-12-25 21:39 吴小明- 阅读(331) 评论(0) 推荐(0) 编辑
摘要:框架 小程序配置 页面配置 属性 类型 默认值 说明 enablePullDownRefresh boolean false 是否开启当前页面下拉刷新 onReachBottomDistance number 50 页面上拉触底事件触发时距页面底部距离(px) 如果是全局都需要下拉刷星,在app.j 阅读全文
posted @ 2019-12-21 10:21 吴小明- 阅读(595) 评论(0) 推荐(0) 编辑
摘要:require any require(string path) 引入模块。返回模块通过module.exports或exports暴露的接口。 参数 名称 类型 说明 path string 需要引入模块文件相对于当前文件的相对路径,或npm模块名,或npm模块路径。不支持绝对路径 示例代码: / 阅读全文
posted @ 2019-12-21 10:15 吴小明- 阅读(534) 评论(0) 推荐(0) 编辑
摘要:import import可以在该文件中使用目标文件定义的template,如: 在mine.wxml中定义了一个叫item的template: <template name="item"> <text>{{text}}</text> </template> 在detail.wxml中引用了mine 阅读全文
posted @ 2019-12-21 10:08 吴小明- 阅读(3325) 评论(0) 推荐(0) 编辑
摘要:模板的定义:<template name="msgItem"> 模板的使用:<template is="msgItem"></template> 模板的调用:<import src="../template/list/list.wxml" /> 如果是同一个文件下定义和使用模板不需要引入 模板的样式 阅读全文
posted @ 2019-12-21 10:03 吴小明- 阅读(272) 评论(0) 推荐(0) 编辑
摘要:// 第一种:地址栏 ? 后面传值,在detail.js中onLoad生命周期中接收参数 toDetail(e){ var id=10, title="我是详情页"; wx.navigateTo({ url: '/pages/detail/detail?id=' + id + '&title=' + 阅读全文
posted @ 2019-12-21 09:54 吴小明- 阅读(177) 评论(0) 推荐(0) 编辑
摘要:点击复制文本功能:wx.setClipboardData() 基础库 1.1.0 开始支持,低版本需做兼容处理 // 当期基础库版本2.8.3 // 复制功能 copy(){ wx.setClipboardData({ data: '这是我要复制的内容1111111111111', success( 阅读全文
posted @ 2019-12-21 09:51 吴小明- 阅读(357) 评论(0) 推荐(0) 编辑
摘要:Page({ onLoad:function(){ // 在onLoad中调用发送请求的函数 this.getProList(); } getProList:function(){ var self=this; // 在这里向服务端发送请求 wx.request({ url:"", method:" 阅读全文
posted @ 2019-12-21 09:50 吴小明- 阅读(159) 评论(0) 推荐(0) 编辑
摘要:界面 交互 wx.showLoading() 显示loading提示框。需主动调用wx.hideLoading()才能关闭提示框 参数: 属性 类型 默认值 必填 说明 title string 是 提示的内容 mask boolean false 否 是否显示透明蒙层,防止触摸穿透 success 阅读全文
posted @ 2019-12-21 09:48 吴小明- 阅读(1007) 评论(0) 推荐(0) 编辑
摘要:wx.switchTab() 跳转到tabBar页面,并关闭其他所有非tabBar页面 wx.reLaunch() 关闭所有页面,打开到应用内某个页面 wx.redirectTo() 关闭当前页面,跳转到应用内的某个页面。但是不能跳转到tabBar页面 以上几种方法相当于replace(),没有返回 阅读全文
posted @ 2019-12-21 09:44 吴小明- 阅读(216) 评论(0) 推荐(0) 编辑
摘要:<button bindtap="phonecall">拨打电话</button> // js Page({ phonecall:function(){ wx.makePhoneCall({ phoneNumber: '1340000' //仅为示例,并非真实的电话号码 }) } }) 注意:在宠物 阅读全文
posted @ 2019-12-21 09:42 吴小明- 阅读(372) 评论(0) 推荐(0) 编辑
摘要:<!-- 结构 --> <view class="wrapper"> <block wx:for="{{desc}}"> <view bindtap="toggle" data-index="{{index}}" class="{{descIndex index?'active':''}}">{{i 阅读全文
posted @ 2019-12-20 22:16 吴小明- 阅读(566) 评论(0) 推荐(0) 编辑
摘要:<!-- detail.wxml --> <view class="picker"> <picker range="{{range}}" bindchange="pickerChange"> 选择数量: <text>{{num}}</text> </picker> </view> // detail 阅读全文
posted @ 2019-12-20 20:44 吴小明- 阅读(1049) 评论(0) 推荐(0) 编辑
摘要:// 在utils-->base.js中,封装一个Base类,有一个axios方法 class Base{ constructor(){ } axios(method,url,data){ console.log("调用到了axios") let method = method || "POST"; 阅读全文
posted @ 2019-12-19 21:42 吴小明- 阅读(526) 评论(0) 推荐(0) 编辑
摘要:1、狗屁不通文章生成器 https://suulnnka.github.io/BullshitGenerator/index.html 2、在线表情包制作器 https://www.52doutu.cn/maker/2/?order=timedown http://www.doutula.com/m 阅读全文
posted @ 2019-12-14 19:11 吴小明- 阅读(6440) 评论(0) 推荐(0) 编辑
摘要:①打开酷我音乐,输入要下载的歌曲,如:a little love ②按下f12或者右键-检查打开控制台,点击Network,点击XHR,刷新一下浏览器(ctrl+R) ③点击Name下最后一个数据,此时右边会有详细介绍,点击Preview,选中url地址 ④将刚刚复制的地址在新窗口粘贴,回车,就可以 阅读全文
posted @ 2019-12-11 19:04 吴小明- 阅读(3786) 评论(0) 推荐(0) 编辑
摘要:mac快捷键 shift+command+delete 清除缓存 shift+command+. 查看隐藏文件 ctrl+空格 切换输入法 shift+option+F11/F12 精细调节声音 fn+F12 打开控制台 command+Z 撤销 shift+command+Z 取消撤销 终端快捷键 阅读全文
posted @ 2019-12-11 10:26 吴小明- 阅读(357) 评论(0) 推荐(0) 编辑
摘要:1、异步接口的保存用Save开头,导出用Export开头 2、优化时,所有的页面删除多余的空格和注释,tpl文件删除var_dump(),js文件不要用ES6语法,删除console.log(),php文件删除var_dump() 3、// 初始化时间选择器 datepickerClass.init 阅读全文
posted @ 2019-12-11 10:24 吴小明- 阅读(123) 评论(0) 推荐(0) 编辑
摘要:<body> <ul> <li>这是第一行</li> <li>这是第二行</li> <li>这是第三行</li> <li>这是第四行</li> <li>这是第五行</li> </ul> </body> 第一种: var lis=document.getElementsByTagName("li"); 阅读全文
posted @ 2019-12-08 12:09 吴小明- 阅读(1743) 评论(0) 推荐(0) 编辑
摘要:1、官网jQuery压缩版引用地址: 3.1.1 <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> 3.0.0 <script src="https://code.jquery.com/jquery-3.0.0.m 阅读全文
posted @ 2019-12-08 11:00 吴小明- 阅读(3471) 评论(0) 推荐(0) 编辑
摘要:第一种方法: var paramsArray = window.location.search.substr(1).split('&'), i, paramsObj = {}; paramsArray.forEach(function(item){ i = item.indexOf('='); pa 阅读全文
posted @ 2019-12-08 10:33 吴小明- 阅读(647) 评论(0) 推荐(0) 编辑
摘要:加上样式: input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; } input[type="number"]{ -moz-appearance: textfiel 阅读全文
posted @ 2019-12-07 14:27 吴小明- 阅读(1057) 评论(0) 推荐(0) 编辑
摘要:①安装插件 此时右击会有: ②anywhere 阅读全文
posted @ 2019-12-06 11:37 吴小明- 阅读(412) 评论(0) 推荐(0) 编辑
摘要:富文本的原理: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta ht 阅读全文
posted @ 2019-12-03 15:40 吴小明- 阅读(422) 评论(0) 推荐(0) 编辑
摘要:原生js拖拽: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta ht 阅读全文
posted @ 2019-12-03 15:34 吴小明- 阅读(436) 评论(0) 推荐(0) 编辑

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