摘要:github地址:https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxs/ js:
阅读全文
摘要:$1,$2.....:显示括号里的第一个;显示括号里的第二个.... let content='<img src="http://qiniu.ve-link.com/files/3/3/45/b20e446593872e59a99aff02edca5c9a450e4533.jpg" style="h
阅读全文
摘要:方法一:rich-text 文档:https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html 方法二(当需要触发点击事件时可以使用): 使用wxParse:https://github.com/icindy/wx
阅读全文
摘要:1.手机选择照片 var that = this; wx.chooseImage({ count: 9, // 默认9 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 sourceType: ['album', 'camera
阅读全文
摘要:例子: 1.wxml: <movable-area class='movable-box'> <movable-view class='movable-btn' x='{{x}}' y='{{y}}' direction='all' bindtouchstart='homeMoveStart' bi
阅读全文
摘要:1.在components自定义文件夹,文件夹里分别包含wxml,wxss,js,json文件 (componetns文件是自己手写的) 2.wxml与wxss文件按照平常的来就好 3.js文件 Component({ properties:{ 页面上需要动态传递的参数:数据类型 例如:name:S
阅读全文
摘要:1.wxml <view class="my-dialog" catchtouchmove="true">//catchtouchmove阻止冒泡,防止遮罩层底部滑动 <view class="my-mask" bindtap="confirmDialog" hidden="{{!showDialo
阅读全文
摘要:1.index.wxml中 <button open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button> 2.index.js中 getUserInfo: function(e) { console.log(e) ap
阅读全文
摘要:1.将iconfont图标代码下载下来 2.解压后找到iconfont.ttf文件,打开https://transfonter.org/转化下 3.在utils下新建个iconfont.wxss(位置,命名自己根据喜好来) 转化后找到stylesheet.css,将里面的代码全部复制到iconfon
阅读全文
摘要:第一种方法: 在app.js中声明 globalData: { userInfo: null, nnnnn:1111 } 调用,在指定的js中 const app = getApp() console.log(app.globalData.nnnnn) 第二种方法: 可以像调用方法那样调用变量 gl
阅读全文
摘要:1.在util.js中写下请求方法 function request(obj.method, obj.url, obj.data) { return new Promise((resolve) => { wx.request({ method: obj.method, url: 'http://17
阅读全文
摘要:1. 先检查下 Node.js 是否安装成功 node -v npm -v 2. 全局安装 vue-cli npm install --global vue-cli 3. 创建一个基于 mpvue-quickstart 模板的新项目 vue init mpvue/mpvue-quickstart m
阅读全文
摘要:template <view class="drawer_screen" v-if="updateTel"></view> //遮罩层 <view :animation="animationData" class="drawer_attr_box" v-if="updateTel"> <view c
阅读全文
摘要:<template> <div> <div style="width:90%;height:40px;line-height:40px;margin:auto;"> <div style="float:left;font-size: 15px;">我的应用</div> <div style="flo
阅读全文
摘要:1.在compontents新建文件放入 <template> <section class="tabBar-wrap"> <article class="tabBar-box"> <ul class="tabBar-nav" v-if="navList.length > 0"> <li class
阅读全文
摘要:1.在https://lbs.qq.com/console/mykey.html?console=mykey链接上申请一个密匙 2.在https://lbs.qq.com/qqmap_wx_jssdk/index.html下载微信小程序JavaScriptSDK 3.在页面引入文件var QQMap
阅读全文
摘要:http://blog.sina.com.cn/s/blog_c42817dc0102y9pt.html 若从A页面跳到B页面(A >B),在B页面操作完成后需要刷新A页面的数据,有两种思路:(推荐使用第2种方法) 1.在返回A页面的时候调用A的页面onShow()方法,重新查询加载一次A页面即可,
阅读全文
摘要:1.小程序中路径跳转的两种方法 ① 用"=" url: `../index/index?serial_number=${that.data.number}&nick_name=${user_info}` ②用"+"拼接 url: `../pic/pic?id=` + member_id + '&se
阅读全文
摘要:1.点击事件 2.1)一个页面调用另外一个页面的html 2)一个页面调用另外一个页面的css,在css页面引入 3)一个页面调用另外一个页面的js,在js页面引入(只对引用util.js有用) 3.CSS 4.banner 5.滑动 6.图标
阅读全文