homepage.wxml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <view class="container1">
  2. <!-- 顶部背景和Logo -->
  3. <view class="header">
  4. <image class="background" src="{{images.background}}" mode="widthFix" />
  5. <image class="logo" src="{{images.logo}}" mode="aspectFit" />
  6. <view class="address-container" bindtap="showAddressPopup" data-address="{{enterPriseAddress}}">
  7. <image src="/static_file/location.png" class="address-icon"></image>
  8. <text class="address-text">{{enterPriseAddress}}</text>
  9. </view>
  10. </view>
  11. <!-- 卡片区域 -->
  12. <view class="cards-container">
  13. <!-- 用户信息卡片 -->
  14. <view class="user-card">
  15. <view class="user-info-section">
  16. <view class="info-row">
  17. <text class="label">户名</text>
  18. <text class="value">{{userInfo.name}}</text>
  19. <view class="switch-btn" bindtap="handleSwitchMeter">切换户号</view>
  20. </view>
  21. <view class="info-row">
  22. <text class="label">户号</text>
  23. <text class="value">{{userInfo.accountNumber}}</text>
  24. </view>
  25. <view class="info-row address-row">
  26. <text class="label">住址</text>
  27. <text class="value address-value">{{userInfo.address}}</text>
  28. </view>
  29. <!-- 通知轮播区域 -->
  30. <view class="notice-bar" wx:if="{{noticeList && noticeList.length > 0}}">
  31. <view class="notice-icon">
  32. <image src="/static_file/speaker.png" mode="aspectFit"></image>
  33. </view>
  34. <view class="notice-swiper-container">
  35. <view class="notice-content {{isScrolling ? 'scrolling' : ''}}" bindanimationend="onScrollComplete" bindtap="goToNoticeDetail" style="animation-duration: {{scrollDuration}}s;">
  36. <text class="notice-title">{{noticeList[currentIndex].noticetitle}}:</text>
  37. <text>{{noticeList[currentIndex].scrollingcontent}}</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 票据式分割线 -->
  44. <view class="card-divider"></view>
  45. <!-- 水费金额信息卡片 -->
  46. <view class="amount-card">
  47. <!-- 添加背景图片 -->
  48. <image class="section-background" src="{{images.kapiantubiao}}" mode="aspectFill"></image>
  49. <!-- 水费金额信息 -->
  50. <view class="amount-section">
  51. <!-- 中间金额显示 -->
  52. <view class="amount-display">
  53. <view class="total-amount">{{billInfo.totalAmount}}</view>
  54. <view class="amount-label">总计应缴(元)</view>
  55. <view class="amount-details">
  56. <view class="detail-item">
  57. <text class="number">{{billInfo.waterUsage}}</text>
  58. <text class="label">用水量(m³)</text>
  59. </view>
  60. <!-- 添加分隔线 -->
  61. <view class="detail-divider"></view>
  62. <view class="detail-item">
  63. <text class="number blue">{{billInfo.balance}}</text>
  64. <text class="label">账户余额(元)</text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 充值缴费按钮 -->
  70. <button class="pay-btn" hover-class="pay-btn-hover" hover-stay-time="100" bindtap="goToPayment">立即缴费</button>
  71. </view>
  72. </view>
  73. <!-- 功能按钮区域 -->
  74. <view class="function-area">
  75. <view class="function-grid">
  76. <view class="function-item" wx:for="{{functionList}}" wx:key="text" bindtap="handleFunctionClick" data-index="{{index}}">
  77. <image src="{{item.icon}}" mode="aspectFit"></image>
  78. <view class="notice-badge {{unreadCount > 99 ? 'notice-badge-large' : ''}}" wx:if="{{item.text === '消息通知' && unreadCount > 0}}">{{unreadCount > 99 ? '99+' : unreadCount}}</view>
  79. <text>{{item.text}}</text>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 活动区域 -->
  84. <view class="activity-area">
  85. <view class="area-header">
  86. <text class="title">精选活动</text>
  87. <text class="more" bindtap="handleMoreActivity">更多 ></text>
  88. </view>
  89. <view class="activity-item">
  90. <image class="activity-image" src="{{activity.imageUrl}}" mode="aspectFill"></image>
  91. </view>
  92. </view>
  93. </view>