unknown
2022-08-16 edd35a251b58b1fad17015deda92324f74458434
台账模块、智能咨询模块

1. 修改样式及部分布局
已修改43个文件
已添加24个文件
2351 ■■■■■ 文件已修改
app.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.wxss 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/inputcell/inputcell.wxml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/inputcell/inputcell.wxss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/toptips/toptips.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/assessment/assessment.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxss 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/icons/icons.js 512 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/icons/icons.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/icons/icons.wxml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/icons/icons.wxss 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/learn/learn.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetail/consultdetail.wxml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.wxml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.wxss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultonline/consultonline.js 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultonline/consultonline.json 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultonline/consultonline.wxml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultonline/consultonline.wxss 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultproblem/consultproblem.js 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultproblem/consultproblem.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultproblem/consultproblem.wxml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultproblem/consultproblem.wxss 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultsearch/consultsearch.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultsearch/consultsearch.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultsearch/consultsearch.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhistory/ledgerhistory.js 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhistory/ledgerhistory.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhistory/ledgerhistory.wxml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhistory/ledgerhistory.wxss 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhome/ledgerhome.js 183 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhome/ledgerhome.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhome/ledgerhome.wxml 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhome/ledgerhome.wxss 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerupload/ledgerupload.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userlogin/userlogin.js 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistercompany/userregistercompany.js 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistercompany/userregistercompany.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/notice.js 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/notice.wxml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/notice.wxss 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/avator_sys.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/nodata.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/notice.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_1.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_1_select.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_2.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_2_select.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_3.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_3_select.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_4.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_4_select.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_5.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/tab_5_select.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/warn.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/wm_assessment.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/wm_commitment.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/wm_ledger.png 补丁 | 查看 | 原始文档 | blame | 历史
service/baserequest.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/ledgerservice.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/notificationservice.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
template/nodata/nodata.wxml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/util.js 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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",
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 ***********************************/
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>
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;
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 {
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`
        }
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 != "") {
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">
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;
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
            })
        })
    }
})
pages/icons/icons.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
{
  "usingComponents": {
    "mp-icon": "/component/icon/icon"
  }
}
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>
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;
}
pages/learn/learn.wxss
@@ -7,7 +7,6 @@
  white-space: nowrap;
  z-index: 2;
  background-color: #65EAD2;
  padding: 2px;
}
.swiper-tab-list{
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>
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å¹´MM月DD日")
    } else {
      return undefined
    }
  },
})
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>
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;
}
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);
  }
})
pages/module_consult/consultonline/consultonline.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
{
  "navigationBarTitleText": "智能咨询",
  "navigationBarBackgroundColor": "#EFF9F4",
  "navigationBarTextStyle": "black",
  "usingComponents": {
    "mp-icon": "/component/icon/icon"
  }
}
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>
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;
}
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);
  }
})
pages/module_consult/consultproblem/consultproblem.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
{
  "navigationBarTitleText": "常见问题",
  "navigationBarBackgroundColor": "#57E4CB",
  "navigationBarTextStyle": "white",
  "usingComponents": {}
}
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>
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;
}
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) => {
pages/module_consult/consultsearch/consultsearch.json
@@ -1,5 +1,5 @@
{
  "navigationBarTitleText": "搜索",
  "navigationBarTitleText": "环保知识库一键查询",
  "navigationBarBackgroundColor": "#57E4CB",
  "navigationBarTextStyle": "white",
  "usingComponents": {
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>
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: '历史台账'
        })
      },
    })
  },
})
pages/module_ledger/ledgerhistory/ledgerhistory.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
{
  "usingComponents": {
    "mp-icon": "/component/icon/icon"
  }
}
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>
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{
}
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})
  }
})
pages/module_ledger/ledgerhome/ledgerhome.json
@@ -1,5 +1,7 @@
{
  "navigationBarTitleText": "台账管理",
  "navigationBarBackgroundColor": "#57E4CB",
  "usingComponents": {}
  "usingComponents": {
    "mp-icon": "/component/icon/icon"
  }
}
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>
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;
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})
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
            })
          }
        })
      },
    })
      }
    })
  },
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
  }
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>
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)
  },
})
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>
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);
}
project.config.json
@@ -22,7 +22,7 @@
    "checkSiteMap": true,
    "uploadWithSourceMap": true,
    "compileHotReLoad": false,
    "useMultiFrameRuntime": false,
    "useMultiFrameRuntime": true,
    "useApiHook": true,
    "babelSetting": {
      "ignore": [],
res/icons/avator_sys.png
res/icons/nodata.png
res/icons/notice.png
res/icons/tab_1.png

res/icons/tab_1_select.png

res/icons/tab_2.png

res/icons/tab_2_select.png

res/icons/tab_3.png

res/icons/tab_3_select.png

res/icons/tab_4.png

res/icons/tab_4_select.png

res/icons/tab_5.png

res/icons/tab_5_select.png

res/icons/warn.png

res/icons/wm_assessment.png
res/icons/wm_commitment.png
res/icons/wm_ledger.png
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
}
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)
  },
}
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)
  },
}
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>
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å¹´MM月')
  } else if (timeMonth < thisMonth) {
    return time.format('MM月DD日')
  } else if (timeDay < thisDay) {
    if (timeDay + 1 == thisDay) {
      return '昨天'
    } else {
      return time.format('MM月DD日')
    }
  } else {
    return time.fromNow()
  }
}
const formatNumber = n => {