Quellcode durchsuchen

页面问题修复

QAQ 陈 vor 4 Monaten
Ursprung
Commit
615ec0495d

+ 1 - 1
app.json

@@ -1,7 +1,7 @@
 {
   "pages": [
-    "pages/homepage/homepage",
     "pages/FirstBangDing/FirstBangDing",
+    "pages/homepage/homepage",
     "pages/huhaobangding/huhaobangding",
     "pages/lijijiaofei/lijijiaofei",
     "pages/zhangdanlist/zhangdanlist",

+ 3 - 1
pages/FirstBangDing/FirstBangDing.js

@@ -9,7 +9,9 @@ Page({
   data: {
     maxBindCount: 5,
     notices: [
-      '部分小区水费由物业代收,请联系小区物业进行咨询缴费操作。'  
+      '部分小区水费由物业代收,请联系小区物业进行咨询缴费操作。',
+      '户号绑定: 在绑定页面手动查询,输入地址关键词信息。',
+      '每个微信用户最多绑定5个户号。'
     ],
     images: {
       logo: '',

+ 2 - 2
pages/FirstBangDing/FirstBangDing.wxml

@@ -17,9 +17,9 @@
   </view>
 
   <!-- 通知列表 -->
-  <view class="notice-list">
+  <!-- <view class="notice-list">
     <view class="notice-item" wx:for="{{notices}}" wx:key="index">
       {{index + 1}}、{{item}}
     </view>
-  </view>
+  </view> -->
 </view>

+ 5 - 7
pages/FirstBangDing/FirstBangDing.wxss

@@ -37,14 +37,14 @@
 .welcome-card {
   position: absolute;
   left: 4%;
-  top: 270rpx;
+  top: 300rpx;
   width: 92%;
   height: 420rpx;
   opacity: 1;
   background-color: #fff;
-  border-radius: 8rpx;
+  border-radius: 16rpx;
   /* 圆角 */
-  box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1);
+  box-shadow: 0 16rpx 20rpx rgba(0, 0, 0, 0.1);
   overflow: hidden;
 }
 
@@ -98,9 +98,7 @@
   font-size: 30rpx;
   border-radius: 40rpx;
   margin-left: 0rpx;
-  /* 向左50rpx */
-  top: 40rpx;
-  /* 向下50rpx */
+  top: 50rpx;
 }
 
 .bind-button::after {
@@ -156,5 +154,5 @@
   width: 30rpx;
   height: 0rpx;
   opacity: 1;
-  border: 2rpx solid rgba(232, 232, 232, 1);
+  border: 1rpx solid rgba(232, 232, 232, 1);
 }

+ 2 - 3
pages/homepage/homepage.js

@@ -285,8 +285,7 @@ Page({
 
     const content = data[this.data.currentIndex].scrollingcontent;
     const title = data[this.data.currentIndex].noticetitle;
-    // 将系数从0.3减小到0.1以加快滚动速度
-    const duration = (title.length + content.length) * 0.2;
+    const duration = (title.length + content.length) * 0.4;
 
     this.setData({
       scrollDuration: duration,
@@ -307,7 +306,7 @@ Page({
       }, () => {
         this.startNoticeScroll();
       });
-    }, 500);
+    }, 1000);
   },
 
   // 加载账户和账单信息

+ 6 - 10
pages/homepage/homepage.wxml

@@ -34,18 +34,17 @@
 
     <!-- 水费金额信息卡片 -->
     <view class="amount-card">
-
+      <!-- 添加背景图片 -->
+      <image class="section-background" src="{{images.kapiantubiao}}" mode="aspectFill"></image>
       <!-- 水费金额信息 -->
       <view class="amount-section">
-        <!-- 左侧水滴背景图 -->
-        <image class="water-drop" src="{{images.kapiantubiao}}" mode="aspectFit"></image>
         <!-- 中间金额显示 -->
         <view class="amount-display">
           <view class="total-amount">{{billInfo.totalAmount}}</view>
           <view class="amount-label">总计应缴(元)</view>
 
           <view class="amount-details">
-            <view class="detail-item">
+            <view class="detaisl-item">
               <text class="number">{{billInfo.waterUsage}}</text>
               <text class="label">用水量(m³)</text>
             </view>
@@ -65,15 +64,12 @@
       <button class="pay-btn" bindtap="goToPayment">立即缴费</button>
 
       <!-- 通知轮播区域 -->
-      <view class="notice-bar">
+      <view class="notice-bar" wx:if="{{noticeList && noticeList.length > 0}}">
         <view class="notice-icon">
           <image src="/static_file/speaker.png" mode="aspectFit"></image>
         </view>
         <view class="notice-swiper-container">
-          <view class="notice-content {{isScrolling ? 'scrolling' : ''}}"
-                bindanimationend="onScrollComplete"
-                bindtap="goToNoticeDetail"
-                style="animation-duration: {{scrollDuration}}s;">
+          <view class="notice-content {{isScrolling ? 'scrolling' : ''}}" bindanimationend="onScrollComplete" bindtap="goToNoticeDetail" style="animation-duration: {{scrollDuration}}s;">
             <text class="notice-title">{{noticeList[currentIndex].noticetitle}}:</text>
             <text>{{noticeList[currentIndex].scrollingcontent}}</text>
           </view>
@@ -102,4 +98,4 @@
       <image class="activity-image" src="{{activity.imageUrl}}" mode="aspectFill"></image>
     </view>
   </view>
-</view>
+</view>

+ 30 - 22
pages/homepage/homepage.wxss

@@ -50,16 +50,14 @@
 
 .info-row .label {
   color: rgba(163, 163, 163, 1);
-  font-size: 28rpx;
+  font-size: 30rpx;
   width: 140rpx;
-  margin-right: 50rpx;
-  font-family: 'PingFang', '苹方', sans-serif; 
+  margin-right: 30rpx;
 }
 
 .info-row .value {
-  font-family: 'PingFang', '苹方', sans-serif;  /* 添加苹方字体 */
   color: rgba(46, 48, 56, 1);
-  font-size: 28rpx;
+  font-size: 32rpx;
   flex: 1;
 }
 
@@ -78,13 +76,24 @@
   padding: 20rpx 30rpx;
   display: flex;
   align-items: center;
+  overflow: hidden;
+}
+
+.section-background {
+  position: absolute;
+  top: 0rpx;
+  left: 0;
+  width: 35%;
+  height: 35%;
+  z-index: 0;
 }
 
 .water-drop {
-  width: 200rpx;
+  width: 188rpx;
   position: absolute;
-  left: -30rpx; 
-  bottom: 0rpx;
+  left: -30rpx;
+  bottom: 40rpx; 
+  z-index: 1;
 }
 
 .amount-display {
@@ -95,15 +104,14 @@
 }
 
 .total-amount {
-  font-size: 60rpx;
-  color: #ff3b30;
+  font-size: 80rpx;
+  color: rgba(239, 93, 93, 1);
   font-weight: bold;
-  margin-bottom: 10rpx;
 }
 
 .amount-label {
-  font-size: 24rpx;
-  color: #666;
+  font-size: 32rpx;
+  color: rgba(104, 108, 128, 1);
   margin-bottom: 30rpx;
 }
 
@@ -120,13 +128,12 @@
 
 .detail-item .number {
   display: block;
-  font-size: 32rpx;
-  color: #333;
-  margin-bottom: 10rpx;
+  font-size: 48rpx;
+  color: rgba(63, 65, 76, 1);
 }
 
 .detail-item .number.blue {
-  color: #0080ff;
+  color: rgba(46, 125, 253, 1);
 }
 
 .detail-item .label {
@@ -176,13 +183,13 @@
 }
 
 .function-item image {
-  width: 80rpx;
-  height: 80rpx;
+  width: 64rpx;
+  height: 64rpx;
   margin-bottom: 10rpx;
 }
 
 .function-item text {
-  font-size: 24rpx;
+  font-size: 28rpx;
   color: #333;
 }
 
@@ -256,9 +263,10 @@
 /* 票据式分割线 */
 .card-divider {
   position: relative;
-  border-top: 0rpx dashed #CCCCCC;
   margin: 0 15rpx;
-  background-color: transparent;
+  border: 2rpx dashed rgba(229, 229, 229, 1);
+  background-color: white;
+  z-index: 1;
 }
 
 /* 左侧半圆挖孔 */

+ 2 - 1
pages/huhaobangding/huhaobangding.js

@@ -247,7 +247,8 @@ Page({
           app.globalData.currentAccountInfo=apiReturnData.data[0];
           setTimeout(function(){
             app.globalData.refresh=1;
-            wx.switchTab({
+            // 使用重定向而不是switchTab,确保homepage完全重新加载
+            wx.reLaunch({
               url: '/pages/homepage/homepage',
             });
           },2000)

+ 4 - 2
pages/huhaobangding/huhaobangding.wxml

@@ -6,7 +6,9 @@
     <view class="nav-title">户号绑定</view> -->
   <!-- </view>   -->
   <view class="custom-nav">
-    <view class="fixed-back" bindtap="goBack">←</view>
+    <view bindtap="goBack">
+      <image src="/static_file/backcion.png" mode="aspectFit" class="back-icon"></image>
+    </view>
     <view class="nav-title">户号绑定</view>
   </view>
 
@@ -60,7 +62,7 @@
       <view class="custom-group">
         <view class="custom-input">
           <input type="text" placeholder="请输入标签名称" bindinput="onTagInput" value="{{customTag}}" />
-          <view class="char-limit {{tagLength > 4 ? 'error' : ''}}">{{tagLength}}/4</view>
+          <view class="char-limit {{tagLength > 4 ? 'error' : ''}}">{{tagLength}}/4</view>
         </view>
       </view>
     </block>

+ 46 - 30
pages/huhaobangding/huhaobangding.wxss

@@ -6,13 +6,15 @@
   flex-direction: column;
   box-sizing: border-box;
   padding-top: 230rpx;
+  padding-left: 24rpx;
+  padding-right: 24rpx;
 }
 .custom-nav {
   background-color: rgba(46, 130, 255, 1);
   display: flex;
   align-items: center;
   height: 90rpx;
-  margin-bottom: 20rpx;
+  margin-bottom: 24rpx;
   position: fixed;
   top: 0;
   left: 0;
@@ -22,10 +24,10 @@
   padding-top: 88rpx; /* 适配iPhone状态栏,44px转换为88rpx */
 }
 
-.fixed-back {
-  font-size: 40rpx;
-  text-align: center;
-  color: #fff;
+.back-icon {
+  width: 16px;
+  height: 16px;
+  vertical-align: middle;
 }
 
 .nav-title {
@@ -38,17 +40,17 @@
 
 .form-group1 {
   background-color: #FFFFFF;
-  border-radius: 18rpx;
-  padding: 0 40rpx;
+  border-radius: 16rpx;
+  padding: 0 24rpx;
   margin-top: -35rpx;
-  margin-bottom: 20rpx;
+  margin-bottom: 24rpx;
   box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
 }
 .form-group2 {
   background-color: #FFFFFF;
-  border-radius: 18rpx;
-  padding: 0 40rpx;
-  margin-bottom: 20rpx;
+  border-radius: 16rpx;
+  padding: 0 24rpx;
+  margin-bottom: 24rpx;
   box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
 }
 
@@ -59,10 +61,6 @@
 }
 
 
-.form-item:first-child {
-  border-bottom: 1rpx solid #EEEEEE;
-}
-
 .label {
   width: 120rpx;
   color: #2e3038;
@@ -102,8 +100,8 @@ input {
 
 .group-select {
   background-color: #FFFFFF;
-  border-radius: 18rpx;
-  padding: 0 40rpx;
+  border-radius: 16rpx;
+  padding: 0 24rpx;
   padding-top: 20rpx;
   margin-bottom: 30rpx;
   position: relative;
@@ -132,20 +130,32 @@ input {
 
 .tag-group {
   display: flex;
-  flex-wrap: wrap;
-  gap: 6rpx;
-  padding: 34rpx 0;
+  flex-wrap: nowrap;
+  justify-content: space-between;
   overflow-x: auto;
   white-space: nowrap;
+  width: 100%;
+  padding: 20rpx 0;
+  -webkit-overflow-scrolling: touch;
 }
 
 .tag {
-  padding: 12rpx 24rpx;
-  background-color: #F5F5F5;
-  border-radius: 8rpx;
+  display: inline-block;
+  flex: 1;
+  flex-shrink: 0;
+  min-width: calc((100% - 60rpx) / 6);
+  margin-right: 10rpx;
+  padding: 12rpx 10rpx;
+  background-color: rgba(242, 245, 250, 1);
+  border-radius: 4rpx;
   font-size: 26rpx;
   color: rgba(0, 0, 0, 1);
-  display: inline-block;
+  text-align: center;
+  box-sizing: border-box;
+}
+
+.tag:last-child {
+  margin-right: 0;
 }
 
 .tag.active {
@@ -165,8 +175,8 @@ input {
 .custom-input {
   display: flex;
   align-items: center;
-  background-color: #F5F5F5;
-  border-radius: 8rpx;
+  background-color: rgba(242, 245, 250, 1);
+  border-radius: 4rpx;
   padding: 24rpx;
   margin: 0;
 }
@@ -187,8 +197,8 @@ input {
 }
 
 .submit-btn button {
-  background-color: #0066FF;
-  color: #FFFFFF;
+  background-color: rgba(46, 130, 255, 1);
+  color: rgba(255, 255, 255, 1);
   font-size: 36rpx;
   border-radius: 44rpx;
   width: 100%;
@@ -197,14 +207,15 @@ input {
 }
 
 .tips {
+  position: fixed;
+  bottom: 100rpx; 
   padding: 0 30rpx;
-  margin-top: 0;
 }
 
 .tips text {
   display: block;
   font-size: 28rpx;
-  color: #999999;
+  color: rgba(163, 163, 163, 1);
   line-height: 1.8;
   margin-bottom: 10rpx;
 }
@@ -582,4 +593,9 @@ input {
     margin-left: 0;
     margin-top: 10rpx;
   }
+}
+
+/* 隐藏滚动条但保留功能(可选) */
+.tag-group::-webkit-scrollbar {
+  display: none;
 }

BIN
static_file/kapiantubiao.png