随笔分类 -  微信小程序

摘要:一、效果图 二、代码 ①、wxml <button bindtap="clickme"> clickme </button> <!--屏幕背景变暗的背景 --> <view class="commodity_screen" bindtap="hideModal" wx:if="{{showModal 阅读全文
posted @ 2021-06-19 15:25 ki1616 阅读(94) 评论(0) 推荐(0)
摘要:一、页面跳转方式(详情见微信官方https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.switchTab.html) 1、wx.switchTab 只能跳转到tabBar页面,并关闭其他所有非 tabBar 页面。 2、wx.re 阅读全文
posted @ 2021-05-12 18:21 ki1616 阅读(112) 评论(0) 推荐(0)
摘要:一、原本有间隙 1.wxml <view class="picture" wx:for="{{product}}"> <image class="img" src="{{item}}" mode="widthFix"></image> </view> 2.wxss .img{ width: 100% 阅读全文
posted @ 2021-05-12 18:17 ki1616 阅读(607) 评论(0) 推荐(0)
摘要:一、symbol 1.搭建环境(在项目根目录打开cmd窗口) npm init -y 这时根目录会多出一个package.json文件 2.mini-program-iconfont-cli(PS:一种适合小程序的多色解决方案) npm install mini-program-iconfont-c 阅读全文
posted @ 2021-05-05 16:37 ki1616 阅读(759) 评论(0) 推荐(0)
摘要:1、按钮 <button bindtap="downloadImages"> 2、实现 downloadImages: function() { this.setData({ shareName: null }) //复制文本 let share = this.data.product.goodsD 阅读全文
posted @ 2021-03-13 10:49 ki1616 阅读(229) 评论(0) 推荐(0)
摘要:1、分享(可以发送给好友) onShareAppMessage: function () { return { title: that.data.detail.name, //分享名字 path: '/pages/goods-detail/goods-detail?id=' + that.data. 阅读全文
posted @ 2021-03-12 15:02 ki1616 阅读(554) 评论(0) 推荐(0)