Selaa lähdekoodia

修改推送增加统计

zhengjinyi 1 vuosi sitten
vanhempi
commit
82e21d89f6

+ 1 - 1
pages/goods/goods-doc-detail.vue

@@ -15,7 +15,7 @@
             :archiveId="archiveId"
             :bottom="isIphoneX ? '60rpx' : '10rpx'"
             @tipStatus="getTipStatus"
-        ></cm-product-doc>
+        />
     </view>
 </template>
 

+ 1 - 1
pages/login/apply.vue

@@ -385,7 +385,7 @@ export default {
 		}
 	},
 	onLoad(option) {
-		this.clubStatus = option.clubStatus
+		this.clubStatus = option.clubStatus ? option.clubStatus : ''
 		this.organizationInfo()
 	},
 	methods: {

+ 8 - 0
pages/notice/club/mixins/notice.mixins.js

@@ -165,6 +165,14 @@ const noticeMixins = {
                 3: `您有${cell.couponFee}元优惠券尚未领取,优惠券将于${cell.content}后下架,赶快去领取下单吧 >>>`,
             }
             return map[cell.couponMessageType]
+        },
+        // 站内消息点击统计
+        async userClubBehaviorInfo(link){
+            try{
+                await this.UserService.userClubBehaviorInfo({ userId: this.userId,link:link, accessType:2,accessSource:1})
+            }catch(error){
+                console.log('error',error)
+            }
         }
     }
 }

+ 4 - 2
pages/notice/club/notice-activity.vue

@@ -55,7 +55,8 @@ export default {
 	data() {
 		return {
 			skeletonShow: true,
-			StaticUrl: this.$Static,
+			StaticUrl: this.$Static,
+			userId:0,
 			listQuery: {
 				source: 2,
 				commonId: 0,
@@ -78,7 +79,8 @@ export default {
 	methods: {
 		async initData(option) {
 			const userInfo = await this.$api.getStorage()
-			this.listQuery.messageType = option.messageType
+			this.listQuery.messageType = option.messageType
+			this.userId = userInfo.userId ? userInfo.userId : 0
 			this.listQuery.commonId = userInfo.clubId ? userInfo.clubId : 0
 			this.getUserAuthClubMessageList()
 		},

+ 2 - 0
pages/notice/club/notice-article.vue

@@ -56,6 +56,7 @@ export default {
         return {
             skeletonShow: true,
             StaticUrl: this.$Static,
+			userId:0,
             listQuery: {
                 source: 2,
                 commonId: 0,
@@ -91,6 +92,7 @@ export default {
         async initData(option) {
             const userInfo = await this.$api.getStorage()
             this.listQuery.messageType = option.messageType
+			this.userId = userInfo.userId ? userInfo.userId : 0
             this.listQuery.commonId = userInfo.clubId ? userInfo.clubId : 0
             this.getUserAuthClubMessageList()
         },

+ 5 - 1
pages/notice/club/notice-coupon.vue

@@ -56,6 +56,7 @@ export default {
 		return {
 			skeletonShow: true,
 			StaticUrl: this.$Static,
+			userId:0,
 			listQuery: {
 				source: 2,
 				commonId: 0,
@@ -78,6 +79,7 @@ export default {
 	methods: {
 		async initData(option) {
 		    const userInfo = await this.$api.getStorage()
+			this.userId = userInfo.userId ? userInfo.userId : 0
 		    this.listQuery.messageType = option.messageType
 		    this.listQuery.commonId = userInfo.clubId ? userInfo.clubId : 0
 		    this.getUserAuthClubMessageList()
@@ -88,8 +90,10 @@ export default {
 				2: `/pages/user/coupon/coupon`,
 				3: `/pages/user/coupon/coupon-collection`,
 			}
+			this.userClubBehaviorInfo(linkJumpMap[cell.couponMessageType])
 			this.$api.navigateTo(linkJumpMap[cell.couponMessageType])
-		}
+		},
+
 	},
 	onReachBottom() {
 		if (this.hasNextPage) {

+ 4 - 0
pages/notice/club/notice-order.vue

@@ -56,6 +56,7 @@ export default {
 		return {
 			skeletonShow: true,
 			StaticUrl: this.$Static,
+			userId:0,
 			listQuery: {
 				source: 2,
 				commonId: 0,
@@ -79,6 +80,7 @@ export default {
 		async initData(option) {
 			const userInfo = await this.$api.getStorage()
 			this.listQuery.messageType = option.messageType
+			this.userId = userInfo.userId ? userInfo.userId : 0
 			this.listQuery.commonId = userInfo.clubId ? userInfo.clubId : 0
 			this.getUserAuthClubMessageList()
 		},
@@ -90,6 +92,7 @@ export default {
 						1: `/pages/user/order/order-pay-list?orderId=${cell.orderId}`
 					}
 					let linkJumpMap = { 1: `/pages/user/order/order-pay-list?orderId=${cell.orderId}` }
+					this.userClubBehaviorInfo(linkJumpMap[cell.orderMessageType])
 					this.$api.navigateTo(linkJumpMap[cell.orderMessageType])
 				} else {
 					this.$util.msg('订单已完成支付', 2000)
@@ -102,6 +105,7 @@ export default {
 					5: `/pages/user/order/order-logistics?orderId=${cell.orderId}`,
 					6: `/pages/user/order/order-details?orderId=${cell.orderId}`
 				}
+				this.userClubBehaviorInfo(linkJumpMap[cell.orderMessageType])
 				this.$api.navigateTo(linkJumpMap[cell.orderMessageType])
 			}
 		},

+ 2 - 0
pages/notice/club/notice-serve.vue

@@ -50,6 +50,7 @@ export default {
 		return {
 			skeletonShow: true,
 			StaticUrl: this.$Static,
+			userId:0,
 			listQuery: {
 				source: 2,
 				commonId: 0,
@@ -73,6 +74,7 @@ export default {
 		async initData(option) {
 		    const userInfo = await this.$api.getStorage()
 		    this.listQuery.messageType = option.messageType
+			this.userId = userInfo.userId ? userInfo.userId : 0
 		    this.listQuery.commonId = userInfo.clubId ? userInfo.clubId : 0
 		    this.getUserAuthClubMessageList()
 		}

+ 3 - 0
pages/notice/club/notice-users.vue

@@ -56,6 +56,7 @@ export default {
 		return {
 			skeletonShow: true,
 			StaticUrl: this.$Static,
+			userId:0,
 			listQuery: {
 				source: 2,
 				commonId: 0,
@@ -79,6 +80,7 @@ export default {
 		async initData(option) {
 		    const userInfo = await this.$api.getStorage()
 		    this.listQuery.messageType = option.messageType
+			this.userId = userInfo.userId ? userInfo.userId : 0
 		    this.listQuery.commonId = userInfo.clubId ? userInfo.clubId : 0
 		    this.getUserAuthClubMessageList()
 		},
@@ -89,6 +91,7 @@ export default {
 				4: `/pages/user/member/member`,
 				6: `/pages/login/apply`
 			}
+			this.userClubBehaviorInfo(linkJumpMap[cell.accountType])
 			this.$api.navigateTo(linkJumpMap[cell.accountType])
 		}
 	},

+ 3 - 4
pages/seller/club/club-inactive-list.vue

@@ -76,7 +76,7 @@
 							<view class="btn" @click.stop="handleClickOper(1, club)">
 								<text class="iconfont icon-jigouhuaxiang"></text> 机构画像
 							</view>
-							<view class="btn" @click.stop="handleClickOper(3, club)">
+							<view class="btn" @click.stop="handleClickOper(2, club)">
 								<text class="iconfont icon-shangcheng"></text> 商城访问记录
 							</view>
 						</view>
@@ -196,15 +196,14 @@ export default {
 		// 按钮操作
 		handleClickOper(type, club) {
 			/**
-			 * 1:机构画像 2:填写咨询记录 3:商城访问记录 4:修改资料 5:更换协销
+			 * 1:机构画像 2:商城访问记录 
 			 * */
-
 			console.log('type', type)
 			switch (type) {
 				case 1:
 					this.$api.navigateTo(`/pages/seller/club/club-portrait?userId=${club.userId}`)
 					break
-				case 3:
+				case 2:
 					this.$api.navigateTo(`/pages/seller/club/club-visit?clubId=${club.clubId}`)
 					break
 			}

+ 8 - 27
pages/seller/club/club-remind.vue

@@ -13,7 +13,7 @@
 					<text v-if="isShowIndex" @click="handleNavigateIndex" class="iconfont icon-shouye"></text>
 					<text v-else @click="handleNavigateBack" class="iconfont icon-fanhui"></text>
 				</view>
-				<view class="title">机构列表</view>
+				<view class="title">咨询记录填写提醒</view>
 			</view>
 			<view class="search-main">
 				<view class="search-from name">
@@ -22,7 +22,7 @@
 						class="input"
 						type="text"
 						confirm-type="search"
-						v-model="listQuery.name"
+						v-model="listQuery.nameOrMobile"
 						@input="onShowClose"
 						@confirm="getList"
 						placeholder="机构名称/联系人/手机号"
@@ -148,14 +148,11 @@ import authorize from '@/common/config/authorize.js'
 import wxLogin from '@/common/config/wxLogin.js'
 
 const defaultListQuery = {
-	userIdentity: '',
-	name: '',
 	pageNum: 1,
 	pageSize: 10,
-	spId: 0,
-	status: '',
+	nameOrMobile: '',
 	type: 1,
-	groupServiceId: 0
+	serviceProviderId: 0
 }
 export default {
 	components: {
@@ -167,27 +164,14 @@ export default {
 			isShowClose: false,
 			isEmpty: false,
 			nomoreText: '上拉显示更多',
-			pageNum: 1,
-			pageSize: 10,
 			hasNextPage: false,
 			loadding: false,
 			pullUpOn: true,
 			pullFlag: true,
-			tabCurrentNum: 0,
-			tabCurrentIndex: 0,
 			clubList: [],
-			isIphoneX: this.$store.state.isIphoneX,
 			CustomBar: this.CustomBar,
 			StatusBar: this.StatusBar,
 			capsule: this.capsule,
-			show_index: 0, //控制显示那个组件
-			rightDrawer: false,
-			salesParams: {
-				choseServiceId: 0,
-				clubId: 0,
-				spId: 0
-			},
-			isShowIndex: false,
 			currentIndex: 0
 		}
 	},
@@ -201,9 +185,7 @@ export default {
 		}
 	},
 	onLoad(option) {
-		if (option.type === 'wechat') {
-			this.isShowIndex = true
-		}
+
 	},
 	computed: {
 		...mapState(['isManage'])
@@ -212,14 +194,13 @@ export default {
 		async initGetStotage() {
 			// 初始化
 			const userInfo = await this.$api.getStorage()
-			this.listQuery.spId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
-			this.salesParams.choseServiceId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
+			this.listQuery.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
 			this.getList()
 		},
 		async getList() {
 			try{
 				this.listQuery.pageNum = 1
-				const res = await this.SellerService.GetSellerClubList(this.listQuery)
+				const res = await this.SellerService.getActiveClub(this.listQuery)
 				const data = res.data
 				if (data.list && data.list.length > 0) {
 					this.isEmpty = false
@@ -251,7 +232,7 @@ export default {
 		async getOnReachBottomData() {
 			try{
 				this.listQuery.pageNum++
-				const res = await this.SellerService.GetSellerClubList(this.listQuery)
+				const res = await this.SellerService.getActiveClub(this.listQuery)
 				const data = res.data
 				if (data.list && data.list.length > 0) {
 					this.hasNextPage = data.hasNextPage

+ 8 - 4
pages/seller/remarks/add-record.vue

@@ -32,12 +32,11 @@
 			<view class="list-view-title">
 				<view class="list-view-h1"><text>*</text>手机号或微信号:</view> 
 			</view>
-			<view class="list-view-radio" @click="handleShowReportPopup">
+			<view class="list-view-radio">
 				<input
 					class="input"
 					type="text"
-					disabled="false"
-					v-model="reportText"
+					v-model="remarksParams.mobileOrWeChat"
 					value=""
 					placeholder="请输入咨询人的手机号或微信号"
 				/>
@@ -435,7 +434,8 @@ export default {
 				groupAddition:''   ,// 加群情况 0 以加群 1 未加群
 				remarks: null, // 关键词
 				trendsKeyword:null,// 动态标签
-				stateKeyword:null  // 静态标签
+				stateKeyword:null  ,// 静态标签
+				mobileOrWeChat:'' //手机号 或者微信
 			},
 			min: 0,
 			max: 200,
@@ -620,6 +620,10 @@ export default {
 				this.$util.msg('请选择沟通情况', 2000)
 				return
 			}
+			if (!this.remarksParams.mobileOrWeChat) {
+				this.$util.msg('请填写手机号或者微信', 2000)
+				return
+			}
 			
 			if(this.current === 0){
 				if (this.remarksParams.consult == '') {

+ 28 - 4
pages/user/member/member.vue

@@ -302,9 +302,8 @@ export default {
 			isReceiveLoading: false
 		}
 	},
-	onLoad() {
-		wxLogin.wxLoginAuthorize()
-		this.getUserSuperPackage()
+	onLoad(option) {
+		this.handleInfo(option)
 	},
 	filters: {
 		TypeFormat(value) {
@@ -335,14 +334,39 @@ export default {
 		...mapState(['hasLogin','clubType'])
 	},
 	methods: {
+		async handleInfo(option){
+			if(option.userBehaviorType === 'model'){
+				// 这是从公众号模板消息进入
+				wxLogin.wxLoginAuthorize()// 执行快捷授权登录
+				this.initGetStotage()
+				setTimeout(()=>{
+					this.userClubBehaviorInfo()
+				},1000)
+			}else{
+				this.initGetStotage()
+			}
+		},
 		async initGetStotage() {
 			const userInfo = await this.$api.getStorage()
 			this.payParam.userId = this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.firstClubType = this.clubType
+			this.getUserSuperPackage()
 			this.getUserSuperCenter()
 			this.getSvipProductPage()
 		},
+		async userClubBehaviorInfo(){
+			// 获取路径
+			const pages = getCurrentPages()
+			const len = pages.length
+			const page = pages[len - 1]
+			const route = { path: '/' + page.route, fullPath: page.$page.fullPath, query: page.options, meta: {} }
+			try{
+				await this.UserService.userClubBehaviorInfo({ userId: this.payParam.userId,link:route.path, accessType:4,accessSource:1 })
+			}catch(error){
+				console.log('error',error)
+			}
+		},
 		getUserSuperCenter() {
 			// 获取会员中心数据
 			this.UserService.getUserSuperCenter({ userId: this.payParam.userId })
@@ -590,7 +614,7 @@ export default {
 		}, 200)
 	},
 	onShow() {
-		this.initGetStotage()
+		
 	}
 }
 </script>

+ 38 - 9
pages/user/operator/list.vue

@@ -83,6 +83,7 @@
 
 <script>
 	import authorize from '@/common/config/authorize.js'	
+	import wxLogin from '@/common/config/wxLogin.js'
 	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
 	import tuiNomore from '@/components/tui-components/nomore/nomore'
 	export default {
@@ -124,8 +125,9 @@
 				}
 			}
 		},
-		onLoad(){				
-			this.setScrollHeight()
+		onLoad(option){				
+			this.handleInfo(option)
+			
 		},
 		methods: {
 			setScrollHeight() {
@@ -142,6 +144,39 @@
 					})
 				}, 500)
 			},
+			async handleInfo(option){
+				if(option.userBehaviorType === 'model'){
+					// 这是从公众号模板消息进入
+					wxLogin.wxLoginAuthorize()// 执行快捷授权登录
+					this.initGetStotage()
+					setTimeout(()=>{
+						this.userClubBehaviorInfo()
+					},1000)
+				}else{
+					this.initGetStotage()
+				}
+			},
+			async initGetStotage(){
+				const clubInfo = await this.$api.getStorage()
+				this.clubName = clubInfo.name
+				this.clubImage = clubInfo.image ? clubInfo.image : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png'
+				this.listQuery.userId = clubInfo.userId
+				this.listQuery.pageNum = 1
+				this.setScrollHeight()
+				this.InitOperatorList()
+			},
+			async userClubBehaviorInfo(){
+				// 获取路径
+				const pages = getCurrentPages()
+				const len = pages.length
+				const page = pages[len - 1]
+				const route = { path: '/' + page.route, fullPath: page.$page.fullPath, query: page.options, meta: {} }
+				try{
+					await this.UserService.userClubBehaviorInfo({ userId: this.listQuery.userId,link:route.path,accessType:4,accessSource:1 })
+				}catch(error){
+					console.log('error',error)
+				}
+			},
 			handSearchOpertor(){
 				this.listQuery.pageNum=1
 				this.InitOperatorList()
@@ -290,13 +325,7 @@
 			}	
 		},
 		onShow() {
-			this.$api.getComStorage('clubInfo').then((resolve) =>{
-				this.clubName = resolve.name
-				this.clubImage = resolve.image ? resolve.image : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png'
-				this.listQuery.userId = resolve.userId
-				this.listQuery.pageNum = 1
-				this.InitOperatorList()
-			})
+			
 		}
 	}
 </script>

+ 10 - 0
services/sellse.service.js

@@ -516,4 +516,14 @@ export default class SellerService {
             isLoading: true 
         })
     }
+    /**
+     * 协销活跃机构未填写咨询记录列表
+     */
+    getActiveClub(data = {}) {
+        return this.AjaxService.get({
+            url:'/user/seller/getActiveClub', 
+            data, 
+            isLoading: true 
+        })
+    }
 }

+ 12 - 0
services/user.service.js

@@ -899,6 +899,18 @@ export default class UserService {
 	        isLoading: false,
 	    }) 
     }
+    /**
+	 *@站内消息点击统计
+	 *@param userId:  登录用户userId 默认 :0
+	 *@param link:页面路径
+	 */
+    userClubBehaviorInfo(data = {}) {
+	    return this.AjaxService.get({
+	        url: '/user/login/clubBehaviorInfo',
+	        data,
+	        isLoading: false,
+	    }) 
+    }
     /**
 	 *@查看用户是否有过弹框游客当天是否有过弹框
 	 */

+ 1 - 0
utils/router.config.js

@@ -22,6 +22,7 @@ export const includeList = [
     {title:'机构注册', url:'/pages/login/register',pageLabel:'机构注册', pageType:22 },
     {title:'供应商注册', url:'/pages/login/register-supplier',pageLabel:'供应商注册', pageType:23 },
     {title:'机构个人中心', url:'/pages/tabBar/user/user',pageLabel:'机构个人中心', pageType:25 },
+    {title:'机构升级', url:'/pages/login/apply',pageLabel:'机构升级', pageType:72 },
     {title:'机构编辑资料', url:'/pages/login/information',pageLabel:'机构编辑资料', pageType:26 },
     {title:'机构站内消息', url:'/pages/tabBar/notice/index',pageLabel:'机构站内消息', pageType:27 },
     {title:'机构超级会员', url:'/pages/user/member/member',pageLabel:'机构超级会员', pageType:28 },