隐私政策 审核通过之后,过半个小时左右再试
用户隐私明明更新了还是报没权限用户隐私明明更新了,包含蓝牙使用,为什么还是报这个,个人小程序。 {"errMsg": "openBluetoothAdapter:fail appid privacy api banned", "errno": 1025}
2024-03-08我们对接的后端api,后端通过两次排序 将最后的几条聊天记录按照时间顺序返回,想要看更多的数据,通过下滑加载
聊天窗口,如何才能够在进入聊天页面时,像微信聊天一样,直接在页面底部看到最新的消息?大家好!我这几天在做一个聊天的功能,遇到了一个问题:每次进入聊天页面,聊天的消息都是从最上面的最旧消息开始显示,需要手动下滑到最底部查看最新消息,所以,请问一下,如何才能够在进入聊天页面时,像微信聊天一样,直接在页面底部看到最新的消息?是需要在wxml页面还是wxss页面设置?设置哪一项?非常感谢! [图片] wxml页面代码: <block class="overflow"> <view wx:for="{{messageList}}" wx:key="messageList"> <view class="rightBox" wx:if="{{item.openId === visitorId}}" data-msg="{{index}}" id='msg_{{index}}'> <view> <view class="createTime_R">{{item.createTime}}</view> <view class="right_message" wx:if="{{item.type=='text'}}">{{item.content}}</view> <image src="{{item.content}}" wx:if="{{item.type=='image'}}" class="image_content" mode="widthFix" bindlongpress="tp_save_img" data-fileid="{{item.content}}"/> </view> <image class="icon" src="{{icon_R}}" mode="widthFix" style="width: 100rpx; height: 80rpx;" /> </view> <view class="leftBox" wx:if="{{item.openId === serverId}}" data-msg="{{index}}" id='msg_{{index}}'> <image class="icon" src="{{icon_L}}" mode="widthFix" style="width: 100rpx; height: 80rpx;" /> <view> <view class="createTime_L">{{item.createTime}}</view> <view class="left_message" wx:if="{{item.type=='text'}}">{{item.content}} </view> <image src="{{item.content}}" wx:if="{{item.type=='image'}}" class="image_content" mode="widthFix" bindlongpress="tp_save_img" data-fileid="{{item.content}}"/> </view> </view> </view> <view class="overflow_a"> </view> </block> <view class="sends"> <image class="sends_a" src="{{imgUrl}}" bind:tap="sendImage" /> <textarea class="sends_b" type="text" maxlength="-1" bindblur="message_blur" auto-height="true" value="{{content}}"></textarea> <view class="sends_c" bind:tap="send">发送</view> </view> wxss页面代码: page { padding-top: 20rpx; padding-bottom: 20rpx; } .overflow{ position: fixed; top: 300rpx; width: 710rpx; overflow: scroll; /*auto hidden scroll*/ } .overflow_a{ margin-bottom: 110rpx; } .sends{ display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-start; height: 100rpx; position: fixed; bottom: 0rpx; left: 0rpx; background-color: white; } .sends_a{ width: 60rpx; height: 50rpx; margin: 0rpx 20rpx; } .sends_b{ width: 500rpx; border: solid black 1rpx; border-radius: 10rpx; margin: 0rpx 20rpx 0rpx 0rpx; } .sends_c{ padding: 10rpx 30rpx; } .icon{ margin: 10rpx 0rpx 0rpx 0rpx; } .rightBox{ display: flex; flex-direction: row; align-items: center; justify-content: flex-end; margin: 10rpx 20rpx 0rpx 0rpx; } .leftBox{ display: flex; flex-direction: row; align-items: center; justify-content: flex-start; margin: 10rpx 0rpx 0rpx 20rpx; } .right_message{ width: 600rpx; text-align: right; padding: 0rpx 10rpx; } .left_message{ width: 600rpx; text-align: left; padding: 0rpx 10rpx; } .image_content{ width: 600rpx; } .createTime_L{ font-size: x-small; text-align: center; } .createTime_R{ font-size: xx-small; text-align: center; } js页面代码: onLoad(){ let that = this; let title = wx.getStorageSync('from'); that.setData({ title, }); let visitorId=''; //来访者的openid let serverId=''; //客服的openid let my_openId = app.globalData.user_data.openid; //拿到 本人 的openid let visitor_Id = wx.getStorageSync('visitor_Id'); //拿到 来访者 的openid,可能为空 if (my_openId == "oi6wV5Gn558x5madg" || my_openId == "oi6wV5qMAYQmm8To") { //识别出本人的openid是客服人员时 serverId = my_openId; //本人的openid赋值给serverId,即赋值给客服id visitorId = visitor_Id; //对方的openid赋值给来访者的openid } else { //识别出本人是来访者时 if (title=="法律咨询") { serverId = "oi6wV558x5madg"; //对客服的openid赋值 visitorId = my_openId; //将本人的openid赋值给来访者 } else if (title=="能力提升") { serverId = "oi6wV5HGqMAYQmm8To"; //对客服的openid赋值 visitorId = my_openId; //将本人的openid赋值给来访者 } else if (title=="心理咨询") { serverId = "oi6wV5HGMSMAYQmm8To"; //对客服的openid赋值 visitorId = my_openId; //将本人的openid赋值给来访者 }; }; that.setData({ serverId, visitorId, }); wx.cloud.callFunction({ //这里调用云函数查询对话 name:"messageList", data:{ $url:"message", //云函数路由参数 visitorId:visitorId, //本人的openid serverId:serverId, //客服的openid } }).then(res=>{ let arr = res.result.data; // console.log("arr:",arr); let userInfo = { //app.globalData.user_data; 就是来访者的个人信息 gender:app.globalData.user_data.gender, id_name:app.globalData.user_data.id_name, openid:app.globalData.user_data.openid, phone_no:app.globalData.user_data.phone_no, orgaId:app.globalData.user_data.orgaId, orgaName:app.globalData.user_data.orgaName, unitId:app.globalData.user_data.unitId, unitName:app.globalData.user_data.unitName, user_name:app.globalData.user_data.user_name, }; if(arr.length === 0){ //进行判断,如果没有数据则创建一个聊天 wx.cloud.database().collection("message") .add({ data:{ Message:[], serverId, userInfo, }} ) } }); }, onReady: function () { let that = this; let visitorId = that.data.visitorId; //本人的openid,来访者 let serverId = that.data.serverId; //客服的openid let watch = db.collection('message') .where({ _openid:_.eq(visitorId), serverId:_.eq(serverId), }) .watch({ onChange: (snapshot)=> { //只要数据发生变化就会调用此方法 that.setData({ messageList:snapshot.docs[0].Message, //将最新的聊天数据放到data中渲染 }); console.log("onReady:",snapshot.docs[0].Message); }, onError: function(err) { console.error('the watch closed because of error', err) } }); },
2024-03-08未认证的订阅号?
公众号开发创建自定义菜单时ACCESSTOKEN报480001?{"errcode":48001,"errmsg":"api unauthorized rid: 65eaae45-6ddd070b-0cd9891c"} accesstoken能获取到,为啥认证不行
2024-03-08提示 很明显,你这是长按识别二维码的结果,而不是用扫一扫对着二维码扫描的结果
小程序管理员无法扫码登录后台?在进行小程序备案时,登录小程序公众号时,管理员扫码后出现扫码失败主,无法登录公众号后台。 [图片] [图片] [图片]
2024-03-05[图片]
2024-03-05[图片] https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html#22
wx-open-launch-app开放标签唤醒app后,uniapp如何拿到H5页面传递来的参数?求解决方法
2024-03-05是已认证的服务号?
调用二维码ticket接口,报48001,token是公众号的,相关接口也授权了,不知道问题出在哪?https://api.weixin.qq.com/cgi-bin/qrcode/create { "errcode": 48001, "errmsg": "api unauthorized rid: 65e689dc-139a0181-142c7d61" }
2024-03-05不可以 [图片]
兄弟们,小程序可以销售苯乙烯吗?苯乙烯可以销售吗?求助
2024-03-05可以通过接口生成小程序二维码,但是数量有限制。也可以生成带参数的太阳码,这个有一个接口无限制 https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/qr-code/getQRCode.html
小程序二维码参数,扫描二维码进入小程序,根据二维码携带的参数查询数据,请问怎么样生成携带参数的二维?是不是开启“扫描普通链接二维码打开小程序”可以实现? 如果要上面的功能,是不是要先把账号进行企业认证?
2024-03-04[图片]
小程序页面中使用webview,导航栏栏设置了自定义,为什么webview没将导航栏覆盖?小程序页面中使用webview,导航栏栏设置了自定义,为什么webview没将导航栏覆盖,怎么才能让导航栏消失[图片][图片][图片] 我用普通文字,导航栏就消失了,如图[图片]
2024-03-04