riku
2026-01-19 068be2757aa2d51e3f6604dae54287683160ad0e
2026.1.19

1. 新增台账提交期限可配置
2. 新增自巡查可承诺(待完成)
已修改13个文件
已添加1个文件
393 ■■■■■ 文件已修改
app.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/loadConfig.js 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/ledger.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mLedger/home/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mLedger/home/summary.wxss 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mSelfPatrol/components/self-patrol/index.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mSelfPatrol/components/self-patrol/index.wxml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mSelfPatrol/components/self-patrol/index.wxss 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mSelfPatrol/patrolhome/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mUser/behaviors/bLogin.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.private.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/baserequest.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/configservice.js 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.json
@@ -24,7 +24,6 @@
    "pages/mLearn/learn/learn",
    "pages/mLearn/learfile/learnfile",
    "pages/mLearn/learncase/learncase",
    "pages/mLedger/ledgerhome/ledgerhome",
    "pages/mLedger/ledgerupload/ledgerupload",
    "pages/mLedger/ledgerhistory/ledgerhistory",
    "pages/mNotice/notice/notice",
config/loadConfig.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
/**
 * ä»ŽæœåŠ¡å™¨åŠ è½½åŠ¨æ€é…ç½®
 */
import configservice from '../service/configservice';
const app = getApp();
function loadConfig() {
  const pList = [];
  const userId = app.globalData.accessToken.userId;
  const f1 = new Promise((resolve, reject) => {
    configservice.fetchUserSetting(userId, {
      success: res => {
        if (res.data) {
          app.globalData.userSetting = res.data
        } else {
          app.globalData.userSetting = {}
        }
        // å°è´¦æäº¤æœŸé™
        if (app.globalData.userSetting.ledgerDeadline == undefined) {
          app.globalData.userSetting.ledgerDeadline = 10
        }
        // è‡ªå·¡æŸ¥æ˜¯å¦å…è®¸æ‰¿è¯ºä¸€å¹´å†…无需重复提交
        if (app.globalData.userSetting.selfPatrolPromise == undefined) {
          app.globalData.userSetting.selfPatrolPromise = false
        }
        wx.setStorage({
          key: 'user_setting',
          data: res.data,
        });
        console.log('app.globalData.userSetting', app.globalData.userSetting);
        resolve()
      },
      fail: e => {
        reject(e)
      }
    });
  });
  pList.push(f1);
  return Promise.all(pList);
}
export {
  loadConfig
};
model/ledger.js
@@ -1,7 +1,8 @@
const moment = require('../utils/moment.min');
const app = getApp();
function name(params) {
  const DEADLINEDAY = 10;
  const DEADLINEDAY = app.globalData.userSetting.ledgerDeadline;
  let monthInfo = {
    totalMust: 0,
    finishedMust: 0,
pages/home/home.wxss
@@ -7,6 +7,7 @@
.page__title {
  margin-left: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--fyui-text-color_1);
  /* font-weight: 600; */
  white-space: nowrap;
pages/mLedger/home/index.js
@@ -16,7 +16,7 @@
Page({
  //每月台账提交期限日
  DEADLINEDAY: 10,
  DEADLINEDAY: app.globalData.userSetting.ledgerDeadline,
  behaviors: [useTab, useSummary, useToolbar, useList],
  data: {
    tabList: [],
pages/mLedger/home/summary.wxss
@@ -1,13 +1,188 @@
@import '../ledgerhome/ledgerhome.wxss';
@import '../ledgerhome/ledgerhome.wxss';.banner-bg {
  position: fixed;
  width: 100%;
  height: 60%;
  background: linear-gradient(to bottom, #57E4CB, #83b6ae);
}
.page__hd {
  /* 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;
  align-items: baseline;
}
.head_row_item{
  text-align: center;
  /* width: 20vw; */
  flex: 1;
  /* background-color: red; */
}
.head_row_item_tag{
  font-size: 12px;
  font-weight: 559;
}
.head_right {
  text-align: end;
  font-size: 12px;
  /* background-color: brown; */
  margin-bottom: 8px;
  vertical-align: middle;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.head_tag{
  font-size: 12px;
  color: white;
}
.head_btn{
  /* background-color: rgb(11, 90, 77);
  padding: 4px 6px;
  border-radius: 4px; */
  background-color: initial;
  padding: 4px 0px;
  border-radius: 4px;
}
.head_btn:active{
  background-color: rgba(11, 90, 77, 0.5);
}
.head_tag>text {
  font-size: 40px;
  font-weight: 600;
}
.head_1 {
  font-size: 30px;
}
.head_1_big{
  font-size: 30px;
}
.head_3 {
  font-size: 12px;
  margin-bottom: 16px;
}
.page__bd {
  padding-bottom: 0;
}
.swiper-tab{
  width: 100%;
  text-align: center;
  line-height: 80rpx;
  white-space: nowrap;
  z-index: 2;
  /* background-color: #65EAD2; */
  /* background-color: #70ea65; */
  /* padding: 2px; */
}
.swiper-tab_view{
  /* background-color: blueviolet; */
}
.swiper-tab-list{
  position: relative;
  font-size: 30rpx;
  display: inline-block;
  min-width: 18%;
  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;
  border-bottom: 4rpx solid white;
}
.swiper-box{
  display: block;
  top: 80rpx;
  width: 100%;
  margin-top: 1px;
  background-color: white;
}
.ledger-group {
  display: flex;
  flex-wrap: wrap;
  /* background-color: white; */
  justify-content: flex-start;
}
.ledger-item {
  position: relative;
  width: 33.33333vw;
  text-align: center;
  /* background-color: teal; */
  margin-top: 16px;
  margin-bottom: 16px;
  font-size: x-small;
}
.ledger-item:active{
  background-color: var(--fyui-BG-COLOR-ACTIVE);
}
.ledger-icon {
  width: 60px;
  height: 60px;
}
.ledger-tag {
  position: absolute;
  right: 6vw;
  top: 6px;
  width: 32px;
  height: 16px;
  color: white;
  padding: 1px;
  border-radius: 50%;
  font-size: 10px;
}
/* .head_right {
} */
/* .head_btn{
  background-color: initial;
  padding: 4px 0px;
  border-radius: 4px;
} */
pages/mSelfPatrol/components/self-patrol/index.js
@@ -1,4 +1,5 @@
import { parseSelfPatrol, refreshLedgerStatus } from '../../../../model/ledger';
import configservice from '../../../../service/configservice';
const ledgerservice = require('../../../../service/ledgerservice');
const moment = require('../../../../utils/moment.min');
const app = getApp();
@@ -17,6 +18,9 @@
    thisMonth: '',
    tags1: { count: 0 },
    pageList1: [],
    // æ˜¯å¦æœ‰æƒé™å¯ä»¥è¿›è¡Œè‡ªå·¡æŸ¥æ‰¿è¯º
    promiseValid: app.globalData.userSetting.selfPatrolPromise,
    promised: false
  },
  lifetimes: {
@@ -48,6 +52,14 @@
      });
    },
    getPromise() {
      configservice.fetchUserSettingRecord(app.globalData.accessToken.userId, {
        success: res => {
        },
      })
    },
    getLedgerType(time, success, lastMonth) {
      var that = this;
      ledgerservice.getLedgerSummary(
pages/mSelfPatrol/components/self-patrol/index.wxml
@@ -1,12 +1,13 @@
<!-- <scroll-view
  bindrefresherrefresh="init"
  refresher-enabled
  refresher-triggered="{{refresh}}"
  scroll-y
  style="height: 90vh;"
> -->
<view class="self-patrol-promise" bindtap="gotoPromise">
  <t-icon name="notification-error" size="32rpx"/>
  <text class="promise-text"></text>
  <text class="promise_btn">去承诺 ></text>
</view>
  <view class="self-patrol-static">
    <view> {{thisMonth}} </view>
  <view class="head_right">
    <view style="font-size: 14px"> {{thisMonth}} </view>
    <text class="head_btn" bindtap="gotoHistory">历史记录 ></text>
  </view>
    <view class="head_row">
      <view class="head_row_item">
        <view class="head_tag">自巡查提交数</view>
@@ -18,9 +19,6 @@
          >{{progress}}<text class="head_row_item_tag">%</text></view
        >
      </view>
    </view>
    <view class="head_right">
      <text class="head_btn" bindtap="gotoHistory">历史记录 ></text>
    </view>
    <!-- <view class="self-patrol-progress">
    <t-progress percentage="{{progress}}" />
@@ -39,4 +37,3 @@
      t-class-text="grid-item"
    />
  </t-grid>
<!-- </scroll-view> -->
pages/mSelfPatrol/components/self-patrol/index.wxss
@@ -1,5 +1,53 @@
.self-patrol-promise {
  color: var(--fyui-text-color_1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 8rpx 8rpx;
  background-color: var(--fyui-primary-color-2);
}
.promise_btn {
  font-weight: 600;
  white-space: nowrap;
}
.promise-text {
  /* white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; */
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow-x: hidden;
  text-overflow: ellipsis;
  width: 80%;
  height: 20px;
  line-height: 20px;
}
.promise-text::after {
  content: "签署自巡查承诺,可将自巡查有效期延长为当年有效!";
  position: absolute;
  top: 0;
  left: 0%;
  white-space: nowrap;
  animation: scrollText 10s linear 0s infinite normal;
}
@keyframes scrollText {
  0% {
    transform: translateX(100%); /* å¼€å§‹ä½ç½® */
  }
  100% {
    transform: translateX(-100%); /* ç»“束位置,根据需要调整 */
  }
}
.self-patrol-static {
  padding: 16rpx 32rpx;
  margin: 16rpx 32rpx;
  padding: 4rpx;
  background-color: white;
  border-radius: 8px;
}
.self-patrol-progress {
@@ -27,16 +75,18 @@
}
.head_right {
  text-align: end;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  /* background-color: brown; */
  margin-bottom: 8px;
  vertical-align: middle;
  /* vertical-align: middle; */
}
.head_tag{
  font-size: 12px;
  color: var(--fyui-text-color_3);
  color: var(--fyui-text-color_2);
}
.head_btn{
@@ -44,6 +94,7 @@
  padding: 4px 6px;
  border-radius: 4px;
  color: white;
  white-space: nowrap;
}
.head_btn:active{
pages/mSelfPatrol/patrolhome/index.wxml
@@ -1,5 +1,5 @@
<view class="page">
  <view class="page__hd"></view>
  <!-- <view class="page__hd"></view> -->
  <view class="page__bd">
    <t-self-patrol wx:if="{{!exist}}" />
    <t-tabs wx:else sticky stickyProps="{{stickyProps}}" defaultValue="{{0}}">
pages/mUser/behaviors/bLogin.js
@@ -1,5 +1,8 @@
import userservice from '../../../service/userservice'
import moment from '../../../utils/moment.min'
import {
  loadConfig
} from "../../../config/loadConfig";
const app = getApp()
@@ -74,9 +77,10 @@
            },
            complete() {
              // wx.hideLoading()
              that.setData({
                loading: false
              })
              // 2026.1.19 åŠ è½½çŠ¶æ€ç”±ä¸‹é¢é…ç½®èŽ·å–æŽ¥å£ ç»“束
              // that.setData({
              //   loading: false
              // })
            }
          })
        },
@@ -84,6 +88,7 @@
    },
    gotoHomePage() {
      var that = this
      if (app.globalData.accessToken.userName == 'pcheck') {
        wx.navigateTo({
          url: '/pages/mExtra/pSupervisiontask/pSupervisiontask',
@@ -96,18 +101,29 @@
              const now = moment()
              app.globalData.newUser = now.diff(registerTime, 'months') <= 1
            }
            console.log(app.globalData.newUser);
            console.log('app.globalData.newUser', app.globalData.newUser);
            app.globalData.userInfo = data
            app.globalData.isLogin = true
            wx.setStorage({
              key: 'userInfo',
              data: data,
              success: (result) => {
                loadConfig().then(() => {
                wx.switchTab({
                  url: '/pages/home/home',
                })
              }
                  })
                  .finally(() => {
                    that.setData({
                      loading: false,
                    });
                  });
              },
              fail: err => {
                that.setData({
                  loading: false,
                });
              },
            })
          }
        })
project.private.config.json
@@ -5,5 +5,5 @@
  },
  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json ä¸­çš„相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
  "projectname": "ep-law-abiding",
  "libVersion": "3.3.4"
  "libVersion": "3.11.2"
}
service/baserequest.js
@@ -10,8 +10,8 @@
const util = require('../utils/util.js');
// å°ç¨‹åºåŽå°
// const baseUrl = "http://192.168.0.138:8082"
const baseUrl = 'https://fyami.com.cn';
const baseUrl = "http://192.168.1.9:8082"
// const baseUrl = 'https://fyami.com.cn';
const bu = 'https://fyami.com.cn';
const basePicUrl = `${bu}/images/`;
const baseIconUrl = `${bu}/images/weixin/eplaw/`;
@@ -22,8 +22,8 @@
const spBu = "https://fyami.com.cn:447"
const spPicUrl = `${spBu}/images/`;
// const mode = 'debug';
const mode = 'prod';
const mode = 'debug';
// const mode = 'prod';
function request(fun, hostUrl) {
  const bUrl = hostUrl ? hostUrl : baseUrl;
service/configservice.js
@@ -0,0 +1,30 @@
const $f = require("./baserequest")
module.exports = {
  // èŽ·å–ç”¨æˆ·çš„ä¸šåŠ¡å±žæ€§é…ç½®ä¿¡æ¯ï¼ˆä¾‹å¦‚å°è´¦ä¸ŠæŠ¥æ—¥æœŸï¼Œè‡ªå·¡æŸ¥æ˜¯å¦éœ€è¦æ‰¿è¯ºç­‰ï¼‰
  fetchUserSetting(userId, fun) {
    let cb = {
      url: `/config/user/setting`,
      params: {
        userId: userId,
      }
    }
    Object.assign(cb, fun)
    $f.get(cb)
  },
  // èŽ·å–ç”¨æˆ·çš„ä¸šåŠ¡å±žæ€§é…ç½®ç»“æžœï¼ˆä¾‹å¦‚è‡ªå·¡æŸ¥æ˜¯å¦å·²ç»æ‰¿è¯ºç­‰ï¼‰
  fetchUserSettingRecord(userId, fun) {
    let cb = {
      url: `/config/user/setting/record`,
      params: {
        userId: userId,
      }
    }
    Object.assign(cb, fun)
    $f.get(cb)
  }
}