- 如何在页面使用自定义的js方法?
有个js工具包,在工具包里面定义了一些方法,如果在页面使用这些方法?
2024-12-09 - 云开发更新之后再重新查询,为什么还是之前的数据?
[图片] 在尝试云开发的时候,遇到了这个问题,更新之后重新查询,但是返回的还是之前的数据,查看数据库的数据也更新了,这个什么原因?
2024-03-11 - DevTools was disconnected from the page?
这个是怎么回事? [图片]
2024-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数组,然后就是我这个数组为什么在页面循环不出来数据?
2024-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的时候却没有值?有大佬知道的吗?
2024-01-12 - Error: MiniProgramError?
[图片]
2024-01-12