wechat_staff/api/index.js
@@ -324,3 +324,16 @@ data }) } export const refreshEnjoy = (obj) =>{ let child = obj.selectComponent('.buoyClient'); // 调用子组件中定义的方法 if(child){ child.freshData(); } const enjoyList = wx.getStorageSync('enjoyList') || []; var {info} = obj.data ; const index = enjoyList.findIndex( i => i.id === info.id ); info.isEnjoy = index > -1; obj.setData({ info:info}) ; }