jiangping
2024-07-26 2faa6546a9f9ddb29f81cbc9770fc25b95703695
wechat_staff/api/index.js
@@ -13,13 +13,21 @@
export const loginByPhone = (data) => {
  return request({
    url: '/web/personnel/loginByPhone',
    data
    datas
  })
}
// 发送验证码
export const sendSms = (data) => {
  return request({
    url: '/web/personnel/sendSms',
    data
  })
}
export const getUserCard = (data) => {
  return request({
    url: '/web/personnel/getUserCard',
    method: "POST",
    data
  })
}
@@ -31,6 +39,7 @@
    data
  })
}
// 绑定Openid
export const bindingOpenid = (data) => {
  return request({
@@ -187,6 +196,13 @@
    data
  })
}
// 获取门店详情
export const loadShopList= (data) => {
  return request({
    url: '/web/personnel/userShopList',
    data
  })
}
// 我的 收藏/喜欢列表
export const collectLikePage = (data) => {
  return request({
@@ -315,3 +331,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}) ;
  }
}