Browse Source

商品详情样式修改

zhaoxw 4 years ago
parent
commit
c516d604de
2 changed files with 17 additions and 3 deletions
  1. 7 1
      jhlive/jhlive.nvue
  2. 10 2
      pagesGood/goodForm.vue

+ 7 - 1
jhlive/jhlive.nvue

@@ -71,8 +71,9 @@
 	// #ifdef MP-WEIXIN
 	import JhliveApp from './live-wechat';
 	//#endif
-
+    // #ifdef APP-PLUS
 	const dom = uni.requireNativePlugin('dom');
+	//#endif
 	const LOGTAG = '--JHLIVE--:';
 	const EXPIRETIME = 604800;
 
@@ -132,6 +133,7 @@
 		},
 		watch: {
 			imMsgs() {
+				// #ifdef APP-PLUS
 				setTimeout(() => {
 					const el = this.$refs.imScrollContent;
 					dom.getComponentRect(el, (e)=>{
@@ -139,6 +141,10 @@
 						// el&&dom.scrollToElement(el, {offset: -100})
 					})
 				},50);
+				//#endif
+				// #ifndef APP-PLUS
+				this.imScrollTop = 10000+ this.imMsgs.length
+				//#endif
 			}
 		},
 		methods: {

+ 10 - 2
pagesGood/goodForm.vue

@@ -5,8 +5,8 @@
 				<u-input v-model="goodInfo.productName" type="text" placeholder="请输入商品名称" :disabled="ifEdit()"/>
 			</u-form-item>
 			<u-form-item label="请上传商品图片(上限5张)" required label-position="top">
-				<view>
-					<u-image width="98px" height="98px" border-radius="5px" v-for="(item, index) in fileList" :src="item" class="good-img"
+				<view class="good-img">
+					<u-image class="good-img-item" width="98px" height="98px" border-radius="5px" v-for="(item, index) in fileList" :src="item"
 					 v-if="ifEdit()"></u-image>
 					<u-upload :action="uploadUrl" :file-list="defaultList" :form-data="uploadData" @on-success="uploadSuccess"
 					 @on-error="uploadError" @on-remove="uploadRemove" max-count="5" :disabled="ifEdit()"></u-upload>
@@ -405,5 +405,13 @@
 			background-color: #FFFFFF;
 			z-index: 999;
 		}
+		.good-img {
+			display: flex;
+			flex-wrap: wrap;
+			.good-img-item {
+				margin-right: 5px;
+				margin-bottom: 5px;
+			}
+		}
 	}
 </style>