xhj пре 2 година
родитељ
комит
7399af207a
3 измењених фајлова са 67 додато и 10 уклоњено
  1. 32 6
      card/index/index.vue
  2. 32 2
      card/poster/poster.vue
  3. 3 2
      components/to-userinfo/index.vue

+ 32 - 6
card/index/index.vue

@@ -400,7 +400,10 @@
 			</view>
 		</view>
 		
-		<serviceContact></serviceContact>
+		<serviceContact :userId="cardInfo.userId" v-if="cardInfo.userId"></serviceContact>
+		
+		<to-userinfo v-if="isShowUpdate" @closeUpdate="()=>{isShowUpdate=false}"></to-userinfo>
+		
 	</view>
 </template>
 <script>
@@ -451,7 +454,11 @@ import util from '../../utils/util.js';
 				
 				isShowCodePop: false,
 				
-				pageBack:false
+				pageBack:false,
+				
+				
+				isShowUpdate: false, //是否显示更新信息弹窗
+
 			};
 		},
 		components:{ serviceContact },
@@ -477,7 +484,10 @@ import util from '../../utils/util.js';
 		async onShow() {
 			this.getConfig()
 			if (this.scene) {
-				this.cardId = this.scene
+				this.cardId = this.scene.split('_')[0]
+				if(this.scene.split('_')[1]){
+					req.setStorage('shareId',this.scene.split('_')[1])
+				}
 				// await this.loadCodeParams();
 			}
 			await req.silenceLogin(this.options.userId ? this.options.userId : '', '')
@@ -495,7 +505,7 @@ import util from '../../utils/util.js';
 				req.saveBehaviorNew(this.cardInfo.id,1,6)
 				return {
 					title: this.cardInfo.realName,
-					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (userInfo.userType==1?('&shareId=' + userInfo.saleNo):''),
+					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
 					imageUrl: this.cardInfo.avatar, // 分享图
 				};
 			}else{
@@ -504,7 +514,7 @@ import util from '../../utils/util.js';
 				req.saveBehaviorNew(this.cardInfo.id,1,6)
 				return {
 					title: this.cardInfo.realName,
-					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (userInfo.userType==1?('&shareId=' + userInfo.saleNo):''),
+					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
 					imageUrl: this.cardInfo.avatar, // 分享图
 				};
 			}
@@ -513,9 +523,19 @@ import util from '../../utils/util.js';
 			if (res.from == 'button') {
 				let userInfo = req.getStorage('userInfo');
 				this.userBehavior(6)
+				req.saveBehaviorNew(this.cardInfo.id,1,6)
 				return {
 					title: this.cardInfo.realName,
-					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id,
+					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
+					imageUrl: this.cardInfo.avatar, // 分享图
+				};
+			}else{
+				let userInfo = req.getStorage('userInfo');
+				this.userBehavior(6)
+				req.saveBehaviorNew(this.cardInfo.id,1,6)
+				return {
+					title: this.cardInfo.realName,
+					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
 					imageUrl: this.cardInfo.avatar, // 分享图
 				};
 			}
@@ -983,6 +1003,12 @@ import util from '../../utils/util.js';
 			},
 			
 			bindSale(){
+				let userInfo = req.getStorage('userInfo');
+				console.log('updateInfo userInfo.avatar',userInfo.avatar)
+				if (!userInfo.avatar || userInfo.nickName == '微信用户' || !userInfo.nickName||!userInfo.mobile) {
+					this.isShowUpdate = true
+					return false
+				}
 				uni.showModal({
 					title:'提示',
 					content:'是否绑定该顾问?',

+ 32 - 2
card/poster/poster.vue

@@ -74,7 +74,37 @@ export default {
 			req.saveBehaviorNew(this.cardInfo.id,1,6)
 			return {
 				title: this.cardInfo.realName,
-				path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id,
+				path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
+				imageUrl: this.cardInfo.avatar, // 分享图
+			};
+		}else{
+			let userInfo = req.getStorage('userInfo');
+			this.userBehavior(6)
+			req.saveBehaviorNew(this.cardInfo.id,1,6)
+			return {
+				title: this.cardInfo.realName,
+				path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
+				imageUrl: this.cardInfo.avatar, // 分享图
+			};
+		}
+	},
+	onShareTimeline(res) {
+		if (res.from == 'button') {
+			let userInfo = req.getStorage('userInfo');
+			this.userBehavior(6)
+			req.saveBehaviorNew(this.cardInfo.id,1,6)
+			return {
+				title: this.cardInfo.realName,
+				path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
+				imageUrl: this.cardInfo.avatar, // 分享图
+			};
+		}else{
+			let userInfo = req.getStorage('userInfo');
+			this.userBehavior(6)
+			req.saveBehaviorNew(this.cardInfo.id,1,6)
+			return {
+				title: this.cardInfo.realName,
+				path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id + (this.cardInfo.jobNumber?('&shareId=' + this.cardInfo.jobNumber):''),
 				imageUrl: this.cardInfo.avatar, // 分享图
 			};
 		}
@@ -145,7 +175,7 @@ export default {
 				let that = this; //获取小程序码
 				const params = {
 					page: 'card/index/index',
-					params: this.cardInfo.id
+					params: this.cardInfo.id+'_'+this.cardInfo.jobNumber
 				};
 				return new Promise((resolve, reject) => {
 					req.getRequest('/api/other/program/code', params, url => {

+ 3 - 2
components/to-userinfo/index.vue

@@ -47,8 +47,8 @@
 					
 					if( data.saleNo) return this.showUserInfoPop = false;
 					
-					// if( !data.avatar) return this.showUserInfoPop = true;
-					// if( !data.nickName) return this.showUserInfoPop = true;
+					if( !data.avatar) return this.showUserInfoPop = true;
+					if( !data.nickName) return this.showUserInfoPop = true;
 					// if( !data.realName) return this.showUserInfoPop = true;
 					// if( !data.cardNo) return this.showUserInfoPop = true;
 					if( !data.mobile) return this.showUserInfoPop = true;
@@ -59,6 +59,7 @@
 			},
 			closeUpdate(){
 				this.showUserInfoPop = false;
+				this.$emit('closeUpdate',true)
 			},
 		}
 	};