DELL před 3 roky
rodič
revize
6310aa4c81

+ 8 - 0
src/packageOperate/activity/index.vue

@@ -389,6 +389,14 @@
 				imageUrl: 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/free_draw_bkg.jpeg',
 			}
 		},
+		//分享朋友圈
+		onShareTimeline() {
+			return {
+				title: '一起来刮盲票吧',
+				path: `/packageOperate/activity/index?marketingId=${ this.info.id }&inviteCode=${ this.inviteCode }&userId=${ this.userInfo.userId }&type=1`,
+				imageUrl: 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/free_draw_bkg.jpeg',
+			}
+		}
 	}
 </script>
 

+ 3 - 0
src/pages/activity/index.vue

@@ -94,6 +94,9 @@
 			this.getBaseInfo()
 		},
 		onShow() {
+			if(uni.getStorageSync('token')) {
+				this.getBaseInfo()
+			}
 			this.pageList()
 		},
 		methods: {

+ 1 - 1
src/pages/core/index.vue

@@ -230,10 +230,10 @@
 			this.getExclusive()
 			this.getClassify()
 			this.getSwiper()
-			this.getBaseInfo()
 		},
 		onShow() {
 			if(uni.getStorageSync('token')) {
+				this.getBaseInfo()
 				this.getBean()
 			}
 		},

+ 4 - 1
src/pages/index/index.vue

@@ -196,11 +196,14 @@
 			let num = Math.round(100 / this.list.length)
 			this.percentage = num
 			
-			this.getBaseInfo()
+			
 			this.getList()
 		},
 		onShow(opthios) {
 			this.loginState = uni.getStorageSync('token') ? true : false
+			if (this.loginState) {
+				this.getBaseInfo()
+			}
 			this.getPrizeNews()
 			this.getActivityList()
 		},

+ 0 - 14
src/pages/user/index.vue

@@ -119,11 +119,6 @@
 				userInfo: '',
 			};
 		},
-		
-		onLoad() {
-			this.getBaseInfo()
-		},
-
 		onShow() {
 			this.loginState = uni.getStorageSync('token') ? true : false
 			if (this.loginState) {
@@ -231,15 +226,6 @@
 				})
 				// #endif
 			},
-			
-			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.userInfo = res.data
-					}
-				})
-			},
 		},
 		//分享好友
 		onShareAppMessage(res) {