jiangping
2024-07-26 7842252d3e9dd4e5cdb84ed26cd03e0bba6008c1
提交
已修改9个文件
78 ■■■■ 文件已修改
server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/api/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/buoyClient/index.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/case.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.js 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/realpic.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/utils/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
@@ -159,5 +159,4 @@
            e.printStackTrace();
        }
    }
}
wechat_staff/api/index.js
@@ -324,3 +324,11 @@
    data
  })
}
export const refreshEnjoy = (obj) =>{
  let child = obj.selectComponent('.buoyClient');
  // 调用子组件中定义的方法
  if(child){
    child.freshData();
  }
}
wechat_staff/components/buoyClient/index.js
@@ -8,10 +8,10 @@
      type: String,
      value: '0'
    }
  },
  attached() {
    const enjoyList = wx.getStorageSync('enjoyList') || []
    this.setData({ enjoyList })
  },
  attached() {
      const enjoyList = wx.getStorageSync('enjoyList') || []
      this.setData({ enjoyList })
  },
  /**
   * 组件的初始数据
@@ -24,6 +24,10 @@
   * 组件的方法列表
   */
  methods: {
    freshData() {
      const enjoyList = wx.getStorageSync('enjoyList') || []
      this.setData({ enjoyList })
  },
    jumpPage(e) {
      const urls = [ '/pages/kefu/fond', '/pages/store/staff' ]
      const i = e.currentTarget.dataset.i
wechat_staff/pages/detailDis/case.js
@@ -1,4 +1,4 @@
import { actionDo, getWholecaseInfo } from '../../api/index'
import { actionDo, getWholecaseInfo,refreshEnjoy } from '../../api/index'
Page({
  /**
@@ -50,11 +50,14 @@
  //   }
  // },
  handleEnjoy(e) {
    const info = this.data.info
    if(info.id == null ){
      return
    }
    const enjoyList = wx.getStorageSync('enjoyList') || []
    const { type, flag } = e.detail
    console.log('type', type);
    console.log('flag', flag);
    const info = this.data.info
    console.log('flag', flag);
    if(type == 'enjoy'){
      // 点击了喜欢
      const index = enjoyList.findIndex( i => i.id === info.id )
@@ -72,6 +75,7 @@
        enjoyList.splice(index, 1)
      }
      wx.setStorageSync('enjoyList', enjoyList)
      refreshEnjoy(this)
    }else{
      actionDo({
        id: info.id,
@@ -129,7 +133,7 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    refreshEnjoy(this)
  },
  /**
wechat_staff/pages/detailDis/product.js
@@ -1,7 +1,8 @@
import {
  shareContent,
  getProductInfo,
  actionDo
  actionDo,
  refreshEnjoy
} from '../../api/index'
import moment from "moment";
Page({
@@ -13,7 +14,15 @@
    id: '',
    info: {},
    member: {},
    showShare: false
    showShare: false,
    enjoyList: []
  },
  onShow(){
    console.log('onShow')
    refreshEnjoy(this)
  },
  onHide() {
    console.log('onHide')
  },
  /**
   * 生命周期函数--监听页面加载
@@ -34,13 +43,17 @@
      member
    })
  },
  //  组件事件
  handleEnjoy(e) {
    const info = this.data.info
    if(info.id == null ){
      return
    }
    const enjoyList = wx.getStorageSync('enjoyList') || []
    const { type, flag } = e.detail
    console.log('type', type);
    console.log('flag', flag);
    const info = this.data.info
    console.log('flag', flag);
    if(type == 'enjoy'){
      // 点击了喜欢
      const index = enjoyList.findIndex( i => i.id === info.id )
@@ -58,6 +71,7 @@
        enjoyList.splice(index, 1)
      }
      wx.setStorageSync('enjoyList', enjoyList)
      refreshEnjoy(this)
    }else{
      actionDo({
        id: info.id,
wechat_staff/pages/detailDis/product.wxml
@@ -1,5 +1,5 @@
<view class="main_app">
  <buoyClient showPurpose="1" />
  <buoyClient class="buoyClient" showPurpose="1" class="buoyClient"/>
  <detailFooter bindenjoy="handleEnjoy" path="0" info="{{info}}" />
  <!-- banner轮播 -->
  <swiper class="banner_swiper" circular indicator-dots autoplay style="height:{{bannerHeight}}rpx" duration>
wechat_staff/pages/detailDis/realpic.js
@@ -1,4 +1,4 @@
import { getRealcaseInfo, actionDo } from '../../api/index'
import { getRealcaseInfo, actionDo ,refreshEnjoy} from '../../api/index'
Page({
  /**
@@ -15,6 +15,9 @@
  /**
   * 生命周期函数--监听页面加载
   */
  onShow(){
    refreshEnjoy(this)
  },
  onLoad(options) {
    var app = getApp().globalData
    this.setData({
@@ -43,11 +46,14 @@
    })
  },
  handleEnjoy(e) {
    const info = this.data.info
    if(info.id == null ){
      return
    }
    const enjoyList = wx.getStorageSync('enjoyList') || []
    const { type, flag } = e.detail
    console.log('type', type);
    console.log('flag', flag);
    const info = this.data.info
    console.log('flag', flag);
    if(type == 'enjoy'){
      // 点击了喜欢
      const index = enjoyList.findIndex( i => i.id === info.id )
@@ -65,6 +71,7 @@
        enjoyList.splice(index, 1)
      }
      wx.setStorageSync('enjoyList', enjoyList)
      refreshEnjoy(this)
    }else{
      actionDo({
        id: info.id,
wechat_staff/pages/kefu/fond.js
@@ -24,6 +24,7 @@
      item.checked = false
    })
    wx.setStorageSync('enjoyList', enjoyList)
    console.log(this.data.enjoyList)
    this.initData()
  },
@@ -65,6 +66,7 @@
      }
    })
    wx.setStorageSync('enjoyList', enjoyList)
    this.initData()
  },
  itemClick(e) {
@@ -178,6 +180,7 @@
            }
          })
          wx.setStorageSync('enjoyList', enjoyListTemp)
          that.initData()
        }
      }
@@ -190,6 +193,7 @@
      item.checked = !item.checked
    })
    wx.setStorageSync('enjoyList', enjoyList)
    this.initData()
  },
  openShare() {
wechat_staff/utils/config.js
@@ -1,5 +1,5 @@
// export const baseUrl = 'http://192.168.0.135:10027'
export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // 本地
export const baseUrl = 'http://192.168.0.135:10027'
// export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // 本地
// export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //测试服务器
// export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/'