![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小程序
那些年的笔记
这个作者很懒,什么都没留下…
展开
-
微信小程序生成二维码
1.wxml页面<view class="container-box"> <view class="img-box"> <canvas class="canvas" bindtap="previewImg" hidden="{{canvasHidden}}"canvas-id="qrcCanvas" /原创 2018-10-22 17:14:14 · 405 阅读 · 0 评论 -
小程序下拉选择
1、效果图2、页面<view class="top"> <view class='list_msg'> <!--下拉框 --> <view class='list_msg2' bindtap='bindShowMsg'> <text>{{tihuoWay}}</text> ...原创 2019-09-24 16:03:59 · 1143 阅读 · 1 评论 -
小程序定时刷新
var interval;在 onLoad: function()里面加/** * 生命周期函数--监听页面加载 */ onLoad: function(options) { var that = this; interval = setInterval(function() { that.getMyCommune(); conso...原创 2019-08-12 11:38:44 · 3759 阅读 · 2 评论 -
小程序侧滑删除加点击切换tab
不喜欢多说,直接上代码1.页面<!--pages/PDCA/PDCAHomeList/PDCAHomeList.wxml--><view class="tab_top"> <view class="tab_top_item {{tabArr.curHdIndex=='0'? 'active' : ''}}" id="0" data-id="0" bin...原创 2019-07-21 16:41:29 · 162 阅读 · 0 评论 -
小程序text文字分行、空格、换行小技巧
直接上代码<text class='main-text' space="ensp" decode="{{true}}">{{item.ContentInfotxt}}</text>原创 2019-06-14 16:46:45 · 4865 阅读 · 0 评论 -
小程序自定义弹框
1、页面简单布局<button bindtap='ElasticFrameClick'>弹框</button><view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view><view wx:if="{{showModal}}"> <v...原创 2019-05-29 18:00:34 · 625 阅读 · 0 评论 -
微信小程序横屏小技巧
1、在对应的页面json文件中配置 "pageOrientation": "auto"如下{ "navigationBarTitleText": "", "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#3891f8", "navigationBarTextStyle": "white", ...原创 2019-05-29 16:52:13 · 2136 阅读 · 0 评论 -
小程序轮播每次显示三条数据
1.页面布局<!-- 统计过程控制s --> <view class='Lean_item'> <view class='Lean_container'> <view class='Lean_item_title'> ...原创 2019-03-18 17:12:08 · 1693 阅读 · 0 评论 -
小程序移动按钮
1.页面<image class="icon40" bindtap="addTeam" bindtouchmove="viewTouchMove" src="{{BaseURL}}uploadFile/groupImages/ProblemReport-zhu.png" style="left:{{left}}px;top:{{top}}px;"></image>...原创 2019-03-20 18:04:39 · 775 阅读 · 0 评论 -
小程序模糊搜索功能
1.写好页面布局<!--搜索--><view class="searchbox"> <form bindsubmit="formSubmit"> <view class="search"> <image class="search-icon" src="{{Bas原创 2019-02-20 10:28:57 · 4965 阅读 · 0 评论 -
小程序侧滑删除
1.页面布局<view class='dialogue-box'> <scroll-view scroll-y="true" style="height:{{winHeight-50}}px"> <view class='top-list'> <view class='standard_text1'&g...原创 2019-02-25 12:00:00 · 799 阅读 · 0 评论 -
小程序展开收缩
1.页面代码 <view class='reason' bindtap='flodFn' bindtap='LeadingStorage'> <text class='reason-name'>仓储</text> <image class='reason-img' src='{{PicURL}}greater.png'...原创 2018-12-25 15:55:20 · 712 阅读 · 0 评论 -
小程序页面跳转方法
需求:从 index.wxml 页面,跳转到 log.wxml 页面方法一:WXML页面实现<navigator url = "/pages/log/log">跳转到新页面</navigator><navigator url = "/pages/log/log" open-type = "redirect">跳转到新页面</navigato原创 2018-11-08 14:31:34 · 469 阅读 · 0 评论 -
小程序小坑小细节
1.小程序一般js显示出数据了,页面后台也循环出来了,就是页面渲染不出文字图片等,一般是页面上的“{{}}”多了空格什么的,删掉空格就行了原创 2018-11-13 11:33:35 · 239 阅读 · 0 评论 -
小程序嵌入web-view网页后,点击网页中的按钮跳转回小程序
1.首先在网页端引入js<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.0.js"></script>2、在网页端点击按钮写如下点击事件$(".kaiqi").click(function(){ url: '/pages/Inform...原创 2018-11-04 19:45:20 · 2080 阅读 · 0 评论 -
小程序图片自适应写法
方法一:在image上加上mode='widthFix'给定宽度,高度就会相对应等比显示了方法二:代码如下:1、html代码<image src='{{BaseURL}}/uploadFile/backstage/{{item.PictureFileName}}' bindload="imageLoad" data-index="{{ index }}" style="...原创 2018-11-04 19:38:29 · 1786 阅读 · 0 评论 -
我的活动日程小程序页面(导航切换)
1.wxml代码如下<!--导航切换 --><view class='top-bg'> <view class="swiper-tab"> <view class="swiper-tab-list {{current == index ? 'change': ' '}}" wx:for="{{title}}" data-index=原创 2018-10-21 12:24:38 · 661 阅读 · 0 评论 -
小程序页面跳转使用转码与解码传递对象
在小程序开发过程中,我们经常会涉及到页面的跳转,在页面的跳转中,需要向下一个页面传递参数,有时候为了防止数据外漏,我们可以进行数据转码,等跳转后再解码!简单介绍:•将对象转换成 JSon 字符串•var infoStr = JSON.stringify(str)•利用编码函数,将字符串进行编码•var mUrl = encodeURIComponent(infoStr);•...原创 2019-09-24 17:25:05 · 1709 阅读 · 0 评论