From edd35a251b58b1fad17015deda92324f74458434 Mon Sep 17 00:00:00 2001
From: unknown <unknown@example.com>
Date: 星期三, 17 八月 2022 00:05:30 +0800
Subject: [PATCH] 台账模块、智能咨询模块

---
 pages/module_consult/consultproblem/consultproblem.wxml        |   32 
 pages/icons/icons.wxml                                         |   30 
 pages/module_consult/consulthome/consulthome.wxss              |    3 
 res/icons/tab_1_select.png                                     |    0 
 res/icons/tab_4.png                                            |    0 
 service/ledgerservice.js                                       |   16 
 component/toptips/toptips.wxss                                 |    2 
 res/icons/notice.png                                           |    0 
 res/icons/tab_2.png                                            |    0 
 pages/module_consult/consultonline/consultonline.wxss          |  118 ++
 pages/module_ledger/ledgerhistory/ledgerhistory.js             |  202 +++++
 pages/module_consult/consultproblem/consultproblem.js          |  111 ++
 pages/module_consult/consultsearch/consultsearch.json          |    2 
 res/icons/wm_commitment.png                                    |    0 
 service/baserequest.js                                         |   19 
 res/icons/tab_5.png                                            |    0 
 pages/home/home.wxss                                           |   47 +
 pages/learn/learn.wxss                                         |    1 
 pages/module_ledger/ledgerhome/ledgerhome.wxml                 |   65 +
 res/icons/tab_1.png                                            |    0 
 res/icons/tab_4_select.png                                     |    0 
 pages/module_consult/consultdetail/consultdetail.wxml          |   15 
 pages/module_ledger/ledgerhistory/ledgerhistory.wxml           |   35 
 component/inputcell/inputcell.wxml                             |    7 
 pages/icons/icons.json                                         |    5 
 res/icons/tab_3_select.png                                     |    0 
 pages/module_user/userregistercompany/userregistercompany.wxml |    2 
 pages/notice/notice.wxml                                       |   32 
 pages/module_ledger/ledgerhome/ledgerhome.js                   |  183 +++
 pages/notice/notice.js                                         |   49 
 utils/util.js                                                  |   36 
 pages/module_ledger/ledgerhistory/ledgerhistory.json           |    5 
 res/icons/avator_sys.png                                       |    0 
 pages/module_ledger/ledgerhome/ledgerhome.json                 |    4 
 res/icons/warn.png                                             |    0 
 project.config.json                                            |    2 
 res/icons/tab_3.png                                            |    0 
 res/icons/tab_2_select.png                                     |    0 
 pages/module_consult/consultproblem/consultproblem.wxss        |   36 
 pages/home/home.js                                             |  121 ++
 pages/assessment/assessment.js                                 |    8 
 pages/icons/icons.wxss                                         |   40 +
 pages/module_consult/consultsearch/consultsearch.wxml          |    2 
 service/notificationservice.js                                 |   27 
 app.wxss                                                       |   28 
 pages/module_consult/consulthome/consulthome.wxml              |   13 
 template/nodata/nodata.wxml                                    |    6 
 pages/module_consult/consultonline/consultonline.wxml          |   22 
 pages/module_ledger/ledgerupload/ledgerupload.js               |    9 
 pages/home/home.wxml                                           |   28 
 pages/module_ledger/ledgerhome/ledgerhome.wxss                 |   70 +
 pages/module_user/userlogin/userlogin.js                       |   26 
 pages/module_consult/consultonline/consultonline.json          |    8 
 pages/module_ledger/ledgerhistory/ledgerhistory.wxss           |   82 ++
 component/inputcell/inputcell.wxss                             |    9 
 res/icons/wm_ledger.png                                        |    0 
 pages/module_consult/consultsearch/consultsearch.js            |    2 
 pages/icons/icons.js                                           |  512 ++++++++++++
 res/icons/tab_5_select.png                                     |    0 
 pages/module_user/userregistercompany/userregistercompany.js   |   41 
 app.json                                                       |    6 
 pages/notice/notice.wxss                                       |   71 +
 res/icons/nodata.png                                           |    0 
 pages/module_consult/consulthome/consulthome.js                |   44 
 pages/module_consult/consultproblem/consultproblem.json        |    6 
 res/icons/wm_assessment.png                                    |    0 
 pages/module_consult/consultonline/consultonline.js            |  111 ++
 67 files changed, 2,185 insertions(+), 166 deletions(-)

diff --git a/app.json b/app.json
index f19c5ce..9d9dbd8 100644
--- a/app.json
+++ b/app.json
@@ -21,12 +21,16 @@
     "pages/module_consult/consultsearch/consultsearch",
     "pages/module_consult/consultresult/consultresult",
     "pages/module_consult/consultdetail/consultdetail",
+    "pages/module_consult/consultonline/consultonline",
     "pages/module_ledger/ledgerhome/ledgerhome",
     "pages/module_ledger/ledgerupload/ledgerupload",
+    "pages/module_ledger/ledgerhistory/ledgerhistory",
     "pages/module_user/userloginpw/userloginpw",
     "pages/module_user/userregistertype/userregistertype",
     "pages/module_user/userregistergov/userregistergov",
-    "pages/module_user/userregistercompany/userregistercompany"
+    "pages/module_user/userregistercompany/userregistercompany",
+    "pages/module_consult/consultproblem/consultproblem",
+    "pages/icons/icons"
   ],
   "window": {
     "backgroundTextStyle": "light",
diff --git a/app.wxss b/app.wxss
index a96fbbe..9e5df28 100644
--- a/app.wxss
+++ b/app.wxss
@@ -20,6 +20,7 @@
   position: relative;
   display: flex;
   justify-content: space-between;
+  align-items: center;
 }
 
 .flex-v {
@@ -78,6 +79,33 @@
   background-color: var(--fyui-BG-COLOR-ACTIVE);
 }
 
+.no-data {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  height: 100vh;
+}
+
+.no-data image {
+  width: 30vw;
+  margin-top: 6vh;
+}
+
+.more {
+  /* background-color: aqua; */
+  font-size: 24rpx;
+  color: rgb(175, 173, 173);
+  vertical-align: middle;
+}
+
+.fyui-selector {
+  background-color: rgb(255, 255, 255);
+  border-radius: 4px;
+  font-size: 14px;
+  color: var(--fyui-primary-color);
+  padding: 2px 4px 2px 18px;
+}
+
 /********************************** 閫氱敤-end ***********************************/
 
 /********************************** 涓荤晫闈㈣儗鏅�-start ***********************************/
diff --git a/component/inputcell/inputcell.wxml b/component/inputcell/inputcell.wxml
index 61ee1f0..df6b4d1 100644
--- a/component/inputcell/inputcell.wxml
+++ b/component/inputcell/inputcell.wxml
@@ -1,14 +1,11 @@
 <view class="page">
   <view class="hr-view"></view>
   <mp-cell ext-class="ext-cell">
-    <view slot="title" class="title-cell">{{item.name}}</view>
+    <view slot="title" class="title-cell"><text class="{{item.required != false ? 'required' : 'not-required'}}">*</text>{{item.name}}</view>
     <image wx:if="{{item.src}}" slot="icon" class="header-img" src="{{item.src}}"></image>
 
     <view class="flexbox {{alignLeft?'':'flexbox-end'}}">
-      <input wx:if="{{item.input}}" type="{{item.type?item.type:'text'}}"
-        maxlength="{{item.maxLength?item.maxLength:'-1'}}" id="{{item.id?item.id:''}}"
-        placeholder-style="color:{{item.noValue?'red':'#B2B2B2'}};" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}"
-        bindinput="changeV" value="{{item.value}}" placeholder="{{item.placeholder ? item.placeholder : '璇疯緭鍏�' + item.name}} " />
+      <input wx:if="{{item.input}}" type="{{item.type?item.type:'text'}}" maxlength="{{item.maxLength?item.maxLength:'-1'}}" id="{{item.id?item.id:''}}" placeholder-style="color:{{item.noValue?'red':'#B2B2B2'}};" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}" bindinput="changeV" value="{{item.value}}" placeholder="{{item.placeholder ? item.placeholder : '璇疯緭鍏�' + item.name}} " />
       <view wx:else="{{text}}" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}">{{item.value}}</view>
       <view class="unit">{{item.unit}}</view>
     </view>
diff --git a/component/inputcell/inputcell.wxss b/component/inputcell/inputcell.wxss
index 8e0b571..b878506 100644
--- a/component/inputcell/inputcell.wxss
+++ b/component/inputcell/inputcell.wxss
@@ -18,6 +18,15 @@
   padding-right: 6px;
 }
 
+.required {
+  color: red;
+  text-align: center;
+}
+
+.not-required {
+  color: transparent;
+}
+
 .title-cell{
   white-space: nowrap;
   display: inline-block;
diff --git a/component/toptips/toptips.wxss b/component/toptips/toptips.wxss
index d190822..f831235 100644
--- a/component/toptips/toptips.wxss
+++ b/component/toptips/toptips.wxss
@@ -5,7 +5,7 @@
 .weui-toptips_show {
   -webkit-transform: translateZ(0) translateY(0);
   transform: translateZ(0) translateY(0);
-  opacity: 0.7
+  /* opacity: 0.7 */
 }
 
 .weui-toptips_success {
diff --git a/pages/assessment/assessment.js b/pages/assessment/assessment.js
index d9e9cfd..630854e 100644
--- a/pages/assessment/assessment.js
+++ b/pages/assessment/assessment.js
@@ -80,7 +80,7 @@
     planYear: "2000",
     maxYear: "2000",
     //褰撳墠鐨勮瘎鍒嗗懆鏈�
-    thisPeiod: '2000/1-1',
+    thisPeriod: '2000/1-1',
     //璇勪及鍘嗗彶
     historys: []
   },
@@ -149,7 +149,7 @@
     this.setData({
       planYear: `${year}骞碻,
       maxYear: year,
-      thisPeiod: period,
+      thisPeriod: period,
       deadline: deadline
     })
   },
@@ -174,7 +174,7 @@
         let lastOne = data[0]
         let date = moment(lastOne.updateDate)
         let period = `${date.year()}/${date.month()+1}-${date.month()+1}`
-        if (period == that.data.thisPeiod) {
+        if (period == that.data.thisPeriod) {
           that.setData({
             score: lastOne.totalPoint,
             text1: "寰堟!",
@@ -240,7 +240,7 @@
       case "0":
         //鍘绘祴璇勬垨鑰呮煡鐪嬭鎯�
         if (this.data.score) {
-          url = `/pages/gradereport/gradereport?period=${this.data.thisPeiod}`
+          url = `/pages/gradereport/gradereport?period=${this.data.thisPeriod}`
         } else {
           url = `/pages/grade/grade?record=false`
         }
diff --git a/pages/home/home.js b/pages/home/home.js
index d77d1db..3211b13 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -1,7 +1,10 @@
 // pages/home/home.js
 const userservice = require("../../service/userservice")
+const notificationservice = require("../../service/notificationservice")
 const assessmentService = require("../../service/assessmentservice")
 const lawservice = require("../../service/lawservice")
+const promiseservice = require("../../service/promiseservice")
+const ledgerservice = require("../../service/ledgerservice")
 const moment = require('../../utils/moment.min')
 const app = getApp()
 /**
@@ -13,10 +16,7 @@
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
-    notices: [{
-      notice: "鏈湀瀹堟硶鎵胯鑷祴鏅鸿瘎宸插紑鍚紝璇峰強鏃惰繘琛岃瘎浠�",
-      time: "2022/3/1"
-    }],
+    notices: [],
 
     dynamic: [{
       title: "浼佷笟钀ヤ笟鎵х収銆侀鍝佺粡钀ヨ鍙瘉涓㈠け璇ュ浣曡ˉ棰�",
@@ -34,9 +34,21 @@
       score: '--',
       rank: '--',
       legalIndex: '--',
-      illegalIndex: '--'
+      illegalIndex: '--',
+      period: ''
     },
-    period: ''
+    //鍙拌处瀹屾垚鎯呭喌
+    ledgerInfo: {
+      //蹇呭~椤规�绘暟
+      totalMust: 0,
+      //蹇呭~椤规彁浜ゆ暟
+      finishedMust: 0,
+    },
+    //鎵胯瀹屾垚鎯呭喌
+    promsieInfo: {
+      leftDays: 0
+    }
+
   },
 
   /**
@@ -57,6 +69,8 @@
     this.getUserInfo()
     this.getHistoryPoint()
     this.getNews()
+    this.getCommitment()
+    this.getLedgerType()
   },
 
   getNextEvaluationTime() {
@@ -73,11 +87,21 @@
   },
 
   getNotice() {
-    this.setData({
-      notices: [{
-        notice: "鏈湀瀹堟硶鎵胯鑷祴鏅鸿瘎宸插紑鍚紝璇峰強鏃惰繘琛岃瘎浠�",
-        time: "2022/5/9"
-      }]
+    var that = this
+    notificationservice.getNotification(app.globalData.accessToken.userId, 1, {
+      success(res) {
+        let notices = []
+        res.forEach(r => {
+          notices.push({
+            notice: r.title,
+            time: moment(r.updateTime).format('YYYY/MM/DD'),
+            isRead: r.hasRead
+          })
+          that.setData({
+            notices
+          })
+        });
+      }
     })
   },
 
@@ -85,6 +109,9 @@
     var that = this
     assessmentService.getHistoryPoint(app.globalData.accessToken.userId, 1, {
       success(data) {
+        if (data.length == 0) {
+          return
+        }
         let lastOne = data[0]
         let year = lastOne.updateDate.substring(0, 4)
         let month = lastOne.updateDate.substring(5, 7)
@@ -94,7 +121,8 @@
             score: lastOne.totalPoint,
             rank: lastOne.rank,
             legalIndex: lastOne.level,
-            illegalIndex: lastOne.level
+            illegalIndex: lastOne.level,
+            period: lastOne.period
           }
         })
       }
@@ -125,6 +153,57 @@
   },
 
   /**
+   * 鑾峰彇鎵胯鍘嗗彶璁板綍
+   */
+  getCommitment() {
+    var that = this
+    promiseservice.getCommitment(app.globalData.accessToken.userId, {
+      success(data) {
+        if (data.length > 0) {
+          let c = data[0]
+          let cTime = moment(c.cmCreateTime)
+          let leftDays = cTime.add(1, 'years').diff(moment(), 'days')
+          that.setData({
+            promise: {
+              leftDays: leftDays
+            }
+          })
+        }
+      }
+    })
+  },
+
+  getLedgerType() {
+    var that = this
+    var time = moment().format('YYYY-MM-DD')
+    ledgerservice.getLedgerSummary(app.globalData.accessToken.userId, app.globalData.userInfo.extension2, time, {
+      success(res) {
+        that.parseLedgerType(res)
+      }
+    })
+  },
+
+  parseLedgerType(subtypes) {
+    let monthInfo = {
+      totalMust: 0,
+      finishedMust: 0,
+    }
+    subtypes.forEach(s => {
+      //鏈堝害缁熻
+      if (s.needUpdate) {
+        monthInfo.totalMust++
+        if (s.upLoad) {
+          monthInfo.finishedMust++
+        }
+      }
+    });
+
+    monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
+
+    this.setData({monthInfo})
+  },
+
+  /**
    * 椤甸潰璺宠浆
    */
   goto: function (e) {
@@ -133,7 +212,17 @@
     switch (index) {
       case "0":
         //娴嬭瘎鍘嗗彶璁板綍
-        url = ""
+        url = `/pages/gradereport/gradereport?period=${this.data.historyPoint.period}`
+        break;
+      case "5":
+        wx.switchTab({
+          url: '/pages/module_ledger/ledgerhome/ledgerhome',
+        })
+        return;
+      case "6":
+        wx.switchTab({
+          url: '/pages/promise/promise',
+        })
         break;
       case "1":
         //宸ヤ綔鎻愰啋
@@ -145,9 +234,7 @@
         break;
       case "3":
         //鍦ㄧ嚎瀹堟硶瀛︿範
-        
         url = `/pages/learn/learn`
-        
         break;
       case "4":
         //瀹堟硶鍔ㄦ��
@@ -168,14 +255,12 @@
               success: function (res) {
                 console.log('鎵撳紑鏂囨。鎴愬姛')
               },
-              fail (error) {
+              fail(error) {
                 console.log(error);
               }
             })
           }
         })
-        break;
-      case "5":
         break;
     }
     if (url != "") {
diff --git a/pages/home/home.wxml b/pages/home/home.wxml
index ac3f111..a91fd27 100644
--- a/pages/home/home.wxml
+++ b/pages/home/home.wxml
@@ -3,8 +3,8 @@
   <cp-notice msg="鎻愰珮娴嬭瘎寰楀垎灏忔妧宸ф潵浜嗭紝蹇偣瀛︿範鍝�" />
   <view class="page__hd">
     <view class="page__title">{{userRealName}}</view>
-    <view class="page__desc">涓嬫娴嬭瘎鏃堕棿{{nextEvaluationTime}}</view>
-    <view class="top-card" bindtap="goto" data-index="0">
+    <!-- <view class="page__desc">涓嬫娴嬭瘎鏃堕棿{{nextEvaluationTime}}</view> -->
+    <!-- <view class="top-card" bindtap="goto" data-index="0">
       <view class="top-card__time">{{historyPoint.time}}</view>
       <view class="top-card__score">{{historyPoint.score}}鍒� ></view>
       <view class="top-card__items">
@@ -21,6 +21,26 @@
           <text>{{historyPoint.illegalIndex}}</text>
         </view>
       </view>
+    </view> -->
+    <view class="flex-h">
+      <view class="top-card" bindtap="goto" data-index="0">
+        <view class="top-card__score"><text class="top-card__num">{{historyPoint.score}}</text>鍒�</view>
+        <view class="top-card__time">鑷祴鏅鸿瘎寰楀垎 ></view>
+        <view class="top-card__tag">鐐瑰嚮鏌ョ湅鏈湡鑷祴鏅鸿瘎鎯呭喌</view>
+        <image src="/res/icons/wm_assessment.png"></image>
+      </view>
+      <view class="top-card" bindtap="goto" data-index="5">
+        <view class="top-card__score"><text class="top-card__num">{{monthInfo.percent}}</text>%</view>
+        <view class="top-card__time">鍙拌处瀹屾垚鐜� ></view>
+        <view class="top-card__tag">鐐瑰嚮鏌ョ湅鏈湡鍙拌处涓婁紶鎯呭喌</view>
+        <image src="/res/icons/wm_ledger.png"></image>
+      </view>
+      <view class="top-card" bindtap="goto" data-index="6">
+        <view class="top-card__score">鍓╀綑<text class="top-card__num">{{promsieInfo.leftDays}}</text>澶�</view>
+        <view class="top-card__time">鎵胯鏈夋晥鍊掕鏃� ></view>
+        <view class="top-card__tag">鐐瑰嚮鏌ョ湅鏈湡鎵胯瀹屾垚鎯呭喌</view>
+        <image src="/res/icons/wm_commitment.png"></image>
+      </view>
     </view>
   </view>
   <view class="page__bd">
@@ -35,7 +55,7 @@
       <view wx:for="{{notices}}" wx:key="index" data-index="index" wx:item="item">
         <view class="fyui-cell">
           <view class="fyui-cell__hd">
-            <image src="/res/icons/tab_1_select.png" class="icon" />
+            <view class="{{item.isRead ? 'notice-read' : 'notice-not-read'}}"></view>
           </view>
           <view class="fyui-cell__bd notice">{{item.notice}}</view>
           <view class="fyui-cell__ft">{{item.time}}</view>
@@ -67,7 +87,7 @@
         <view class="fyui-cell__ft">鏌ョ湅鏇村</view>
       </view>
       <view wx:for="{{dynamic}}" wx:key="index" data-index="index" wx:item="item">
-        <view class="fyui-box"  bindtap="goto" data-index="4" data-url="{{item.url}}" data-filetype="{{item.fileType}}">
+        <view class="fyui-box" bindtap="goto" data-index="4" data-url="{{item.url}}" data-filetype="{{item.fileType}}">
           <view class="fyui-box__bd">
             <view class="fyui-box__content">{{item.title}}</view>
             <view class="fyui-box__tag">
diff --git a/pages/home/home.wxss b/pages/home/home.wxss
index 0b03eb2..b3ed0bd 100644
--- a/pages/home/home.wxss
+++ b/pages/home/home.wxss
@@ -4,24 +4,45 @@
 }
 
 .top-card {
+  position: relative;
   border-radius: 4px;
-  background: linear-gradient(to bottom right, #a5f5e9, #62EAD2);
+  background-color: #5bf0d6;
+  /* background: linear-gradient(to bottom right, #a5f5e9, #62EAD2); */
   color: white;
   padding: 8px;
-  text-shadow: 1px 1px rgb(0, 0, 0, 0.4);
+  width: 26vw;
+  /* text-shadow: 1px 1px rgb(0, 0, 0, 0.4); */
+}
+
+.top-card>image{
+  width: 13vw;
+  height: 14vw;
+  position: absolute;
+  bottom: -2px;
+  right: -2px;
 }
 
 .top-card .top-card__time {
-  text-align: end;
+  /* text-align: end; */
   font-size: 12px;
   color: #ffffffde;
 }
 
 .top-card .top-card__score {
-  font-size: 26px;
+  font-size: 12px;
+  /* text-align: center; */
+  /* margin: 16px; */
+}
+
+.top-card .top-card__num {
+  font-size: 20px;
   font-weight: 600;
-  text-align: center;
-  margin: 16px;
+}
+
+.top-card .top-card__tag{
+  font-size: 10px;
+  width: 12vw;
+  color: #ffffff5e;
 }
 
 .top-card .top-card__items {
@@ -51,6 +72,20 @@
   background-color: var(--fyui-text-color_2);
 }
 
+.notice-read {
+  width: 12px;
+  height: 12px;
+  background-color: #CECECE;
+  border-radius: 50%;
+}
+
+.notice-not-read {
+  width: 12px;
+  height: 12px;
+  background-color: red;
+  border-radius: 50%;
+}
+
 .notice {
   color: var(--fyui-text-color_2);
   font-size: 12px;
diff --git a/pages/icons/icons.js b/pages/icons/icons.js
new file mode 100644
index 0000000..ffe7566
--- /dev/null
+++ b/pages/icons/icons.js
@@ -0,0 +1,512 @@
+
+const colorLight = 'rgba(0, 0, 0, .9)'
+const colorDark = 'rgba(255, 255, 255, .8)'
+
+Page({
+    data: {
+        iconList: [
+            {
+                icon: 'add-friends',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'add',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'add2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'album',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'arrow',
+                color: colorLight,
+                size: 12,
+                name: ''
+            },
+            {
+                icon: 'at',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'back',
+                color: colorLight,
+                size: 12,
+                name: ''
+            },
+            {
+                icon: 'back2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'bellring-off',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'bellring-on',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'camera',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'cellphone',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'clip',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'close',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'close2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'comment',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'contacts',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'copy',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'delete-on',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'delete',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'discover',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'display',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'done',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'done2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'download',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'email',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'error',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'eyes-off',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'eyes-on',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'folder',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'group-detail',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'help',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'home',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'imac',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'info',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'keyboard',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'like',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'link',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'location',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'lock',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'max-window',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'me',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'mike',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'mike2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'mobile-contacts',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'more',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'more2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'mosaic',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'music-off',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'music',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'note',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'pad',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'pause',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'pencil',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'photo-wall',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'play',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'play2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'previous',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'previous2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'qr-code',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'refresh',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'report-problem',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'search',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'sending',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'setting',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'share',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'shop',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'star',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'sticker',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'tag',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'text',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'time',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'transfer-text',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'transfer2',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'translate',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'tv',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'video-call',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'voice',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'volume-down',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'volume-off',
+                color: colorLight,
+                size: 25,
+                name: ''
+            },
+            {
+                icon: 'volume-up',
+                color: colorLight,
+                size: 25,
+                name: ''
+            }
+        ]
+    },
+    onLoad() {
+        this.setIconColor(this.data.theme)
+
+        const app = getApp()
+        app.watchThemeChange && app.watchThemeChange(this.setIconColor)
+    },
+    setIconColor(theme) {
+        const color = theme === 'dark' ? colorDark : colorLight
+
+        this.setData({
+            iconList: this.data.iconList.map((icon) => {
+                icon.color = color
+                return icon
+            })
+        })
+    }
+})
diff --git a/pages/icons/icons.json b/pages/icons/icons.json
new file mode 100644
index 0000000..6b5f028
--- /dev/null
+++ b/pages/icons/icons.json
@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "mp-icon": "/component/icon/icon"
+  }
+}
\ No newline at end of file
diff --git a/pages/icons/icons.wxml b/pages/icons/icons.wxml
new file mode 100644
index 0000000..0fd504a
--- /dev/null
+++ b/pages/icons/icons.wxml
@@ -0,0 +1,30 @@
+<view class="page" data-weui-theme="{{theme}}">
+    <view class="page__hd">
+        <view class="page__title">Icons</view>
+        <view class="page__desc">鍥炬爣</view>
+    </view>
+    <view class="page__bd">
+        <view class="icon-box">
+            <view class="icon-box__title">鎻忚竟鍨�</view>
+            <view class="weui-grids">
+                <block wx:for="{{iconList}}" wx:key="*this">
+                    <navigator url="" class="weui-grid">
+                        <mp-icon icon="{{item.icon}}" color="{{item.color}}" size="{{item.size}}"></mp-icon>
+                        <view class="weui-grid__label">{{item.icon}}</view>
+                    </navigator>
+                </block>
+            </view>
+        </view>
+        <view class="icon-box">
+            <view class="icon-box__title">濉厖鍨�</view>
+            <view class="weui-grids">
+                <block wx:for="{{iconList}}" wx:key="*this">
+                    <navigator url="" class="weui-grid">
+                        <mp-icon type="filled" icon="{{item.icon}}" color="{{item.color}}" size="{{item.size}}"></mp-icon>
+                        <view class="weui-grid__label">{{item.icon}}</view>
+                    </navigator>
+                </block>
+            </view>
+        </view>
+    </view>
+</view>
diff --git a/pages/icons/icons.wxss b/pages/icons/icons.wxss
new file mode 100644
index 0000000..140e92d
--- /dev/null
+++ b/pages/icons/icons.wxss
@@ -0,0 +1,40 @@
+
+icon{
+    margin-right: 13px;
+}
+
+.weui-grid {
+    text-align: center;
+    padding: 36px 10px;
+}
+
+.page__bd {
+    padding-left: 15px;
+    padding-right: 15px;
+    text-align: left;
+}
+.icon-box{
+    margin-bottom: 25px;
+}
+.icon-box__ctn{
+    flex-shrink: 100;
+}
+.icon-item_box {
+    display: inline-block;
+    width: 25%;
+    padding: 3px;
+    height: 80px;
+    line-height: 30px;
+    text-align: center;
+    box-sizing: border-box;
+}
+.icon-name {
+    font-size: 24rpx;
+    overflow: hidden;
+    white-space:nowrap;
+    text-overflow:ellipsis; 
+}
+.icon-box__title{
+    font-size: 18px;
+    margin: 5px 0;
+}
\ No newline at end of file
diff --git a/pages/learn/learn.wxss b/pages/learn/learn.wxss
index 1313f68..dc7aea4 100644
--- a/pages/learn/learn.wxss
+++ b/pages/learn/learn.wxss
@@ -7,7 +7,6 @@
   white-space: nowrap;
   z-index: 2;
   background-color: #65EAD2;
-  padding: 2px;
 }
 
 .swiper-tab-list{
diff --git a/pages/module_consult/consultdetail/consultdetail.wxml b/pages/module_consult/consultdetail/consultdetail.wxml
index a716e97..4d4de5e 100644
--- a/pages/module_consult/consultdetail/consultdetail.wxml
+++ b/pages/module_consult/consultdetail/consultdetail.wxml
@@ -13,21 +13,22 @@
       <view>鍦板煙锛歿{content.mfMgtLevel}}</view>
     </view>
     <view class="fyui-panel">
+      <view>鏂囦欢绫诲埆锛歿{content.mfFileType}}</view>
+      <!-- <view>鏂囦欢涓嬭浇</view> -->
+    </view>
+    <view class="fyui-panel">
       <view>鐩稿叧琛屼笟锛歿{content.mfFileIndustry}}</view>
       <view>鐜繚瑕佺礌锛歿{content.mfEpItemType}}銆亄{content.mfEpItemSubtype}}</view>
       <view>渚濇嵁锛歿{content.mfFileBasis}}</view>
     </view>
     <view class="fyui-panel">
-      <view>鐢熸晥鏃堕棿锛歿{content.mfEffectiveDate}}--{{content.mfClosingDate? content.mfClosingDate : '鐜板湪'}}</view>
+      <view>鐢熸晥鏃堕棿锛歿{content.mfEffectiveDate}}</view>
       <view>淇鎯呭喌锛歿{content.mfFileRevise}}</view>
     </view>
-    <view class="fyui-panel">
-      <view>鏂囦欢绫诲埆锛歿{content.mfFileType}}</view>
-      <!-- <view>鏂囦欢涓嬭浇</view> -->
-    </view>
-    <view class="fyui-panel">
+    
+    <!-- <view class="fyui-panel">
       <view>鍏抽敭璇嶏細{{content.mfKeywordLv1}}</view>
-    </view>
+    </view> -->
   </view>
   <view class="page__ft">
     <view class="submit" bindtap="openFile">鏌ョ湅鏂囦欢</view>
diff --git a/pages/module_consult/consulthome/consulthome.js b/pages/module_consult/consulthome/consulthome.js
index 0495b25..66ac077 100644
--- a/pages/module_consult/consulthome/consulthome.js
+++ b/pages/module_consult/consulthome/consulthome.js
@@ -1,5 +1,6 @@
 // pages/module_consult/consulthome/consulthome.js
 const consultservice = require("../../../service/consultservice")
+const moment = require('../../../utils/moment.min')
 const app = getApp()
 
 Page({
@@ -9,16 +10,7 @@
    */
   data: {
     searchTips: '璇疯緭鍏ュ叧閿瓧鎼滅储',
-    hotTopics: [{
-      id: '',
-      name: '娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡',
-      des: '娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡',
-      fileIndustry: '鐢熸�佺幆澧�',
-      itemType: '澶ф皵',
-      fileUrl: '',
-      keywords: ['鐢熸�佺幆澧�', '澶ф皵', '鐢熸�佺幆澧�', '澶ф皵澶�', '澶ф皵', '澶ф皵', '澶ф皵澶ф皵澶ф皵澶ф皵澶ф皵澶ф皵'],
-      time: ''
-    }]
+    hotTopics: []
   },
 
   /**
@@ -42,24 +34,24 @@
 
   },
 
-  gotoSearch () {
+  gotoSearch() {
     wx.navigateTo({
       url: "/pages/module_consult/consultsearch/consultsearch"
     })
   },
 
-  goto (e) {
+  goto(e) {
     var url = ""
     var index = e.currentTarget.dataset.index
     switch (index) {
       case "0":
-        url = ""
+        url = "/pages/module_consult/consultproblem/consultproblem"
         break;
       case "1":
         url = "/pages/module_consult/consultsearch/consultsearch"
         break;
       case "2":
-        url = ""
+        url = "/pages/module_consult/consultonline/consultonline"
         break;
     }
     if (url != "") {
@@ -76,13 +68,19 @@
     }
   },
 
-    /**
+  /**
    * 鑾峰彇鐑棬鎼滅储鍐呭
    */
   getHotTopic() {
     var that = this
     consultservice.getTopicLaw(app.globalData.accessToken.userId, {
-      success (res) {
+      success(res) {
+        res.forEach(r => {
+          r.mfKeywordLv1 = r.mfKeywordLv1.split('銆�').slice(0, 5)
+          r.mfReleaseDate = that.formateTime(r.mfReleaseDate)
+          r.mfEffectiveDate = that.formateTime(r.mfEffectiveDate)
+          r.mfClosingDate = that.formateTime(r.mfClosingDate)
+        });
         that.setData({
           hotTopics: res
         })
@@ -90,9 +88,9 @@
     })
   },
 
-  gotoDetail (e) {
+  gotoDetail(e) {
     var i = e.currentTarget.dataset.index
-    var fileId = this.data.hotTopics[i].id
+    var fileId = this.data.hotTopics[i].mfGuid
     wx.navigateTo({
       url: '/pages/module_consult/consultdetail/consultdetail',
       success: (res) => {
@@ -102,5 +100,13 @@
         })
       },
     })
-  }
+  },
+
+  formateTime (t) {
+    if (t) {
+      return moment(t).format("YYYY骞碝M鏈圖D鏃�") 
+    } else {
+      return undefined
+    }
+  },
 })
\ No newline at end of file
diff --git a/pages/module_consult/consulthome/consulthome.wxml b/pages/module_consult/consulthome/consulthome.wxml
index bcc321b..45f365c 100644
--- a/pages/module_consult/consulthome/consulthome.wxml
+++ b/pages/module_consult/consulthome/consulthome.wxml
@@ -51,16 +51,21 @@
       </view> -->
       <view class="fyui-box  fyui-box__text">
         <view class="fyui-box__hd">
-          {{item.name}}
+          {{item.mfName}}
         </view>
         <view class="fyui-box__bd">
-          <view class="fyui-box__content tag">鐩稿叧琛屼笟 -> {{item.fileIndustry}}</view>
-          <view class="fyui-box__content des">{{item.des}}</view>
+          <view class="fyui-box__content tag">
+            <view>鏂囦欢绫诲埆锛歿{item.mfFileType}}</view>
+            <view>鐢熸晥鏃堕棿锛歿{item.mfEffectiveDate}}</view>
+            <view>鏂囧彿锛歿{item.mfReferenceNumber}}</view>
+            <view>鐩稿叧琛屼笟 -> {{item.mfFileIndustry}}</view>
+          </view>
+          <view class="fyui-box__content des">{{item.mfSummary}}</view>
         </view>
         <view class="fyui-box__ft">
           <text class="keyword">鍏抽敭璇嶏細</text>
           <view class="keyword-item">
-            <text wx:for="{{item.keywords}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text>
+            <text wx:for="{{item.mfKeywordLv1}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text>
           </view>
         </view>
       </view>
diff --git a/pages/module_consult/consulthome/consulthome.wxss b/pages/module_consult/consulthome/consulthome.wxss
index d86da21..7a2da05 100644
--- a/pages/module_consult/consulthome/consulthome.wxss
+++ b/pages/module_consult/consulthome/consulthome.wxss
@@ -83,6 +83,7 @@
   /* text-overflow: ellipsis; */
 }
 
-.tag {
+.fyui-box__text .fyui-box__bd .tag {
   margin-bottom: 8px;
+  font-size: 14px;
 }
\ No newline at end of file
diff --git a/pages/module_consult/consultonline/consultonline.js b/pages/module_consult/consultonline/consultonline.js
new file mode 100644
index 0000000..3f47a63
--- /dev/null
+++ b/pages/module_consult/consultonline/consultonline.js
@@ -0,0 +1,111 @@
+// pages/module_consult/consultonline/consultonline.js
+const app = getApp()
+
+Page({
+
+  /**
+   * 椤甸潰鐨勫垵濮嬫暟鎹�
+   */
+  data: {
+    userId: app.globalData.accessToken.userId,
+    record: [{
+        id: 'system',
+        time: '',
+        userId: 'system',
+        userName: '鏅鸿兘瀹㈡湇',
+        text: '鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓轰綘鏈嶅姟',
+      },
+      {
+        id: 'system',
+        time: '',
+        userId: 'system',
+        userName: '鏅鸿兘瀹㈡湇',
+        text: '鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.',
+      },
+
+    ],
+
+    focus: false,
+    value: '',
+    placeholder: '璇疯緭鍏ュ叧閿瓧'
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
+   */
+  onUnload() {
+
+  },
+
+  clearInput() {
+    this.setData({
+      value: '',
+      focus: true,
+    });
+  },
+
+  inputChange(e) {
+    this.setData({
+      value: e.detail.value
+    });
+  },
+
+  send() {
+    let record = this.data.record
+    record.push({
+      id: '',
+      time: '',
+      userId: app.globalData.accessToken.userId,
+      userName: app.globalData.userInfo.acountname,
+      text: this.data.value,
+    })
+    this.getAnswer(this.data.value)
+    this.setData({
+      record,
+      value: ''
+    })
+  },
+
+  getAnswer(q) {
+    let record = this.data.record
+
+    setTimeout(() => {
+      record.push({
+        id: 'system',
+        time: '',
+        userId: 'system',
+        userName: '鏅鸿兘瀹㈡湇',
+        text: '鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓轰綘鏈嶅姟',
+      })
+      this.setData({record})
+    }, 1000);
+  }
+})
\ No newline at end of file
diff --git a/pages/module_consult/consultonline/consultonline.json b/pages/module_consult/consultonline/consultonline.json
new file mode 100644
index 0000000..6f0e366
--- /dev/null
+++ b/pages/module_consult/consultonline/consultonline.json
@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "鏅鸿兘鍜ㄨ",
+  "navigationBarBackgroundColor": "#EFF9F4",
+  "navigationBarTextStyle": "black",
+  "usingComponents": {
+    "mp-icon": "/component/icon/icon"
+  }
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultonline/consultonline.wxml b/pages/module_consult/consultonline/consultonline.wxml
new file mode 100644
index 0000000..67249ed
--- /dev/null
+++ b/pages/module_consult/consultonline/consultonline.wxml
@@ -0,0 +1,22 @@
+<!--pages/module_consult/consultonline/consultonline.wxml-->
+<view class="consult-record">
+  <block wx:for="{{record}}">
+    <view wx:if="{{userId == item.userId}}" class="consult-record_item_user">
+      <view class="consult-text_user">{{item.text}}</view>
+    </view>
+    <view wx:else class="consult-record_item">
+      <image src="/res/icons/avator_sys.png" class="consult-avator"></image>
+      <view class="consult-text">{{item.text}}</view>
+    </view>
+  </block>
+</view>
+<view class="consult-input">
+  <view class="consult-input_box">
+    <view class="search-bar">
+      <!-- <mp-icon icon="search" size="15" color="black"></mp-icon> -->
+      <input type="text" class="search-bar__input" placeholder="{{placeholder}}" value="{{value}}" focus="{{focus}}" bindinput="inputChange" />
+      <text class="weui-icon-clear" hover-class="weui-active" wx:if="{{value.length > 0}}" bindtap="clearInput"></text>
+    </view>
+    <view wx:if="{{value.length > 0}}" class="btn" bindtap="send">鍙戦��</view>
+  </view>
+</view>
\ No newline at end of file
diff --git a/pages/module_consult/consultonline/consultonline.wxss b/pages/module_consult/consultonline/consultonline.wxss
new file mode 100644
index 0000000..ad01e1a
--- /dev/null
+++ b/pages/module_consult/consultonline/consultonline.wxss
@@ -0,0 +1,118 @@
+/* pages/module_consult/consultonline/consultonline.wxss */
+.consult-record {
+  padding: 8px;
+  background-color: #EFF9F4;
+  height: 100vh;
+}
+
+.consult-record_item {
+  display: flex;
+  align-items: flex-start;
+  justify-content: flex-start;
+  margin-bottom: 16px;
+}
+
+.consult-record_item_user {
+  display: flex;
+  align-items: flex-start;
+  justify-content: flex-end;
+  margin-bottom: 16px;
+}
+
+.consult-avator {
+  width: 40px;
+  height: 40px;
+}
+
+.consult-text {
+  max-width: 80%;
+  margin-left: 4px;
+  padding: 10px;
+  background-color: white;
+  border: 0px solid #CCCCCC;
+  border-radius: 16px;
+  border-top-left-radius: 0;
+  box-shadow: 1px 1px #CCCCCC;
+  font-size: 12px;
+}
+
+.consult-text_user {
+  max-width: 80%;
+  margin-left: 4px;
+  padding: 10px;
+  /* background-color: #49c4ad; */
+  background: linear-gradient(to top right, #58bba9, #52e6ca);
+  border: 0px solid #CCCCCC;
+  border-radius: 16px;
+  border-top-right-radius: 0;
+  box-shadow: 1px 1px #CCCCCC;
+  font-size: 12px;
+  color: white;
+}
+
+
+.consult-input {
+  position: fixed;
+  bottom: 0;
+  /* padding-bottom: calc(10px + constant(safe-area-inset-bottom)); */
+  padding-bottom: calc(10px + env(safe-area-inset-bottom));
+  left: 0;
+  width: 100%;
+}
+
+.consult-input_box {
+  display: flex;
+  align-items: center;
+  padding: 0 8px;
+}
+
+.search-bar {
+  flex: 1;
+  position: relative;
+  min-width: 50vw;
+  padding: 6px 8px;
+  font-size: 12px;
+  line-height: 24px;
+  color: var(--fyui-text-color_2);
+  text-align: left;
+  background-color: white;
+  border-radius: 10px;
+  display: flex;
+  align-items: center;
+}
+
+.search-bar .weui-icon-clear {
+  /* position: absolute;
+  top: 50%;
+  right: 0;
+  margin-top: -16px; */
+  padding-left: 8px;
+  width: 16px;
+  height: 16px;
+  -webkit-mask-size: 16px;
+  mask-size: 16px;
+  /* display: block; */
+}
+
+.search-bar .search-bar__input {
+  width: 100%;
+  border: 0;
+  font-size: 14px;
+  line-height: 20px;
+  box-sizing: content-box;
+  background: transparent;
+  caret-color: var(--weui-BRAND);
+  color: var(--weui-FG-0);
+}
+
+.btn {
+  border-radius: 20px;
+  line-height: 20px;
+  font-size: 12px;
+  min-width: 40px;
+  background: linear-gradient(to top right, #58bba9, #52e6ca);
+  padding: 4px 2px;
+  text-align: center;
+  color: white;
+  margin-left: 4px;
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultproblem/consultproblem.js b/pages/module_consult/consultproblem/consultproblem.js
new file mode 100644
index 0000000..e4967b2
--- /dev/null
+++ b/pages/module_consult/consultproblem/consultproblem.js
@@ -0,0 +1,111 @@
+// pages/module_consult/consultproblem/consultproblem.js
+Page({
+
+  /**
+   * 椤甸潰鐨勫垵濮嬫暟鎹�
+   */
+  data: {
+    problemTypes: ['鍗卞簾杞Щ','浼佷笟鎺掓薄','鎺掓薄绾崇','璁惧缁存姢','璁惧瀹夎','搴熸皵娌荤悊','鍥哄簾杞Щ','鏇村 >'],
+    selectedIndex: 0,
+
+    problems: [
+      [
+        {
+          q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
+          a: [{
+            text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
+            author: 'NickName',
+            time: '2022-05-03'
+          },{
+            text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
+            author: 'NickName',
+            time: '2022-05-03'
+          }],
+          viewed: 120,
+          like: 123,
+          favorite: 50
+        },
+        {
+          q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
+          a: [{
+            text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
+            author: 'NickName',
+            time: '2022-05-03'
+          }],
+          viewed: 120,
+          like: 123,
+          favorite: 50
+        },
+        {
+          q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
+          a: [{
+            text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
+            author: 'NickName',
+            time: '2022-05-03'
+          }],
+          viewed: 120,
+          like: 123,
+          favorite: 50
+        },
+        {
+          q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
+          a: [{
+            text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
+            author: 'NickName',
+            time: '2022-05-03'
+          }],
+          viewed: 120,
+          like: 123,
+          favorite: 50
+        },
+      ],
+      [
+        {
+          q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
+          a: [{
+            text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
+            author: 'NickName',
+            time: '2022-05-03'
+          },{
+            text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
+            author: 'NickName',
+            time: '2022-05-03'
+          }],
+          viewed: 120,
+          like: 123,
+          favorite: 50
+        },
+      ],
+    ],
+    problemIndex: 0,
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+   */
+  onReady() {
+
+  },
+
+  selectProblemType(e) {
+    const selectedIndex = e.currentTarget.dataset.index
+    this.setData({selectedIndex})
+    this.getProblems()
+  },
+
+  getProblems() {
+    let index = this.data.selectedIndex
+    let length = this.data.problems.length
+
+    let problemIndex = index % length
+    this.setData({problemIndex})
+    console.log(problemIndex);
+  }
+})
\ No newline at end of file
diff --git a/pages/module_consult/consultproblem/consultproblem.json b/pages/module_consult/consultproblem/consultproblem.json
new file mode 100644
index 0000000..f7a9e67
--- /dev/null
+++ b/pages/module_consult/consultproblem/consultproblem.json
@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "甯歌闂",
+  "navigationBarBackgroundColor": "#57E4CB",
+  "navigationBarTextStyle": "white",
+  "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultproblem/consultproblem.wxml b/pages/module_consult/consultproblem/consultproblem.wxml
new file mode 100644
index 0000000..10b04c5
--- /dev/null
+++ b/pages/module_consult/consultproblem/consultproblem.wxml
@@ -0,0 +1,32 @@
+<!--pages/module_consult/consultproblem/consultproblem.wxml-->
+<!--pages/module_consult/consulthome/consulthome.wxml-->
+<view class="page">
+  <view class="page__hd">
+    <view class="switch-tab {{selectedIndex == index ? 'switch-tab_selected' : ''}}" wx:for="{{problemTypes}}" wx:index="index" data-index="{{index}}" bindtap="selectProblemType">{{item}}</view>
+  </view>
+  <view class="page__bd">
+    <block wx:for="{{problems[problemIndex]}}" wx:key="index">
+      <view class="fyui-box  fyui-box__text">
+        <view class="fyui-box__hd">
+          Q. {{item.q}}
+        </view>
+        <view class="fyui-box__bd">
+          <view class="fyui-box__content">{{item.a.length > 0 ? item.a[0].text : ''}}</view>
+        </view>
+        <view class="fyui-box__ft">
+          <view class="fyui-box__tag">
+              <view class="flex-h">
+                <image src="/res/icons/view.png" class="icon"></image>{{item.viewed}}
+              </view>
+              <view class="flex-h">
+                <image src="/res/icons/like.png" class="icon"></image><view>{{item.like}}</view>
+              </view>
+            </view>
+        </view>
+      </view>
+    </block>
+
+  </view>
+  <view class="page__ft">
+  </view>
+</view>
\ No newline at end of file
diff --git a/pages/module_consult/consultproblem/consultproblem.wxss b/pages/module_consult/consultproblem/consultproblem.wxss
new file mode 100644
index 0000000..c3ca5d5
--- /dev/null
+++ b/pages/module_consult/consultproblem/consultproblem.wxss
@@ -0,0 +1,36 @@
+/* pages/module_consult/consultproblem/consultproblem.wxss */
+.page__hd {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+}
+.switch-tab {
+  border-radius: 8px;
+  color: var(--fyui-text-color_1);
+  width: 20vw;
+  background-color: white;
+  padding: 1vw;
+  margin-bottom: 8px;
+  text-align: center;
+  font-weight: 500;
+  font-size: 14px;
+}
+.switch-tab_selected {
+  background: linear-gradient(to bottom right, #65EAD2, #2BDEDC);
+  color: white;
+}
+
+.fyui-box__content {
+  padding: 0 8px;
+}
+
+.fyui-box__tag {
+  display: flex;
+  /* background-color: red; */
+  width: 100%;
+  justify-content: flex-end;
+}
+
+.fyui-box__tag .flex-h{
+  margin-right: 16px;
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultsearch/consultsearch.js b/pages/module_consult/consultsearch/consultsearch.js
index cfe3cbe..44a31a9 100644
--- a/pages/module_consult/consultsearch/consultsearch.js
+++ b/pages/module_consult/consultsearch/consultsearch.js
@@ -126,7 +126,7 @@
 
   gotoDetail (e) {
     var i = e.currentTarget.dataset.index
-    var fileId = this.data.hotTopic[i].id
+    var fileId = this.data.hotTopic[i].mfGuid
     wx.navigateTo({
       url: '/pages/module_consult/consultdetail/consultdetail',
       success: (res) => {
diff --git a/pages/module_consult/consultsearch/consultsearch.json b/pages/module_consult/consultsearch/consultsearch.json
index 40c2e0e..026ed97 100644
--- a/pages/module_consult/consultsearch/consultsearch.json
+++ b/pages/module_consult/consultsearch/consultsearch.json
@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "鎼滅储",
+  "navigationBarTitleText": "鐜繚鐭ヨ瘑搴撲竴閿煡璇�",
   "navigationBarBackgroundColor": "#57E4CB",
   "navigationBarTextStyle": "white",
   "usingComponents": {
diff --git a/pages/module_consult/consultsearch/consultsearch.wxml b/pages/module_consult/consultsearch/consultsearch.wxml
index 6490d24..a895899 100644
--- a/pages/module_consult/consultsearch/consultsearch.wxml
+++ b/pages/module_consult/consultsearch/consultsearch.wxml
@@ -20,7 +20,7 @@
     <view class="hot-topic">
       <view wx:for="{{hotTopic}}" wx:key="index" class="hot-topic__item" data-index="{{index}}" bindtap="gotoDetail">
         <view class="{{index < 3 ? 'hot-topic__hot' : 'hot-topic__normal'}}">{{index + 1}}</view>
-        <view class="hot-topic__name">{{item.name}}</view>
+        <view class="hot-topic__name">{{item.mfName}}</view>
       </view>
     </view>
   </view>
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.js b/pages/module_ledger/ledgerhistory/ledgerhistory.js
new file mode 100644
index 0000000..e6976db
--- /dev/null
+++ b/pages/module_ledger/ledgerhistory/ledgerhistory.js
@@ -0,0 +1,202 @@
+// pages/module_ledger/ledgerHistory/ledgerhistory.js
+const ledgerservice = require("../../../service/ledgerservice")
+const moment = require('../../../utils/moment.min')
+const app = getApp()
+
+Page({
+
+  /**
+   * 椤甸潰鐨勫垵濮嬫暟鎹�
+   */
+  data: {
+    year: 2000,
+    maxYear: 2000,
+
+    months: [{
+      month: 1,
+      hasData: true
+    }, {
+      month: 2,
+      hasData: true
+    }, {
+      month: 3,
+      hasData: true
+    }, {
+      month: 4,
+      hasData: true
+    }, {
+      month: 5,
+      hasData: true
+    }, {
+      month: 6,
+      hasData: true
+    }, {
+      month: 7,
+      hasData: true
+    }, {
+      month: 8,
+      hasData: true
+    }, {
+      month: 9,
+      hasData: true
+    }, {
+      month: 10,
+      hasData: true
+    }, {
+      month: 11,
+      hasData: true
+    }, {
+      month: 12,
+      hasData: true
+    }],
+    selectedMonIndex: 0,
+
+    recordList: []
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+   */
+  onLoad(options) {
+    var that = this
+    this.initTime()
+    this.getRecord()
+    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
+      let ledgerMap = new Map()
+      data.tabList.forEach(t => {
+        ledgerMap.set(t.name, {
+          notUpload: t.tag,
+          total: t.total,
+          ledgers: []
+        })
+      });
+      that.setData({
+        ledgerMap
+      })
+    })
+  },
+
+  /**
+   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+   */
+  onReady() {
+
+  },
+
+  onShow(){
+    if (this.data.marginTop == undefined) {
+      this.topHeight('.page__hd')
+    }
+  },
+
+  initTime(year) {
+    var date = new Date()
+    let maxYear = date.getFullYear()
+    var thisMonth = date.getMonth()
+    if (year == undefined) {
+      year = maxYear + '骞�'
+    }
+    this.setData({
+      year: year,
+      maxYear: maxYear,
+    })
+    this.setData({
+      selectedMonIndex: thisMonth
+    })
+  },
+
+  bindYearChange(e) {
+    let y = e.detail.value
+    this.setData({
+      year: `${y}骞碻
+    })
+    this.getRecord()
+  },
+
+  selectMonth(e) {
+    let index = e.currentTarget.dataset.index
+    this.setData({
+      selectedMonIndex: index
+    })
+    this.getRecord()
+  },
+
+  getRecord() {
+    var that = this
+    var userId = app.globalData.accessToken.userId
+    var sceneType = app.globalData.userInfo.extension2
+    let month = this.data.months[this.data.selectedMonIndex].month
+    let year = parseInt(this.data.year.split("骞�")[0])
+    var time = moment().year(year).month(month - 1).format('YYYY-MM-DD')
+    wx.showLoading({
+      title: '鍔犺浇涓�',
+      mask: true,
+      success: (res) => {},
+      fail: (res) => {},
+      complete: (res) => {},
+    })
+    setTimeout(() => {
+      wx.hideLoading()
+    }, 20000);
+    ledgerservice.getLedgerDetail(userId, undefined, sceneType, time, {
+      success(res) {
+        let ledgerMap = that.data.ledgerMap
+        ledgerMap.forEach((e, key) => {
+          e.ledgers = []
+        });
+        res.forEach(r => {
+          let t = ledgerMap.get(r.ledgerType)
+          t.ledgers.push(r)
+        });
+        let recordList = []
+        ledgerMap.forEach((e, key) => {
+          recordList.push({
+            ledgerType: key,
+            total: e.total,
+            notUpload: e.notUpload,
+            ledgers: e.ledgers
+          })
+        });
+        // for (const key in ledgerMap) {
+        //   const e = ledgerMap.get(key);
+
+        // }
+        that.setData({
+          ledgerMap: ledgerMap,
+          recordList: recordList
+        })
+        console.log(recordList);
+      },
+      complete(res) {
+        wx.hideLoading()
+      }
+    })
+  },
+
+  topHeight(element) {
+    let that = this;
+    let query = wx.createSelectorQuery(); //蹇呴』瑕佸厛鍒涘缓涓�涓煡璇�
+    query.select(element).boundingClientRect(function (rect) {
+      that.setData({
+        marginTop: rect.height + 'px'
+      });
+    }).exec();
+  },
+
+  gotoLedgerDetail(e) {
+    var i = e.currentTarget.dataset.index.split(',')
+    var indexGroup = [parseInt(i[0]), parseInt(i[1])]
+    var ledger = this.data.recordList[indexGroup[0]].ledgers[indexGroup[1]]
+    wx.navigateTo({
+      url: '/pages/module_ledger/ledgerupload/ledgerupload',
+      success: (res) => {
+        // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+        res.eventChannel.emit('acceptDataFromOpenerPage', {
+          ledger: ledger,
+          indexGroup: indexGroup,
+          barTitle: '鍘嗗彶鍙拌处'
+        })
+      },
+    })
+  },
+})
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.json b/pages/module_ledger/ledgerhistory/ledgerhistory.json
new file mode 100644
index 0000000..6b5f028
--- /dev/null
+++ b/pages/module_ledger/ledgerhistory/ledgerhistory.json
@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "mp-icon": "/component/icon/icon"
+  }
+}
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.wxml b/pages/module_ledger/ledgerhistory/ledgerhistory.wxml
new file mode 100644
index 0000000..629c4ef
--- /dev/null
+++ b/pages/module_ledger/ledgerhistory/ledgerhistory.wxml
@@ -0,0 +1,35 @@
+<!--pages/module_ledger/ledgerHistory/ledgerhistory.wxml-->
+<import src="/template/nodata/nodata.wxml"></import>
+<view class="page">
+  <view class="page__hd">
+    <view class="flex-h">
+      <text class="title">鏌ョ湅璁板綍</text>
+      <picker bindchange="bindYearChange" data-type="year" value="{{year}}" mode="date" fields="year" end="{{maxYear}}">
+        <view class="fyui-selector">
+          {{year}}
+          <mp-icon extClass="arrow-down" icon="arrow" color="black" size="{{12}}"></mp-icon>
+        </view>
+      </picker>
+    </view>
+    <view class="horizal-list">
+      <view class="{{selectedMonIndex == index ? 'tag_selected':'tag_unselected'}} {{item.hasData ? 'tag_has_data':''}}" wx:for="{{months}}" wx:key="month" bindtap="selectMonth" data-index="{{index}}">{{item.month}}鏈�</view>
+    </view>
+  </view>
+  <view class="page__bd" style="margin-top: {{marginTop}};">
+    <block wx:if="{{recordList.length > 0}}">
+      <view wx:for="{{recordList}}" wx:key="index" wx:for-index="i1" class="fyui-panel">
+        <view class="flex-h">
+          <view class="ledger-type">{{item.ledgerType}}</view>
+          <view class="ledger-type_2">({{item.ledgers.length}} / {{item.total}})</view>
+        </view>
+        <view class="ledger-group">
+          <view wx:for="{{item.ledgers}}" wx:for-item="ledger" wx:for-index="i2" wx:key="i2" class="ledger-group_item" bindtap="gotoLedgerDetail" data-index="{{i1}},{{i2}}">
+            <image class="" src="{{ledger.path1[0]}}"></image>
+            <view>{{ledger.ledgerName}}</view>
+          </view>
+        </view>
+      </view>
+    </block>
+    <template wx:else is="nodataPage"></template>
+  </view>
+</view>
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.wxss b/pages/module_ledger/ledgerhistory/ledgerhistory.wxss
new file mode 100644
index 0000000..88aad3a
--- /dev/null
+++ b/pages/module_ledger/ledgerhistory/ledgerhistory.wxss
@@ -0,0 +1,82 @@
+/* pages/module_ledger/ledgerHistory/ledgerhistory.wxss */
+.page__hd {
+  background-color: var(--fyui-BG_1);
+  position: fixed;
+  z-index: 2;
+}
+.flex-h{
+  padding: 8px;
+}
+
+.title{
+  font-size: 14px;
+  font-weight: 550;
+  margin: 4px 0;
+}
+
+.arrow-down {
+  transform: rotateZ(90deg);
+  margin-left: 6px;
+}
+
+.tag_unselected,
+.tag_selected {
+  font-size: 12px;
+  background-color: #b4b4b45b;
+  /* border: 1px solid rgb(175, 173, 173); */
+  border-radius: 2px;
+  color: var(--fyui-text-color_3);
+  padding: 6rpx 18rpx;
+  margin-bottom: 8px;
+  width: 10%;
+  text-align: center;
+}
+
+.tag_has_data {
+  color: var(--fyui-text-color_1);
+  background-color: white;
+}
+
+.tag_selected {
+  background-color: var(--fyui-primary-color);
+  color: white;
+}
+
+.horizal-list {
+  display: flex;
+  flex-flow: row;
+  flex-wrap: wrap;
+  white-space: nowrap;
+  justify-content: space-around;
+}
+
+.ledger-type{
+  font-size: 14px;
+  font-weight: 600;
+  padding: 0 8px;
+}
+
+.ledger-type_2{
+  font-size: 14px;
+  padding: 0 8px;
+  color: var(--fyui-text-color_3);
+}
+
+.ledger-group{
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.ledger-group_item{
+  width: 30vw;
+  text-align: center;
+  font-size: 14px;
+}
+
+.ledger-group_item>image{
+  width: 28vw;
+  height: 28vw;
+}
+
+.ledger-group_item>view{
+}
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhome/ledgerhome.js b/pages/module_ledger/ledgerhome/ledgerhome.js
index 2cf573e..d72761e 100644
--- a/pages/module_ledger/ledgerhome/ledgerhome.js
+++ b/pages/module_ledger/ledgerhome/ledgerhome.js
@@ -9,14 +9,50 @@
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
-    deadline: '',
-    leftday:0 ,
+    thisMonth: '',
+    lastMonth: '',
 
+    //鎻愪氦鏈熼檺
+    deadline: '',
+    //鍓╀綑鎻愪氦澶╂暟
+    leftday: 0,
+
+    //鏈湀姹囨��
+    thisMonthInfo: {
+      //蹇呭~椤规�绘暟
+      totalMust: 0,
+      //蹇呭~椤规彁浜ゆ暟
+      finishedMust: 0,
+      //閫夊~椤规�绘暟
+      totalSelect: 0,
+      //閫夊~椤规彁浜ゆ暟
+      finishedSelect: 0,
+      //鎻愪氦鎯呭喌
+      status: '',
+      //瓒呮椂鎯呭喌
+      overtime: '',
+      //寤鸿
+      suggestion: ''
+    },
+    //涓婃湀姹囨��
+    lastMonthInfo: {
+      totalMust: 0,
+      finishedMust: 0,
+      totalSelect: 0,
+      finishedSelect: 0,
+      status: '',
+      overtime: '',
+      suggestion: ''
+    },
+
+    //閫夐」鍗$浉鍏�
     currentTab: 0,
     tabList: [],
     pageList: [],
+    pageheight: '300px',
 
-    pageheight: '300px'
+    //褰撳墠鏄剧ず鏈堜唤
+    showThisMonth: true,
   },
 
   //姣忔湀鍙拌处鎻愪氦鏈熼檺鏃�
@@ -26,14 +62,31 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-    this.getLedgerType()
-
-    var deadline = moment().format(`MM-${this.DEADLINEDAY}`)
-    var leftday = this.DEADLINEDAY + 1 - moment().date()
+    let now = moment()
+    let deadline = now.format(`MM-${this.DEADLINEDAY}`)
+    let leftday = this.DEADLINEDAY + 1 - now.date()
+    let thisMonth = now.format('YYYY-MM')
+    let lastMonth = now.add(-1, 'M').format('YYYY-MM')
     this.setData({
-      deadline: deadline,
-      leftday: leftday
+      deadline,
+      leftday,
+      thisMonth,
+      lastMonth
     })
+
+    now = moment()
+    this.getLedgerType(now.format('YYYY-MM-DD'), r => {
+      this.setData({
+        tabList: r[0],
+        pageList: r[1],
+        thisMonthInfo: r[2]
+      })
+    }) //鏈湀
+    this.getLedgerType(now.add(-1, 'M').format('YYYY-MM-DD'), r => {
+      this.setData({
+        lastMonthInfo: r[2]
+      }, true)
+    }) //涓婃湀
   },
 
   /**
@@ -50,24 +103,43 @@
 
   },
 
-  getLedgerType () {
+  getLedgerType(time, success, lastMonth) {
     var that = this
-    var time = moment().format('YYYY-MM-DD')
+    // var time = moment().format('YYYY-MM-DD')
     ledgerservice.getLedgerSummary(app.globalData.accessToken.userId, app.globalData.userInfo.extension2, time, {
-      success (res) {
-        // console.log(res);
-        let r = that.parseLedgerType(res)
-        that.setData({
-          tabList: r[0],
-          pageList: r[1]
-        })
+      success(res) {
+        let r = that.parseLedgerType(res, lastMonth)
+        success(r)
       }
     })
   },
 
-  parseLedgerType (subtypes) {
-    var map = new Map()
+  parseLedgerType(subtypes, lastMonth) {
+    let monthInfo = {
+      totalMust: 0,
+      finishedMust: 0,
+      totalSelect: 0,
+      finishedSelect: 0,
+      status: '',
+      overtime: '',
+      suggestion: ''
+    }
+    let map = new Map()
     subtypes.forEach(s => {
+      //鏈堝害缁熻
+      if (s.needUpdate) {
+        monthInfo.totalMust++
+        if (s.upLoad) {
+          monthInfo.finishedMust++
+        }
+      } else {
+        monthInfo.totalSelect++
+        if (s.upLoad) {
+          monthInfo.finishedSelect++
+        }
+      }
+
+      //閫夐」鍗�
       if (s.upLoad) {
         s.tag = '/res/icons/round_check_fill.png'
       } else if (s.ledgerFinished) {
@@ -82,18 +154,56 @@
       }
       map.get(s.ledgerType).push(s)
     });
+
+    //
+    if (monthInfo.finishedMust == 0) {
+      monthInfo.status = '鏈彁浜�'
+      if (lastMonth) {
+        monthInfo.suggestion = '褰撴湡鍙拌处瀹屽叏鏈彁浜わ紝涓ラ噸褰卞搷璇勪及缁撴灉锛屽悗缁娉ㄦ剰'
+      } else {
+        monthInfo.suggestion = '璇峰敖蹇彁浜ゅ彴璐�'
+      }
+    } else if (monthInfo.finishedMust < monthInfo.totalMust) {
+      monthInfo.status = '閮ㄥ垎鎻愪氦'
+      if (lastMonth) {
+        monthInfo.suggestion = '褰撴湡鍙拌处閮ㄥ垎鏈彁浜わ紝浼氬奖鍝嶈瘎浼扮粨鏋滐紝鍚庣画璇峰敖閲忔彁浜ゆ墍鏈夊彴璐�'
+      } else {
+        monthInfo.suggestion = '褰撳墠宸叉彁浜ら儴鍒嗗彴璐︼紝璇疯ˉ鍏ㄥ墿浣欏彴璐�'
+      }
+    } else {
+      monthInfo.status = '宸叉彁浜�'
+      if (lastMonth) {
+        monthInfo.suggestion = '褰撴湡鍙拌处宸插叏閮ㄦ彁浜わ紝璇蜂繚鎸�'
+      } else {
+        monthInfo.suggestion = '鏈湡鍙拌处宸插叏閮ㄦ彁浜�'
+      }
+    }
+    monthInfo.overtime = moment().date() - this.DEADLINEDAY
+    monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
+
+    //閫夐」鍗�
     var t = []
     var p = []
-    for(let item of map){
+    for (let item of map) {
       console.log(item);
-      t.push(item[0])
+      let notUpload = 0
+      item[1].forEach(l => {
+        if (l.needUpdate && !l.upLoad) {
+          notUpload++
+        }
+      });
+      t.push({
+        name: item[0],
+        tag: notUpload,
+        total: item[1].length
+      })
       p.push(item[1])
     }
 
-    return [t, p]
+    return [t, p, monthInfo]
   },
 
-  gotoLedgerDetail (e) {
+  gotoLedgerDetail(e) {
     var i = e.currentTarget.dataset.index.split(',')
     var indexGroup = [parseInt(i[0]), parseInt(i[1])]
     var ledger = this.data.pageList[indexGroup[0]][indexGroup[1]]
@@ -123,12 +233,30 @@
     })
   },
 
+  gotoHistory(){
+    let tabList = this.data.tabList
+    wx.navigateTo({
+      url: '/pages/module_ledger/ledgerhistory/ledgerhistory',
+      success: (res) => {
+        // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+        res.eventChannel.emit('acceptDataFromOpenerPage', {
+          tabList: tabList,
+        })
+      },
+    })
+  },
+
 
   //璁$畻swiper楂樺害鏂规硶锛堝湪鍒囨崲鐨勬椂鍊欒皟鐢級
   tabsHeight(element) {
     let that = this;
     let query = wx.createSelectorQuery(); //蹇呴』瑕佸厛鍒涘缓涓�涓煡璇�
     query.select(element).boundingClientRect(function (rect) {
+      // let pageheight = that.data.pageheight.split('px')[0]
+      // pageheight = parseInt(pageheight)
+      // if (rect > pa) {
+        
+      // }
       that.setData({
         pageheight: rect.height + 'px'
       });
@@ -143,7 +271,7 @@
         currentTab: e.target.dataset.current,
         navScrollLeft: e.target.dataset.current >= 3 ? ((e.target.dataset.current) * 60) : 0 //鍒ゆ柇褰撳墠閫変腑鐨勪釜鏁版槸鍚︽槸绗�5涓�
       })
-      that.tabsHeight('.page'+e.target.dataset.current);	//鏌ヨ鍝竴涓厓绱�
+      that.tabsHeight('.page' + e.target.dataset.current); //鏌ヨ鍝竴涓厓绱�
     }
   },
   bindChange: function (e) {
@@ -154,4 +282,9 @@
     });
     // that.tabsHeight('.page'+e.target.dataset.current);	//鏌ヨ鍝竴涓厓绱�
   },
+
+  changeMonth(){
+    let showThisMonth = !this.data.showThisMonth
+    this.setData({showThisMonth})
+  }
 })
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhome/ledgerhome.json b/pages/module_ledger/ledgerhome/ledgerhome.json
index dd316eb..b012b03 100644
--- a/pages/module_ledger/ledgerhome/ledgerhome.json
+++ b/pages/module_ledger/ledgerhome/ledgerhome.json
@@ -1,5 +1,7 @@
 {
   "navigationBarTitleText": "鍙拌处绠$悊",
   "navigationBarBackgroundColor": "#57E4CB",
-  "usingComponents": {}
+  "usingComponents": {
+    "mp-icon": "/component/icon/icon"
+  }
 }
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhome/ledgerhome.wxml b/pages/module_ledger/ledgerhome/ledgerhome.wxml
index c502f1a..00fbec0 100644
--- a/pages/module_ledger/ledgerhome/ledgerhome.wxml
+++ b/pages/module_ledger/ledgerhome/ledgerhome.wxml
@@ -2,16 +2,69 @@
 <view class="page">
   <view class="banner-bg"></view>
   <view class="page__hd">
-    <view class="head_1">鏈湀鍙拌处鎻愪氦鏃ワ細{{deadline}}</view>
-    <view wx:if="{{leftday > 0}}" class="head_2">鍓╀綑<text>{{leftday}}</text>澶�</view>
-    <view wx:else class="head_2">宸查�炬湡锛岃灏藉揩鎻愪氦</view>
-    <view class="head_3">鍑嗘椂浜ゅ彴璐︼紝缁存姢濂戒俊鐢�</view>
+    <!-- <view class="fyui-panel"> -->
+    <view class="head_right" bindtap="changeMonth">
+      <text class="head_tag" >{{showThisMonth ? thisMonth + '鏈湀' : lastMonth + '涓婃湀'}}姹囨��</text>
+      <mp-icon style="margin-left: 4px;" icon="transfer2" color="white" size="{{20}}"></mp-icon>
+    </view>
+    <view class="card">
+      <block wx:if="{{showThisMonth}}">
+        <view class="head_row">
+          <view class="head_row_item">
+            <view class="head_tag">閫夊~椤�</view>
+            <view class="head_1">{{thisMonthInfo.finishedSelect}}<text class="head_row_item_tag">/{{thisMonthInfo.totalSelect}}</text></view>
+          </view>
+          <view class="head_row_item">
+            <view class="head_tag">蹇呭~椤�</view>
+            <view class="head_1">{{thisMonthInfo.finishedMust}}<text class="head_row_item_tag">/{{thisMonthInfo.totalMust}}</text></view>
+          </view>
+          <view class="head_row_item">
+            <view class="head_tag">瀹屾垚搴�</view>
+            <view class="head_1">{{thisMonthInfo.percent}}<text class="head_row_item_tag">%</text></view>
+          </view>
+        </view>
+        <view class="head_row">
+          <view class="head_tag">鏈湡鍙拌处鎻愪氦鏃ワ細{{deadline}}</view>
+          <view wx:if="{{leftday > 0}}" class="head_tag">鍓╀綑<text>{{leftday}}</text>澶�</view>
+          <view wx:else class="head_tag">閫炬湡 <text>{{thisMonthInfo.overtime}}</text>澶�</view>
+        </view>
+        <view class="head_tag">寤鸿锛歿{thisMonthInfo.suggestion}}</view>
+
+      </block>
+      <block wx:else>
+        <view class="head_row">
+          <view class="head_row_item">
+            <view class="head_tag">閫夊~椤�</view>
+            <view class="head_1">{{lastMonthInfo.finishedSelect}}<text class="head_row_item_tag">/{{lastMonthInfo.totalSelect}}</text></view>
+          </view>
+          <view class="head_row_item">
+            <view class="head_tag">蹇呭~椤�</view>
+            <view class="head_1">{{lastMonthInfo.finishedMust}}<text class="head_row_item_tag">/{{lastMonthInfo.totalMust}}</text></view>
+          </view>
+          <view class="head_row_item">
+            <view class="head_tag">瀹屾垚搴�</view>
+            <view class="head_1">{{lastMonthInfo.percent}}<text class="head_row_item_tag">%</text></view>
+          </view>
+        </view>
+        <view class="head_row">
+          <view class="head_tag">鎻愪氦鎯呭喌锛歿{lastMonthInfo.status}}</view>
+        </view>
+        <view class="head_tag">寤鸿锛歿{lastMonthInfo.suggestion}}</view>
+      </block>
+    </view>
+    <view class="head_right">
+      <text class="head_tag" bindtap="gotoHistory">鍘嗗彶璁板綍 ></text>
+    </view>
   </view>
+  <!-- </view> -->
   <view class="page__bd">
     <view class="swiper-tab">
-      <scroll-view scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="false" scroll-with-animation="true">
+      <scroll-view class="swiper-tab_view" scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true">
         <block wx:for="{{tabList}}" wx:key="i">
-          <view class="swiper-tab-list {{currentTab==index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav">{{item}}</view>
+          <view class="swiper-tab-list {{currentTab==index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav">
+            {{item.name}}
+            <text wx:if="{{item.tag > 0}}" class="swiper-tab-list__tag">{{item.tag}}</text>
+          </view>
         </block>
       </scroll-view>
     </view>
diff --git a/pages/module_ledger/ledgerhome/ledgerhome.wxss b/pages/module_ledger/ledgerhome/ledgerhome.wxss
index b38016c..3d153f8 100644
--- a/pages/module_ledger/ledgerhome/ledgerhome.wxss
+++ b/pages/module_ledger/ledgerhome/ledgerhome.wxss
@@ -2,29 +2,64 @@
 .banner-bg {
   position: fixed;
   width: 100%;
-  height: 50vh;
+  height: 60%;
   background: linear-gradient(to bottom, #57E4CB, #83b6ae);
 }
 
 .page__hd {
-  height: 30vh;
-  text-align: center;
+  /* text-align: center; */
   display: flex;
   flex-flow: column;
+  justify-content: flex-start;
+  /* color: #50854C; */
+  color: white;
+  padding: 8px 16px;
+}
+
+.card{
+  height: 26vh;
+  /* background-color: royalblue; */
+}
+
+.head_row{
+  display: flex;
+  /* padding: 0 30px; */
   justify-content: space-between;
-  color: #50854C;
+  align-items: baseline;
 }
 
-.head_1 {
+.head_row_item{
+  text-align: center;
+  /* width: 20vw; */
+  flex: 1;
+  /* background-color: red; */
+}
+
+.head_row_item_tag{
   font-size: 12px;
+  font-weight: 559;
 }
 
-.head_2 {
+.head_right {
+  text-align: end;
+  font-size: 12px;
+  /* background-color: brown; */
+  margin-bottom: 8px;
+  vertical-align: middle;
+}
+
+.head_tag{
+  font-size: 12px;
+  color: rgba(255, 255, 255, 0.8);
+}
+
+.head_tag>text {
+  font-size: 40px;
   font-weight: 600;
 }
 
-.head_2>text {
-  font-size: 40px;
+.head_1 {
+  font-size: 30px;
 }
 
 .head_3 {
@@ -44,18 +79,33 @@
   z-index: 2;
   /* background-color: #65EAD2; */
   /* background-color: #70ea65; */
-  padding: 2px;
+  /* padding: 2px; */
 }
 
+.swiper-tab_view{
+  /* background-color: blueviolet; */
+}
 
 .swiper-tab-list{
+  position: relative;
   font-size: 30rpx;
   display: inline-block;
   min-width: 18%;
-  padding: 0 1%;
+  padding: 0 16px;
   color: rgba(255, 255, 255, 0.658);
 }
 
+.swiper-tab-list__tag{
+  position: absolute;
+  top: 2px;
+  right: 4px;
+  font-size: 10px;
+  line-height: 16px;
+  width: 16px;
+  background-color: brown;
+  border-radius: 50%;
+}
+
 .on{ 
   color: white;
   font-weight: bold;
diff --git a/pages/module_ledger/ledgerupload/ledgerupload.js b/pages/module_ledger/ledgerupload/ledgerupload.js
index 08bf20f..fc3f692 100644
--- a/pages/module_ledger/ledgerupload/ledgerupload.js
+++ b/pages/module_ledger/ledgerupload/ledgerupload.js
@@ -26,6 +26,11 @@
         ledger: data.ledger,
         indexGroup: data.indexGroup
       })
+      if (data.barTitle) {
+        wx.setNavigationBarTitle({
+          title: data.barTitle,
+        })
+      }
 
       that.checkStatus()
     })
@@ -50,9 +55,7 @@
           if (res.length > 0) {
             let detail = res[0]
             if (detail.upLoad) {
-              let imgFiles = detail.path1.split(';').map((value, index) => {
-                return $f.basePicUrl + value
-              })
+              let imgFiles = detail.path1
               let remark = detail.remark1 == null ? '' : detail.remark1
               let remarkDisable = true
               that.setData({imgFiles, remark, remarkDisable})
diff --git a/pages/module_user/userlogin/userlogin.js b/pages/module_user/userlogin/userlogin.js
index f3b05bc..5609ece 100644
--- a/pages/module_user/userlogin/userlogin.js
+++ b/pages/module_user/userlogin/userlogin.js
@@ -23,7 +23,7 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
    */
   onReady: function () {
-
+    // this.login()
   },
 
   /**
@@ -34,12 +34,26 @@
   },
 
   loginWx() {
-    var that = this
     wx.getUserProfile({
       lang: 'zh_CN',
       desc: '鐢ㄤ簬鏄剧ず锛屾彁绀虹敤鎴峰綋鍓嶅凡鐧诲綍',
       success(res) {
-        //鑾峰彇缂撳瓨鐨勭敤鎴疯处鎴峰瘑鐮�
+        console.log(res);
+        wx.login({
+          timeout: 10000,
+          success: (result) => {
+            console.log(result);
+          },
+          fail: (res) => {},
+          complete: (res) => {},
+        })
+      }
+    })
+  },
+
+  login() {
+    //鑾峰彇缂撳瓨鐨勭敤鎴疯处鎴峰瘑鐮�
+    var that = this
     wx.getStorage({
       key: 'accessToken',
       success(res) {
@@ -50,7 +64,7 @@
         })
 
         userservice.login(that.data.userName, that.data.password, {
-          success (data) {
+          success(data) {
             if (data.success) {
               app.globalData.accessToken = {
                 userName: that.data.userName,
@@ -71,15 +85,13 @@
               })
             }
           },
-          complete () {
+          complete() {
             that.setData({
               loading: false
             })
           }
         })
       },
-    })
-      }
     })
   },
 
diff --git a/pages/module_user/userregistercompany/userregistercompany.js b/pages/module_user/userregistercompany/userregistercompany.js
index ad1417c..66ef194 100644
--- a/pages/module_user/userregistercompany/userregistercompany.js
+++ b/pages/module_user/userregistercompany/userregistercompany.js
@@ -19,18 +19,17 @@
     imgFiles: [],
 
     msg: [{
-        name: "璐﹀彿",
+        name: "鐢ㄦ埛鍚嶇О",
         id: "username",
         input: true,
         value: "",
-        noValue: false
+        noValue: false,
       },
       {
-        name: "瀵嗙爜",
+        name: "鏂板瘑鐮�",
         id: "password",
         input: true,
         type: 'password',
-        placeholder: '璇疯緭鍏ュ瘑鐮侊紙鏈�澶�20浣嶏級',
         maxLength: 20,
         value: "",
         noValue: false
@@ -46,8 +45,22 @@
         noValue: false,
       },
       {
-        name: "鍏徃鍚嶇О",
+        name: "浼佷笟鍚嶇О",
         id: "department",
+        input: true,
+        value: '',
+        noValue: false,
+      },
+      {
+        name: "浼佷笟鍦板潃",
+        id: "address",
+        input: true,
+        value: '',
+        noValue: false,
+      },
+      {
+        name: "鑱旂郴鏂瑰紡",
+        id: "contract",
         input: true,
         value: '',
         noValue: false,
@@ -144,6 +157,24 @@
       })
       return false
     }
+    //瀵嗙爜澶嶆潅搴︾‘璁�
+    var pwError
+    var pw = msg[1].value
+    var regex1 = /[a-zA-Z]/
+    var regex2 = /[0-9]/
+    var r = regex1.test(pw) && regex2.test(pw)
+    console.log('regex:' + r);
+    if (pw.length < 6) {
+      pwError = '瀵嗙爜浣嶆暟鏈�灏�6浣�'
+    } else if (!r) {
+      pwError = '瀵嗙爜蹇呴』鍖呭惈瀛楁瘝鍜屾暟瀛�'
+    }
+    if (pwError) {
+      this.setData({
+        errorMsg: pwError,
+      })
+      return false
+    }
 
     return true
   }
diff --git a/pages/module_user/userregistercompany/userregistercompany.wxml b/pages/module_user/userregistercompany/userregistercompany.wxml
index 77224d3..332b831 100644
--- a/pages/module_user/userregistercompany/userregistercompany.wxml
+++ b/pages/module_user/userregistercompany/userregistercompany.wxml
@@ -4,7 +4,7 @@
 
   <view class="page__bd">
     <view class="top-card">
-      <view class="tag">浼佷笟绫诲瀷</view>
+      <view class="tag"><text style="color: transparent;">*</text>浼佷笟绫诲瀷</view>
       <picker mode="selector" bindchange="changeSceneType" value="{{sceneTypeIndex}}" range="{{sceneTypes}}" range-key="name" class="value">
         <view>{{sceneTypes[sceneTypeIndex].name}}</view>
       </picker>
diff --git a/pages/notice/notice.js b/pages/notice/notice.js
index 64c5dd3..3b778c8 100644
--- a/pages/notice/notice.js
+++ b/pages/notice/notice.js
@@ -1,4 +1,9 @@
 // pages/notice/notice.js
+const notificationservice = require("../../service/notificationservice")
+const moment = require('../../utils/moment.min')
+const util = require("../../utils/util.js")
+const app = getApp()
+
 Page({
 
   /**
@@ -17,16 +22,9 @@
       }
     ],
     pageList: [
-      {
-        url: "/res/icons/notice_3.png"
-      },
-      {
-        url: "/res/icons/notice_1.png"
-      },
-      {
-        url: "/res/icons/notice_2.png"
-      },
-      
+      [],
+      [],
+      []
     ]
   },
 
@@ -66,5 +64,36 @@
    */
   onLoad: function (options) {
     this.tabsHeight('.page0');
+    this.getNotice()
+  },
+
+  onReachBottom () {
+    if (this.cPage && this.tPage) {
+      if (this.cPage < this.tPage) {
+        this.getNotice(this.cPage + 1)
+      }
+    }
+  },
+
+  getNotice(cPage = 1) {
+    var that = this
+    notificationservice.getNotification(app.globalData.accessToken.userId, cPage, {
+      onHead(header) {
+        that.cPage = parseInt(header.currentPage)
+        that.tPage = parseInt(header.totalPage)
+        console.log(`cPage:${that.cPage}, tPage:${that.tPage}`);
+      },
+      success(res) {
+        res.forEach(r => {
+          r.updateTime = util.formatTime(r.updateTime)
+        });
+        let notices = that.data.pageList[0].concat(res)
+        that.setData({
+          ['pageList[0]']: notices
+        })
+
+        that.tabsHeight('.page0');	//鍒锋柊楂樺害
+      }
+    }, 5)
   },
 })
\ No newline at end of file
diff --git a/pages/notice/notice.wxml b/pages/notice/notice.wxml
index 6f4d14f..ec340f0 100644
--- a/pages/notice/notice.wxml
+++ b/pages/notice/notice.wxml
@@ -1,4 +1,6 @@
 <!--pages/notice/notice.wxml-->
+<import src="/template/nodata/nodata.wxml"></import>
+
 <view class="page">
   <view class="swiper-tab">
     <scroll-view scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="false" scroll-with-animation="true">
@@ -12,11 +14,35 @@
     <block wx:for="{{pageList}}" wx:for-item="page" wx:key="n">
       <swiper-item>
         <view class="page{{index}}">
-          <image src="{{page.url}}" mode="aspectFit" style="width: 100%;"></image>
-          <image src="{{page.url}}" mode="aspectFit" style="width: 100%;"></image>
-          <image src="{{page.url}}" mode="aspectFit" style="width: 100%;"></image>
+          <block wx:if="{{page.length > 0}}">
+            <view wx:for="{{page}}" wx:for-item="notice" wx:key="index">
+              <view class="fyui-box  fyui-box__text">
+                <view class="fyui-box__hd">
+                  <image src="/res/icons/notice.png" class=""></image>
+                  <view class="title">
+                    <view>宸ヤ綔閫氱煡</view>
+                    <text>{{notice.updateTime}}</text>
+                  </view>
+                </view>
+                <view class="fyui-box__bd">
+                  <!-- <view class="fyui-box__content tag">鐩稿叧琛屼笟 -> {{item.fileIndustry}}</view> -->
+                  <view class="fyui-box__content des">{{notice.content}}</view>
+                </view>
+                <view class="fyui-box__ft">
+                  <text class="detail">鏌ョ湅璇︽儏 ></text>
+                  <button wx:if="{{notice.needSigned}}" class="sign" size="mini" type="{{notice.hasSigned ? 'default' : 'primary'}}" plain="{{notice.hasSigned}}" loading="">
+                    {{notice.hasSigned ? '宸茬鏀�' : '绛炬敹'}}
+                  </button>
+                </view>
+              </view>
+            </view>
+            <view class="page__ft"></view>
+          </block>
+          <template is="nodataPage" wx:else></template>
         </view>
       </swiper-item>
     </block>
   </swiper>
+
+
 </view>
\ No newline at end of file
diff --git a/pages/notice/notice.wxss b/pages/notice/notice.wxss
index b1a7112..b6f3038 100644
--- a/pages/notice/notice.wxss
+++ b/pages/notice/notice.wxss
@@ -7,7 +7,6 @@
   white-space: nowrap;
   z-index: 2;
   background-color: #EAFFF1;
-  padding: 2px;
 }
 
 .swiper-tab-list{
@@ -29,6 +28,74 @@
   display: block;
   top: 80rpx;
   width: 100%;
-  margin-top: 10px;
+  /* margin-top: 10px; */
   background-color: var(--fyui-BG_1);
+}
+
+.fyui-box {
+  margin-bottom: 16px;
+}
+
+
+.fyui-box .fyui-box__hd {
+  display: flex;
+  align-items: center;
+}
+
+.title {
+  display: flex;
+  width: 100%;
+  justify-content: space-between;
+  align-items: flex-end;
+}
+.title>text {
+  font-size: small;
+  color: var(--fyui-text-color_2);
+}
+
+
+.fyui-box .fyui-box__hd>image {
+  width: 12px;
+  height: 12px;
+  background-color: #4C97F8;
+  padding: 5px;
+  border-radius: 50%;
+}
+
+.fyui-box__ft {
+  /* position: relative; */
+  /* padding: 20px; */
+  margin-top: 40px;
+  align-items: center;
+}
+
+.fyui-box__ft:before{
+  content: " ";
+  width: 100%;
+  height: 1px;
+  background-color: var(--fyui-BG_1);
+  bottom: 50px;
+  position: absolute;
+}
+
+.detail {
+  white-space: nowrap;
+  color: var(--fyui-text-color_1);
+}
+.sign {
+  background-color: red;
+  margin: 0;
+}
+
+.des {
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 4;
+  width: 100%;
+  overflow: hidden;
+  /* text-overflow: ellipsis; */
+}
+
+.page__ft {
+  color: var(--fyui-text-color_2);
 }
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index dd79fcc..4086af7 100644
--- a/project.config.json
+++ b/project.config.json
@@ -22,7 +22,7 @@
     "checkSiteMap": true,
     "uploadWithSourceMap": true,
     "compileHotReLoad": false,
-    "useMultiFrameRuntime": false,
+    "useMultiFrameRuntime": true,
     "useApiHook": true,
     "babelSetting": {
       "ignore": [],
diff --git a/res/icons/avator_sys.png b/res/icons/avator_sys.png
new file mode 100644
index 0000000..a845931
--- /dev/null
+++ b/res/icons/avator_sys.png
Binary files differ
diff --git a/res/icons/nodata.png b/res/icons/nodata.png
new file mode 100644
index 0000000..744cad3
--- /dev/null
+++ b/res/icons/nodata.png
Binary files differ
diff --git a/res/icons/notice.png b/res/icons/notice.png
new file mode 100644
index 0000000..e3ac644
--- /dev/null
+++ b/res/icons/notice.png
Binary files differ
diff --git a/res/icons/tab_1.png b/res/icons/tab_1.png
index 99b56e7..370891b 100644
--- a/res/icons/tab_1.png
+++ b/res/icons/tab_1.png
Binary files differ
diff --git a/res/icons/tab_1_select.png b/res/icons/tab_1_select.png
index ef3edb4..2bca4fd 100644
--- a/res/icons/tab_1_select.png
+++ b/res/icons/tab_1_select.png
Binary files differ
diff --git a/res/icons/tab_2.png b/res/icons/tab_2.png
index 8eaa4f2..18d62ec 100644
--- a/res/icons/tab_2.png
+++ b/res/icons/tab_2.png
Binary files differ
diff --git a/res/icons/tab_2_select.png b/res/icons/tab_2_select.png
index d0b3c18..2ff6282 100644
--- a/res/icons/tab_2_select.png
+++ b/res/icons/tab_2_select.png
Binary files differ
diff --git a/res/icons/tab_3.png b/res/icons/tab_3.png
index 950fd29..8cc6fc6 100644
--- a/res/icons/tab_3.png
+++ b/res/icons/tab_3.png
Binary files differ
diff --git a/res/icons/tab_3_select.png b/res/icons/tab_3_select.png
index 35bb351..e7ac429 100644
--- a/res/icons/tab_3_select.png
+++ b/res/icons/tab_3_select.png
Binary files differ
diff --git a/res/icons/tab_4.png b/res/icons/tab_4.png
index 58233ef..bf2366d 100644
--- a/res/icons/tab_4.png
+++ b/res/icons/tab_4.png
Binary files differ
diff --git a/res/icons/tab_4_select.png b/res/icons/tab_4_select.png
index a6f92da..803baa0 100644
--- a/res/icons/tab_4_select.png
+++ b/res/icons/tab_4_select.png
Binary files differ
diff --git a/res/icons/tab_5.png b/res/icons/tab_5.png
index a745ffc..1962112 100644
--- a/res/icons/tab_5.png
+++ b/res/icons/tab_5.png
Binary files differ
diff --git a/res/icons/tab_5_select.png b/res/icons/tab_5_select.png
index 5b81a88..9a0e7f0 100644
--- a/res/icons/tab_5_select.png
+++ b/res/icons/tab_5_select.png
Binary files differ
diff --git a/res/icons/warn.png b/res/icons/warn.png
index ea17bee..2259d75 100644
--- a/res/icons/warn.png
+++ b/res/icons/warn.png
Binary files differ
diff --git a/res/icons/wm_assessment.png b/res/icons/wm_assessment.png
new file mode 100644
index 0000000..62360f2
--- /dev/null
+++ b/res/icons/wm_assessment.png
Binary files differ
diff --git a/res/icons/wm_commitment.png b/res/icons/wm_commitment.png
new file mode 100644
index 0000000..c71afa2
--- /dev/null
+++ b/res/icons/wm_commitment.png
Binary files differ
diff --git a/res/icons/wm_ledger.png b/res/icons/wm_ledger.png
new file mode 100644
index 0000000..b11e2b0
--- /dev/null
+++ b/res/icons/wm_ledger.png
Binary files differ
diff --git a/service/baserequest.js b/service/baserequest.js
index cd2c8db..c5b0c65 100644
--- a/service/baserequest.js
+++ b/service/baserequest.js
@@ -18,7 +18,7 @@
 const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/"
 const baseFileUrl = baseUrl + "/meeting/file/"
 
-function request(fun) { 
+function request(fun) {
   if (fun.params != undefined) {
     var param = ""
     Object.keys(fun.params).forEach(key => {
@@ -30,8 +30,8 @@
       }
     });
     var url = fun.url
-    fun.url = baseUrl + url + "?" + param 
-  }else{
+    fun.url = baseUrl + url + "?" + param
+  } else {
     var url = fun.url
     fun.url = baseUrl + url
   }
@@ -39,7 +39,10 @@
   fun1.success = function (res) {
     console.log("--------------璇锋眰缁撴灉----------------" + fun.url);
     console.log(res);
-    
+
+    if (fun.onHead) {
+      fun.onHead(res.header)
+    }
     fun.success(res.data)
     // if(res.data.success) {
     //   var head = res.data['head']
@@ -59,7 +62,7 @@
       icon: 'none'
     })
     if (fun.fail) {
-      fun.fail(error)      
+      fun.fail(error)
     }
   }
   fun1.complete = fun.complete
@@ -75,8 +78,8 @@
     fun['method'] = 'POST'
     request(fun)
   },
-  basePicUrl:basePicUrl,
-  baseUrl:baseUrl,
-  baseFileUrl:baseFileUrl,
+  basePicUrl: basePicUrl,
+  baseUrl: baseUrl,
+  baseFileUrl: baseFileUrl,
   baseIconUrl: baseIconUrl
 }
\ No newline at end of file
diff --git a/service/ledgerservice.js b/service/ledgerservice.js
index 808b086..0d0663e 100644
--- a/service/ledgerservice.js
+++ b/service/ledgerservice.js
@@ -52,13 +52,25 @@
     let cb = {
       url: `/ledger/${userId}/detail2`,
       params: {
-        ledgerSubTypeId: ledgerSubTypeId,
         sceneType: sceneType,
         time: time
       },
     }
+    if (ledgerSubTypeId) {
+      cb.params.ledgerSubTypeId = ledgerSubTypeId
+    }
     Object.assign(cb, fun)
 
-    $f.get(cb)
+    let fun1 = util.deepCopy(cb)
+    fun1.success = function (res) {
+      res.forEach(r => {
+        r.path1 = r.path1.split(';').map((value, index) => {
+          return $f.basePicUrl + value
+        })
+      });
+      cb.success(res)
+    }
+    
+    $f.get(fun1)
   },
 }
\ No newline at end of file
diff --git a/service/notificationservice.js b/service/notificationservice.js
new file mode 100644
index 0000000..d0b72de
--- /dev/null
+++ b/service/notificationservice.js
@@ -0,0 +1,27 @@
+const $f = require('./baserequest')
+const util = require('../utils/util')
+
+module.exports = {
+  //鑾峰彇鍙拌处绫诲瀷
+  getNotification: function (userId, page, fun, perPage = 3) {
+    let cb = {
+      url: `/notifications`,
+      params: {
+        userId: userId,
+        page: page,
+        per_page: perPage
+      },
+    }
+    Object.assign(cb, fun)
+
+    let fun1 = util.deepCopy(cb)
+    fun1.success = function (res) {
+      res.forEach(r => {
+        r.authorPicUrl = $f.basePicUrl + r.authorPicUrl
+        r.picUrl = $f.basePicUrl + r.picUrl
+      });
+      cb.success(res)
+    }
+    $f.get(fun1)
+  },
+}
\ No newline at end of file
diff --git a/template/nodata/nodata.wxml b/template/nodata/nodata.wxml
new file mode 100644
index 0000000..900f982
--- /dev/null
+++ b/template/nodata/nodata.wxml
@@ -0,0 +1,6 @@
+<template name="nodataPage">
+  <view class="no-data">
+    <image src="/res/icons/nodata.png" mode="widthFix"></image>
+    <view class="more">鏆傛棤璁板綍</view>
+  </view>
+</template>
\ No newline at end of file
diff --git a/utils/util.js b/utils/util.js
index cc27905..d59968c 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -1,12 +1,32 @@
-const formatTime = date => {
-  const year = date.getFullYear()
-  const month = date.getMonth() + 1
-  const day = date.getDate()
-  const hour = date.getHours()
-  const minute = date.getMinutes()
-  const second = date.getSeconds()
+const moment = require('./moment.min')
 
-  return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
+
+
+const formatTime = date => {
+  const time = moment(date)
+  const now = moment()
+
+  const timeYear = time.year()
+  const timeMonth = time.month() + 1
+  const timeDay = time.date()
+
+  const thisYear = now.year()
+  const thisMonth = now.month() + 1
+  const thisDay = now.date()
+
+  if (timeYear < thisYear) {
+    return time.format('YYYY骞碝M鏈�')
+  } else if (timeMonth < thisMonth) {
+    return time.format('MM鏈圖D鏃�')
+  } else if (timeDay < thisDay) {
+    if (timeDay + 1 == thisDay) {
+      return '鏄ㄥぉ'
+    } else {
+      return time.format('MM鏈圖D鏃�')
+    }
+  } else {
+    return time.fromNow()
+  }
 }
 
 const formatNumber = n => {

--
Gitblit v1.9.3