riku
2022-10-28 b45a01a8bee4a9bff5f9c248ead301b8675d1099
2022.10.28

1. bug修复
已修改16个文件
124 ■■■■ 文件已修改
pages/home/home.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_assessment/assessment/assessment.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_assessment/assessment/assessment.wxml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_assessment/assessment/assessment.wxss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_assessment/gradereport/gradereport.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_ledger/ledgerhome/ledgerhome.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_ledger/ledgerhome/ledgerhome.wxml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_ledger/ledgerupload/ledgerupload.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_service/p_schedule/p_schedule.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_service/p_schedule/p_schedule.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/behaviors/b_login.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/mine/mine.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/mine/mine.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/userlogin/userlogin.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/userloginpw/userloginpw.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js
@@ -232,8 +232,8 @@
      }
    });
    monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
    monthInfo.percent2 = Math.round(monthInfo.finishedSelf / monthInfo.totalSelf * 100)
    monthInfo.percent = monthInfo.totalMust == 0 ? 0 : Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
    monthInfo.percent2 = monthInfo.totalSelf == 0 ? 0 : Math.round(monthInfo.finishedSelf / monthInfo.totalSelf * 100)
    this.setData({monthInfo})
  },
@@ -302,6 +302,13 @@
      wx.navigateTo({
        url: url
      })
    } else {
      wx.showToast({
        title: '功能敬请期待',
        duration: 1000,
        icon: 'none',
        mask: true,
      })
    }
  }
})
pages/home/home.wxml
@@ -123,7 +123,7 @@
            <view class="fyui-box__tag">
              <view>{{item.time}}</view>
              <view class="flex-h">
                <image src="/res/icons/view.png" class="icon"></image>{{item.views}}
                <image src="/res/icons/view.png" class="image-16"></image>{{item.views}}
              </view>
            </view>
          </view>
pages/m_assessment/assessment/assessment.js
@@ -296,16 +296,16 @@
        }
        break;
      case "1":
        //
        //历史评估记录详情
        var period = e.currentTarget.dataset.period
        url = `/pages/m_assessment/gradereport/gradereport?period=${period}`
        break;
      case "2":
        //
        //碳排放智能估算
        url = ""
        return;
        break;
      case "3":
        //
        //其他专项自测
        url = ""
        break;
      case "4":
@@ -317,6 +317,13 @@
      wx.navigateTo({
        url: url
      })
    } else {
      wx.showToast({
        title: '功能敬请期待',
        duration: 1000,
        icon: 'none',
        mask: true,
      })
    }
  }
})
pages/m_assessment/assessment/assessment.wxml
@@ -36,7 +36,7 @@
      <!-- <mp-icon icon="arrow" class="" size="15" color="white"></mp-icon> -->
    </view>
    <view class="flex-h">
      <view class="flex-h_block">
      <view class="flex-h_block" bindtap="goto" data-index="2">
        <view class="top-card">
          <image src="/res/icons/ass_2.png" mode="aspectFit"></image>
          <view>
@@ -45,7 +45,7 @@
          </view>
        </view>
      </view>
      <view class="flex-h_block">
      <view class="flex-h_block" bindtap="goto" data-index="3">
        <view class="top-card top-card_2">
          <image src="/res/icons/ass_1.png" mode="aspectFit"></image>
          <view>
@@ -99,9 +99,6 @@
              </view>
              <view data-id="{{item.scoreId}}" class="h-btn" bindtap="goto" data-index="1" data-period="{{item.period}}">去看看</view>
            </view>
            <!-- <view class="h-line_2">
            <view data-id="{{item.scoreId}}" class="h-btn" bindtap="goto" data-index="1" data-period="{{item.time}}">去看看</view>
          </view> -->
          </view>
        </view>
      </view>
pages/m_assessment/assessment/assessment.wxss
@@ -106,7 +106,8 @@
.top-card {
  position: relative;
  border-radius: 4px;
  background: linear-gradient(90deg, #A3D9F5, #88E1EC);
  /* background: linear-gradient(90deg, #A3D9F5, #88E1EC); */
  background-color: rgb(199, 199, 199);
  color: white;
  padding: 8px;
  margin-left: 10px;
@@ -117,7 +118,8 @@
}
.top-card_2 {
  background: linear-gradient(90deg, #87CEB2, #6CD398);
  /* background: linear-gradient(90deg, #87CEB2, #6CD398); */
  background-color: rgb(199, 199, 199);
  margin-left: 2px;
  margin-right: 10px;
}
pages/m_assessment/gradereport/gradereport.js
@@ -156,7 +156,6 @@
  onReady: function () {
    this.ecComponent = this.selectComponent('#mychart-dom-radar');
    this.initChart()
    this.getDetail()
  },
  /**
@@ -188,6 +187,7 @@
      }],
      value: [100, 100, 80, 5, 67, 82]
    }
    setTimeout(() => {
    this.ecComponent.init((canvas, width, height, dpr) => {
      // 获取组件的 canvas、width、height 后的回调函数
      // 在这里初始化图表
@@ -201,9 +201,12 @@
      // 将图表实例绑定到 this 上,可以在其他成员函数(如 dispose)中访问
      this.chart = chart;
        this.getDetail()
      // 注意这里一定要返回 chart 实例,否则会影响事件处理等
      return chart;
    });
    }, 1000);
  },
  getDetail() {
@@ -279,6 +282,7 @@
          losePoints: losePoints,
          losePointsItem: losePointsItem
        })
        debugger
        setOption(that.chart, classPoints)
      }
    })
pages/m_ledger/ledgerhome/ledgerhome.js
@@ -63,7 +63,7 @@
   */
  onLoad(options) {
    let now = moment()
    let limitTime = moment().day(this.DEADLINEDAY)
    let limitTime = moment().date(this.DEADLINEDAY)
    //如果是新注册用户不到一个月,则不提醒本月情况,直接提醒下个月的情况
    if (app.globalData.newUser) {
      limitTime.add(1, 'M')
@@ -86,6 +86,7 @@
        pageList: r[1],
        thisMonthInfo: r[2]
      })
      this.tabsHeight('.page0')
    }) //本月
    this.getLedgerType(now.add(-1, 'M').format('YYYY-MM-DD'), r => {
      this.setData({
@@ -147,13 +148,13 @@
      //选项卡
      if (s.upLoad) {
        s.tag = '/res/icons/round_check_fill.png'
        s.opacity = 0.2
        s.opacity = 0.7
      } else if (s.ledgerFinished) {
        s.tag = '/res/icons/warning_yellow.png'
        s.opacity = 1
      } else if (!s.needUpdate) {
        s.tag = '/res/icons/warning_selected.png'
        s.opacity = 0.5
        s.opacity = 0.8
      } else {
        s.tag = '/res/icons/warning_red.png'
        s.opacity = 1
@@ -168,16 +169,16 @@
    if (monthInfo.finishedMust == 0) {
      monthInfo.status = '未提交'
      if (lastMonth) {
        monthInfo.suggestion = '当期台账完全未提交,严重影响评估结果,后续请注意'
        monthInfo.suggestion = '建议:当期台账完全未提交,严重影响评估结果,后续请注意'
      } else {
        monthInfo.suggestion = '请尽快提交台账'
        monthInfo.suggestion = '建议:请尽快提交台账'
      }
    } else if (monthInfo.finishedMust < monthInfo.totalMust) {
      monthInfo.status = '部分提交'
      if (lastMonth) {
        monthInfo.suggestion = '当期台账部分未提交,会影响评估结果,后续请尽量提交所有台账'
        monthInfo.suggestion = '建议:当期台账部分未提交,会影响评估结果,后续请尽量提交所有台账'
      } else {
        monthInfo.suggestion = '当前已提交部分台账,请补全剩余台账'
        monthInfo.suggestion = '建议:当前已提交部分台账,请补全剩余台账'
      }
    } else {
      monthInfo.status = '已提交'
@@ -230,6 +231,7 @@
          let pageList = that.data.pageList
          pageList[i[0]][i[1]].upLoad = true
          pageList[i[0]][i[1]].tag = '/res/icons/round_check_fill.png'
          pageList[i[0]][i[1]].opacity = 0.7
          that.setData({
            pageList
          })
pages/m_ledger/ledgerhome/ledgerhome.wxml
@@ -25,10 +25,12 @@
        </view>
        <view class="head_row">
          <view class="head_tag">本期台账提交日:{{deadline}}</view>
          <block wx:if="{{thisMonthInfo.percent < 1}}">
          <view wx:if="{{leftday > 0}}" class="head_tag">剩余<text>{{leftday}}</text>天</view>
          <view wx:else class="head_tag">逾期 <text>{{thisMonthInfo.overtime}}</text>天</view>
          </block>
        </view>
        <view class="head_tag">建议:{{thisMonthInfo.suggestion}}</view>
        <view class="head_tag">{{thisMonthInfo.suggestion}}</view>
      </block>
      <block wx:else>
pages/m_ledger/ledgerupload/ledgerupload.js
@@ -95,7 +95,7 @@
  //台账提交成功后
  _success(res) {
    this.getOpenerEventChannel().emit('uploadOver', {
      indexGroup: that.data.indexGroup
      indexGroup: this.data.indexGroup
    })
    wx.navigateBack({
      delta: 1,
pages/m_service/p_schedule/p_schedule.js
@@ -39,6 +39,7 @@
          time: s.time.format('MM月DD日'),
          name: e.name,
          left: s.diffDays,
          s: s
        })
      });
    }
@@ -54,12 +55,22 @@
    })
  },
  goto() {
  goto(e) {
    var that = this
    const index = e.currentTarget.dataset.index
    const s = that.data.schedules[index[0]].details[index[1]].s
    const _s = {
      time: s.time.format('YYYY-MM-DD dddd'),
      events: s.events,
      diffDays: s.diffDays,
      steps: s.steps,
      category: s.category
    }
    console.log(that.data.schedules);
    wx.navigateTo({
      url: '/pages/m_service/p_scheduledetail/p_scheduledetail',
      success: (res) => {
        res.eventChannel.emit('acceptDataFromOpenerPage', that.data.thisSchedule)
        res.eventChannel.emit('acceptDataFromOpenerPage', _s)
      },
    })
  }
pages/m_service/p_schedule/p_schedule.wxml
@@ -3,9 +3,9 @@
    <view>共有{{totals}}条日程记录</view>
  </view>
  <view class="page__bd">
    <block wx:for="{{schedules}}" wx:key="index">
    <block wx:for="{{schedules}}" wx:key="i" wx:for-index="i">
      <view class="sm-title">{{item.category}}</view>
      <view wx:for="{{item.details}}" wx:key="i" wx:for-item="d" class="sm-card" bindtap="goto">
      <view wx:for="{{item.details}}" wx:key="j" wx:for-index="j" wx:for-item="d" class="sm-card" data-index="{{[i, j]}}" bindtap="goto">
        <view class="sm-time">{{d.time}}</view>
        <view class="history_icon">
          <view class="history_icon_1">
pages/m_user/behaviors/b_login.js
@@ -15,6 +15,8 @@
  },
  methods: {
    loginPw(accessTokenPW) {
      // accessTokenPW.nickName = '\xF0\x9F\x98\x84'
      // debugger
      wx.showLoading({
        title: '登录中',
        mask: true,
pages/m_user/mine/mine.js
@@ -11,7 +11,9 @@
  data: {
    version: app.globalData.version,
    //认证状态,[企业, 场景, 个人]
    authStatus:[]
    authStatus:[],
    //场景类型
    sceneType: app.globalData.userInfo.extension2
  },
  /**
@@ -19,7 +21,8 @@
   */
  onLoad: function (options) {
    this.setData({
      userRealName: app.globalData.userInfo.realname
      userRealName: app.globalData.userInfo.realname,
      sceneType: app.globalData.userInfo.extension2
    })
    this.getBaseInfo()
  },
pages/m_user/mine/mine.wxml
@@ -17,7 +17,7 @@
        <!-- <view>{{authStatus[0] ? '修改企业信息' : '企业信息认证'}}</view> -->
        <view>企业信息认证</view>
      </view>
      <view bindtap="gotoAuthentication" data-index="1">
      <view wx:if="{{sceneType == 1}}" bindtap="gotoAuthentication" data-index="1">
        <text class="{{authStatus[1] ? 'status-1' : 'status-2'}}">{{authStatus[1] ? '已认证' : '未认证'}}</text>
        <image src="/res/icons/scene_info.png"></image>
        <!-- <view>{{authStatus[1] ? '修改店铺信息' : '店铺信息认证'}}</view> -->
pages/m_user/userlogin/userlogin.js
@@ -64,7 +64,7 @@
          console.log(res);
        },
        fail(e) {
          console.log(fail);
          console.log(e);
        },
        complete() {
          that.loginPw(app.globalData.userProfile)
@@ -117,6 +117,19 @@
  gotoLogin(toast) {
    if (!this.waitAgree()) return
    wx.requestSubscribeMessage({
      tmplIds: [
        '6JQFOJ12yBvKfRg_duSdwKiH5_J3LpICmz3Li-L1Cr8',
        'zPNMzF5WsshniJyl83DD-lDZtNvx7JyqLbKgqDl0qvU',
        'dqREi7vAd03OOirTgBGcm5aCihZJKBjVpiA8Kbu4B8w'
      ],
      success(res) {
        console.log(res);
      },
      fail(e) {
        console.log(e);
      },
      complete() {
    wx.navigateTo({
      url: '/pages/m_user/userloginpw/userloginpw',
      success: (result) => {
@@ -127,6 +140,8 @@
      fail: (res) => {},
      complete: (res) => {},
    })
      }
    })
  },
  checkboxChange(e) {
pages/m_user/userloginpw/userloginpw.js
@@ -112,7 +112,13 @@
          token.userName = this.data.userName
          token.password = this.data.password
          this.loginPw(token)
        }
        },
        fail:(e)=>{
        },
        complete:()=>{
        },
      })
    }