jiangping
2024-09-27 04b4bddaac0a222760113899568d20b45af701f4
wechat_staff/api/index.js
@@ -11,6 +11,7 @@
}
// 验证码登录
export const loginByPhone = (data) => {
  console.log(data)
  return request({
    url: '/web/personnel/loginByPhone',
    data
@@ -23,6 +24,14 @@
    data
  })
}
export const getUserCard = (data) => {
  return request({
    url: '/web/personnel/getUserCard',
    method: "POST",
    data
  })
}
// 获取手机号
export const getWxMiniPhone = (data) => {
  return request({
@@ -31,6 +40,7 @@
    data
  })
}
// 绑定Openid
export const bindingOpenid = (data) => {
  return request({
@@ -47,9 +57,10 @@
  })
}
// 获取会员信息
export const getMemberInfo = () => {
export const getMemberInfo = (data) => {
  return request({
    url: '/web/personnel/getUserDetail',
    data:data
  })
}
// 更新会员信息
@@ -64,6 +75,36 @@
export const getDailyUpdates = (data) => {
  return request({
    url: '/web/customer/getDailyUpdates',
    data
  })
}
//推广咨询分享
export const saveShareRecord = (data) => {
  return request({
    url: '/web/customer/saveShareRecord?id='+data,
    data,
    loading: '0'
  })
}
// 产品视频
export const getZhongTaiVideoPage = (data) => {
  return request({
    url: '/web/customer/getZhongTaiVideoPage',
    method: 'POST',
    data
  })
}
// 首页 定制服务 列表
export const getCustomizedNewsList = (data) => {
  return request({
    url: '/web/customer/getCustomizedNewsList',
    data
  })
}
//  定制服务 详情
export const getCustomizedNewsDetail = (data) => {
  return request({
    url: '/web/customer/getCustomizedNewsDetail',
    data
  })
}
@@ -98,10 +139,26 @@
    data
  })
}
export const getUserCard = (data) => {
// 操作 行为内容
export const actionDo = (data) => {
  return request({
    url: '/web/personnel/getUserCard',
    url: '/web/customer/actionDo',
    data,
    loading: data.actionType == 'view' ? '0' : '1'
  })
}
// 获取客户-潜客列表
export const getCustomerList = (data) => {
  return request({
    url: '/web/personnel/getCustomerList',
    method: "POST",
    data
  })
}
// 批量添加喜欢给客户
export const batchAddLike = (data) => {
  return request({
    url: '/web/personnel/batchAddLike',
    method: "POST",
    data
  })
@@ -116,7 +173,7 @@
// 志说装修 内容
export const pageZSZXContentList = (data) => {
  return request({
    url: '/web/customer/pageContentList',
    url: '/web/customer/getZhongTaiZbDecoPage',
    method: "POST",
    data
  })
@@ -143,10 +200,94 @@
    data
  })
}
// 获取门店详情
export const loadShopList= (data) => {
  return request({
    url: '/web/personnel/userShopList',
    data
  })
}
// 我的 收藏/喜欢列表
export const collectLikePage = (data) => {
  return request({
    url: '/web/customer/collectLikePage',
    method: 'POST',
    data
  })
}
// 分类产品 分页列表 中台
export const getZhongTaiProductPage = (data) => {
  return request({
    url: '/web/customer/getZhongTaiProductPage',
    method: 'POST',
    data
  })
}
// 中台 分类产品详情
export const getProductInfo = (data) => {
  return request({
    url: '/web/customer/getProductInfo',
    data
  })
}
// 分类案例 分页列表 中台
export const getZhongTaiWholecasePage = (data) => {
  return request({
    url: '/web/customer/getZhongTaiWholecasePage',
    method: 'POST',
    data
  })
}
// 分类案例 详情
export const getWholecaseInfo = (data) => {
  return request({
    url: '/web/customer/getWholecaseInfo',
    data
  })
}
// 分类实景 分页列表 中台
export const getZhongTaiRealcasePage = (data) => {
  return request({
    url: '/web/customer/getZhongTaiRealcasePage',
    method: 'POST',
    data
  })
}
// 分类实景 详情
export const getRealcaseInfo = (data) => {
  return request({
    url: '/web/customer/getRealcaseInfo',
    data
  })
}
// 产品资讯 分页列表 中台
export const getZhongTaiProductNewsPage = (data) => {
  return request({
    url: '/web/customer/getZhongTaiProductNewsPage',
    method: 'POST',
    data
  })
}
// 产品资讯 详情
export const getProductNewsInfo = (data) => {
  return request({
    url: '/web/customer/getProductNewsInfo',
    method: 'GET',
    data
  })
}
// 内容 收藏
export const collectContent = (data) => {
  return request({
    url: '/web/customer/collectContent',
    method: 'GET',
    data
  })
}
// 获取内容分享海报
export const getContentShareImg = (data) => {
  return request({
    url: '/web/personnel/getContentShareImg',
    method: 'POST',
    data
  })
@@ -188,10 +329,25 @@
    data
  })
}
// 小程序注销
export const getCrmAuthUrl = (data) => {
  return request({
    url: '/web/customer/getCrmAuthUrl',
    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}) ;
  }
}