LiChengjin пре 4 недеља
родитељ
комит
b1f32c7ca8
1 измењених фајлова са 37 додато и 34 уклоњено
  1. 37 34
      pages/home/home.vue

+ 37 - 34
pages/home/home.vue

@@ -98,7 +98,7 @@
 						title: ""
 					}
 				],
-				showGuide: true, //引导是否显示 
+				showGuide: false, //引导是否显示 
 				cShowMsg: '', // 展示的解释语
 				cWidth: '',
 				cHeight: '',
@@ -194,6 +194,7 @@
 				console.log('点击了下一个')
 				if (this.currentIndex >= this.noticeArray.length) {
 					this.showGuide = false;
+					uni.setStorageSync('showGuide', false)
 					return;
 				}
 				this.noticeArray[this.currentIndex].zindex = 0;
@@ -271,27 +272,37 @@
 				// #endif
 			}
 
-			let _this = this;
-			this.$nextTick(function() {
-				if (_this.currentIndex >= _this.noticeArray.length) {
-					_this.showGuide = false;
-					return;
-				}
-				_this.showGuide = true;
-				_this.cShowMsg = _this.noticeArray[_this.currentIndex].showMessage;
-				var idS = '#' + _this.noticeArray[_this.currentIndex].showID;
-				console.log(idS)
-				//根据布局信息显示引导框位置
-				const query = uni.createSelectorQuery().in(_this);
-				query.select(idS).boundingClientRect(data => {
-					console.log("得到布局位置信息" + JSON.stringify(data));
-					_this.cWidth = data.width;
-					_this.cHeight = data.height;
-					_this.cLeft = data.left;
-					this.cRight = data.right;
-					_this.cTop = data.top;
-				}).exec();
-			});
+			//显示引导
+			// uni.setStorageSync('showGuide', true)
+			let showGuide = uni.getStorageSync('showGuide')
+			console.log(typeof showGuide)
+			console.log(showGuide)
+			console.log(showGuide === '')
+			if (showGuide === '') {
+				this.showGuide = true
+				uni.setStorageSync('showGuide', 'false')
+				let _this = this;
+				this.$nextTick(function() {
+					if (_this.currentIndex >= _this.noticeArray.length) {
+						_this.showGuide = false;
+						return;
+					}
+					_this.showGuide = true;
+					_this.cShowMsg = _this.noticeArray[_this.currentIndex].showMessage;
+					var idS = '#' + _this.noticeArray[_this.currentIndex].showID;
+					console.log(idS)
+					//根据布局信息显示引导框位置
+					const query = uni.createSelectorQuery().in(_this);
+					query.select(idS).boundingClientRect(data => {
+						console.log("得到布局位置信息" + JSON.stringify(data));
+						_this.cWidth = data.width;
+						_this.cHeight = data.height;
+						_this.cLeft = data.left;
+						this.cRight = data.right;
+						_this.cTop = data.top;
+					}).exec();
+				});
+			}
 		},
 		// #ifdef MP-WEIXIN
 		onShareAppMessage(info) {
@@ -366,24 +377,16 @@
 			.bottom--row {
 				display: flex;
 				flex-direction: row;
-				justify-content: space-between;
+				justify-content: space-around;
 				margin: 0 60rpx 30rpx;
 				padding-top: 60rpx;
 
-				.bottom--row-item__content {
+				.bottom--row-item {
+					width: 30vw;
 					display: flex;
+					justify-content: center;
 					flex-direction: column;
 					align-items: center;
-					justify-content: space-between;
-					height: 170rpx;
-					width: 170rpx;
-
-					.bottom--row-item__img {
-						height: 120rpx;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-					}
 				}
 			}
 		}