cmsMixins.js 969 B

123456789101112131415161718192021222324252627282930
  1. // 统计数据
  2. // 统计类型 1:首页banner;2:直播模块;3:最新活动;4:热门文章;5:新品橱窗;6:活动列表
  3. import Vue from 'vue'
  4. const cmsMixins = {
  5. computed: {
  6. },
  7. methods: {
  8. cmsSysStatistics(cmsSysType,productId) {
  9. this.ProductService.sYsStatisticsTypesSatisticsNumber({typeId:cmsSysType,productId:productId})
  10. .then(response => {
  11. const map = {
  12. 1: '首页轮播',
  13. 2: '直播模块',
  14. 3: '最新活动',
  15. 4: '热门文章',
  16. 5: '新品橱窗',
  17. 6: '活动列表'
  18. }
  19. const sYsText = map[cmsSysType]
  20. console.log(`<-------${sYsText}统计数据成功------>`)
  21. })
  22. .catch(error => {
  23. console.log(`<-------统计${sYsText}数据异常------>`)
  24. })
  25. },
  26. }
  27. }
  28. export default cmsMixins