![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小程序
TaTaPark
空气贩子
展开
-
小程序离开当前页面时,清除定时器问题
一、小程序离开当前页面时,会遇到清除定时器失效问题解决方式:// pages/setInter/index.jsPage({ /** * 页面的初始数据 */ data: { myInterv: '', // 定时器 cont: 0 // 数据 }, /** * 生命周期函数--监听页面加载 */ onLoad: f...原创 2019-12-30 10:41:30 · 4786 阅读 · 2 评论 -
小程序swiper轮播 切换数据出现白屏问题
小程序切换首页,轮播图片数据切换,偶尔会出现白屏,解决方式: <swiper autoplay="{{swiper_options.autoplay}}" interval="{{swiper_options.interval}}" duration="{{swiper_options.duration}}" circular="{{sw...原创 2019-12-30 09:54:31 · 1335 阅读 · 0 评论 -
小程序实现淘票票选场次轮播功能
一、效果图预览,非gif二、通过swiper 实现头部海报轮播 <view class="cinemaCarou" wx:if="{{headmovies.length>3}}"> <swiper bindanimationfinish="intervalChange" easeOutCubic="eas...原创 2020-01-16 16:41:03 · 755 阅读 · 0 评论 -
小程序sessionStorage 功能 替代方案
一、目的:实现H5sessionStorage 功能 ,数据本地保存二、方法:使用小程序官方提供 globalData 方法a、在 app.js 中初始化自有变量App({ globalData: { flageType: true // 初始化自有变量 },...})b、在项目模块index.js 中请求 globalData 数据onS...原创 2019-12-19 15:12:29 · 4427 阅读 · 0 评论 -
vscode 小程序开发配置
一、配置项{ "minapp-vscode.globalStyleFiles": [ "style/size.wxss", "style/font.wxss", "style/icon.wxss", "style/zyfont.wxss", "style/layout.wxss", "sty...原创 2019-11-19 09:47:50 · 1353 阅读 · 0 评论 -
小程序实现星级评价样式
一、wxml 通过循环画星星容器<view class="score"> <text wx:for="{{ [0, 1, 2, 3, 4] }}" wx:key="{{index}}" class="{{ shop.score >= (index + 1) ? 'bg_color' : '' }} v v-st...原创 2019-10-21 16:04:15 · 624 阅读 · 0 评论 -
动画实现点赞出现小心心动效
1、页面添加事件点击事件触发动效标识 aFlag : true2、动画容器根据aFlag 显隐3、样式.heart{position:absolute;z-index:10;height:16rpx;width:16rpx;top:0; background-image:url('https:../images/hea...原创 2019-10-16 11:32:06 · 1126 阅读 · 0 评论 -
小程序本地图片真机获取不到解决
一、小程序本地内存较小建议图片压缩之后上传远程终端、压缩有介绍(https://blog.csdn.net/TaTaPark/article/details/99547432)二、通过.wxss 背景属性background.wxss 中 通过 background-image:url('../images/heart.png'); 获取不到本地图片的解决方式backgr...原创 2019-10-16 11:24:01 · 775 阅读 · 0 评论 -
前端图片高质量压缩工具
一、推荐一款图片低损高压缩比网站。https://tinypng.com/可压缩55%左右,亲测高效好用,直接拖拽图片即可使用。原创 2019-09-11 17:46:12 · 568 阅读 · 2 评论 -
小程序B端客户扫码登录功能
一、扫码登录需求B端商户为了便利需在我们C端平台嵌套B端入口,且可实现扫码立刻登录功能。二、代码实现B端商家登录页面做逻辑判断 onLoad: async function(options) { // 该页面为 B端客户登录页面 if (options.inf=="QRinf"){ // 二维码链接参数 {inf:QRinf} await a...原创 2019-09-11 17:47:17 · 1045 阅读 · 0 评论 -
小程序flex布局text标签不垂直居中问题
一、实现 空格功能,text替换掉 view 布局<text class="size28"> 某某信用卡 再减 </text> <text class="size36" decode="{{true}}"> 15元 </text>其中 使用 text的decode...原创 2019-06-20 15:48:24 · 3259 阅读 · 0 评论