xhj 2 лет назад
Родитель
Сommit
e097a89cbf
3 измененных файлов с 11 добавлено и 3 удалено
  1. 2 1
      card/index/index.vue
  2. 7 0
      match/activityDetail/activityDetail.vue
  3. 2 2
      topic/content/content.vue

+ 2 - 1
card/index/index.vue

@@ -432,6 +432,7 @@ import util from '../../utils/util.js';
 		onLoad(options) {
 			this.options = options
 			this.cardId = options.cardId;
+			if(options.shareId) req.setStorage('shareId',options.shareId)
 			if (options.scene)
 				this.scene = options.scene
 			uni.showLoading({
@@ -458,7 +459,7 @@ import util from '../../utils/util.js';
 				this.userBehavior(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 + (userInfo.userType==1?('&shareId=' + userInfo.id):''),
 					imageUrl: this.cardInfo.avatar + '?x-oss-process=style/w375', // 分享图
 				};
 			}

+ 7 - 0
match/activityDetail/activityDetail.vue

@@ -138,6 +138,7 @@ export default {
 			menus: ['shareAppMessage', 'shareTimeline']
 		});
 		this.options = options;
+		if(options.shareId) req.setStorage('shareId',options.shareId)
 		// req.silenceLogin(options.userId, '');
 	},
 	async onShow() {
@@ -158,6 +159,9 @@ export default {
 		if(req.getStorage('userInfo')){
 			url += '&userId=' + req.getStorage('userInfo').id
 		}
+		if(req.getStorage('userInfo').userType==1){
+			url += '&shareId=' + req.getStorage('userInfo').id
+		}
 		return {
 			title: this.detail.title,
 			imageUrl: this.detail.pic,
@@ -171,6 +175,9 @@ export default {
 		if(req.getStorage('userInfo')){
 			query.userId = req.getStorage('userInfo').id
 		}
+		if(req.getStorage('userInfo').userType==1){
+			url += '&shareId=' + req.getStorage('userInfo').id
+		}
 		return {
 			title: this.detail.title,
 			imageUrl: this.detail.pic,

+ 2 - 2
topic/content/content.vue

@@ -77,7 +77,7 @@ export default {
 	onLoad: async function(options) {
 		this.query = options
 		this.id = options.id;
-		if(options.userId) req.setStorage('shareId',options.userId)
+		if(options.shareId) req.setStorage('shareId',options.shareId)
 		await  req.silenceLogin(options.userId, '');
 		setTimeout(()=>{
 			this.userInfo = req.getStorage('userInfo')
@@ -100,7 +100,7 @@ export default {
 		return {
 			title: this.detaile.title,
 			imageUrl: this.detaile.pic,
-			path: '/topic/content/content?id=' + this.id +'&isShare=' + true+(this.userInfo.userType==1?('&userId='+this.userInfo.id):'')
+			path: '/topic/content/content?id=' + this.id +'&isShare=' + true+(this.userInfo.userType==1?('&shareId='+this.userInfo.id):'')
 		};
 	},
 	onShareTimeline() {