Эх сурвалжийг харах

fix:商品信息没有铺满问题

jinchaoyu 1 жил өмнө
parent
commit
c8e1ee2e1c

+ 15 - 16
pages/groupbuying_details/detail/index.vue

@@ -96,6 +96,7 @@ export default {
 	mixins: [colors],
 	data () {
 		return {
+			albumWidth: 0,
 		};
 	},
 	computed: mapGetters(['isLogin']),
@@ -103,28 +104,26 @@ export default {
 		isLogin: {
 			handler: function (newV, oldV) {
 				if (newV) {
-					this.getUserInfo();
 				}
 			},
 			deep: true
 		}
 	},
-	onLoad () {
-
-		if (this.isLogin) {
-			this.getUserInfo();
-			// #ifdef APP-PLUS
-			this.formatSize()
-			// 获取版本号
-			plus.runtime.getProperty(plus.runtime.appid, (inf) => {
-				console.log(inf.version)
-				this.version = inf.version;
+	created(options) {
+		console.log('???')
+		let that = this;
+			uni.getSystemInfo({
+				success: function (res) {
+					console.log(res,'getSystemInfo')
+					that.albumWidth = res.windowWidth - 30
+					that.height = res.windowHeight;
+					//res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
+					// #ifndef APP-PLUS || H5 || MP-ALIPAY
+					that.navbarRight =
+						res.windowWidth - uni.getMenuButtonBoundingClientRect().left;
+					// #endif
+				},
 			});
-			// #endif
-			this.setLang();
-		} else {
-			toLogin();
-		}
 	},
 	methods: {
 

+ 1 - 1
pages/index/diy/components/latestGroupBuying.vue

@@ -439,7 +439,7 @@ export default {
 
 .introduce {
 	padding: 0 30rpx;
-	height: 44rpx;
+	min-height: 44rpx;
 	font-size: 36rpx;
 	font-weight: bolder;
 	color: #111111;