![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
微信小程序
跑路羊崽
一只热爱生活的码农
展开
-
小程序 wx.chooseLocation 没反应无法调起 解决方案
由于版本问题,此api在较新的基础库调用会失败,出现这种情况时试试以下解决方案。app,json文件下添加。原创 2022-11-03 16:34:09 · 3633 阅读 · 5 评论 -
小程序上列表下固定布局
小程序上中下布局方式,解决布局互相遮挡原创 2022-07-20 10:34:41 · 362 阅读 · 0 评论 -
js时间格式化整理
/** * date 格式转yyyy-MM-dd HH:mm * dateFormat("YYYY-mm-dd HH:MM:SS", date) */function date2String(fmt, dateString) { const date = new Date(dateString); let ret; const opt = { "Y+": date.getFullYear().toString(), // 年 "m+": (date.g原创 2022-03-07 15:29:07 · 560 阅读 · 0 评论 -
小程序调起微信支付
/** * 支付 */ pay() { console.log('nonce_str:' + this.data.nonce_str); console.log('paySign:' + this.data.paySign); console.log('prepay_id:' + this.data.package); console.log('price:' + this.data.price); console.log('timeStamp:' +原创 2022-03-02 14:23:59 · 582 阅读 · 0 评论 -
小程序网络请求模板
const baseUrl = getApp().globalData.baseUrlconst that = this; wx.getStorage({ key: 'userid', success(res) { that.setData({ userid: res.data }) console.log('存储的userid为' + res.data) wx.request({原创 2022-03-02 10:34:29 · 157 阅读 · 0 评论 -
微信小程序常用弹窗
询问框wx.showModal({ title: '确认要删除吗?', showCancel: true, success(res) { if (res.confirm) { console.log('确认') } else { console.log('取消') } } })提示框 wx.showModal({ title: '提交原创 2022-03-02 09:56:40 · 606 阅读 · 0 评论 -
小程序实现加载列表
小程序实现加载列表wxml中: <view wx:for="{{keshiList}}" wx:key="id" data-id="{{item.id}}" bindtap="toDetail"> <view class="view4"> <view class="view5"></view> <text class="text1">{{item.name原创 2022-02-23 09:45:08 · 250 阅读 · 0 评论 -
小程序设置布局高度充满屏幕
组建的wxss样式中加入属性height: 100vh;原创 2022-02-23 09:42:50 · 666 阅读 · 0 评论