// 统计数据 // 统计类型 1:首页banner;2:直播模块;3:最新活动;4:热门文章;5:新品橱窗;6:活动列表 import Vue from 'vue' const cmsMixins = { computed: { }, methods: { cmsSysStatistics(cmsSysType,bannerId) { this.ProductService.sYsStatisticsTypesSatisticsNumber({typeId:cmsSysType,bannerId:bannerId}) .then(response => { const map = { 1: '首页轮播', 2: '直播模块', 3: '最新活动', 4: '热门文章', 5: '新品橱窗', 6: '活动列表' } const sYsText = map[cmsSysType] console.log(`<-------${sYsText}统计数据成功------>`) }) .catch(error => { console.log(`<-------统计${sYsText}数据异常------>`) }) }, // 模块点击量统计 async cmsMoudleHits(type, authorId) { try { await this.ProductService.cmsMoudleHits({type, authorId}) console.log('<-------统计数据成功------>') } catch(e) { console.log('<-------统计数据异常------>') } }, // 搜索词统计 async cmsKeywordHits(keyword) { try { await this.ProductService.cmsKeywordHits(keyword) console.log('<-------统计数据成功------>') } catch(e) { console.log('<-------统计数据异常------>') } } } } export default cmsMixins