https://developers.weixin.qq.com/community/develop/article/doc/00042614f28d6074adeda7e9651c13,这个api10月份就不能用了
wx.getUserProfile调用失败 ?errMsg: "getUserProfile:fail " err_code: -80002 部分用户报错
2022-05-12这么浪漫的么
能否做一个表白的小程序?想给喜欢的人做一个表白小程序,需要什么权限或者类目设置吗?有没有懂这个的前辈指导一下,先行谢过了..
2022-05-12更稳妥一点的,去服务端获取服务器时间吧
小程序里面获取当天日期 部分手机获取是昨天不是今天?[图片] [图片]
2022-05-12mqtt 这个是干嘛用的,长链接?
uni-app使用mqtt连接不上closeSocket:fail task not found?按正常在vue里引入mqtt的方式,在uni-app里引入后,连接不上,在浏览器正常连接,微信小程序就不行 在微信开发者工具报这个错[图片] 在真机调试报这个错[图片] 在谷歌浏览器正常连接[图片] mqtt使用参考https://www.jb51.net/article/212481.htm 域名没有问题,mqtt的版本号最新版本和3.0.0版本都试了也不行 求提议
2022-05-12[图片] 这个是个对象啊,对象是没有length属性的
小程序开发 list数组不会获取值?onLoad:function(options){ let num = this.data.num; wx.getStorage({ key: 'orderList', success: function(res){ // success console.log('已选美食',res.data) }, fail: function() { // fail }, complete: function() { // complete } }) var orderList = wx.getStorageSync('orderList'); var list=orderList.list; //console.log(list) //object 转 array var order = JSON.parse(options.order); var t_order = []; var t_total = 0; for(var k in order){ if(order[k].num > 0){ t_order.push(order[k]); t_total = t_total + order[k].cost*order[k].num; //计算总价格 } } t_total=order.total; this.setData({ total: t_total, orderList:list }); console.log('数量list',list) num = list.length; console.log('数量num',num) }, 打印出结果是下图 [图片] [图片] 1、如何得到list的个数 num = list.length;这个得到结果是undefined 2、如何得到list的id,就是这个1,2,3 这个值是上一个页面传过来的选择值,是选择后的值,不是固定1,2,3,list也可能{3:2,5:1,13:2} [图片] 想要得到list数组中的个数,和id num = 3 listid1 = 1 ,listid2 = 2,listid3 = 3, 如果list是{3:2,5:1,13:2};listid1 = 3 ,listid2 = 4,listid3 = 13 大神们帮忙看下
2022-05-12建议先学习下ts基础,再去使用ts语法来开发吧
参数“e”隐式具有“any”类型。这个报错咋修改?[图片]
2022-05-12createInnerAudioContext,有兼容性问题,可以参考下https://developers.weixin.qq.com/community/develop/article/doc/00004265ab0740ad9bddacb5a51813,希望能对你有帮助哦
音频文件无法播放https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/InnerAudioContext 音频文件是: https://fanyi.baidu.com/gettts?lan=en&text=pregnant&spd=3&source=web 代码: const innerAudioContext = wx.createInnerAudioContext({useWebAudioImplement: true}) innerAudioContext.autoplay = false innerAudioContext.src = 'https://fanyi.baidu.com/gettts?lan=en&text=pregnant&spd=3&source=web'; innerAudioContext.play(); 执行代码报错: WAServiceMainContext.js:2 reporter error:Cannot read property 'indexOf' of undefined TypeError: Cannot read property 'indexOf' of undefined at Object.errorReport (WAServiceMainContext.js:2:127516) at r.thirdErrorReport (WAServiceMainContext.js:2:126923) at Object.thirdErrorReport (WAServiceMainContext.js:2:130123) at i (http://127.0.0.1:18008/appservice/__dev__/WASubContext.js?t=wechat&s=1652282634340&v=2.19.4:2:102665) at Object.a [as cb] (http://127.0.0.1:18008/appservice/__dev__/WASubContext.js?t=wechat&s=1652282634340&v=2.19.4:2:96450) at http://127.0.0.1:18008/appservice/__dev__/WASubContext.js?t=wechat&s=1652282634340&v=2.19.4:2:73668 at Array.forEach (<anonymous>) at n.emit (http://127.0.0.1:18008/appservice/__dev__/WASubContext.js?t=wechat&s=1652282634340&v=2.19.4:2:73632) at t (http://127.0.0.1:18008/appservice/__dev__/WASubContext.js?t=wechat&s=1652282634340&v=2.19.4:2:80667) at http://127.0.0.1:18008/appservice/__dev__/WASubContext.js?t=wechat&s=1652282634340&v=2.19.4:2:81055(env: macOS,mp,1.05.2204250; lib: 2.19.4) 这个音频访问就会得到一个 mp3 格式的文件, 为何还不能播放? 是否必须直接使用文件原始地址?
2022-05-12最好别用中文做为key,以免后面维护的同学骂街
关于中文字段,{{item.}}如何使用?[图片] 字段名是中文的话,如何用{{item.}}啊?直接用中文就报错
2022-05-12flex布局了解一些
如何让方框们靠右?<view wx:for="{{chatlist}}" wx:for-item="item" > <view wx:if="{{item.type=='text'}}" style="display: flex;position: relative;"> <view class="self"> <text>{{item.content}}</text> </view> <image src="../../image/righttr.png" style="width: 40rpx;" mode="widthFix"></image> </view> </view> .self{ background-color:rgb(36,80,134); color: white; border-radius: 7%; width: auto; right: 20rpx; min-height: 50rpx; margin-bottom: 20rpx; padding-left: 20rpx; padding-right: 30rpx; padding-top: 10rpx; padding-bottom: 10rpx; word-break: break-all; } [图片]
2022-05-12很好的建议哦
有没有朋友圈的一些接口 ?我想发的朋友圈,带一些call to action 的button, 像脸书/推特的帖子一样 ? 现在我们朋友圈中附带的按键只有 “点赞和评论”, 如果能像其他社媒那行, po文有 “联系,了解更多,官网跳转”等按钮就更好了
2022-05-12