فهرست منبع

内容转发带名片信息

xhj 2 سال پیش
والد
کامیت
4a004edea4
3فایلهای تغییر یافته به همراه25 افزوده شده و 9 حذف شده
  1. 1 1
      card/cardList/cardList.vue
  2. 21 5
      components/service-contact/index.vue
  3. 3 3
      topic/content/content.vue

+ 1 - 1
card/cardList/cardList.vue

@@ -183,7 +183,7 @@
 				stateIndex: 0,
 				stateList:[{
 						label: '智能推荐',
-						value: 'distance'
+						value: null
 					},{
 						label: '评价分从高到低',
 						value: 'avage'

+ 21 - 5
components/service-contact/index.vue

@@ -34,7 +34,9 @@
 		},
 
 		components: {},
-		props: {},
+		props: {
+			userId:String
+		},
 		watch: {},
 
 		mounted() {
@@ -45,10 +47,24 @@
 		methods: {
 			// 获取推荐销售
 			getRecommendCard() {
-				req.getRequest('/api/visiting/card/recommendCardInfo', {}, res => {
-					this.recommendCard = res
-					this.loading = false
-				})
+				if(this.userId){
+					req.getRequest('/api/user/userInfoById', {userId:this.userId}, res => {
+						if(res.visitingCardDTO){
+							this.recommendCard = res.visitingCardDTO
+							this.loading = false
+						}else{
+							req.getRequest('/api/visiting/card/recommendCardInfo', {}, res => {
+								this.recommendCard = res
+								this.loading = false
+							})
+						}
+					})
+				}else{
+					req.getRequest('/api/visiting/card/recommendCardInfo', {}, res => {
+						this.recommendCard = res
+						this.loading = false
+					})
+				}
 			},
 
 

+ 3 - 3
topic/content/content.vue

@@ -41,7 +41,7 @@
 				</navigator>
 			</view>
 		</view>
-		<serviceContact v-if="userInfo.userType!=1"></serviceContact>
+		<serviceContact :userId="query.userId?query.userId:''" v-if="userInfo.userType!=1"></serviceContact>
 	</view>
 </template>
 
@@ -98,14 +98,14 @@ export default {
 		return {
 			title: this.detaile.title,
 			imageUrl: this.detaile.pic,
-			path: '/topic/content/content?id=' + this.id +'&isShare=' + true
+			path: '/topic/content/content?id=' + this.id +'&isShare=' + true+(this.userInfo.userType==1?('&userId='+this.userInfo.id):'')
 		};
 	},
 	onShareTimeline() {
 		return {
 			title: this.detaile.title,
 			imageUrl: this.detaile.pic,
-			path: '/topic/content/content?id=' + this.id +'&isShareTimeline=' + true
+			path: '/topic/content/content?id=' + this.id +'&isShareTimeline=' + true+(this.userInfo.userType==1?('&userId='+this.userInfo.id):'')
 		};
 	},
 	methods: {