liukangdong
2024-07-26 c7d7aff39b6566d05d3c0a080839c46bb2b6a8aa
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}) ;
  }
}