随笔分类 -  小程序

原生小程序 wxs使用
摘要:github地址:https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxs/ js: 阅读全文

posted @ 2019-10-31 17:16 旺仔小裤头 阅读(252) 评论(0) 推荐(0)

正则踩坑一
摘要:$1,$2.....:显示括号里的第一个;显示括号里的第二个.... let content='<img src="http://qiniu.ve-link.com/files/3/3/45/b20e446593872e59a99aff02edca5c9a450e4533.jpg" style="h 阅读全文

posted @ 2019-10-31 17:12 旺仔小裤头 阅读(124) 评论(0) 推荐(0)

小程序 富文本编辑器解析标签组件
摘要:方法一:rich-text 文档:https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html 方法二(当需要触发点击事件时可以使用): 使用wxParse:https://github.com/icindy/wx 阅读全文

posted @ 2019-10-18 17:11 旺仔小裤头 阅读(621) 评论(0) 推荐(0)

原生小程序 常用api集合
摘要:1.手机选择照片 var that = this; wx.chooseImage({ count: 9, // 默认9 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 sourceType: ['album', 'camera 阅读全文

posted @ 2019-10-15 14:53 旺仔小裤头 阅读(401) 评论(0) 推荐(0)

原生小程序 拖拽组件movable-view
摘要:例子: 1.wxml: <movable-area class='movable-box'> <movable-view class='movable-btn' x='{{x}}' y='{{y}}' direction='all' bindtouchstart='homeMoveStart' bi 阅读全文

posted @ 2019-10-15 14:33 旺仔小裤头 阅读(957) 评论(0) 推荐(0)

原生小程序 自定义封装组件
摘要:1.在components自定义文件夹,文件夹里分别包含wxml,wxss,js,json文件 (componetns文件是自己手写的) 2.wxml与wxss文件按照平常的来就好 3.js文件 Component({ properties:{ 页面上需要动态传递的参数:数据类型 例如:name:S 阅读全文

posted @ 2019-10-14 10:00 旺仔小裤头 阅读(724) 评论(0) 推荐(0)

原生小程序底部弹出层动画过渡
摘要:1.wxml <view class="my-dialog" catchtouchmove="true">//catchtouchmove阻止冒泡,防止遮罩层底部滑动 <view class="my-mask" bindtap="confirmDialog" hidden="{{!showDialo 阅读全文

posted @ 2019-10-12 10:27 旺仔小裤头 阅读(833) 评论(0) 推荐(0)

小程序 用户授权登录
摘要:1.index.wxml中 <button open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button> 2.index.js中 getUserInfo: function(e) { console.log(e) ap 阅读全文

posted @ 2019-09-06 15:22 旺仔小裤头 阅读(173) 评论(0) 推荐(0)

原生小程序 iconfont引用及使用
摘要:1.将iconfont图标代码下载下来 2.解压后找到iconfont.ttf文件,打开https://transfonter.org/转化下 3.在utils下新建个iconfont.wxss(位置,命名自己根据喜好来) 转化后找到stylesheet.css,将里面的代码全部复制到iconfon 阅读全文

posted @ 2019-09-05 15:46 旺仔小裤头 阅读(1058) 评论(0) 推荐(0)

原生小程序 变量全局调用
摘要:第一种方法: 在app.js中声明 globalData: { userInfo: null, nnnnn:1111 } 调用,在指定的js中 const app = getApp() console.log(app.globalData.nnnnn) 第二种方法: 可以像调用方法那样调用变量 gl 阅读全文

posted @ 2019-09-04 15:17 旺仔小裤头 阅读(277) 评论(0) 推荐(0)

原生小程序 请求方法的封装及调用
摘要:1.在util.js中写下请求方法 function request(obj.method, obj.url, obj.data) { return new Promise((resolve) => { wx.request({ method: obj.method, url: 'http://17 阅读全文

posted @ 2019-09-04 14:47 旺仔小裤头 阅读(744) 评论(0) 推荐(0)

mpvue 搭建命令
摘要:1. 先检查下 Node.js 是否安装成功 node -v npm -v 2. 全局安装 vue-cli npm install --global vue-cli 3. 创建一个基于 mpvue-quickstart 模板的新项目 vue init mpvue/mpvue-quickstart m 阅读全文

posted @ 2019-08-23 10:55 旺仔小裤头 阅读(198) 评论(0) 推荐(0)

mpvue小程序 上拉菜单
摘要:template <view class="drawer_screen" v-if="updateTel"></view> //遮罩层 <view :animation="animationData" class="drawer_attr_box" v-if="updateTel"> <view c 阅读全文

posted @ 2019-05-13 17:43 旺仔小裤头 阅读(517) 评论(0) 推荐(0)

mpvue 小程序应用拖动排序
摘要:<template> <div> <div style="width:90%;height:40px;line-height:40px;margin:auto;"> <div style="float:left;font-size: 15px;">我的应用</div> <div style="flo 阅读全文

posted @ 2019-04-30 13:19 旺仔小裤头 阅读(675) 评论(0) 推荐(0)

mpvue小程序 自定义底部导航栏
摘要:1.在compontents新建文件放入 <template> <section class="tabBar-wrap"> <article class="tabBar-box"> <ul class="tabBar-nav" v-if="navList.length > 0"> <li class 阅读全文

posted @ 2019-03-14 13:07 旺仔小裤头 阅读(1267) 评论(0) 推荐(0)

mpvue小程序 腾讯地图定位获取到地理位置
摘要:1.在https://lbs.qq.com/console/mykey.html?console=mykey链接上申请一个密匙 2.在https://lbs.qq.com/qqmap_wx_jssdk/index.html下载微信小程序JavaScriptSDK 3.在页面引入文件var QQMap 阅读全文

posted @ 2019-03-13 17:43 旺仔小裤头 阅读(935) 评论(0) 推荐(0)

mpvue小程序 改变其它页面的数据
摘要:http://blog.sina.com.cn/s/blog_c42817dc0102y9pt.html 若从A页面跳到B页面(A >B),在B页面操作完成后需要刷新A页面的数据,有两种思路:(推荐使用第2种方法) 1.在返回A页面的时候调用A的页面onShow()方法,重新查询加载一次A页面即可, 阅读全文

posted @ 2019-01-02 11:33 旺仔小裤头 阅读(493) 评论(0) 推荐(0)

mpvue小程序
摘要:1.小程序中路径跳转的两种方法 ① 用"=" url: `../index/index?serial_number=${that.data.number}&nick_name=${user_info}` ②用"+"拼接 url: `../pic/pic?id=` + member_id + '&se 阅读全文

posted @ 2018-11-21 18:07 旺仔小裤头 阅读(114) 评论(0) 推荐(0)

小程序(1)
摘要:1.点击事件 2.1)一个页面调用另外一个页面的html 2)一个页面调用另外一个页面的css,在css页面引入 3)一个页面调用另外一个页面的js,在js页面引入(只对引用util.js有用) 3.CSS 4.banner 5.滑动 6.图标 阅读全文

posted @ 2018-10-11 09:42 旺仔小裤头 阅读(121) 评论(0) 推荐(0)