shiFN:function(e){
// touchstart
// touchend
let that=this;
let n=0;
// 判断是开始还是结束的参数
let textTure = e.type;
that.setData({
textTure: textTure
})
if (textTure =='touchstart'){
let lovetime = setInterval(function () {
n += 0.5;
 
if (that.data.textTure=='touchend') {
clearInterval(lovetime);
}
console.log(n);
that.setData({
bian: n
})
}, 500)
 
}
},
 
<view class='bt-item' bindtouchend='shiFN' bindtouchstart='shiFN'></view>

微信小程序 功能函数 touch触摸计时的更多相关文章

  1. 微信小程序 功能函数 openid本地和网络请求

    本地-------------------------------------------------------------------------------------------------- ...

  2. 微信小程序 功能函数 点击传参和页面

    // 商品详情页跳转函数 detailInto: function (e) { // console.log() var change = e.currentTarget.dataset.id; wx ...

  3. 微信小程序 功能函数 支付接口

    // 订单生成返回数据,弹出是否支付模态 wx.showModal({ title: '微信支付', content: '确定支付吗?', success: function (res) { if ( ...

  4. 微信小程序 功能函数 定时震动

    ffn: function () { let nnn = this.data.nnn nnn += 1; this.setData({ nnn: nnn }); if (nnn > 10) { ...

  5. 微信小程序 功能函数 客服

    <view> <view class='btn-img'> <image class='image-full' src='../../imgs/index/tab6.pn ...

  6. 微信小程序 功能函数 将对象的键添加到数组 (函数深入)

    // 将对象的键添加到数组 var arr = Object.keys(site); //英文 https://developer.mozilla.org/en-US/docs/Web/JavaScr ...

  7. 微信小程序 功能函数 购物车商品删除

    // 购物车删除 deleteList(e) { const index = e.currentTarget.dataset.index; let carts = this.data.carts; c ...

  8. 微信小程序 功能函数 替换字符串内的指定字符

    var str = 'abcadeacf'; var str1 = str.replace('a', 'o'); alert(str1);    // 打印结果: obcadeacf   var st ...

  9. 微信小程序 功能函数picker-view的弹出模态

    <view class="list"> <form bindsubmit="formSubmit"> <view class=&q ...

随机推荐

  1. 理解 ajax、fetch和axios

    背景 ajax fetch.axios 优缺点 ajax基于jquery,引入时需要引入庞大的jquery库,不符合当下前端框架,于是fetch替代了ajax 由于fetch是比较底层,需要我们再次封 ...

  2. Shrio第一天——入门与基本概述

    一.Shiro是什么 Apache Shiro是Java的一个安全框架.(希罗:/笑哭) Shiro可以非常容易的开发出足够好的应用,其不仅可以用在JavaSE环境,也可以用在JavaEE环境. sh ...

  3. Storyboarding by Scripting

    Storyboarding by Scripting In the .osu file, under [Events]:Note: underscores can be replaced with s ...

  4. day1 ORM

    ORM对象关系映射 映射关系: 表名 <-------> 类名 字段 <-------> 属性 表记录 <------->类实例对象 class Customer( ...

  5. [IOI2011]Race 点分治

    [IOI2011]Race LG传送门 点分治板子题. 直接点分治统计,统计的时候开个桶维护下就好了. 注(tiao)意(le)细(hen)节(jiu). #include<cstdio> ...

  6. IIS解决上传文件大小限制

    目的:通过配置文件和IIS来解决服务器对上传文件大小的限制 1:修改配置文件(默认为4M 值的大小根据自己情况进行修改) <httpRuntime  maxRequestLength=" ...

  7. Spring学习(九)-----Spring bean配置继承

    在 Spring,继承是用为支持bean设置一个 bean 来分享共同的值,属性或配置. 一个子 bean 或继承的bean可以继承其父 bean 的配置,属性和一些属性.另外,子 Bean 允许覆盖 ...

  8. html查漏补缺之meta标签

    什么是meta标签? meta标签是html标记head区的一个关键标签,它位于HTML文档的<head>和<title>之间(有些也不是在<head>和<t ...

  9. sublime3配置java开发环境

    链接:http://www.jianshu.com/p/48a524a4f63c 或者:http://www.jianshu.com/p/9d167c4c4feb 侵权删!

  10. NO--10今天带大家回忆回忆“闭包”吧!

    对于‘闭包,我相信很多人都掉进过这个坑里,也相信很多人没能详细的理解这个问题,今天带大家再次走进闭包: 写这篇文章时的心情是十分忐忑的,因为对于我们今天的主角:闭包,很多小伙伴都写过关于它的文章,相信 ...