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