Jelajahi Sumber

commit 统计

zhengjinyi 2 tahun lalu
induk
melakukan
c5344e55d1
3 mengubah file dengan 12 tambahan dan 5 penghapusan
  1. 5 5
      pages/goods/product.vue
  2. 4 0
      utils/cmSrsMixins.js
  3. 3 0
      utils/residence.js

+ 5 - 5
pages/goods/product.vue

@@ -846,7 +846,6 @@ export default {
                     const dataStr = JSON.stringify(response.data)
 					this.product = JSON.parse(dataStr)
                     this.skuProduct = JSON.parse(dataStr)
-                    console.log('is same obj',this.product === this.skuProduct)
 					this.skusCount = this.product.skus.length
 					this.addParams.skuId = this.product.skuId
 					if (this.product.tinyTypeName) {
@@ -857,10 +856,11 @@ export default {
 						productLabel = this.product.bigTypeName
 					}
 					//设置统计数据标签
-					uni.setStorageSync(
-						'productLabel',
-						`${productLabel}-${this.product.brandName ? this.product.brandName : ''}`
-					)
+					if(this.product.tags){
+						uni.setStorageSync('productLabel',this.product.tags)
+					}else{
+						uni.setStorageSync('productLabel',`${productLabel}-${this.product.brandName ? this.product.brandName : ''}`)
+					}
 					//校验是否为ross
 					this.checkedIsRossSet()
 					//判断是否可以跳转供应商主页

+ 4 - 0
utils/cmSrsMixins.js

@@ -10,6 +10,7 @@ const defaultParams = {
     pageLabel: '', //页面标签
     userId: 0, //用户Id
     productId: 0, //商品Id
+    shopId: 0, //供应商Id
     behaviorType: 1 // 统计类型
 }
 const cmSrsMixins = {
@@ -53,6 +54,9 @@ const cmSrsMixins = {
 		    sysParams.pageType = pageData ? pageData.pageType : ''
 		    sysParams.behaviorType = uni.getStorageSync('behaviorType') ? uni.getStorageSync('behaviorType') : 1
 		    // 根据path获取不同的参数
+            if (route.path === '/pages/supplier/user/my-shop') {
+			    sysParams.shopId = route.query.shopId ? route.query.shopId : 0
+            } 
             if (route.path === '/pages/goods/product') {
 			    sysParams.productId = route.query.id ? route.query.id : 0
 			    sysParams.pageLabel = uni.getStorageSync('productLabel')

+ 3 - 0
utils/residence.js

@@ -86,6 +86,9 @@ const setingSysParams = async (current) => {
     sysParams.pageType = pageData ? pageData.pageType : ''
     sysParams.behaviorType = uni.getStorageSync('behaviorType') ? uni.getStorageSync('behaviorType') : 1
     // 根据path获取不同的参数
+    if (current.path === '/pages/supplier/user/my-shop') {
+	    sysParams.shopId = current.query.shopId ? current.query.shopId : 0
+    } 
     if (current.path === '/pages/goods/product' || current.path === '/pages/second/product/product-details') {
 	    sysParams.productId = current.query.id ? current.query.id : 0
 	    sysParams.pageLabel = uni.getStorageSync('productLabel')