- 云开发更新之后再重新查询,为什么还是之前的数据?
[图片] 在尝试云开发的时候,遇到了这个问题,更新之后重新查询,但是返回的还是之前的数据,查看数据库的数据也更新了,这个什么原因?
03-11 - DevTools was disconnected from the page?
这个是怎么回事? [图片]
01-21 - 数组里面包含了数组怎么循环?
"data": [ { "id": 4, "dynamicId": 1, "userDTO": { "openid": "1", "nickName": "我是名字", "avatarUrl": "https://img01.yzcdn.cn/vant/cat.jpeg", "intro": null, "member": 0, "luyeLeaf": null, "status": null }, "rootId": 4, "content": "哈哈", "type": 0, "signDate": "2024-01-15T04:03:01", "discussionAnswerDTOList": [ ] }, { "id": 1, "dynamicId": 1, "userDTO": { "openid": "1", "nickName": "我是名字", "avatarUrl": "https://img01.yzcdn.cn/vant/cat.jpeg", "intro": null, "member": 0, "luyeLeaf": null, "status": null }, "rootId": 1, "content": "同时一如既往的帅", "type": 0, "signDate": "2024-01-15T02:42:03", "discussionAnswerDTOList": [ { "id": 2, "dynamicId": 1, "userDTO": { "openid": "3", "nickName": "我是名字", "avatarUrl": "https://img01.yzcdn.cn/vant/cat.jpeg", "intro": null, "member": 1, "luyeLeaf": null, "status": null }, "userAnswerDTO": null, "rootId": 1, "content": "还是同时一如既往的帅", "type": 1, "signDate": "2024-01-15T02:42:06" }, { "id": 3, "dynamicId": 1, "userDTO": { "openid": "2", "nickName": "我是名字", "avatarUrl": "https://img01.yzcdn.cn/vant/cat.jpeg", "intro": null, "member": 1, "luyeLeaf": null, "status": null }, "userAnswerDTO": null, "rootId": 1, "content": "哈哈哈哈哈哈哈哈哈爱好", "type": 1, "signDate": "2024-01-15T03:57:07" } ] } ] <view class="comment"> <view wx:for="{{dynamicReviewList}}" wx:for-item="outerItem" wx:key="outerIndex"> <view> <image src="{{outerItem.userDTO.avatarUrl}}" mode="aspectFill" /> </view> <view> <view>{{outerItem.userDTO.nickName}}</view> <view> {{outerItem.content}} <text class="comment-time"> {{outerItem.signDate}}</text> <text class="comment-reply"> 回复</text> </view> </view> <view wx:for="{{outerItem.discussionAnswerDTOList}}" wx:for-item="innerItem" wx:key="innerIndex"> <view> <image src="{{innerIndex.userDTO.avatarUrl}}" mode="aspectFill" /> </view> <view> <view>{{innerIndex.userDTO.nickName}}</view> <view> {{innerIndex.content}} <text class="comment-time">2023-10-25</text> <text class="comment-reply">回复</text> </view> </view> </view> </view> </view> 上面是数据格式,下面是页面,然后数据里面还有个discussionAnswerDTOList数组,然后就是我这个数组为什么在页面循环不出来数据?
01-15 - this.setData不能这样使用吗?
Page({ data: { openid: '', info: {} }, getUserInfo() { console.log("openid" + this.data.openid); if (!this.data.openid.trim()) { return; } }, onLoad() { this.getUserInfo(); const openid = wx.getStorageSync('openid') this.setData({ openid: openid }) }, }) 新手入坑,要崩溃了? 在onLoad中设置了openid的值,缓存中也openid的值,为什么打印openid的时候却没有值?有大佬知道的吗?
01-12 - Error: MiniProgramError?
[图片]
01-12 - 开发一个社交小程序需要什么资质?
[图片][图片] 需要这两个许可证还是只需要其中一个就够了?或者还需其他什么证件不?然后这个他们都是怎么办理的?有没有大佬知道的。
2023-12-23 - unity插件导入失败这是什么问题呀?
[图片]
2023-12-15 - 页面怎么没有显示?
<view class="content"> <view class="content-left"> <block wx:for="{{list}}" wx:key="list"> <template is='item-data' data='{{...item}}' wx:if="{{inde % 2==0}}"></template> </block> </view> <view class="content-right"> <block wx:for="{{list}}" wx:key="list"> <template is='item-data' data='{{...item}}' wx:if="{{inde % 2==1}}"></template> </block> </view> </view> <template name="item-data"> <view class="content-item"> <image src="{{url}}" class="content-item-img" mode="widthFix" /> <view class="content-item-box"> <view class="content-item-title">{{title}}</view> <view class="content-item-name"> <view class="flex"> <image src="{{avatar}}" class="content-item-avatar" mode="aspectFill" /> <view>{{name}}</view> </view> <view class="content-item-num">{{num}}</view> </view> </view> </view> </template> data: { list:[ { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' }, { name:'song', num:'10', title:'他真的很帅', url:'https://img01.yzcdn.cn/vant/cat.jpeg', avatar:'https://img01.yzcdn.cn/vant/cat.jpeg' } ] } [图片]
2023-10-24 - 绑定四个小程序怎么不能绑定第五个了?
我微信号才绑定4个,第五个不让绑定了
2023-04-26 - TypeError: Cannot readproperty '_id' of undefine?
// 云函数入口文件 const cloud = require('wx-server-sdk') cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) // 使用当前云环境 // 云函数入口函数 exports.main = async (event, context) => { const wxContext = cloud.getWXContext() const db = cloud.database() let { OPENID, APPID, UNIONID } = cloud.getWXContext() const { cnetent, openid, avatarUrl, nickName, fileList } = event const { data } = await db.collection('data').where({ openid: OPENID }).get() if (data.length == 0) { const { _id } = await db.collection('data').add({ data: { cnetent, openid, avatarUrl, nickName, fileList, type: '', introduce: '', gender: '', city: '', age: '', status: 2 } }) const date = await db.collection('data').doc(_id).get() return { data: date.data } } else { if (fileList.length != 0) { await cloud.deleteFile({ fileList: [data.fileList.url] }) } const update = await db.collection('data').doc(data.data._id).update({ data: { cnetent, openid, avatarUrl, nickName, fileList, type: '', introduce: '', gender: '', city: '', age: '', status: 2 } }) return { data: update } } } [图片]
2023-04-24