浏览代码

Merge branch 'master' of /Users/qaqchen/WxProjects/zhsw_wechat with conflicts.

QAQ 陈 5 月之前
父节点
当前提交
827aeaa895

二进制
.DS_Store


+ 11 - 10
app.js

@@ -15,16 +15,17 @@ App({
   },
   globalData: {
     userInfo: null,
-    pictures:{
-      background:'/static_file/background.png',
-      logo:'/static_file/logo.png',
-      phone:'/static_file/phone.png',
-      water:'/static_file/water.png',
-      tzd:'/static_file/tzd.png',
-      hh:'/static_file/hh.png',
-      card:'/static_file/card.png',
-      location:'/static_file/location.png',
-      location:'/static_file/yl.png',
+    // 统一管理图片路径
+    images: {
+      logo: '/static_file/logo.png',
+      background: '/static_file/backgorund.png',
+      card: '/static_file/crad.png',
+      tabBar: {
+        home: '/static_file/homepage.png',
+        homeActive: '/static_file/homepageCheck.png',
+        profile: '/static_file/personalCenter.png',
+        profileActive: '/static_file/personalCenterCheck.png'
+      }
     }
   }
 })

+ 14 - 15
app.json

@@ -1,33 +1,32 @@
 {
   "pages": [
     "pages/homepage/homepage",
-    "pages/mine/mine"
+    "pages/profile/profile"
   ],
   "tabBar": {
-    "color": "#2E3038",
-    "selectedColor": "#2E3038",
-    "position": "bottom",
-    "borderStyle":"black",
+    "color": "rgba(182, 189, 205, 1)",
+    "selectedColor": "rgba(46, 48, 56, 1)",
+    "backgroundColor": "#ffffff",
     "list": [
       {
-        "selectedIconPath": "static_file/homepageCheck.png",
-        "iconPath": "static_file/homepage.png",
         "pagePath": "pages/homepage/homepage",
-        "text": "首页"
+        "text": "首页",
+        "iconPath": "static_file/homepage.png",
+        "selectedIconPath": "static_file/homepageCheck.png"
       },
       {
-        "selectedIconPath": "static_file/personalCenterCheck.png",
+        "pagePath": "pages/profile/profile",
+        "text": "我的",
         "iconPath": "static_file/personalCenter.png",
-        "pagePath": "pages/mine/mine",
-        "text": "我的"
+        "selectedIconPath": "static_file/personalCenterCheck.png"
       }
     ]
   },
   "window": {
     "backgroundTextStyle": "light",
-    "navigationBarTextStyle": "white",
-    "navigationBarTitleText": "智水务",
-    "navigationBarBackgroundColor": "#07f"
+    "navigationBarBackgroundColor": "#4080FF",
+    "navigationBarTitleText": "智水务",
+    "navigationBarTextStyle": "white"
   },
   "componentFramework": "glass-easel",
   "sitemapLocation": "sitemap.json",
@@ -35,4 +34,4 @@
   "usingComponents": {
     "t-button": "tdesign-miniprogram/button/button"
   }
-}
+}

+ 36 - 2
pages/homepage/homepage.js

@@ -1,18 +1,37 @@
 // pages/homepage/homepage.js
+const app = getApp()
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-
+    maxBindCount: 5,
+    notices: [
+      '部分小区水费由物业代收,请联系小区物业进行咨询缴费操作。',
+      '户号绑定: 在绑定页面手动查询,输入地址关键词信息。',
+      '每个微信用户最多绑定5个户号。'
+    ],
+    images: {
+      logo: '',
+      background: '',
+      card: ''
+    }
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-
+    // 页面加载时获取图片路径
+    this.setData({
+      images: {
+        logo: app.globalData.images.logo,
+        background: app.globalData.images.background,
+        card: app.globalData.images.card
+      }
+    })
   },
 
   /**
@@ -62,5 +81,20 @@ Page({
    */
   onShareAppMessage() {
 
+  },
+
+  bindAccount() {
+    wx.navigateTo({
+      url: '/pages/bind/bind'
+    })
+  },
+
+  switchTab(e) {
+    const page = e.currentTarget.dataset.page
+    if (page === 'profile') {
+      wx.switchTab({
+        url: '/pages/profile/profile'
+      })
+    }
   }
 })

+ 2 - 1
pages/homepage/homepage.json

@@ -1,3 +1,4 @@
 {
-  "usingComponents": {}
+  "usingComponents": {},
+  "navigationStyle": "custom"
 }

+ 18 - 41
pages/homepage/homepage.wxml

@@ -1,47 +1,24 @@
-<!--index.wxml-->
 <view class="container">
-  <view class="main-banner">
-    <image src="{{pagePics.mainBanner}}" mode="aspectFit" class="main-banner-image"></image>
+  <!-- 顶部背景和Logo -->
+  <view class="header">
+    <image class="background" src="{{images.background}}" mode="widthFix" />
+    <image class="logo" src="{{images.logo}}" mode="aspectFit" />
   </view>
-  <!-- 核心功能 账单缴费/充值 -->
-  <view class="payment-card">
-    <view class="index-waterRate-wrapper">
-      <image src="{{pagePics.payment.x3}}" 
-      mode="aspectFit" class="payment-card-icon" bindtap="doPayment"></image>
-      <view class="payment-card-text" bindtap="doPayment">我要缴费</view>
-    </view>
-    <view class="index-property-wrapper">
-      <image src="{{pagePics.precharge.x3}}" 
-      mode="aspectFit" class="payment-card-icon" bindtap="doPrecharge"></image>
-      <view class="payment-card-text" bindtap="doPrecharge">我要充值</view>
-    </view>
-  </view>
-  <!-- 次级功能 缴费记录、充值记录、户号绑定/解绑、用户反馈 -->
-  <view class="function-card">
-    <view class="function-card-title">
-      我的服务
-    </view>
-    <view class="function-item-wrapper clearfix">
-      <view class="function-item" wx:for="{{ functionItems }}" wx:key="item" 
-      data-hi="{{ item }}" bindtap="doService">
-        <image class="function-item-icon" src="{{item.iconSrc}}" mode="aspectFit"></image>
-        <view class="function-item-text">{{item.text}}</view>
-      </view>
+
+  <!-- 欢迎卡片 -->
+  <view class="welcome-card">
+    <image class="card-bg" src="{{images.card}}" mode="aspectFill" />
+    <view class="card-content">
+      <view class="title">欢迎使用智慧水务</view>
+      <view class="subtitle">润/泽/千/家/万/户</view>
+      <button class="bind-button" bindtap="bindAccount">户号绑定</button>
     </view>
   </view>
-    <view class="rw-info-msg-wrapper info-msg-wrapper">
-    <view class="index-ad-wrapper">
-    <view class="ad-text">
-    好消息!云锡广元应急生产支援疫情防控,75%酒精消毒液9元/500ml。老虎山酒业个旧、蒙自直营店,市区各广元物管小区办公室均可购买!
-    </view>
-    <view class="ad-addr">
-    联系人:李经理,电话:13508830190
-    </view>
-    </view>
-    <view class="rw-info-msg-title">温馨提示:</view>
-    <view class="rw-info-msg-text">1、部分小区水费由物业代收,那么只需要做物业绑定就可以了。具体情况请咨询现场工作人员。
-    </view>
-    <view class="rw-info-msg-text">2、缴费与充值记录显示可能有5-10分钟的延迟,如果没有记录可稍后再查询
+
+  <!-- 通知列表 -->
+  <view class="notice-list">
+    <view class="notice-item" wx:for="{{notices}}" wx:key="index">
+      {{index + 1}}、{{item}}
     </view>
   </view>
-</view>
+</view>

+ 121 - 1
pages/homepage/homepage.wxss

@@ -1 +1,121 @@
-/* pages/homepage/homepage.wxss */
+/* pages/homepage/homepage.wxss */
+.container {
+  min-height: 100vh;
+  background-color: #f5f7fa;
+  padding-bottom: 120rpx;
+}
+
+.header {
+  position: relative;
+  width: 100%;
+  height: 320rpx;
+  margin-top: -32rpx;
+}
+
+.background {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+}
+
+
+.logo {
+  position: absolute;
+  left: 32rpx;
+  bottom: 80rpx;
+  width: 280rpx;
+  height: 90rpx;
+  z-index: 2;
+}
+
+.welcome-card {
+  position: relative;
+  margin: -60rpx 32rpx 0;
+  border-radius: 16rpx;
+  overflow: hidden;
+  background: #fff;
+}
+
+.card-bg {
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  width: 160rpx;
+  height: 160rpx;
+  opacity: 0.8;
+  z-index: 1;
+}
+
+.card-content {
+  position: relative;
+  padding: 40rpx 32rpx;
+  z-index: 2;
+}
+
+.title {
+  font-size: 36rpx;
+  font-weight: 500;
+  color: #333;
+  margin-bottom: 12rpx;
+}
+
+.subtitle {
+  font-size: 26rpx;
+  color: #999;
+  margin-bottom: 32rpx;
+  letter-spacing: 4rpx;
+}
+
+.bind-button {
+  width: 200rpx !important;
+  height: 80rpx;
+  line-height: 80rpx;
+  background: #4080FF;
+  color: #fff;
+  font-size: 30rpx;
+  border-radius: 40rpx;
+  padding: 0;
+}
+
+.bind-button::after {
+  border: none;
+}
+
+.notice-list {
+  margin: 32rpx;
+  color: #666;
+}
+
+.notice-item {
+  font-size: 26rpx;
+  line-height: 1.8;
+  margin-bottom: 16rpx;
+  color: #999;
+}
+
+.tab-bar {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  height: 100rpx;
+  background: #fff;
+  display: flex;
+  padding-bottom: env(safe-area-inset-bottom);
+  border-top: 1rpx solid #eee;
+}
+
+.tab-item {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  font-size: 24rpx;
+  color: #999;
+}
+
+.tab-item.active {
+  color: #4080FF;
+}

+ 66 - 0
pages/profile/profile.js

@@ -0,0 +1,66 @@
+// pages/profile/profile.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/profile/profile.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/profile/profile.wxml

@@ -0,0 +1,2 @@
+<!--pages/profile/profile.wxml-->
+<text>pages/profile/profile.wxml</text>

+ 1 - 0
pages/profile/profile.wxss

@@ -0,0 +1 @@
+/* pages/profile/profile.wxss */

+ 15 - 2
project.config.json

@@ -17,12 +17,25 @@
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
-    }
+    },
+    "compileWorklet": false,
+    "uglifyFileName": false,
+    "uploadWithSourceMap": true,
+    "packNpmManually": false,
+    "minifyWXSS": true,
+    "minifyWXML": true,
+    "localPlugins": false,
+    "disableUseStrict": false,
+    "useCompilerPlugins": false,
+    "condition": false,
+    "swc": false,
+    "disableSWC": true
   },
   "condition": {},
   "editorSetting": {
     "tabIndent": "auto",
     "tabSize": 2
   },
-  "appid": "wx021dffc1b1a5de18"
+  "appid": "wx021dffc1b1a5de18",
+  "simulatorPluginLibVersion": {}
 }

+ 18 - 2
project.private.config.json

@@ -2,7 +2,23 @@
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "projectname": "zhsw_wechat",
   "setting": {
-    "compileHotReLoad": true
+    "compileHotReLoad": true,
+    "urlCheck": true,
+    "coverView": true,
+    "lazyloadPlaceholderEnable": false,
+    "skylineRenderEnable": false,
+    "preloadBackgroundData": false,
+    "autoAudits": false,
+    "useApiHook": true,
+    "useApiHostProcess": true,
+    "showShadowRootInWxmlPanel": true,
+    "useStaticServer": false,
+    "useLanDebug": false,
+    "showES6CompileOption": false,
+    "checkInvalidKey": true,
+    "ignoreDevUnusedFiles": true,
+    "bigPackageSizeSupport": false
   },
-  "libVersion": "trial"
+  "libVersion": "3.7.9",
+  "condition": {}
 }

二进制
static_file/.DS_Store


二进制
static_file/1.png


二进制
static_file/backgorund.png


二进制
static_file/crad.png


二进制
static_file/logo.png