- 数组循环问题?
[图片] [图片] [图片]
2022-05-19 - 图标变换显示失败?
js: this.data.ne.forEach((item) => { console.log("item",item) if(item.name == dishId){ // console.log("it",item) item.status = !item.status || false } }) wxml: <view class="content flex-item"> <block wx:for="{{dishesList}}" wx:key="kong"> <view class="dish flex-wrap flex-direction-row" catchtap="checkboxChange" data-dish="{{item.name}}"> <image class="gallery-img tui-fl" src="{{item.imgFileID}}"></image> <view class="flex-item"> <text class="title">{{item.name}}</text> </view> <view class="add-btn"> <view class="add-btn"><icon type="{{item.status ? 'success' : 'circle'}}" color="orange" size="30"></icon></view> </view> </view> </block> </view> </view> [图片] [图片]
2022-02-27 - 云函数login,取值做全局变量,不成功,大佬们看看是什么问题?
App({ Data:{ openid:'' }, onLaunch: function () { wx.cloud.callFunction({ name: 'login', success: res => { console.log('[云函数] [login] user openid: ', res.result.openid) openid = res.result.openid }, fail: err => { console.error('[云函数] [login] 调用失败', err) } }) }, })
2021-09-11