小天天天天 前端 44 次 2023-05-16 16:32:21
///获取应用实例varapp=getApp()Page({data:{lanya:"",state:"",msg:"",sousuo:"",status:"",connectedDeviceId:"",//连接设备Iddevices:[],serviceId:"",writeCharacteristicId:"",notifyCharacteristicId:"",},onL
小天天天天 前端 73 次 2023-04-28 10:44:52
微信小程序的左右滑动触屏事件,主要有三个事件:touchstart,touchmove,touchend。这三个事件最重要的属性是startX和startY,表示X,Y坐标。touchstart在触摸开始时触发事件;touchend在触摸结束时触发事件;1:在wxml文件中绑定事件<viewclass='header_content'bindtouchstart="touchstart"bindtouchmove="touchmo
小天天天天 前端 96 次 2023-04-18 14:50:44
近期在小程序中使用到了数字键盘,由于某些需求手机自带的数字键盘无法满足,于是通过查看一些文章,自己模仿支付宝弄了一个键盘,下面是样式的源码:有身份证键盘和纯数字键盘两种:<viewclass="keyboard"> <!--<viewclass="keyboard-line"> <viewbindtap="_cancelNumber"style="width:37%;"> <v
小天天天天 前端 246 次 2022-12-09 13:39:03
小程序页面之间的跳转方式有很多种,我们下面就来分析一下每种跳转方式的不同已经优缺点。需求:从index.wxml页面,跳转到aaa.wxml页面方法一:WXML页面实现<navigatorurl="/pages/aaa/aaa">跳转到新页面</navigator><navigatorurl="/pages/aaa/aaa"open-type="redirect">跳转到新页面</naviga
小天天天天 PHP 310 次 2022-12-03 23:54:02
通过后台接口可以获取小程序任意页面的二维码,扫描该二维码可以直接进入小程序对应的页面。官方推荐生成并使用小程序码,它具有更好的辨识度。目前有3个接口可以生成小程序码,开发者可以根据自己的需要选择合适的接口。接口A:适用于需要的码数量较少的业务场景接口地址:https://api.weixin.qq.com/wxa/getwxacode?access_token=ACCESS_TOKEN参数如下:注意:通过该接口生成的小程序码,永久有效,
小天天天天 前端 986 次 2021-12-23 14:51:18
<buttonbindtouchstart="handleTouchStart"bindtouchend="handleTouchEnd"bindlongpress="handleLongPress"bindtap="handleClick">点击/长按</button><!--button可以换成view-->//touchstarthandleTouchStart:function(
小天天天天 PHP 988 次 2017-08-15 10:24:53
几个常用的函数1.计算两个时间的相差几天$startdate=strtotime("2009-12-09");$enddate=strtotime("2009-12-05");上面的php时间日期函数strtotime已经把字符串日期变成了时间戳,这样只要让两数值相减,然后把秒变成天就可以了,比较的简单,如下:$days=round(($enddate-$startdate)/3600/24)
网站文章数:467
今日UV/PV/IP:19/25/18
昨日UV/PV/IP:23/28 /21