Prechádzať zdrojové kódy

通知公告bug修复

ouyang 3 týždňov pred
rodič
commit
bdced086e0

+ 23 - 13
ghsApp/src/admin/ghsNotice/add.vue

@@ -96,12 +96,14 @@
           />
         </view>
       </view>
-
-      <view class="footer-bar">
-        <button class="footer-btn preview" type="button" @click="previewContent">预览</button>
-        <button class="footer-btn submit" formType="submit">确认</button>
-      </view>
     </form>
+
+    <!-- 底部按钮放在 form 外,避免小程序原生 textarea 与 fixed 底栏层级错乱 -->
+    <view class="footer-placeholder"></view>
+    <view class="footer-bar">
+      <button class="footer-btn preview" type="button" @click="previewContent">预览</button>
+      <button class="footer-btn submit" type="button" @click="formSubmit">确认</button>
+    </view>
   </view>
 </template>
 
@@ -120,8 +122,8 @@ export default {
         title: '',
         summary: '',
         positions: [],
-        sort: '',
-        status: 0,
+        sort: '10',
+        status: 1,
         imageTextVos: []
       },
       positionOptions: [
@@ -179,7 +181,7 @@ export default {
           summary: res.data.summary || '',
           positions: res.data.positions || [],
           sort: res.data.sort !== undefined && res.data.sort !== null ? String(res.data.sort) : '',
-          status: Number(res.data.status) || 0,
+          status: Number(res.data.status) || 1,
           imageTextVos: content
         }
         this.$nextTick(() => {
@@ -271,7 +273,7 @@ export default {
 <style lang="scss" scoped>
 .app-content {
   min-height: 100vh;
-  padding: 24rpx 24rpx calc(160rpx + env(safe-area-inset-bottom));
+  padding: 24rpx 24rpx 0;
   background: #f3f4f6;
   box-sizing: border-box;
 }
@@ -418,8 +420,7 @@ export default {
 }
 
 .content-card {
-  padding-bottom: 0;
-  overflow: hidden;
+  padding-bottom: 24rpx;
 }
 
 .content-header {
@@ -445,7 +446,7 @@ export default {
 
   ::v-deep .content-area {
     min-height: 280rpx;
-    padding: 0 28rpx 20rpx;
+    padding: 0 28rpx 40rpx;
     background: #fff;
   }
 
@@ -499,16 +500,21 @@ export default {
   }
 }
 
+.footer-placeholder {
+  height: calc(140rpx + env(safe-area-inset-bottom));
+}
+
 .footer-bar {
   position: fixed;
   left: 0;
   right: 0;
   bottom: 0;
+  z-index: 999;
   display: flex;
-  gap: 24rpx;
   padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom));
   background: #fff;
   box-shadow: 0 -2rpx 16rpx rgba(0, 0, 0, 0.06);
+  box-sizing: border-box;
 }
 
 .footer-btn {
@@ -521,6 +527,10 @@ export default {
   border-radius: 20rpx;
   border: none;
 
+  &:first-child {
+    margin-right: 24rpx;
+  }
+
   &::after {
     border: none;
   }

+ 2 - 0
ghsApp/src/admin/ghsNotice/preview.vue

@@ -94,6 +94,8 @@ export default {
   font-size: 28rpx;
   color: #666;
   line-height: 1.6;
+  white-space: pre-line;
+  word-break: break-word;
 }
 
 .preview-content {

+ 9 - 4
ghsApp/src/components/RichMediaEditor/index.vue

@@ -95,8 +95,9 @@
             v-model="item.content"
             class="text-input"
             placeholder="请输入文本内容..."
-            auto-height
             maxlength="-1"
+            :show-confirm-bar="false"
+            :adjust-position="true"
             @input="onTextChange(index, $event)"
           />
         </view>
@@ -651,7 +652,7 @@ export default {
   margin-bottom: 30rpx;
   background-color: #fff;
   border-radius: 12rpx;
-  overflow: hidden;
+  overflow: visible;
   border: 1rpx solid #eee;
   transition: all 0.2s ease-in-out;
   
@@ -745,16 +746,20 @@ export default {
 }
 
 .text-item {
+  overflow: hidden;
+  border-radius: 12rpx;
+
   .text-input {
     width: 100%;
     min-height: 80rpx;
     max-height: 600rpx;
     padding: 20rpx;
     border: none;
-    background-color: transparent;
+    background-color: #f9f9f9;
     font-size: 28rpx;
-    line-height: 1.5;
+    line-height: 1.6;
     color: #333;
+    box-sizing: border-box;
   }
 }
 

+ 12 - 11
hdApp/src/admin/billing/affirmGhs.vue

@@ -27,7 +27,7 @@
 						>
 							<swiper-item v-for="item in ghsNoticeList" :key="item.id" class="ghs-notice-slide">
 								<view class="ghs-notice-item">
-									<view class="ghs-notice-summary">【公告】{{ item.summary }}</view>
+									<text class="ghs-notice-summary">【公告】{{ item.summary }}</text>
 								</view>
 							</swiper-item>
 						</swiper>
@@ -1802,7 +1802,7 @@ export default {
 
 .ghs-notice-bar {
 	padding: 0 0 0 20upx;
-	height: 150upx;
+	height: 168upx;
 	background: #3385FF;
 	border-radius: 10upx;
 	box-shadow: 0upx 4upx 12upx rgba(51, 133, 255, 0.2);
@@ -1815,14 +1815,14 @@ export default {
 .ghs-notice-swiper {
 	flex: 1;
 	width: 0;
-	height: 150upx;
+	height: 168upx;
 	min-width: 0;
 	background: transparent;
 }
 
 .ghs-notice-slide,
 .ghs-notice-item {
-	height: 150upx;
+	height: 168upx;
 	width: 100%;
 	background: transparent;
 	overflow: hidden;
@@ -1830,13 +1830,15 @@ export default {
 
 .ghs-notice-item {
 	display: flex;
-	align-items: center;
+	align-items: flex-start;
+	padding: 12upx 0;
+	box-sizing: border-box;
 }
 
 .ghs-notice-arrow-wrap {
 	flex-shrink: 0;
 	width: 52upx;
-	height: 150upx;
+	height: 168upx;
 	display: flex;
 	align-items: center;
 	justify-content: center;
@@ -1851,17 +1853,16 @@ export default {
 }
 
 .ghs-notice-summary {
-	display: -webkit-box;
+	display: block;
 	width: 100%;
 	font-size: 30upx;
 	color: #ffffff;
 	line-height: 1.6;
 	text-align: left;
 	font-weight: 540;
-	word-break: break-all;
+	word-break: break-word;
+	white-space: pre-line;
+	max-height: 144upx;
 	overflow: hidden;
-	text-overflow: ellipsis;
-	-webkit-box-orient: vertical;
-	-webkit-line-clamp: 3;
 }
 </style>

+ 22 - 12
hdApp/src/admin/shopNotice/add.vue

@@ -98,12 +98,14 @@
           />
         </view>
       </view>
-
-      <view class="footer-bar">
-        <button class="footer-btn preview" type="button" @click="previewContent">预览</button>
-        <button class="footer-btn submit" formType="submit">确认</button>
-      </view>
     </form>
+
+    <!-- 底部按钮放在 form 外,避免小程序原生 textarea 与 fixed 底栏层级错乱 -->
+    <view class="footer-placeholder"></view>
+    <view class="footer-bar">
+      <button class="footer-btn preview" type="button" @click="previewContent">预览</button>
+      <button class="footer-btn submit" type="button" @click="formSubmit">确认</button>
+    </view>
   </view>
 </template>
 
@@ -122,8 +124,8 @@ export default {
         title: '',
         summary: '',
         positions: [],
-        sort: '',
-        status: 0,
+        sort: '10',
+        status: 1,
         imageTextVos: []
       },
       positionOptions: [
@@ -275,7 +277,7 @@ export default {
 <style lang="scss" scoped>
 .app-content {
   min-height: 100vh;
-  padding: 24rpx 24rpx calc(160rpx + env(safe-area-inset-bottom));
+  padding: 24rpx 24rpx 0;
   background: #f3f4f6;
   box-sizing: border-box;
 }
@@ -422,8 +424,7 @@ export default {
 }
 
 .content-card {
-  padding-bottom: 0;
-  overflow: hidden;
+  padding-bottom: 24rpx;
 }
 
 .content-header {
@@ -449,7 +450,7 @@ export default {
 
   ::v-deep .content-area {
     min-height: 280rpx;
-    padding: 0 28rpx 20rpx;
+    padding: 0 28rpx 40rpx;
     background: #fff;
   }
 
@@ -503,16 +504,21 @@ export default {
   }
 }
 
+.footer-placeholder {
+  height: calc(140rpx + env(safe-area-inset-bottom));
+}
+
 .footer-bar {
   position: fixed;
   left: 0;
   right: 0;
   bottom: 0;
+  z-index: 999;
   display: flex;
-  gap: 24rpx;
   padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom));
   background: #fff;
   box-shadow: 0 -2rpx 16rpx rgba(0, 0, 0, 0.06);
+  box-sizing: border-box;
 }
 
 .footer-btn {
@@ -525,6 +531,10 @@ export default {
   border-radius: 44rpx;
   border: none;
 
+  &:first-child {
+    margin-right: 24rpx;
+  }
+
   &::after {
     border: none;
   }

+ 11 - 6
hdApp/src/components/RichMediaEditor/index.vue

@@ -95,8 +95,9 @@
             v-model="item.content"
             class="text-input"
             placeholder="请输入文本内容..."
-            auto-height
             maxlength="-1"
+            :show-confirm-bar="false"
+            :adjust-position="true"
             @input="onTextChange(index, $event)"
           />
         </view>
@@ -651,7 +652,7 @@ export default {
   margin-bottom: 30rpx;
   background-color: #fff;
   border-radius: 12rpx;
-  overflow: hidden;
+  overflow: visible;
   border: 1rpx solid #eee;
   transition: all 0.2s ease-in-out;
   
@@ -745,16 +746,20 @@ export default {
 }
 
 .text-item {
+  overflow: hidden;
+  border-radius: 12rpx;
+
   .text-input {
     width: 100%;
-    min-height: 80rpx;
-    max-height: 600rpx;
+    height: 320rpx;
+    min-height: 320rpx;
     padding: 20rpx;
     border: none;
-    background-color: transparent;
+    background-color: #f9f9f9;
     font-size: 28rpx;
-    line-height: 1.5;
+    line-height: 1.6;
     color: #333;
+    box-sizing: border-box;
   }
 }
 

+ 3 - 0
hdApp/src/pagesPurchase/ghsNoticeDetail.vue

@@ -3,6 +3,7 @@
     <view class="page-header">
       <view class="header-content">
         <text class="page-title">{{ title || '公告详情' }}</text>
+        <text class="page-summary" v-if="summary">{{ summary }}</text>
       </view>
     </view>
     <view class="preview-content">
@@ -85,6 +86,8 @@ export default {
   font-size: 28rpx;
   color: #666;
   line-height: 1.6;
+  white-space: pre-line;
+  word-break: break-word;
 }
 
 .preview-content {

+ 23 - 22
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -26,7 +26,7 @@
 				>
 					<swiper-item v-for="item in ghsNoticeList" :key="item.id" class="ghs-notice-slide">
 						<view class="ghs-notice-item">
-							<view class="ghs-notice-summary">【公告】{{ item.summary }}</view>
+							<text class="ghs-notice-summary">【公告】{{ item.summary }}</text>
 						</view>
 					</swiper-item>
 				</swiper>
@@ -799,7 +799,7 @@ export default {
 .ghs-notice-bar {
 	margin-top: 9upx;
 	padding: 0 0 0 20upx;
-	height: 150upx;
+	height: 168upx;
 	background: #3385FF;
 	border-radius: 10upx;
 	box-shadow: 0upx 4upx 12upx rgba(51, 133, 255, 0.2);
@@ -812,14 +812,14 @@ export default {
 .ghs-notice-swiper {
 	flex: 1;
 	width: 0;
-	height: 150upx;
+	height: 168upx;
 	min-width: 0;
 	background: transparent;
 }
 
 .ghs-notice-slide,
 .ghs-notice-item {
-	height: 150upx;
+	height: 168upx;
 	width: 100%;
 	background: transparent;
 	overflow: hidden;
@@ -827,13 +827,29 @@ export default {
 
 .ghs-notice-item {
 	display: flex;
-	align-items: center;
+	align-items: flex-start;
+	padding: 12upx 0;
+	box-sizing: border-box;
+}
+
+.ghs-notice-summary {
+	display: block;
+	width: 100%;
+	font-size: 30upx;
+	color: #ffffff;
+	line-height: 1.6;
+	text-align: left;
+	font-weight: 540;
+	word-break: break-word;
+	white-space: pre-line;
+	max-height: 144upx;
+	overflow: hidden;
 }
 
 .ghs-notice-arrow-wrap {
 	flex-shrink: 0;
 	width: 52upx;
-	height: 150upx;
+	height: 168upx;
 	display: flex;
 	align-items: center;
 	justify-content: center;
@@ -847,21 +863,6 @@ export default {
 	opacity: 0.9;
 }
 
-.ghs-notice-summary {
-	display: -webkit-box;
-	width: 100%;
-	font-size: 30upx;
-	color: #ffffff;
-	line-height: 1.6;
-	text-align: left;
-	font-weight: 540;
-	word-break: break-all;
-	overflow: hidden;
-	text-overflow: ellipsis;
-	-webkit-box-orient: vertical;
-	-webkit-line-clamp: 3;
-}
-
 .notice-banner {
 	margin-top: 9upx;
 	padding: 0upx 20upx;
@@ -1078,7 +1079,7 @@ export default {
     animation-duration:.3s;
   }
   .fadeIn{
-	height: 300upx;
+	height: 318upx;
     overflow: hidden;
     animation-name: fadeInFrames;
     animation-duration:.3s;