zhengjinyi 2 سال پیش
والد
کامیت
d21c868056

+ 2 - 2
components/cm-module/pageTemplate/template-product.vue

@@ -56,10 +56,10 @@ export default{
        ...mapState(['hasLogin', 'userInfo', 'isActivity']),
     },
     methods: {
-        // 跳转商品详情
+        // 跳转商品详情ss
 	   navToDetailPage(pros) {
 			this.cmsSysStatistics(5)
-			this.$api.navigateTo(`/pages/goods/product?id=${pros.productId}`)
+			this.$api.navigateTo(`/pages/goods/product?id=${pros.productId}&typeId=5`)
 	   }
     }
 }

+ 13 - 3
mixins/cmsMixins.js

@@ -1,14 +1,24 @@
 // 统计数据
 // 统计类型 1:首页banner;2:直播模块;3:最新活动;4:热门文章;5:新品橱窗;6:活动列表
+import Vue from 'vue'
 const cmsMixins = {
     computed: {
 		
     },
     methods: {
-        cmsSysStatistics(cmsSysType) {
-            this.UserService.cmsSysStatistics({type:cmsSysType})
+        cmsSysStatistics(cmsSysType,productId) {
+            this.ProductService.sYsStatisticsTypesSatisticsNumber({typeId:cmsSysType,productId:productId})
                 .then(response => {
-                    console.log('<-------统计数据成功------>')
+                    const map = {
+					    1: '首页轮播',
+					    2: '直播模块',
+					    3: '最新活动',
+					    4: '热门文章',
+					    5: '新品橱窗',
+					    6: '活动列表'
+                    }
+                    const sYsText = map[cmsSysType]
+                    console.log(`<-------${sYsText}统计数据成功------>`)
                 })
                 .catch(error => {
                     console.log('<-------统计数据异常------>')

+ 5 - 2
pages/goods/good-hot.vue

@@ -256,7 +256,9 @@
 <script>
 import { mapState, mapMutations } from 'vuex'
 import uniGrader from '@/components/uni-grade/uni-grade.vue'
-export default {
+import cmsMixins from '@/mixins/cmsMixins.js'
+export default{
+	mixins: [cmsMixins],
 	components: {
 		uniGrader
 	},
@@ -393,7 +395,8 @@ export default {
 		},
 		navToDetailPage(productId) {
 			//跳转商品详情页
-			this.$api.navigateTo(`/pages/goods/product?id=${productId}`)
+			this.cmsSysStatistics(5)
+			this.$api.navigateTo(`/pages/goods/product?id=${pros.productId}&typeId=5`)
 		},
 		isShowVipFlag(pros) {
 			// 超级会员价格显示控制

+ 4 - 1
pages/goods/product.vue

@@ -735,6 +735,7 @@ export default {
 			userId: 0,
 			shopId: 0,
 			shopID: 0,
+			typeId: 0,
 			vipFlag: 0,
 			firstClubType: 0,
 			productId: 0,
@@ -865,6 +866,7 @@ export default {
 	},
 	onLoad(option) {
 		this.productId = this.couponParam.productId = option.id //获取商品ID
+		this.typeId =  option.typeId
 		this.opentype = option.open
 		this.isShareType = option.type
 		this.linkPath = option.path
@@ -914,7 +916,8 @@ export default {
 			this.ProductService.QueryProductDetils({
 				userId: this.userId,
 				productId: this.productId,
-				identity: this.identity
+				identity: this.identity,
+				typeId:this.typeId
 			})
 				.then(response => {
 					this.productImage = []

+ 1 - 1
pages/h5/activity/activity-list.vue

@@ -99,9 +99,9 @@
 				})
 			},
 			NavigateToActivity(item){//跳转活动详情
-				this.cmsSysStatistics(6)
 				if(item.status!=3 ){
 					if(item.crmLink){
+						this.cmsSysStatistics(6)
 						this.$api.navigateTo(`/pages/h5/activity/activity?title=${item.title}&link=${item.crmLink}`)
 					}
 				}else{

+ 16 - 5
services/product.service.js

@@ -520,17 +520,28 @@ export default class ProductService {
     /**
 	 * @搜索筛选项查询商品品牌
 	 * @param:keyword 关键词
-	 * @param:id 分类Id
-	 * @param:idType 1 一级分类 2 二级分类 3 三级分类
+	 * @param:id 分类id
+	 * @param:idtype 1 一级分类 2 二级分类 3 三级分类
 	 * @param:identity 
 	 */
-    getCommoditySearchQUeryBrand (data = {}) {
+    getcommoditysearchquerybrand (data = {}) {
         return this.AjaxService.get({
             url:'/commodity/search/query/brand',
             data,
-            isLoading: true ,
+            isloading: true ,
               
         })
     }
-	
+    /**
+	 * @数据统计
+	 * @param:TypeId 1:首页banner;2:直播模块;3:最新活动;4:热门文章;5:新品橱窗;6:活动列表
+	 */
+    sYsStatisticsTypesSatisticsNumber (data = {}) {
+	    return this.AjaxService.get({
+	        url:'/commodity/StatisticsType/statisticsNumber',
+	        data,
+	        isLoading: false ,
+	          
+	    })
+    }
 }