Переглянути джерело

Merge branch 'developer' into developerA

yuwenjun1997 2 роки тому
батько
коміт
0ce75d2e43
3 змінених файлів з 168 додано та 47 видалено
  1. 48 0
      mixins/cmSysMixins.js
  2. 44 23
      pages/seller/club/club-list.vue
  3. 76 24
      pages/seller/club/list.vue

+ 48 - 0
mixins/cmSysMixins.js

@@ -0,0 +1,48 @@
+// 统计数据
+// 统计类型 1:首页banner;2:直播模块;3:最新活动;4:热门文章;5:新品橱窗;6:活动列表
+import Vue from 'vue'
+const cmSysVitaMixins = {
+    data() {
+	    return {
+            rowseTime: 0,  // 浏览时长初始值为 0
+            clearTimeSet: null,
+	    }
+    },
+    mounted(){
+        this.setTime() // 页面加载完成后开始计时
+    },
+    methods: {
+        setTime() {
+            //设置定时器
+            this.clearTimeSet = setInterval(() => {
+                this.browseTime++
+                console.log(this.browseTime, '时长累计')
+            }, 1000)
+        },
+        cmSysVitaMixins(cmsSysType,productId) {
+            this.ProductService.sYsStatisticsTypesSatisticsNumber({typeId:cmsSysType,productId:productId})
+                .then(response => {
+                    const map = {
+					    1: '首页轮播',
+					    2: '直播模块',
+					    3: '最新活动',
+					    4: '热门文章',
+					    5: '新品橱窗',
+					    6: '活动列表'
+                    }
+                    const sYsText = map[cmsSysType]
+                    console.log(`<-------${sYsText}统计数据成功------>`)
+                })
+                .catch(error => {
+                    console.log('<-------上送用户行为记录异常------>')
+                })
+        },
+    },
+    onUnload() {
+        debugger
+        clearInterval(this.clearTimeSet) // 离开页面后清除定时器
+        this.cmSysVitaMixins() // 上送后台接口,将浏览时长等信息传到后台,离开当前路由后调用
+    },
+}
+
+export default cmSysVitaMixins

+ 44 - 23
pages/seller/club/club-list.vue

@@ -54,6 +54,20 @@
 								<view class="list-opea">
 									<text class="tags" v-if="club.vipFlag == 0 && club.userIdentity === 2">VIP</text>
 									<text class="tags sv" v-if="club.vipFlag == 1">SVIP</text>
+									<text
+										class="tags sm"
+										@click.stop="
+											this.$api.navigateTo('/pages/service/service?id=1041&title=标签说明')
+										"
+										>{{ club.activeState }} <text class="iconfont icon-xiayibu"></text
+									></text>
+									<text
+										class="tags sm"
+										@click.stop="
+											this.$api.navigateTo('/pages/service/service?id=1041&title=标签说明')
+										"
+										>{{ club.customerValue }} <text class="iconfont icon-xiayibu"></text
+									></text>
 								</view>
 							</view>
 						</view>
@@ -197,27 +211,16 @@ export default {
 			this.isShowClose = false
 		},
 		_goOperation(type, club) {
-			this.$api.setStorage('orderUserInfo', club)
-			switch (type) {
-				case 1:
-					this.$api.navigateTo('/pages/seller/cart/immediately')
-					break
-				case 2:
-					this.$api.navigateTo('/pages/seller/cart/second')
-					break
-				case 3:
-					this.$api.navigateTo('/pages/seller/cart/buyagain')
-					break
-				case 4:
-					this.$api.navigateTo('/pages/seller/order/create-recharge-order')
-					break
-				case 5:
-					this.$api.navigateTo('/pages/seller/order/order-historylist?listType=0')
-					break
-				case 6:
-					this.$api.navigateTo('/pages/seller/cart/coupon')
-					break
+			const pathMap = {
+				1: '/pages/seller/cart/immediately',
+				2: '/pages/seller/cart/second',
+				3: '/pages/seller/cart/buyagain',
+				4: '/pages/seller/order/create-recharge-order',
+				5: '/pages/seller/order/order-historylist?listType=0',
+				6: '/pages/seller/cart/coupon',
 			}
+			this.$api.setStorage('orderUserInfo', club)
+			this.$api.navigateTo(pathMap[type])
 		}
 	},
 	onReachBottom() {
@@ -385,19 +388,37 @@ page,
 					align-items: center;
 					.tags {
 						display: inline-block;
-						width: 60rpx;
-						height: 32rpx;
+						height: 36rpx;
+						padding: 0 15rpx;
 						border-radius: 8rpx;
 						background: #f0cb72;
 						font-size: $font-size-22;
 						color: #4e4539;
 						text-align: center;
-						line-height: 32rpx;
+						line-height: 36rpx;
 						margin-left: 10rpx;
+						margin-right: 10rpx;
 						&.sv {
 							background: #333333;
 							color: #f0cb72;
 						}
+						&.sm {
+							display: inline-block;
+							height: 36rpx;
+							box-sizing: border-box;
+							padding: 0 8rpx 0 15rpx;
+							border-radius: 8rpx;
+							background: #faede5;
+							font-size: $font-size-22;
+							color: $color-system;
+							text-align: center;
+							line-height: 36rpx;
+							margin-right: 10rpx;
+							.icon-xiayibu {
+								font-size: 20rpx;
+								margin-left: 10rpx;
+							}
+						}
 					}
 				}
 			}

+ 76 - 24
pages/seller/club/list.vue

@@ -104,6 +104,22 @@
 									<text class="tags sv" v-if="club.vipFlag == 1">SVIP</text>
 									<text class="tags xf" v-if="club.newDeal === 1">新分配</text>
 								</view>
+								<view class="list-tags">
+									<text
+										class="tags"
+										@click.stop="
+											this.$api.navigateTo('/pages/service/service?id=1041&title=标签说明')
+										"
+										>{{ club.activeState }} <text class="iconfont icon-xiayibu"></text
+									></text>
+									<text
+										class="tags"
+										@click.stop="
+											this.$api.navigateTo('/pages/service/service?id=1041&title=标签说明')
+										"
+										>{{ club.customerValue }} <text class="iconfont icon-xiayibu"></text
+									></text>
+								</view>
 								<view class="list-ntel" v-if="tabSmallCurrentIndex === 1">
 									<text class="list-link">销售:{{ club.serviceName ? club.serviceName : '' }}</text>
 								</view>
@@ -124,7 +140,12 @@
 									{{ showBadge(club.orderNum) }}
 								</text>
 							</view>
-							<view class="btn" v-if="isManage && club.serviceProviderId != 1342" @click.stop="handleReplaceClub(club)">更换协销</view>
+							<view
+								class="btn"
+								v-if="isManage && club.serviceProviderId != 1342"
+								@click.stop="handleReplaceClub(club)"
+								>更换协销</view
+							>
 							<view class="btn" @click.stop="handleClubinfo(club)" v-if="club.recordCount === 1"
 								>注册行为记录</view
 							>
@@ -169,7 +190,7 @@
 </template>
 
 <script>
-import { mapState, mapMutations } from 'vuex'	
+import { mapState, mapMutations } from 'vuex'
 import authorize from '@/common/config/authorize.js'
 import wxLogin from '@/common/config/wxLogin.js'
 import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
@@ -184,9 +205,8 @@ const defaultListQuery = {
 	pageSize: 10,
 	spId: 0,
 	status: 90,
-	type:1,
-	groupServiceId:0
-	
+	type: 1,
+	groupServiceId: 0
 }
 export default {
 	components: {
@@ -211,31 +231,34 @@ export default {
 			pullFlag: true,
 			tabCurrentNum: 0,
 			tabCurrentIndex: 0,
-			tabSmallCurrentIndex:0,
+			tabSmallCurrentIndex: 0,
 			clubList: [],
 			isIphoneX: this.$store.state.isIphoneX,
 			CustomBar: this.CustomBar,
 			StatusBar: this.StatusBar,
 			capsule: this.capsule,
-			show_index: 0 ,//控制显示那个组件
-			rightDrawer:false,
-			isSellerpopup:false,
+			show_index: 0, //控制显示那个组件
+			rightDrawer: false,
+			isSellerpopup: false,
 			salesParams: {
-				choseServiceId:0,
+				choseServiceId: 0,
 				clubId: 0,
 				spId: 0
 			},
-			isShowIndex:false
+			isShowIndex: false
 		}
 	},
 	onLoad(option) {
-		if(option.type === 'wechat'){this.isShowIndex = true}
+		if (option.type === 'wechat') {
+			this.isShowIndex = true
+		}
 	},
 	computed: {
 		...mapState(['isManage'])
 	},
 	methods: {
-		async initGetStotage() {// 初始化
+		async initGetStotage() {
+			// 初始化
 			const userInfo = await this.$api.getStorage()
 			this.listQuery.spId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
 			this.salesParams.choseServiceId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
@@ -343,7 +366,7 @@ export default {
 					break
 			}
 		},
-		tabSmallCurrentClick(index){
+		tabSmallCurrentClick(index) {
 			//商品详情&&供应商信息tab切换
 			this.tabSmallCurrentIndex = index
 			switch (index) {
@@ -382,7 +405,7 @@ export default {
 			this.salesParams.spId = data.serviceProviderId
 			this.userClubChoseSales(this.salesParams)
 		},
-		handleReplaceClub(club){
+		handleReplaceClub(club) {
 			//更换协销
 			this.salesParams.clubId = club.clubId
 			this.isSellerpopup = true
@@ -405,9 +428,14 @@ export default {
 		orderHistory(club) {
 			//跳转机构历史订单
 			this.$api.setStorage('orderUserInfo', club)
-			if(this.tabSmallCurrentIndex === 1 || this.tabSmallCurrentIndex === 2){// 查看组员机构历史订单
-				this.$api.navigateTo(`/pages/seller/order/order-historylist?clubId=${club.clubId}&listType=0&authType=${this.tabSmallCurrentIndex}`)
-			}else{
+			if (this.tabSmallCurrentIndex === 1 || this.tabSmallCurrentIndex === 2) {
+				// 查看组员机构历史订单
+				this.$api.navigateTo(
+					`/pages/seller/order/order-historylist?clubId=${club.clubId}&listType=0&authType=${
+						this.tabSmallCurrentIndex
+					}`
+				)
+			} else {
 				this.$api.navigateTo(`/pages/seller/order/order-historylist?clubId=${club.clubId}&listType=0`)
 			}
 		},
@@ -492,7 +520,7 @@ page,
 				font-size: 44rpx;
 				color: #333333;
 			}
-			.icon-shouye{
+			.icon-shouye {
 				font-size: 44rpx;
 				color: #333333;
 			}
@@ -575,12 +603,12 @@ page,
 			}
 		}
 	}
-	.search-smalltab{
+	.search-smalltab {
 		width: 100%;
 		height: 104rpx;
 		background: #ffffff;
 		box-sizing: border-box;
-		padding:20rpx 10rpx;
+		padding: 20rpx 10rpx;
 		.tab-item {
 			width: 180rpx;
 			height: 64rpx;
@@ -606,7 +634,7 @@ page,
 		background: #ffffff;
 		position: relative;
 		border-bottom: 1px solid #ebebeb;
-		.list-cell-top{
+		.list-cell-top {
 			width: 100%;
 			height: 140rpx;
 			box-sizing: border-box;
@@ -656,6 +684,30 @@ page,
 						}
 					}
 				}
+				.list-tags {
+					width: 100%;
+					height: 36rpx;
+					float: left;
+					line-height: 36rpx;
+					margin: 7rpx 0;
+					.tags {
+						display: inline-block;
+						height: 36rpx;
+						box-sizing: border-box;
+						padding: 0 8rpx 0 15rpx;
+						border-radius: 8rpx;
+						background: #faede5;
+						font-size: $font-size-22;
+						color: $color-system;
+						text-align: center;
+						line-height: 36rpx;
+						margin-right: 16rpx;
+						.icon-xiayibu {
+							font-size: 20rpx;
+							margin-left: 10rpx;
+						}
+					}
+				}
 				.list-ntel {
 					width: 100%;
 					height: 50rpx;
@@ -674,9 +726,9 @@ page,
 						float: left;
 					}
 				}
-			}	
+			}
 		}
-		.list-cell-btn{
+		.list-cell-btn {
 			width: 100%;
 			height: 60rpx;
 			display: flex;