riku
2022-08-23 8fbd6b8d09e70494d920cc0b77812e9643be3196
2022.8.23
已修改65个文件
已删除3个文件
已添加24个文件
已重命名1个文件
2747 ■■■■ 文件已修改
app.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.json 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.wxss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/loading/loading.js 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/loading/loading.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/loading/loading.wxml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/loading/loading.wxss 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/progress/progress.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/progress/progress.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/progress/progress.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/switchtab/switchtab.js 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/switchtab/switchtab.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/switchtab/switchtab.wxml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/switchtab/switchtab.wxss 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/assessment/assessment.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/assessment/assessment.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/assessment/assessment.wxml 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/assessment/assessment.wxss 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/grade/grade.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/grade/grade.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/gradedetail/gradedetail.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/gradereport/gradereport.js 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/gradereport/gradereport.wxml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/gradereport/gradereport.wxss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxss 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/learn/learn.js 335 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/learn/learn.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/learn/learn.wxml 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/learn/learn.wxss 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/mine.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/mine.wxss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_common/pagevideo/pagevideo.js 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_common/pagevideo/pagevideo.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_common/pagevideo/pagevideo.wxml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_common/pagevideo/pagevideo.wxss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/behaviors/behConsultItem.js 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetail/consultdetail.wxml 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetailitem/consultdetailitem.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetailitem/consultdetailitem.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetailitem/consultdetailitem.wxml 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetailitem/consultdetailitem.wxss 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.wxml 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresult/consultresult.js 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresult/consultresult.wxml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresult/consultresult.wxss 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresultmore/consultresultmore.js 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresultmore/consultresultmore.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresultmore/consultresultmore.wxml 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresultmore/consultresultmore.wxss 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhistory/ledgerhistory.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhistory/ledgerhistory.json 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhistory/ledgerhistory.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhistory/ledgerhistory.wxss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhome/ledgerhome.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhome/ledgerhome.wxml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerhome/ledgerhome.wxss 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerupload/ledgerupload.js 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerupload/ledgerupload.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_ledger/ledgerupload/ledgerupload.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userlogin/userlogin.js 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistercompany/userregistercompany.js 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistergov/userregistergov.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/notice.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promise/promise.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promise/promise.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promise/promise.wxss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promisefile/promisefile.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promiseresult/promiseresult.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promiseresult/promiseresult.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/test/test.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/text/text.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/ass_1.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/ass_2.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/con_qa.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/notice_1.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/notice_2.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/notice_3.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/wm_assessment.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/wm_commitment.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/wm_ledger.png 补丁 | 查看 | 原始文档 | blame | 历史
service/baserequest.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/consultservice.js 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/lawservice.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/promiseservice.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/userservice.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
template/loading.wxml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
template/nodata.wxml 补丁 | 查看 | 原始文档 | blame | 历史
app.js
@@ -2,16 +2,16 @@
App({
  onLaunch() {
    // å±•示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    // const logs = wx.getStorageSync('logs') || []
    // logs.unshift(Date.now())
    // wx.setStorageSync('logs', logs)
    // ç™»å½•
    wx.login({
      success: res => {
        // å‘送 res.code åˆ°åŽå°æ¢å– openId, sessionKey, unionId
      }
    })
    // wx.login({
    //   success: res => {
    //     // å‘送 res.code åˆ°åŽå°æ¢å– openId, sessionKey, unionId
    //   }
    // })
  },
  globalData: {
    userInfo: null,
app.json
@@ -30,7 +30,10 @@
    "pages/module_user/userregistergov/userregistergov",
    "pages/module_user/userregistercompany/userregistercompany",
    "pages/module_consult/consultproblem/consultproblem",
    "pages/icons/icons"
    "pages/icons/icons",
    "pages/module_common/pagevideo/pagevideo",
    "pages/module_consult/consultresultmore/consultresultmore",
    "pages/module_consult/consultdetailitem/consultdetailitem"
  ],
  "window": {
    "backgroundTextStyle": "light",
app.wxss
@@ -110,10 +110,11 @@
/********************************** ä¸»ç•Œé¢èƒŒæ™¯-start ***********************************/
.page {
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  justify-content: flex-start;
  box-sizing: border-box;
  background-color: var(--fyui-BG_1);
}
@@ -283,7 +284,7 @@
  width: 100%;
  height: auto;
  border-radius: 0px;
  font-size: large;
  font-size: 20px;
  font-weight: 600;
  /* background-color: greenyellow; */
}
component/loading/loading.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,193 @@
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/     // The module cache
/******/     var installedModules = {};
/******/
/******/     // The require function
/******/     function __webpack_require__(moduleId) {
/******/
/******/         // Check if module is in cache
/******/         if(installedModules[moduleId]) {
/******/             return installedModules[moduleId].exports;
/******/         }
/******/         // Create a new module (and put it into the cache)
/******/         var module = installedModules[moduleId] = {
/******/             i: moduleId,
/******/             l: false,
/******/             exports: {}
/******/         };
/******/
/******/         // Execute the module function
/******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/         // Flag the module as loaded
/******/         module.l = true;
/******/
/******/         // Return the exports of the module
/******/         return module.exports;
/******/     }
/******/
/******/
/******/     // expose the modules object (__webpack_modules__)
/******/     __webpack_require__.m = modules;
/******/
/******/     // expose the module cache
/******/     __webpack_require__.c = installedModules;
/******/
/******/     // define getter function for harmony exports
/******/     __webpack_require__.d = function(exports, name, getter) {
/******/         if(!__webpack_require__.o(exports, name)) {
/******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/         }
/******/     };
/******/
/******/     // define __esModule on exports
/******/     __webpack_require__.r = function(exports) {
/******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/         }
/******/         Object.defineProperty(exports, '__esModule', { value: true });
/******/     };
/******/
/******/     // create a fake namespace object
/******/     // mode & 1: value is a module id, require it
/******/     // mode & 2: merge all properties of value into the ns
/******/     // mode & 4: return value when already ns object
/******/     // mode & 8|1: behave like require
/******/     __webpack_require__.t = function(value, mode) {
/******/         if(mode & 1) value = __webpack_require__(value);
/******/         if(mode & 8) return value;
/******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/         var ns = Object.create(null);
/******/         __webpack_require__.r(ns);
/******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/         return ns;
/******/     };
/******/
/******/     // getDefaultExport function for compatibility with non-harmony modules
/******/     __webpack_require__.n = function(module) {
/******/         var getter = module && module.__esModule ?
/******/             function getDefault() { return module['default']; } :
/******/             function getModuleExports() { return module; };
/******/         __webpack_require__.d(getter, 'a', getter);
/******/         return getter;
/******/     };
/******/
/******/     // Object.prototype.hasOwnProperty.call
/******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/     // __webpack_public_path__
/******/     __webpack_require__.p = "";
/******/
/******/
/******/     // Load entry module and return exports
/******/     return __webpack_require__(__webpack_require__.s = 14);
/******/ })
/************************************************************************/
/******/ ({
/***/ 14:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
  options: {
    addGlobalClass: true
  },
  properties: {
    extClass: {
      type: String,
      value: ''
    },
    show: {
      // é»˜è®¤æ˜¾ç¤ºå‡ºæ¥
      type: Boolean,
      value: true,
      observer(newValue) {
        this._computedStyle(newValue, this.data.animated);
      }
    },
    animated: {
      type: Boolean,
      value: false,
      observer(newValue) {
        this._computedStyle(this.data.show, newValue);
      }
    },
    duration: {
      // è¿‡æ¸¡åŠ¨ç”»æ—¶é—´
      type: Number,
      value: 350
    },
    type: {
      type: String,
      value: 'dot-gray' // å–值dot-white、dot-gray、circle
    },
    tips: {
      // type是circle的时候才有效
      type: String,
      value: '加载中'
    }
  },
  data: {
    animationData: {},
    animationInstance: {},
    displayStyle: 'none'
  },
  methods: {
    _computedStyle(show, animated) {
      if (!show) {
        if (!animated) {
          this.setData({
            displayStyle: 'none'
          });
        } else {
          this._startAnimation();
        }
      } else {
        this.setData({
          displayStyle: ''
        });
      }
    },
    _startAnimation() {
      setTimeout(() => {
        const data = this.data;
        const animation = data.animationInstance;
        animation.height(0).step();
        this.setData({
          animationData: animation.export()
        });
      }, 0);
    }
  },
  lifetimes: {
    attached() {
      const data = this.data;
      const animationInstance = wx.createAnimation({
        duration: data.duration,
        timingFunction: 'ease'
      });
      this.setData({
        animationInstance
      });
      this._computedStyle(this.data.show, this.data.animated);
    }
  }
});
/***/ })
/******/ });
component/loading/loading.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,4 @@
{
    "component": true,
    "usingComponents": {}
}
component/loading/loading.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
<view style="display:{{displayStyle}};" class="wx_loading_view {{extClass}}" animation="{{animationData}}" id="wx_loading_view">
    <view wx:if="{{type==='dot-white'}}" class="loading wx_dot_loading wx_dot_loading_white">
    </view>
    <view wx:elif="{{type==='dot-gray'}}" class="loading wx_dot_loading"></view>
    <view wx:elif="{{type==='circle'}}" class="weui-loadmore">
        <view class="weui-loading"></view>
        <view class="weui-loadmore__tips">{{tips}}</view>
    </view>
</view>
component/loading/loading.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
.wx_loading_view {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden
}
.loading {
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  text-align: center
}
.loading_view_translation {
  transition: height .2s .3s ease
}
component/progress/progress.js
@@ -12,6 +12,8 @@
   */
  data: {
    progress_txt: '信用较差',
    progress_txt_color1: '#f1fefc',
    progress_txt_color2: '#b4f7ec',
    count: 0, // è®¾ç½® è®¡æ•°å™¨ åˆå§‹ä¸º0
    countTimer: null, // è®¾ç½® å®šæ—¶å™¨ åˆå§‹ä¸ºnull
    x: 100,
@@ -25,17 +27,30 @@
  observers: {
    'progress': function (progress) {
      if (progress) {
      if (progress >= 90) {
        this.setData({
            progress_txt_color1: '#f2fff7',
            progress_txt_color2: '#96f3bd',
          progress_txt: '信用优秀'
        })
      } else if (progress >= 60) {
        this.setData({
            progress_txt_color1: '#f6f2e3',
            progress_txt_color2: '#f6e59f',
          progress_txt: '信用一般'
        })
      } else {
        this.setData({
            progress_txt_color1: '#fff6f6',
            progress_txt_color2: '#f29696',
          progress_txt: '信用较差'
          })
        }
      } else {
        this.setData({
          progress_txt_color1: '#f1fefc',
          progress_txt_color2: '#b4f7ec',
        })
      }
      this.drawProgressCircle(progress / 100)
@@ -139,10 +154,11 @@
          console.log("节点实例:", res); // èŠ‚ç‚¹å¯¹åº”çš„ Canvas å®žä¾‹ã€‚
          ctx = res.context;
          // è®¾ç½®æ¸å˜
          var gradient = ctx.createLinearGradient(200, 100, 100, 200);
          gradient.addColorStop("0", "#76ECD3");
          gradient.addColorStop("0.5", "#76ECD3");
          gradient.addColorStop("1.0", "#76ECD3");
          var gradient = ctx.createLinearGradient(0, 0, 0, 200);
          gradient.addColorStop("0", "#96f3bd");
          gradient.addColorStop("0.1", "#f6e59f");
          gradient.addColorStop("0.4", "#f6e59f");
          gradient.addColorStop("1.0", "#f29696");
          ctx.setLineWidth(10);
          ctx.setStrokeStyle(gradient);
component/progress/progress.wxml
@@ -7,7 +7,7 @@
  <canvas class="progress_canvas" id="canvasProgress" canvas-id="canvasProgress"> </canvas>
  <!-- ä¸­é—´æ˜¾ç¤ºçš„æ–‡æœ¬ -->
  <view class="progress_text">
  <view class="progress_text" style="background: linear-gradient(to top right, {{progress_txt_color1}}, {{progress_txt_color2}});">
    <text class='progress_num'> {{progress == undefined ? '?' : progress}}</text>
    <text class='progress_info'> {{progress == undefined ? '本次测评得分?' : progress_txt}}</text>
  </view>
component/progress/progress.wxss
@@ -28,7 +28,6 @@
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top right, #bbf3eb86, #62ead18c);
  border-radius: 50%;
  width: 100px;
  height: 100px;
component/switchtab/switchtab.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,81 @@
// component/switchtab/switchtab.js
Component({
  options: {
    addGlobalClass: true,
    multipleSlots: true
  },
  /**
   * ç»„件的属性列表
   */
  properties: {
    tabList: {
      type: Array,
      value: []
    },
    pageList: {
      type: Array,
      value: []
    },
  },
  /**
   * ç»„件的初始数据
   */
  data: {
    //选项卡相关
    currentTab: 0,
    // pageheight: '600px',
  },
  observers: {
    'pageList': function() {
      this.tabsHeight('.page0');
    }
  },
  /**
   * ç»„件的方法列表
   */
  methods: {
    //计算swiper高度方法(在切换的时候调用)
    tabsHeight(element) {
      let that = this;
      let query = this.createSelectorQuery(); //必须要先创建一个查询
      query.select(element).boundingClientRect(function (rect) {
        if (that.data.pageheight) {
          let pageheight = that.data.pageheight.split('px')[0]
          pageheight = parseInt(pageheight)
          if (rect.height > pageheight) {
            that.setData({
              pageheight: rect.height + 'px'
            });
          }
        } else {
          that.setData({
            pageheight: rect.height + 'px'
          });
        }
      }).exec();
    },
    swichNav: function (e) {
      var that = this;
      if (this.data.currentTab === e.target.dataset.current) {
        return false;
      } else {
        that.setData({
          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); //查询哪一个元素
      }
    },
    bindChange: function (e) {
      var that = this;
      that.setData({
        currentTab: e.detail.current,
        navScrollLeft: e.detail.current >= 3 ? ((e.detail.current) * 60) : 0 //判断当前选中的个数是否是第5个
      });
      that.tabsHeight('.page' + e.detail.current); //查询哪一个元素
    },
  }
})
component/switchtab/switchtab.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,4 @@
{
  "component": true,
  "usingComponents": {}
}
component/switchtab/switchtab.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
<!--component/switchtab/switchtab.wxml-->
<view class="swiper-tab">
  <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.name}}
        <text wx:if="{{item.tag > 0}}" class="swiper-tab-list__tag">{{item.tag}}</text>
      </view>
    </block>
  </scroll-view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" bindchange="bindChange" style="height: {{pageheight}};">
  <block wx:for="{{pageList}}" wx:for-item="item" wx:key="index" wx:for-index="index">
    <swiper-item>
      <view class="page{{index}}">
        <slot name="slot{{index}}"></slot>
      </view>
    </swiper-item>
  </block>
</swiper>
component/switchtab/switchtab.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
/* component/switchtab/switchtab.wxss */
.swiper-tab{
  width: 100%;
  text-align: start;
  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;
  text-align: center;
  display: inline-block;
  min-width: 18%;
  padding: 0 4px;
  color: rgba(0, 0, 0, 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%;
  color: white;
}
.on{
  color: #57E4CB;
  font-weight: bold;
  border-bottom: 4rpx solid #57E4CB;
}
.swiper-box{
  display: block;
  /* top: 80rpx; */
  width: 100%;
  /* height: 70px; */
  margin-top: 1px;
  background-color: white;
}
pages/assessment/assessment.js
@@ -54,6 +54,22 @@
      name: '评分',
      type: 'line',
      smooth: true,
      areaStyle: {
        color: {
          type: 'linear',
          x: 0.5,
          y: 0,
          x2: 0.5,
          y2: 1,
          colorStops: [{
              offset: 0, color: '#28db74' // 0% å¤„的颜色
          }, {
              offset: 1, color: '#dcfeea79' // 100% å¤„的颜色
          }],
          opacity: 0.1,
          global: false // ç¼ºçœä¸º false
        }
      },
      data: data,
    }]
  };
@@ -105,6 +121,12 @@
    this.ecComponent = this.selectComponent('#mychart-dom-line');
    this.initChart()
    // }, 1000);
    wx.startPullDownRefresh({
      success: (res) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
  },
  /**
@@ -112,7 +134,11 @@
   */
  onShow: function () {
    var that = this
  },
  onPullDownRefresh(){
    this.getHistoryPoint()
  },
  initChart: function () {
@@ -177,9 +203,16 @@
        if (period == that.data.thisPeriod) {
          that.setData({
            score: lastOne.totalPoint,
            text1: "很棒!",
            text1: "",
            text2: "本次测评已完成",
            text3: "查看详情",
          })
        } else {
          that.setData({
            text1: "测评已开始!",
            text2: "请尽快完成测评",
            text3: "去测评",
            score: undefined,
          })
        }
@@ -193,14 +226,21 @@
            color: d.color,
            rank: d.rank,
            level: d.level,
            time: d.period,
            time: d.period.replace('/', 'å¹´').replace(/\-[0-9]+/, '月'),
            scoreId: d.tPGuid
          })
          //折线图数据
          let key = d.period.split('/')[0] + 'å¹´'
          let y = d.period.split('/')[0]
          let key =  y + 'å¹´'
          if (!that.chartData.hasOwnProperty(key)) {
            that.chartData[key] = ['-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-']
            that.chartData[key] = ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']
            if (y == date.year() + '') {
              let m = date.month()
              for (let i = m; i <= 11; i++) {
                that.chartData[key][i] = '-'
              }
            }
          }
          let monthGap = d.period.split('/')[1]
          let startMonth = parseInt(monthGap.split('-')[0])
@@ -215,6 +255,13 @@
        setTimeout(() => {
          setOption(that.chart, that.chartData[that.data.planYear]);
        }, 500);
      },
      complete(res) {
        wx.stopPullDownRefresh({
          success: (res) => {},
          fail: (res) => {},
          complete: (res) => {},
        })
      }
    })
  },
pages/assessment/assessment.json
@@ -1,5 +1,6 @@
{
  "navigationBarTitleText": "自测智评",
  "enablePullDownRefresh":true,
  "usingComponents": {
    "cp-progress": "/component/progress/progress",
    "ec-canvas": "/component/ec-canvas/ec-canvas",
pages/assessment/assessment.wxml
@@ -1,6 +1,6 @@
<!--pages/assessment/assessment.wxml-->
<view class="page">
  <view class="banner-bg"></view>
  <!-- <view class="banner-bg"></view> -->
  <!-- <view style="padding-top: {{statusBarHeight}}px;" class="statusbar-title">
    <view style="line-height: {{navContentHeight - statusBarHeight}}px;">
@@ -23,13 +23,43 @@
  </view>
  <view class="page__bd">
    <view style="margin-left: 10px;">分类测评</view>
    <view class="top-card top-card_main">
      <image src="/res/icons/ass_1.png" mode="aspectFit"></image>
      <view>
        <view class="top-card__name">综合自测智评</view>
        <view class="top-card__tag">点击进行测评 ></view>
      </view>
      <!-- <mp-icon icon="arrow" class="" size="15" color="white"></mp-icon> -->
    </view>
    <view class="flex-h">
      <view class="flex-h_block">
        <view class="top-card">
          <image src="/res/icons/ass_1.png" mode="aspectFit"></image>
          <view>
            <view class="top-card__name">其他专项自测</view>
            <view class="top-card__tag">点击进行测评 ></view>
          </view>
        </view>
      </view>
      <view class="flex-h_block">
        <view class="top-card top-card_2">
          <image src="/res/icons/ass_2.png" mode="aspectFit"></image>
          <view>
            <view class="top-card__name">碳排放智能估算</view>
            <view class="top-card__tag">点击进行测评 ></view>
          </view>
        </view>
      </view>
    </view>
    <view style="margin-left: 10px;margin-top: 8px;">测评趋势</view>
    <view class="fyui-panel line-chart-card">
      <view class="flex-h" style="padding: 4px;">
        æµ‹è¯„趋势
        <view></view>
        <picker bindchange="bindYearChange" data-type="planYear" value="{{planYear}}" mode="date" fields="year" end="{{maxYear}}">
          <view class="fyui-selector">
            {{planYear}}
            <mp-icon icon="arrow" class="icon-down" size="10" color="white"></mp-icon>
            <mp-icon icon="arrow" class="icon-down" size="10" color="black"></mp-icon>
          </view>
        </picker>
      </view>
@@ -40,9 +70,18 @@
      <view class="fyui-cell__bd">历史测评</view>
      <view class="fyui-cell__ft">查看更多</view>
    </view>
    <view wx:for="{{historys}}" wx:key="index" data-index="index">
    <view wx:for="{{historys}}" wx:key="index" data-index="index" class="flex-h" style="align-items: flex-start;">
      <view class="history_icon">
        <view class="history_icon_1">
          <view></view>
        </view>
        <view class="history_icon_2"></view>
      </view>
      <view style="flex: 1;">
        <view class="history_time">{{item.time}}</view>
      <view class="h-cell fyui-panel">
        <view class="h-line_1">
            <view class="flex-h">
          <view class="h-score" style="background-color: {{item.color}};">
            {{item.score}}
          </view>
@@ -51,10 +90,12 @@
            <view>风险等级:{{item.level}}</view>
          </view>
        </view>
        <view class="h-line_2">
          <view>考核月份:{{item.time}}</view>
          <view data-id="{{item.scoreId}}" class="h-btn" bindtap="goto" data-index="1" data-period="{{item.time}}">去看看</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/assessment/assessment.wxss
@@ -4,6 +4,12 @@
  width: 100%;
  height: 50vh;
  background: linear-gradient(to bottom, #57E4CB, #bbf3eb);
  /* color: #dcfeea79; */
}
.page__hd {
  background: linear-gradient(to bottom, #57E4CB, #bbf3eb);
  padding-bottom: 4px;
}
.page__hd .title {
@@ -50,7 +56,8 @@
.h-line_1 {
  display: flex;
  justify-content: flex-start;
  justify-content: space-between;
  align-items: center;
}
.h-rank {
@@ -77,3 +84,92 @@
  color: white;
  font-size: 14px;
}
.flex-h_block {
  flex: 1;
}
.top-card {
  position: relative;
  border-radius: 4px;
  background: linear-gradient(90deg, #87CEB2, #6CD398);
  color: white;
  padding: 8px;
  margin-left: 10px;
  margin-right: 2px;
  display: flex;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.top-card_2 {
  background: linear-gradient(90deg, #A3D9F5, #88E1EC);
  margin-left: 2px;
  margin-right: 10px;
}
.top-card_main {
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 4px;
}
.top-card>image {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}
.top-card .top-card__tag {
  /* text-align: end; */
  font-size: 12px;
}
.top-card .top-card__name {
  font-size: 12px;
  /* width: 100%; */
  /* font-weight: 600; */
  /* text-align: center; */
  /* margin: 16px; */
}
.history_time{
  /* background-color: red; */
  margin-left: 10px;
  font-size: 14px;
  font-weight: 550;
}
.history_icon {
  width: 10vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.history_icon .history_icon_1 {
  width: 22px;
  height: 22px;
  background-color: #8DF1E0;
  border-radius: 50%;
  opacity: 0.2;
  display: flex;
  justify-content: center;
  align-items: center;
}
.history_icon .history_icon_1>view {
  width: 11px;
  height: 11px;
  background: #1addbd;
  border-radius: 50%;
  z-index: 10;
}
.history_icon .history_icon_2 {
  width: 0px;
  height: 100px;
  border: 1px dashed #80EFDC;
}
pages/grade/grade.json
@@ -3,6 +3,7 @@
  "navigationBarBackgroundColor": "#57E4CB",
  "navigationBarTextStyle": "white",
  "usingComponents": {
    "c-dialog": "/component/commondialog/commondialog"
    "c-dialog": "/component/commondialog/commondialog",
    "mp-icon": "/component/icon/icon"
  }
}
pages/grade/grade.wxml
@@ -8,8 +8,9 @@
        <view class="e-title__2">{{sub1.title2}}</view>
        <view class="e-content {{sub.select ? 'select' : ''}}" wx:for="{{sub1.sub2}}" wx:key="index"
          data-index="{{index}}" wx:for-item="sub" data-group="{{sub1.group}}" bindtap="choose">
          <!-- <mp-icon icon="check" color="white" size="25"></mp-icon> -->
          <view>{{sub.content}}</view>
          <view>{{sub.score}}</view>
          <!-- <view>{{sub.score}}</view> -->
        </view>
      </block>
    </view>
pages/gradedetail/gradedetail.js
@@ -19,53 +19,4 @@
      score: options.score
    })
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面隐藏
   */
  onHide: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面卸载
   */
  onUnload: function () {
  },
  /**
   * é¡µé¢ç›¸å…³äº‹ä»¶å¤„理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  },
  /**
   * é¡µé¢ä¸Šæ‹‰è§¦åº•事件的处理函数
   */
  onReachBottom: function () {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage: function () {
  }
})
pages/gradereport/gradereport.js
@@ -95,11 +95,11 @@
   */
  data: {
    ec: {
      lazyLoad: false
      lazyLoad: true
    },
    creditText: '----------------------',
    gradeDetails: [{
      name: '考核得分',
      name: '自评得分',
      detail: '--'
    }, {
      name: '风险排名',
@@ -108,13 +108,19 @@
      name: '风险等级',
      detail: '--'
    }, {
      name: '考核周期',
      name: '自评周期',
      detail: '--'
    }, {
      name: '自评时间',
      detail: '--'
    }],
    //失分的类型
    losePointsItem: [],
    losePoints: [{
      baseRule: '',
      name: '',
      itemlist: [{
      ruleName: '----',
      score: '--',
      remark: '------------'
@@ -122,6 +128,7 @@
      ruleName: '----',
      score: '--',
      remark: '------------'
      }]
    }]
  },
@@ -207,7 +214,7 @@
        let year = data.period.split('/')[0]
        let month = data.period.split('/')[1].split('-')[0]
        let gradeDetails = [{
          name: '考核得分',
          name: '自评得分',
          detail: data.score
        }, {
          name: '风险排名',
@@ -216,20 +223,36 @@
          name: '风险等级',
          detail: data.level
        }, {
          name: '考核周期',
          name: '自评周期',
          detail: `${year}å¹´${month}月`
        }, {
          name: '自评时间',
          detail: moment(data.time).format("YYYY-MM-DD HH:mm")
        }]
        let losePointsItem = []
        let losePoints = []
        data.loseScore.forEach(l => {
          losePoints.push({
            ruleName: l.first,
            score: l.second,
            remark: l.third
        for (const key in data.loseScore) {
          const s = data.loseScore[key];
          if (Object.keys(s).length > 0) {
            losePointsItem.push(key)
            for (const key1 in s) {
              const rule = s[key1];
              let p = {
                baseRule: key,
                name: key1,
                itemlist: []
              }
              rule.forEach(r => {
                p.itemlist.push({
                  ruleName: r.first,
                  score: r.second,
                  remark: r.third
          })
        });
              losePoints.push(p)
            }
          }
        }
        let classPoints = {
          score: data.score,
          level: data.level,
@@ -247,7 +270,8 @@
        that.setData({
          creditText: creditText,
          gradeDetails: gradeDetails,
          losePoints: losePoints
          losePoints: losePoints,
          losePointsItem: losePointsItem
        })
        setOption(that.chart, classPoints)
      }
pages/gradereport/gradereport.wxml
@@ -12,7 +12,7 @@
      <image src="/res/icons/qmark2.png" class="mark"></image>
    </view>
    <view class="fyui-panel">
      <view class="fyui-panel_title">得分解读</view>
      <view class="fyui-panel_title">自评解读</view>
      <view class="fyui-panel_desc">{{creditText}}</view>
    </view>
    <!-- å¾—分详情 -->
@@ -28,11 +28,24 @@
    <!-- å¤±åˆ†æ¡ç›® -->
    <view class="fyui-panel fyui-panel__max">
      <view class="fyui-panel_title">自评诊断</view>
      <view>
        æœ¬æ¬¡æµ‹è¯„主要失分类别为<text style="color: orange;font-weight: 600;font-size: 16px;" wx:for="{{losePointsItem}}" wx:key="index">{{index > 0 ? "、" : ""}}{{item}}</text>
        ï¼Œå…±è®¡<text style="color: orange;font-weight: 600;font-size: 18px;">{{losePoints.length}}</text>项,具体情况如下:
      </view>
      <block wx:for="{{losePoints}}" wx:key="index">
        <view class="{{index !=0 ? 'first' : ''}}">
          <view class="fyui-panel_title">{{index + 1}}. {{item.ruleName}}</view>
          <view class="fyui-panel_desc">细则:<text style="color: orange;">{{item.score}}分</text></view>
          <view class="fyui-panel_desc">{{item.remark}}</view>
          <view class="fyui-panel_title">{{index + 1}}. ã€<text style="color: orange;">{{item.baseRule}}</text>】{{item.name}}</view>
          <block wx:for="{{item.itemlist}}" wx:for-item="rule" wx:key="index">
            <view class="fyui-panel_desc">
              <view>问题:</view>{{rule.ruleName}}
            </view>
            <view class="fyui-panel_desc">
              <view>失分:</view><text style="color: orange;">{{rule.score}}分</text>
            </view>
            <view class="fyui-panel_desc">
              <view>建议:</view>{{rule.remark}}
            </view>
          </block>
        </view>
      </block>
    </view>
pages/gradereport/gradereport.wxss
@@ -57,3 +57,11 @@
.fyui-panel .last {
  border-bottom: 0px rgba(214, 214, 214, 0.308) solid;
}
.fyui-panel__max .fyui-panel_desc{
  display: flex;
}
.fyui-panel__max .fyui-panel_desc>view{
  white-space: nowrap;
}
pages/home/home.js
@@ -73,6 +73,15 @@
    this.getLedgerType()
  },
  onPullDownRefresh(){
    console.log('onPullDownRefresh');
    wx.stopPullDownRefresh({
      success: (res) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
  },
  getNextEvaluationTime() {
    let now = moment().add(1, 'months')
    this.setData({
@@ -132,7 +141,10 @@
  getNews() {
    var that = this
    let user = app.globalData.userInfo
    lawservice.getLawRegulations(user.guid, 1, user.extension2, {
    lawservice.getLawRegulations(user.guid, 1, {
      sceneTypeId: user.extension2,
      fileType: 1
    }, {
      success(data) {
        let laws = []
        data.forEach(d => {
@@ -164,7 +176,7 @@
          let cTime = moment(c.cmCreateTime)
          let leftDays = cTime.add(1, 'years').diff(moment(), 'days')
          that.setData({
            promise: {
            promsieInfo: {
              leftDays: leftDays
            }
          })
pages/home/home.json
@@ -1,5 +1,6 @@
{
  "navigationBarBackgroundColor": "#EAFFF1",
  "enablePullDownRefresh":true,
  "usingComponents": {
    "cp-notice": "/component/notice/notice"
  }
pages/home/home.wxml
@@ -23,26 +23,29 @@
      </view>
    </view> -->
    <view class="flex-h">
      <view class="flex-h_block">
      <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>
      <view class="flex-h_block">
        <view class="top-card top-card_2" 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>
        <view class="top-card top-card_3" bindtap="goto" data-index="6">
          <view class="top-card__score">{{promsieInfo.leftDays > 0 ? '剩余' : '失效'}}
            <text class="top-card__num">{{promsieInfo.leftDays > 0 ? promsieInfo.leftDays : 0 - promsieInfo.leftDays}}</text>天
          </view>
          <view class="top-card__time">承诺倒计时 ></view>
        <image src="/res/icons/wm_commitment.png"></image>
      </view>
    </view>
  </view>
  </view>
  <view class="page__bd">
    <view class="fyui-panel" bindtap="goto" data-index="1">
      <view class="fyui-cell fyui-cell_select title">
pages/home/home.wxss
@@ -1,31 +1,78 @@
/* pages/home/home.wxss */
.page__hd {
  background: linear-gradient(to bottom right, #D9FDFB, white);
  /* background: linear-gradient(to bottom right, #D9FDFB, white); */
  padding: 0;
}
.page__title {
  margin-left: 10px;
}
.flex-h_block{
  flex: 1;
}
.top-card {
  position: relative;
  border-radius: 4px;
  background-color: #5bf0d6;
  background-color: #DCFFF9;
  /* background: linear-gradient(to bottom right, #a5f5e9, #62EAD2); */
  color: white;
  color: #219372;
  padding: 8px;
  width: 26vw;
  /* text-shadow: 1px 1px rgb(0, 0, 0, 0.4); */
  margin-left: 10px;
  margin-right: 2px;
  height: 20vh;
}
.top-card_2 {
  margin-left: 2px;
  margin-right: 10px;
  margin-bottom: 0.5vh;
  height: 8.5vh;
  background-color: #DDEEFF;
  color: #2B7BCB;
}
.top-card_3 {
  margin-left: 2px;
  margin-right: 10px;
  margin-top: 0.5vh;
  height: 8.5vh;
  background-color: #FAFCF0;
  color: #859438;
}
.top-card>image{
  width: 15vh;
  height: 18vh;
  position: absolute;
  bottom: 0px;
  right: 0px;
}
.top-card_2>image{
  width: 13vw;
  height: 14vw;
  position: absolute;
  bottom: -2px;
  right: -2px;
}
.top-card_3>image{
  width: 13vw;
  height: 14vw;
}
.top-card .top-card__time {
  /* text-align: end; */
  font-size: 12px;
  color: #ffffffde;
  color: #8BD5C8;
}
.top-card_2 .top-card__time {
  color: #95BEE7;
}
.top-card_3 .top-card__time {
  color: #BBC391;
}
.top-card .top-card__score {
@@ -35,14 +82,14 @@
}
.top-card .top-card__num {
  font-size: 20px;
  font-size: 26px;
  font-weight: 600;
}
.top-card .top-card__tag{
  font-size: 10px;
  width: 12vw;
  color: #ffffff5e;
  color: #ffffffbd;
}
.top-card .top-card__items {
pages/learn/learn.js
@@ -1,4 +1,8 @@
// pages/learn/learn.js
const lawservice = require("../../service/lawservice")
const moment = require('../../utils/moment.min')
const app = getApp()
Page({
  /**
@@ -20,36 +24,16 @@
      }
    ],
    pageList: [
    ],
    banners: [
      {
        banners: [
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
        pic: '',
        url: '',
        fileType: ''
      },
        ],
        text1: [{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´4月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´3月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´2月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´2月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        }],
    resources: [],
        text2: [{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
@@ -79,185 +63,6 @@
          time: '2021å¹´3月2日',
          likes: 233
        }]
      },{
        banners: [
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
        ],
        text1: [{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´4月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´3月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´2月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´2月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        }],
        text2: [{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        }]
      },{
        banners: [
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
        ],
        text1: [{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´4月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´3月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´2月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´2月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        }],
        text2: [{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        }]
      },{
        banners: [
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
          '/res/icons/btn_bg_1.png',
          '/res/icons/btn_bg_2.png',
        ],
        text1: [{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´4月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´3月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´2月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        },{
          title: "企业营业执照、食品经营许可证丢失该如何补领",
          time: "2022å¹´2月5日",
          views: 2012,
          pic: "/res/icons/temp_pic_1.png"
        }],
        text2: [{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        },{
          title: "因违章建筑导致执法",
          content: "执法描述:环保主管部门可调阅并作为执法溯源依据之一环保主管部门可调阅并作为执法溯源依据之一",
          tags: ['违法搭建', '依法拆除'],
          views: 123,
          time: '2021å¹´3月2日',
          likes: 233
        }]
      }
    ]
  },
  //计算swiper高度方法(在切换的时候调用)
  tabsHeight(element) {
@@ -294,38 +99,120 @@
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad: function (options) {
    this.tabsHeight('.page0');
    // this.tabsHeight('.page0');
    this.getResources()
  },
  onReachBottom () {
    console.log('onReachBottom');
    if (this.cPage && this.tPage) {
      if (this.cPage < this.tPage) {
        this.getResources(this.cPage + 1)
      }
    }
  },
  getBanner() {
    let banners = []
    for (let i = 0; i < 6; i++) {
      const d = this.data.resources[i]
      banners.push({
        pic: d.lrPicurl,
        url: d.lrBodyurl,
        fileType: d.lrResourcefiletype,
      })
    }
    this.setData({
      banners
    })
  },
  getResources(cPage = 1) {
    var that = this
    let user = app.globalData.userInfo
    lawservice.getLawRegulations(user.guid, cPage, {sceneTypeId: user.extension2}, {
      onHead(header) {
        that.cPage = parseInt(header.currentPage)
        that.tPage = parseInt(header.totalPage)
        console.log(`cPage:${that.cPage}, tPage:${that.tPage}`);
      },
      success(data) {
        let resources = that.data.resources
        data.forEach(d => {
          d.views = parseInt(Math.random() * 1000 + 10)
          d.lrPublishdate = moment(d.lrPublishdate).format('YYYYå¹´MM月DD日')
        });
        resources = resources.concat(data)
        that.setData({
          resources
        })
        if (that.cPage == 1) {
          that.getBanner()
        }
      }
    }, 10)
  },
  gotoBanner(e) {
    var index = e.currentTarget.dataset.index
    let f = this.data.resources[index]
    this.goto(f)
  },
  gotoResource(e) {
    var index = e.currentTarget.dataset.index
    let f = this.data.resources[index]
    this.goto(f)
  },
  /**
   * é¡µé¢è·³è½¬
   */
  goto: function (e) {
  goto: function (f) {
    var url = ""
    var index = e.currentTarget.dataset.index
    switch (index) {
      case "0":
        url = ""
        break;
    switch (f.lrResourcefiletype) {
      //文档
      case "1":
        let bodyUrl = f.lrBodyurl
        wx.showLoading({
          title: ' æ–‡ä»¶ä¸‹è½½ä¸­',
          mask: true,
        })
        wx.downloadFile({
          url: bodyUrl,
          success: function (res) {
            wx.hideLoading()
            const filePath = res.tempFilePath
            wx.openDocument({
              filePath: filePath,
              success: function (res) {
                console.log('打开文档成功')
              },
              fail(error) {
                console.log(error);
              }
            })
          }
        })
        break;
      //链接
      case 2:
        url = ""
        break;
      case "2":
        url = ""
        return;
      case "3":
      //图片
      case 3:
        url = ""
        break;
      case "4":
        //环保守法
        url = "/pages/text/text"
        break;
      case "5":
      //视频
      case 4:
        url = "/pages/module_common/pagevideo/pagevideo"
        break;
    }
    if (url != "") {
      wx.navigateTo({
        url: url
        url: url,
        success: (res) => {
          // é€šè¿‡ eventChannel å‘被打开页面传送数据
          res.eventChannel.emit('acceptDataFromOpenerPage', f)
        },
      })
    }
  }
pages/learn/learn.json
@@ -2,5 +2,7 @@
  "navigationBarTitleText": "守法学习",
  "navigationBarBackgroundColor": "#65EAD2",
  "navigationBarTextStyle": "white",
  "usingComponents": {}
  "usingComponents": {
    "mp-icon": "/component/icon/icon"
  }
}
pages/learn/learn.wxml
@@ -1,25 +1,31 @@
<!--pages/learn/learn.wxml-->
<view class="page ">
  <view class="swiper-tab">
  <!-- <view class="swiper-tab">
    <scroll-view scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="false" 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.name}}</view>
      </block>
    </scroll-view>
  </view>
  <swiper current="{{currentTab}}" class="swiper-box" duration="300" bindchange="bindChange" style="height: {{pageheight}};">
  </view> -->
  <!-- <swiper current="{{currentTab}}" class="swiper-box" duration="300" bindchange="bindChange" style="height: {{pageheight}};">
    <block wx:for="{{pageList}}" wx:for-item="page" wx:key="n">
      <swiper-item>
        <view class="page{{index}}">
        </view>
      </swiper-item>
    </block>
  </swiper> -->
          <view class="page__bd ">
            <view class="fyui-panel">
              <swiper indicator-dots="true" autoplay="true" circular="true" interval="2000" duration="500" previous-margin="0px" next-margin="0px">
                <block wx:for='{{page.banners}}' wx:key='u'>
        <block wx:for='{{banners}}' wx:key='u'>
                  <swiper-item>
                    <image src='{{item}}' mode="aspectFill" class='swiper-item-images' />
            <image src='{{item.pic}}' mode="aspectFill" class='swiper-item-images' data-index="{{index}}" bindtap="gotoBanner" />
                  </swiper-item>
                </block>
              </swiper>
@@ -39,32 +45,45 @@
              </view>
            </view>
            <view class="fyui-cell fyui-cell_select title">
    <!-- <view class="fyui-cell fyui-cell_select title">
              <view class="fyui-cell__bd">环保守法</view>
              <view class="fyui-cell__ft">更多</view>
            </view>
            <view wx:for="{{page.text1}}" wx:key="index" data-index="index" wx:item="item">
              <view class="fyui-box fyui-panel" bindtap="goto" data-index="4">
    </view> -->
    <view wx:for="{{resources}}" wx:key="index" wx:item="item" bindtap="gotoResource" data-index="{{index}}">
      <view wx:if="{{item.lrResourcefiletype != 4}}" class="fyui-box fyui-panel">
                <view class="fyui-box__hd">
                  <image src="{{item.pic}}" class="" />
          <image src="{{item.lrPicurl}}" class="" mode="aspectFill" />
                </view>
                <view class="fyui-box__bd">
                  <view class="fyui-box__content">{{item.title}}</view>
          <view class="fyui-box__content">{{item.lrResourcetitle}}</view>
                  <view class="fyui-box__tag">
                    <view>{{item.time}}</view>
            <view>{{item.lrPublishdate}}</view>
                    <view class="flex-h">
                      <image src="/res/icons/view.png" class="icon"></image>{{item.views}}
                    </view>
                  </view>
                </view>
              </view>
      <view wx:else class="fyui-panel fyui-panel_video">
        <view style="position: relative;">
          <image src="{{item.lrPicurl}}" class="video-poster" mode="aspectFit" />
          <mp-icon class="video-play" icon="play" color="white" size="50" type="filled"></mp-icon>
        </view>
        <view class="video-title">{{item.lrResourcetitle}}</view>
        <view class="tag">
          <view>{{item.lrPublishdate}}</view>
          <view class="flex-h">
            <image src="/res/icons/view.png" class="icon"></image>{{item.views}}
          </view>
        </view>
      </view>
            </view>
            <view class="fyui-cell fyui-cell_select title">
    <!-- <view class="fyui-cell fyui-cell_select title">
              <view class="fyui-cell__bd">执法案例</view>
              <view class="fyui-cell__ft">更多</view>
            </view>
            <view wx:for="{{page.text2}}" wx:key="index" data-index="index" wx:for-item="item">
    <view wx:for="{{text2}}" wx:key="index" data-index="index" wx:for-item="item">
              <view class="fyui-box fyui-panel fyui-box__text">
                <view class="fyui-box__hd">
                  {{item.title}}
@@ -85,13 +104,9 @@
                  <view>{{item.time}}</view>
                </view>
              </view>
            </view>
    </view> -->
          </view>
          <view class="page__ft"></view>
        </view>
      </swiper-item>
    </block>
  </swiper>
</view>
pages/learn/learn.wxss
@@ -68,3 +68,30 @@
  width: 46vw;
  height: 20vw;
}
.fyui-panel_video .video-poster {
  width: 100%;
  background-color: black;
}
.fyui-panel_video .video-title{
  padding: 2px 16px;
  font-size: 16px;
}
.fyui-panel_video .video-play {
  position: absolute;
  top: calc(50% - 25px);
  left: calc(50% - 25px);
  z-index: 10;
  background-color: rgba(138, 138, 138, 0.712);
  border-radius: 50%;
}
.fyui-panel_video .tag{
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fyui-text-color_2);
  padding: 4px 16px;
}
pages/mine/mine.js
@@ -18,53 +18,4 @@
      userRealName: app.globalData.userInfo.realname
    })
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面隐藏
   */
  onHide: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面卸载
   */
  onUnload: function () {
  },
  /**
   * é¡µé¢ç›¸å…³äº‹ä»¶å¤„理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  },
  /**
   * é¡µé¢ä¸Šæ‹‰è§¦åº•事件的处理函数
   */
  onReachBottom: function () {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage: function () {
  }
})
pages/mine/mine.wxss
@@ -11,6 +11,7 @@
}
.flex-v {
  flex: 1;
  justify-content: space-between;
  margin-left: 20px;
}
@@ -29,7 +30,7 @@
}
.user-name {
  white-space: nowrap;
  /* white-space: nowrap; */
  font-size: 16px;
  font-weight: 600;
}
pages/module_common/pagevideo/pagevideo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,86 @@
// pages/module_common/pagevideo/pagevideo.js
const lawservice = require("../../../service/lawservice")
const moment = require('../../../utils/moment.min')
const app = getApp()
Page({
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    video: {},
    resources: []
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
    var that = this
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      setTimeout(() => {
        that.setData({
          video: data
        })
      }, 500);
      if (data.lrResourcetitle) {
        wx.setNavigationBarTitle({
          title: data.lrResourcetitle,
        })
      }
    })
    this.getResources()
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage() {
  },
  onReachBottom () {
    console.log('onReachBottom');
    if (this.cPage && this.tPage) {
      if (this.cPage < this.tPage) {
        this.getResources(this.cPage + 1)
      }
    }
  },
  getResources(cPage = 1) {
    var that = this
    let user = app.globalData.userInfo
    lawservice.getLawRegulations(user.guid, cPage, {
      sceneTypeId: user.extension2,
      fileType: 4
    }, {
      onHead(header) {
        that.cPage = parseInt(header.currentPage)
        that.tPage = parseInt(header.totalPage)
        console.log(`cPage:${that.cPage}, tPage:${that.tPage}`);
      },
      success(data) {
        let resources = that.data.resources
        data.forEach(d => {
          d.views = parseInt(Math.random() * 1000 + 10)
          d.lrPublishdate = moment(d.lrPublishdate).format('YYYYå¹´MM月DD日')
        });
        resources = resources.concat(data)
        that.setData({
          resources
        })
      }
    }, 4)
  },
})
pages/module_common/pagevideo/pagevideo.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
{
  "navigationBarTitleText": "视频播放",
  "navigationBarBackgroundColor": "#65EAD2",
  "navigationBarTextStyle": "white",
  "usingComponents": {}
}
pages/module_common/pagevideo/pagevideo.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
<!--pages/module_common/pagevideo/pagevideo.wxml-->
<view class="page">
  <view class="page__hd">
    <video class="video" id="myVideo" src="{{video.lrBodyurl}}" binderror="videoErrorCallback" show-center-play-btn='{{false}}' show-play-btn="{{true}}" controls autoplay custom-cache="{{false}}" poster="{{video.lrPicurl}}" picture-in-picture-mode="{{['push', 'pop']}}" bindenterpictureinpicture='bindVideoEnterPictureInPicture' bindleavepictureinpicture='bindVideoLeavePictureInPicture'></video>
  </view>
  <view class="page__bd">
    <view class="fyui-box  fyui-box__text">
      <view class="fyui-box__hd">
        {{video.lrResourcetitle}}
      </view>
      <view class="fyui-box__bd">
        <view class="fyui-box__content">{{video.lrResourcetitle}}</view>
      </view>
      <view class="fyui-box__ft">
        <view>{{video.lrPublishdate}}</view>
        <view>
          <image src="/res/icons/view.png" class="icon"></image>{{video.views}}
        </view>
      </view>
    </view>
  </view>
  <view class="page__ft">
    <view class="title">相关视频</view>
    <view wx:for="{{resources}}" wx:key="index" wx:item="item">
      <view class="fyui-box fyui-panel" bindtap="gotoResource" data-index="{{index}}">
        <view class="fyui-box__hd">
          <image src="{{item.lrPicurl}}" class="" mode="aspectFill"/>
        </view>
        <view class="fyui-box__bd">
          <view class="fyui-box__content">{{item.lrResourcetitle}}</view>
          <view class="fyui-box__tag">
            <view>{{item.lrPublishdate}}</view>
            <view class="flex-h">
              <image src="/res/icons/view.png" class="icon"></image>{{item.views}}
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</view>
pages/module_common/pagevideo/pagevideo.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
/* pages/module_common/pagevideo/pagevideo.wxss */
.page__hd{
  padding: 0;
}
.video{
  width: 100%;
}
.title{
  text-align: start;
  padding: 0 16px;
  font-weight: 600;
  font-size: 16px;
}
pages/module_consult/behaviors/behConsultItem.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,109 @@
const consultservice = require("../../../service/consultservice")
const app = getApp()
/**
 * æ™ºèƒ½åœ¨çº¿å’¨è¯¢çš„æŸ¥è¯¢ä¸ŽæŸ¥çœ‹è¯¦æƒ…
 */
module.exports = Behavior({
  data: {
    result: []
  },
  methods:{
    onReachBottom () {
      console.log('onReachBottom');
      if (this.cPage && this.tPage) {
        if (this.cPage < this.tPage) {
          this.searchMore(this.cPage + 1)
        }
      }
    },
    searchMore (cPage = 1) {
      var that = this
      wx.showLoading({
        title: '搜索中',
        mask: true,
        success: (res) => {},
        fail: (res) => {},
        complete: (res) => {},
      })
      setTimeout(() => {
        wx.hideLoading()
      }, 20000);
      consultservice.searchLaw(app.globalData.accessToken.userId, '大气污染', cPage, 5, {
        onPage(head){
          that.cPage = head.page
          that.tPage = head.totalPage
        },
        success (res) {
          let result = that.data.result
          res.forEach(r => {
            r.des = r.des.replace('\\n', '<br/>')
            if (result.length === 0) {
              result.push({
                typeId: r.typeId,
                typeName: r.typeName,
                contents: [r]
              })
            } else {
              result[0].contents.push(r)
            }
          });
          that.setData({
            result
          })
          console.log(result);
        },
        complete (res) {
          wx.hideLoading()
        }
      }, 2)
    },
    /**
     * æŸ¥çœ‹æŸ¥è¯¢ç»“果详情
     */
    gotoDetail (e) {
      const iList = e.currentTarget.dataset.index.split(',')
      const i1 = iList[0]
      const i2 = iList[1]
      const r = this.data.result[i1]
      switch (r.typeId) {
        //法律法规文件
        case 1:
          const fileId = r.contents[i2].id
          wx.navigateTo({
            url: '/pages/module_consult/consultdetail/consultdetail',
            success: (res) => {
              // é€šè¿‡ eventChannel å‘被打开页面传送数据
              res.eventChannel.emit('acceptDataFromOpenerPage', {
                fileId: fileId
              })
            },
          })
          break;
        //法律法规条目
        case 2:
          const itemId = r.contents[i2].id
          wx.navigateTo({
            url: '/pages/module_consult/consultdetailitem/consultdetailitem',
            success: (res) => {
              // é€šè¿‡ eventChannel å‘被打开页面传送数据
              res.eventChannel.emit('acceptDataFromOpenerPage', {
                itemId: itemId
              })
            },
          })
          break;
        //执法案例
        case 3:
          break;
        //环保问题
        case 4:
          break;
        default:
          break;
      }
    },
  }
})
pages/module_consult/consultdetail/consultdetail.wxml
@@ -2,27 +2,28 @@
<view class="page">
  <view class="page__hd">
    <view class="f-title">《{{content.mfName}}》</view>
    <view class="f-tag">发布时间:{{content.mfReleaseDate}}</view>
    <!-- <view class="f-tag">发布时间:{{content.mfReleaseDate}}</view> -->
    <text class="f-summary" user-select="true" decode="true" space="emsp">【摘要】:{{content.mfSummary}}</text>
  </view>
  <view class="page__bd">
    <view class="fyui-panel">
      <view>简称:{{content.mfShortName}}</view>
      <view>文号:{{content.mfReferenceNumber}}</view>
      <!-- <view>简称:{{content.mfShortName}}</view> -->
      <view>发布单位:{{content.mfReleaseOrg}}</view>
      <view>地域:{{content.mfMgtLevel}}</view>
    </view>
    <view class="fyui-panel">
      <view>文号:{{content.mfReferenceNumber}}</view>
      <view>文件类别:{{content.mfFileType}}</view>
      <!-- <view>文件下载</view> -->
      <view>文件级别:{{content.mfMgtLevel}}</view>
    </view>
    <view class="fyui-panel">
      <view>相关行业:{{content.mfFileIndustry}}</view>
      <view>环保要素:{{content.mfEpItemType}}、{{content.mfEpItemSubtype}}</view>
      <!-- <view>文件下载</view> -->
    </view>
    <view class="fyui-panel">
      <view>依据:{{content.mfFileBasis}}</view>
    </view>
    <view class="fyui-panel">
      <view>生效时间:{{content.mfEffectiveDate}}</view>
      <view>发布时间:{{content.mfReleaseDate}}</view>
      <view>实施时间:{{content.mfEffectiveDate}}</view>
      <view>修订情况:{{content.mfFileRevise}}</view>
    </view>
    
pages/module_consult/consultdetailitem/consultdetailitem.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
// pages/module_consult/consultdetailitem/consultdetailitem.js
const consultservice = require("../../../service/consultservice")
const app = getApp()
const behavior = require('../behaviors/behConsultItem')
Page({
  behaviors: [behavior],
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    content:[],
    more:[]
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
    var that = this
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      that.setData({
        itemId: data.itemId
      })
      that.getItem()
    })
    this.searchMore(1)
  },
  getItem () {
    var that = this
    wx.showLoading({
      title: '加载中',
      mask: true,
      success: (res) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
    setTimeout(() => {
      wx.hideLoading()
    }, 20000);
    consultservice.getMgtItem(app.globalData.accessToken.userId, this.data.itemId, {
      success (res) {
        res.miItemContent = res.miItemContent.replace('\\n', '<br/>')
        that.setData({
          content: res
        })
      },
      complete (res) {
        wx.hideLoading()
      }
    })
  },
})
pages/module_consult/consultdetailitem/consultdetailitem.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
{
  "navigationBarTitleText": "法规细则",
  "navigationBarBackgroundColor": "#57E4CB",
  "navigationBarTextStyle": "white",
  "usingComponents": {}
}
pages/module_consult/consultdetailitem/consultdetailitem.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
<!--pages/module_consult/consultdetailitem/consultdetailitem.wxml-->
<view class="page">
  <!-- <view class="page__hd">
      <view class="f-tag">发布时间:{{content.mfReleaseDate}}</view>
  </view> -->
  <view class="page__bd">
    <view class="fyui-panel">
      <rich-text class="f-title" nodes="{{content.miItemContent}}"></rich-text>
      <!-- <view>简称:{{content.mfShortName}}</view> -->
    </view>
    <view class="fyui-panel">
      <view>关键词:{{content.miKeyword}}</view>
    </view>
    <view class="fyui-panel">
      <view>来源:《{{content.mfName}}》</view>
      <view>章节:{{content.miChapterName}}</view>
      <view>条目:{{content.miItemName}}</view>
    </view>
  </view>
  <view class="page__ft">
    <block wx:for="{{result}}" wx:key="i1" wx:for-item="catagory" wx:for-index="i1">
      <view class="page__hd">
        <view>相关条目 ></view>
      </view>
      <view class="page__bd">
        <view class="fyui-panel">
          <block wx:if="{{catagory.typeId === 2}}">
            <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail">
              <view class="fyui-box  fyui-box__text">
                <view class="fyui-box__hd">
                  <rich-text nodes="{{item.des}}" class="fyui-box__content des subtitle"></rich-text>
                </view>
                <view class="fyui-box__bd">
                  <!-- <view class="fyui-box__content tag">相关行业 -> {{item.fileIndustry}}</view> -->
                  <text class="tag2">来源:《{{item.fileName}}》 {{item.chapterName}}{{item.name ? ' ' + item.name : ''}}</text>
                </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></view>
                </view>
              </view>
            </view>
          </block>
        </view>
      </view>
    </block>
  </view>
</view>
pages/module_consult/consultdetailitem/consultdetailitem.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,89 @@
/* pages/module_consult/consultdetailitem/consultdetailitem.wxss */
/* .page__hd {
  padding: 0;
} */
.page__ft{
  text-align: start;
}
.f-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--fyui-text-color_1);
}
.f-tag {
  font-size: 12px;
  color: var(--fyui-text-color_2);
  text-align: end;
  margin-bottom: 16px;
}
.f-summary {
  font-size: 14px;
  color: var(--fyui-text-color_2);
}
.fyui-panel{
  padding: 8px;
  font-size: 14px;
  color: var(--fyui-text-color_1);
}
.fyui-panel>view{
  margin-bottom: 4px;
}
.keyword {
  white-space: nowrap;
}
.keyword-item {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.keyword-item>text {
  white-space: nowrap;
  margin-right: 8px;
  padding: 0px 6px;
  color: #2c7064;
}
.des {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  width: 100%;
  overflow: hidden;
  /* text-overflow: ellipsis; */
}
.tag {
  margin-bottom: 8px;
}
.subtitle{
  font-size: 15px;
}
.tag2{
  font-size: 12px;
  color: var(--fyui-text-color_3);
}
.btn-more{
  text-align: center;
  background-color: white;
  margin: 0 10px;
  border-top: 1px solid var(--fyui-BG_1);
  color: var(--fyui-text-color_2);
  padding: 8px;
  font-size: 12px;
}
.btn-more:active{
  background-color: var(--fyui-BG-COLOR-ACTIVE);
}
pages/module_consult/consulthome/consulthome.js
@@ -10,7 +10,28 @@
   */
  data: {
    searchTips: '请输入关键字搜索',
    hotTopics: []
    hotTopics: [],
    tabList: [{
      name: '热门',
      tag: 0
    }, {
      name: '文件',
      tag: 0
    }, {
      name: '条目',
      tag: 0
    }, {
      name: '案例',
      tag: 0
    }],
    pageList: [
      [],
      [],
      [],
      [],
    ]
  },
  /**
@@ -82,7 +103,8 @@
          r.mfClosingDate = that.formateTime(r.mfClosingDate)
        });
        that.setData({
          hotTopics: res
          'pageList[0]': res,
          'pageList[1]': res
        })
      }
    })
@@ -90,7 +112,7 @@
  gotoDetail(e) {
    var i = e.currentTarget.dataset.index
    var fileId = this.data.hotTopics[i].mfGuid
    var fileId = this.data.pageList[0][i].mfGuid
    wx.navigateTo({
      url: '/pages/module_consult/consultdetail/consultdetail',
      success: (res) => {
pages/module_consult/consulthome/consulthome.json
@@ -3,6 +3,8 @@
  "navigationBarBackgroundColor": "#57E4CB",
  "navigationBarTextStyle": "white",
  "usingComponents": {
    "mp-icon": "/component/icon/icon"
    "mp-icon": "/component/icon/icon",
    "switch-tab": "/component/switchtab/switchtab",
    "mp-loading": "/component/loading/loading"
  }
}
pages/module_consult/consulthome/consulthome.wxml
@@ -10,45 +10,32 @@
    <view class="flex-h">
      <view class="card" bindtap="goto" data-index="0">
        <image src="/res/icons/con_pro_bg.png" class="card-bg" mode="scaleToFill" />
        <view class="card-title">常见问题</view>
        <view class="card-abstract">常见企业环保问题</view>
        <view class="card-title">环保问题</view>
        <view class="card-abstract">常见企业问题</view>
        <image src="/res/icons/con_pro.png" mode="aspectFit" class="icon"></image>
      </view>
      <view class="divider"></view>
      <view class="card middle" bindtap="goto" data-index="1">
        <image src="/res/icons/con_lib_bg.png" class="card-bg" mode="scaleToFill" />
        <view class="card-title">环保知识库</view>
        <view class="card-abstract">环保法律法规</view>
        <view class="card-abstract">生态环境法律法规</view>
        <image src="/res/icons/con_lib.png" mode="aspectFit" class="icon"></image>
      </view>
      <view class="divider"></view>
      <view class="card" bindtap="goto" data-index="2">
        <image src="/res/icons/con_qa_bg.png" class="card-bg" mode="scaleToFill" />
        <view class="card-title">智能咨询</view>
        <view class="card-abstract">环保专家 åœ¨çº¿å’¨è¯¢</view>
        <view class="card-abstract">环保智能助手</view>
        <image src="/res/icons/con_qa.png" mode="aspectFit" class="icon"></image>
      </view>
    </view>
    <view class="fyui-cell fyui-cell_select">
      <view class="fyui-cell__bd">热门</view>
      <view class="fyui-cell__ft">更多</view>
    </view>
    <view wx:for="{{hotTopics}}" wx:key="index" data-index="{{index}}" bindtap="gotoDetail">
      <!-- <view class="fyui-box  fyui-box__text">
        <view class="fyui-box__hd">
          <text class="" wx:for="{{item.tags}}" wx:key="i" data-index="i" wx:for-item="tag">{{tag}}</text>
          {{item.name}}
        </view>
        <view class="fyui-box__bd">
          <view class="fyui-box__content">{{item.abstract}}</view>
          
        </view>
        <view class="fyui-box__ft">
          <view>{{item.time}}</view>
          <view>{{item.author}}</view>
        </view>
      </view> -->
    <switch-tab tabList="{{tabList}}" pageList="{{pageList}}">
      <view slot="slot{{index}}" wx:for="{{pageList}}" wx:for-item="page" wx:key="index">
        <block wx:if="{{page.length > 0}}">
          <view wx:for="{{page}}" wx:key="cIndex" wx:for-index="cIndex" data-index="{{cIndex}}" bindtap="gotoDetail">
      <view class="fyui-box  fyui-box__text">
        <view class="fyui-box__hd">
          {{item.mfName}}
@@ -70,8 +57,23 @@
        </view>
      </view>
    </view>
        </block>
        <view wx:else class="page__ft">
          <mp-loading duration="{{900}}" type="dot-gray" show="{{true}}" animated="{{true}}"></mp-loading>
</view>
      </view>
    </switch-tab>
    <!-- <view class="fyui-cell fyui-cell_select">
      <view class="fyui-cell__bd">热门</view>
      <view class="fyui-cell__ft">更多</view>
    </view> -->
  </view>
  <view class="page__ft">
  </view>
</view>
pages/module_consult/consulthome/consulthome.wxss
@@ -43,7 +43,7 @@
}
.card .card-abstract {
  font-size: 12px;
  font-size: 11px;
  color: var(--fyui-text-color_2);
}
pages/module_consult/consultresult/consultresult.js
@@ -1,14 +1,15 @@
// pages/module_consult/consultresult/consultresult.js
const consultservice = require("../../../service/consultservice")
const app = getApp()
const behavior = require('../behaviors/behConsultItem')
Page({
  behaviors: [behavior],
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    keyword: 'asdad',
    keyword: '',
    result: []
  },
@@ -39,11 +40,29 @@
    setTimeout(() => {
      wx.hideLoading()
    }, 20000);
    consultservice.searchLaw(app.globalData.accessToken.userId, this.data.keyword, {
    consultservice.searchLaw(app.globalData.accessToken.userId, this.data.keyword, 1, 5, {
      success (res) {
        that.setData({
          result: res
        let result = []
        let thisTypeId = ''
        let thisIndex = -1
        res.forEach(r => {
          r.des = r.des.replace('\\n', '<br/>')
          if (thisTypeId === '' || thisTypeId != r.typeId) {
            thisTypeId = r.typeId
            thisIndex++
            result.push({
              typeId: r.typeId,
              typeName: r.typeName,
              contents: [r]
        })
          } else {
            result[thisIndex].contents.push(r)
          }
        });
        that.setData({
          result
        })
        console.log(result);
      },
      complete (res) {
        wx.hideLoading()
@@ -51,15 +70,52 @@
    })
  },
  gotoDetail (e) {
    var i = e.currentTarget.dataset.index
    var fileId = this.data.result[i].id
  // gotoDetail (e) {
  //   const iList = e.currentTarget.dataset.index.split(',')
  //   const i1 = iList[0]
  //   const i2 = iList[1]
  //   const r = this.data.result[i1]
  //   switch (r.typeId) {
  //     //法律法规文件
  //     case 1:
  //       const fileId = r.contents[i2].id
  //       wx.navigateTo({
  //         url: '/pages/module_consult/consultdetail/consultdetail',
  //         success: (res) => {
  //           // é€šè¿‡ eventChannel å‘被打开页面传送数据
  //           res.eventChannel.emit('acceptDataFromOpenerPage', {
  //             fileId: fileId
  //           })
  //         },
  //       })
  //       break;
  //     //法律法规条目
  //     case 2:
  //       break;
  //     //执法案例
  //     case 3:
  //       break;
  //     //环保问题
  //     case 4:
  //       break;
  //     default:
  //       break;
  //   }
  // },
  gotoMore(e){
    const typeId = e.currentTarget.dataset.typeid
    const keyword = this.data.keyword
    wx.navigateTo({
      url: '/pages/module_consult/consultdetail/consultdetail',
      url: '/pages/module_consult/consultresultmore/consultresultmore',
      success: (res) => {
        // é€šè¿‡ eventChannel å‘被打开页面传送数据
        res.eventChannel.emit('acceptDataFromOpenerPage', {
          fileId: fileId
          typeId: typeId,
          keyword: keyword
        })
      },
    })
pages/module_consult/consultresult/consultresult.wxml
@@ -1,11 +1,13 @@
<!--pages/module_consult/consultresult/consultresult.wxml-->
<view class="page">
  <block wx:for="{{result}}" wx:key="i1" wx:for-item="catagory" wx:for-index="i1">
  <view class="page__hd">
  <view><text>{{keyword}}</text>的法律法规 ></view>
      <view><text style="color: #57E4CB;">{{keyword}}</text>的{{catagory.typeName}} ></view>
  </view>
  <view class="page__bd">
  <view class="fyui-panel">
    <view wx:for="{{result}}" wx:key="index" data-index="{{index}}" bindtap="gotoDetail">
        <block wx:if="{{catagory.typeId === 1}}">
          <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail">
      <view class="fyui-box  fyui-box__text">
        <view class="fyui-box__hd">
          {{item.name}}
@@ -20,7 +22,28 @@
        </view>
      </view>
    </view>
        </block>
        <block wx:else="{{catagory.typeId === 2}}">
          <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail">
            <view class="fyui-box  fyui-box__text">
              <view class="fyui-box__hd">
                <rich-text nodes="{{item.des}}" class="fyui-box__content des subtitle"></rich-text>
              </view>
              <view class="fyui-box__bd">
                <!-- <view class="fyui-box__content tag">相关行业 -> {{item.fileIndustry}}</view> -->
                <text class="tag2">来源:《{{item.fileName}}》 {{item.chapterName}}{{item.name ? ' ' + item.name : ''}}</text>
              </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></view>
  </view>
  </view>
          </view>
        </block>
      </view>
      <view class="btn-more" data-typeid="{{catagory.typeId}}" bindtap="gotoMore">查看更多</view>
    </view>
  </block>
  <view class="page__ft"></view>
</view>
pages/module_consult/consultresult/consultresult.wxss
@@ -27,3 +27,26 @@
.tag {
  margin-bottom: 8px;
}
.subtitle{
  font-size: 15px;
}
.tag2{
  font-size: 12px;
  color: var(--fyui-text-color_3);
}
.btn-more{
  text-align: center;
  background-color: white;
  margin: 0 10px;
  border-top: 1px solid var(--fyui-BG_1);
  color: var(--fyui-text-color_2);
  padding: 8px;
  font-size: 12px;
}
.btn-more:active{
  background-color: var(--fyui-BG-COLOR-ACTIVE);
}
pages/module_consult/consultresultmore/consultresultmore.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,80 @@
// pages/module_consult/consultresultmore/consultresultmore.js
const consultservice = require("../../../service/consultservice")
const app = getApp()
const behavior = require('../behaviors/behConsultItem')
Page({
  behaviors: [behavior],
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    // result: []
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
    var that = this
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      that.setData({
        keyword: data.keyword,
        typeId: data.typeId,
      })
      that.search(1)
    })
  },
  // onReachBottom () {
  //   console.log('onReachBottom');
  //   if (this.cPage && this.tPage) {
  //     if (this.cPage < this.tPage) {
  //       this.search(this.cPage + 1)
  //     }
  //   }
  // },
  search (cPage = 1) {
    var that = this
    wx.showLoading({
      title: '搜索中',
      mask: true,
      success: (res) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
    setTimeout(() => {
      wx.hideLoading()
    }, 20000);
    consultservice.searchLaw(app.globalData.accessToken.userId, this.data.keyword, cPage, 5, {
      onPage(head){
        that.cPage = head.page
        that.tPage = head.totalPage
      },
      success (res) {
        let result = that.data.result
        res.forEach(r => {
          r.des = r.des.replace('\\n', '<br/>')
          if (result.length === 0) {
            result.push({
              typeId: r.typeId,
              typeName: r.typeName,
              contents: [r]
            })
          } else {
            result[0].contents.push(r)
          }
        });
        that.setData({
          result
        })
        console.log(result);
      },
      complete (res) {
        wx.hideLoading()
      }
    }, this.data.typeId)
  },
})
pages/module_consult/consultresultmore/consultresultmore.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
{
  "navigationBarTitleText": "更多结果",
  "navigationBarBackgroundColor": "#57E4CB",
  "navigationBarTextStyle": "white",
  "usingComponents": {}
}
pages/module_consult/consultresultmore/consultresultmore.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
<!--pages/module_consult/consultresultmore/consultresultmore.wxml-->
<view class="page">
  <block wx:for="{{result}}" wx:key="i1" wx:for-item="catagory" wx:for-index="i1">
    <view class="page__hd">
      <view><text style="color: #57E4CB;">{{keyword}}</text>的{{catagory.typeName}} ></view>
    </view>
    <view class="page__bd">
      <view class="fyui-panel">
        <block wx:if="{{catagory.typeId === 1}}">
          <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail">
            <view class="fyui-box  fyui-box__text">
              <view class="fyui-box__hd">
                {{item.name}}
              </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>
              <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></view>
              </view>
            </view>
          </view>
        </block>
        <block wx:else="{{catagory.typeId === 2}}">
          <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail">
            <view class="fyui-box  fyui-box__text">
              <view class="fyui-box__hd">
                <rich-text nodes="{{item.des}}" class="fyui-box__content des subtitle"></rich-text>
              </view>
              <view class="fyui-box__bd">
                <!-- <view class="fyui-box__content tag">相关行业 -> {{item.fileIndustry}}</view> -->
                <text class="tag2">来源:《{{item.fileName}}》 {{item.chapterName}}{{item.name ? ' ' + item.name : ''}}</text>
              </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></view>
              </view>
            </view>
          </view>
        </block>
      </view>
    </view>
  </block>
  <view class="page__ft"></view>
</view>
pages/module_consult/consultresultmore/consultresultmore.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
/* pages/module_consult/consultresult/consultresult.wxss */
.keyword {
  white-space: nowrap;
}
.keyword-item {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.keyword-item>text {
  white-space: nowrap;
  margin-right: 8px;
  padding: 0px 6px;
  color: #2c7064;
}
.des {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  width: 100%;
  overflow: hidden;
  /* text-overflow: ellipsis; */
}
.tag {
  margin-bottom: 8px;
}
.subtitle{
  font-size: 15px;
}
.tag2{
  font-size: 12px;
  color: var(--fyui-text-color_3);
}
.btn-more{
  text-align: center;
  background-color: white;
  margin: 0 10px;
  border-top: 1px solid var(--fyui-BG_1);
  color: var(--fyui-text-color_2);
  padding: 8px;
  font-size: 12px;
}
.btn-more:active{
  background-color: var(--fyui-BG-COLOR-ACTIVE);
}
pages/module_ledger/ledgerhistory/ledgerhistory.js
@@ -187,6 +187,7 @@
    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]]
    console.log(ledger);
    wx.navigateTo({
      url: '/pages/module_ledger/ledgerupload/ledgerupload',
      success: (res) => {
pages/module_ledger/ledgerhistory/ledgerhistory.json
@@ -1,4 +1,6 @@
{
  "navigationBarTitleText": "历史台账",
  "navigationBarBackgroundColor": "#57E4CB",
  "usingComponents": {
    "mp-icon": "/component/icon/icon"
  }
pages/module_ledger/ledgerhistory/ledgerhistory.wxml
@@ -1,5 +1,5 @@
<!--pages/module_ledger/ledgerHistory/ledgerhistory.wxml-->
<import src="/template/nodata/nodata.wxml"></import>
<import src="/template/nodata.wxml"></import>
<view class="page">
  <view class="page__hd">
    <view class="flex-h">
@@ -24,7 +24,7 @@
        </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>
            <image class="" src="{{ledger.path1[0]}}" mode="aspectFill"></image>
            <view>{{ledger.ledgerName}}</view>
          </view>
        </view>
pages/module_ledger/ledgerhistory/ledgerhistory.wxss
@@ -68,15 +68,18 @@
}
.ledger-group_item{
  width: 30vw;
  width: 46vw;
  text-align: center;
  font-size: 14px;
}
.ledger-group_item>image{
  width: 28vw;
  height: 28vw;
  width: 40vw;
  height: 40vw;
  border-radius: 8px;
}
.ledger-group_item>view{
  font-size: 12px;
  margin-bottom: 8px;
}
pages/module_ledger/ledgerhome/ledgerhome.js
@@ -85,8 +85,8 @@
    this.getLedgerType(now.add(-1, 'M').format('YYYY-MM-DD'), r => {
      this.setData({
        lastMonthInfo: r[2]
      }, true)
    }) //上月
      })
    }, true) //上月
  },
  /**
@@ -181,6 +181,9 @@
    monthInfo.overtime = moment().date() - this.DEADLINEDAY
    monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
    console.log(lastMonth);
    console.log(monthInfo);
    //选项卡
    var t = []
    var p = []
@@ -207,7 +210,7 @@
    var i = e.currentTarget.dataset.index.split(',')
    var indexGroup = [parseInt(i[0]), parseInt(i[1])]
    var ledger = this.data.pageList[indexGroup[0]][indexGroup[1]]
    console.log(indexGroup);
    console.log(ledger);
    var that = this
    wx.navigateTo({
@@ -252,14 +255,14 @@
    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) {
      // }
      console.log(rect.height);
      let pageheight = that.data.pageheight.split('px')[0]
      pageheight = parseInt(pageheight)
      if (rect.height > pageheight) {
      that.setData({
        pageheight: rect.height + 'px'
      });
      }
    }).exec();
  },
  swichNav: function (e) {
@@ -271,7 +274,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) {
@@ -280,7 +283,7 @@
      currentTab: e.detail.current,
      navScrollLeft: e.detail.current >= 3 ? ((e.detail.current) * 60) : 0 //判断当前选中的个数是否是第5个
    });
    // that.tabsHeight('.page'+e.target.dataset.current);    //查询哪一个元素
    that.tabsHeight('.page' + e.detail.current);    //查询哪一个元素
  },
  changeMonth(){
pages/module_ledger/ledgerhome/ledgerhome.wxml
@@ -11,16 +11,16 @@
      <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 class="head_tag">完成度</view>
            <view class="head_1 head_1_big">{{thisMonthInfo.percent}}<text class="head_row_item_tag">%</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 class="head_tag">选填项</view>
            <view class="head_1">{{thisMonthInfo.finishedSelect}}<text class="head_row_item_tag">/{{thisMonthInfo.totalSelect}}</text></view>
          </view>
        </view>
        <view class="head_row">
@@ -34,16 +34,16 @@
      <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 class="head_tag">完成度</view>
            <view class="head_1">{{lastMonthInfo.percent}}<text class="head_row_item_tag">%</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 class="head_tag">选填项</view>
            <view class="head_1">{{lastMonthInfo.finishedSelect}}<text class="head_row_item_tag">/{{lastMonthInfo.totalSelect}}</text></view>
          </view>
        </view>
        <view class="head_row">
@@ -53,7 +53,7 @@
      </block>
    </view>
    <view class="head_right">
      <text class="head_tag" bindtap="gotoHistory">历史记录 ></text>
      <text class="head_btn" bindtap="gotoHistory">历史记录 ></text>
    </view>
  </view>
  <!-- </view> -->
pages/module_ledger/ledgerhome/ledgerhome.wxss
@@ -50,7 +50,17 @@
.head_tag{
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  color: white;
}
.head_btn{
  background-color: rgb(11, 90, 77);
  padding: 4px 6px;
  border-radius: 4px;
}
.head_btn:active{
  background-color: rgba(11, 90, 77, 0.5);
}
.head_tag>text {
@@ -62,6 +72,10 @@
  font-size: 30px;
}
.head_1_big{
  font-size: 30px;
}
.head_3 {
  font-size: 12px;
  margin-bottom: 16px;
pages/module_ledger/ledgerupload/ledgerupload.js
@@ -13,7 +13,11 @@
    imgFiles: [],
    remark: '',
    remarkDisable: false
    remarkDisable: false,
    previewImageUrls:[],
    previewCurrent: 0,
    showPreview: false,
  },
  /**
@@ -44,7 +48,12 @@
  },
  checkStatus() {
    if (this.data.ledger.upLoad) {
    if (this.data.ledger.path1) {
      let imgFiles = this.data.ledger.path1
      let remark = this.data.ledger.remark1 == null ? '' : this.data.ledger.remark1
      let remarkDisable = true
      this.setData({imgFiles, remark, remarkDisable})
    }else if (this.data.ledger.upLoad) {
      var that = this
      var userId = app.globalData.accessToken.userId
      var typeId = this.data.ledger.ledgerSubTypeId
@@ -136,5 +145,17 @@
      complete (res) {
      }
    })
  }
  },
  previewImage(e) {
    const {
      index
    } = e.currentTarget.dataset;
    const previewImageUrls = this.data.imgFiles;
    this.setData({
      previewImageUrls,
      previewCurrent: index,
      showPreview: true
    });
  },
})
pages/module_ledger/ledgerupload/ledgerupload.json
@@ -4,6 +4,7 @@
  "navigationBarTextStyle": "white",
  "usingComponents": {
    "mp-upload":"/component/uploader/uploader",
    "c-dialog": "/component/commondialog/commondialog"
    "c-dialog": "/component/commondialog/commondialog",
    "mp-gallery": "/component/gallery/gallery"
  }
}
pages/module_ledger/ledgerupload/ledgerupload.wxml
@@ -10,8 +10,8 @@
        binduploadImg="uploadFile" binddelete="delImg"></mp-upload>
    </view>
    <view wx:else class="img-group">
      <view wx:for="{{imgFiles}}" >
        <image class="img-group_img" src="{{item}}"></image>
      <view wx:for="{{imgFiles}}" wx:key="index">
        <image class="img-group_img" src="{{item}}" mode="aspectFill" bindtap="previewImage" data-index="{{index}}"></image>
      </view>
    </view>
  </view>
@@ -22,4 +22,5 @@
  <c-dialog show="{{showDialog}}" yes="确认" bindconfirm="submitLedger">
    <view>确认是否提交台账?</view>
  </c-dialog>
  <mp-gallery class="gallery" hide-on-click="{{true}}" show-delete="{{false}}" show="{{showPreview}}" img-urls="{{previewImageUrls}}" current="{{previewCurrent}}"></mp-gallery>
</view>
pages/module_user/userlogin/userlogin.js
@@ -34,19 +34,22 @@
  },
  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) => {},
        })
        // wx.login({
        //   timeout: 10000,
        //   success: (result) => {
        //     console.log(result);
        //   },
        //   fail: (res) => {},
        //   complete: (res) => {},
        // })
        that.login()
      }
    })
  },
@@ -56,13 +59,20 @@
    var that = this
    wx.getStorage({
      key: 'accessToken',
      success(res) {
      success(res) { //获取成功自动登录
        app.globalData.accessToken = res.data
        that.setData({
          userName: res.data.userName,
          password: res.data.password
        })
        wx.showLoading({
          title: '登录中',
          mask: true,
        })
        setTimeout(() => {
          wx.hideLoading()
        }, 10000);
        userservice.login(that.data.userName, that.data.password, {
          success(data) {
            if (data.success) {
@@ -89,14 +99,23 @@
            that.setData({
              loading: false
            })
            wx.hideLoading()
          }
        })
      },
      fail(e) { //获取失败
        //后台查询微信是否绑定账号,未绑定则跳转注册界面
        wx.navigateTo({
          url: '/pages/module_user/userregistercompany/userregistercompany',
          success: (result) => {},
          fail: (res) => {},
          complete: (res) => {},
        })
      }
    })
  },
  getUserInfo() {
    var that = this
    userservice.getUserInfo(app.globalData.accessToken.userId, {
      success(data) {
        app.globalData.userInfo = data
pages/module_user/userregistercompany/userregistercompany.js
@@ -1,4 +1,7 @@
// pages/module_user/userregistercompany/userregistercompany.js
const userservice = require("../../../service/userservice")
const app = getApp()
Page({
  /**
@@ -7,12 +10,12 @@
  data: {
    sceneTypes: [
      {value: '1', name: '餐饮'},
      {value: '7', name: '汽修'},
      {value: '6', name: '工业企业' },
      {value: '2', name: '工地'},
      {value: '3', name: '码头'},
      {value: '4', name: '堆场'},
      {value: '5', name: '搅拌站' },
      {value: '6', name: '工业企业' },
      {value: '7', name: '汽修'},
    ],
    sceneTypeIndex: 0,
@@ -121,7 +124,49 @@
  onSubmit: function () {
    if (!this.submitCheck()) return
    let msg = this.data.msg
    let info = {
      sceneType: this.data.sceneTypes[this.data.sceneTypeIndex].value,
      userName: msg[0].value,
      password: msg[1].value,
      department: msg[3].value,
      address: msg[4].value,
      telephone: msg[5].value,
      orgCode: msg[6].value
    }
    
    wx.showLoading({
      title: '注册中',
      mask: true,
    })
    setTimeout(() => {
      wx.hideLoading()
    }, 10000);
    var that = this
    userservice.register(info, {
      success(res) {
        if (res.success) {
          app.globalData.accessToken = {
            userId: res.userId,
            suserId: res.suserId,
          }
          that.getUserInfo()
        } else {
          wx.hideLoading({
            success: (res) => {
              wx.showToast({
                title: '用户名称重复',
                duration: 2000,
                icon: 'error',
                mask: true,
              })
            },
            fail: (res) => {},
            complete: (res) => {},
          })
        }
      }
    })
  },
  /**
@@ -177,5 +222,28 @@
    }
    return true
  },
  getUserInfo() {
    userservice.getUserInfo(app.globalData.accessToken.userId, {
      success(data) {
        app.globalData.accessToken.userName = data.acountname
        app.globalData.accessToken.password = data.acountname
        wx.setStorage({
          key: 'accessToken',
          data: app.globalData.accessToken,
        })
        app.globalData.userInfo = data
        wx.setStorage({
          key: 'userInfo',
          data: data,
          success: (result) => {
            wx.switchTab({
              url: '/pages/home/home',
            })
  }
})
      }
    })
  },
})
pages/module_user/userregistergov/userregistergov.js
@@ -14,53 +14,4 @@
  onLoad(options) {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面隐藏
   */
  onHide() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面卸载
   */
  onUnload() {
  },
  /**
   * é¡µé¢ç›¸å…³äº‹ä»¶å¤„理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * é¡µé¢ä¸Šæ‹‰è§¦åº•事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage() {
  }
})
pages/notice/notice.wxml
@@ -1,5 +1,5 @@
<!--pages/notice/notice.wxml-->
<import src="/template/nodata/nodata.wxml"></import>
<import src="/template/nodata.wxml"></import>
<view class="page">
  <view class="swiper-tab">
pages/promise/promise.js
@@ -16,7 +16,7 @@
    promise: [{
      period: '承诺周期:2021å¹´1月~2021å¹´12月',
      time: '2021å¹´1月6日完成',
      picPath: '',
      picPath: [],
      pdfPath: ''
    }],
    deadline: "承诺截止时间:----å¹´--月--日",
@@ -60,18 +60,24 @@
  checkStatus() {
    if (this.promiseHistory.length > 0) {
      var first = this.promiseHistory[0]
      var firstYear = moment(first.cmCreateTime).year()
      if (firstYear >= this.data.year) {
        var deadline = moment().add(1, 'years').endOf('year').format("YYYYå¹´MM月DD日")
      var cTime = moment(first.cmCreateTime)
      let leftDays = cTime.add(1, 'years').diff(moment(), 'days')
      // that.setData({
      //   promsieInfo: {
      //     leftDays: leftDays
      //   }
      // })
      if (leftDays > 0) {
        var deadline = cTime.format("YYYY-MM-DD")
        this.setData({
          text1: "很棒!本次承诺已完成",
          text1: "本次承诺已完成",
          text3: "查看承诺",
          status: 1,
          deadline: `下次承诺时间:${deadline}`
          deadline: `承诺有效时间:剩余${leftDays}天`
        })
      } else {
        this.setData({
          text1: "已开启!请及时完成承诺",
          text1: "请及时完成承诺",
          text3: "去承诺",
          status: 0,
        })
pages/promise/promise.wxml
@@ -9,7 +9,8 @@
      <view class="btn" bindtap="gotoPromise" data-status="{{status}}">{{text3}}</view>
    </view>
    <view wx:if="{{status == 1}}" bindtap="gotoPromise" data-status="{{status}}">
      <image class="file" src="{{promise[0].picPath}}"></image>
      <image class="file" src="{{promise[0].picPath[0]}}" mode="aspectFit"></image>
      <view class="tag">{{promise[0].time}}</view>
    </view>
  </view>
  <view class="page__bd">
@@ -19,7 +20,7 @@
    </view>
    <view wx:for="{{promise}}" wx:key="index">
      <view class="p-cell fyui-panel">
        <view class="p-title"> å®ˆæ³• | æ‰¿è¯º</view>
        <view class="p-title">| å®ˆæ³•承诺</view>
        <view class="p-content">{{item.period}}</view>
        <view class="p-tag">{{item.time}}</view>
        <view class="p-btn" bindtap="gotoDetail" data-index="{{index}}">去看看</view>
pages/promise/promise.wxss
@@ -19,9 +19,11 @@
}
.page__hd .tag {
  font-size: 10px;
  font-size: 12px;
  color: #55A37D;
  margin-top: 8px;
  /* background-color: red; */
  text-align: end;
}
.page__hd .btn {
@@ -37,7 +39,7 @@
.page__hd .file {
  width: 40vw;
  margin-bottom: 2px;
  height: 25vh;
}
.p-cell{
pages/promisefile/promisefile.js
@@ -55,6 +55,7 @@
  startSign() {
    var that = this
    wx.navigateTo({
      url: '/pages/promisesign/promisesign',
      events: {
@@ -64,6 +65,27 @@
        }
      },
    })
    // wx.getStorage({
    //   key: 'signPath',
    //   success: (result) => {
    //     console.log(result.data);
    //     that.signOver(result.data)
    //   },
    //   fail: (res) => {
    //     console.log(res);
    //     wx.navigateTo({
    //       url: '/pages/promisesign/promisesign',
    //       events: {
    //         onSignSuccess: function (imgPath) {
    //           console.log('signover:' + imgPath);
    //           that.signOver(imgPath)
    //         }
    //       },
    //     })
    //   },
    //   complete: (res) => {},
    // })
  },
  signOver(imgPath) {
pages/promiseresult/promiseresult.js
@@ -8,7 +8,7 @@
   */
  data: {
    promise: {
      picPath: '',
      picPath: [],
      pdfPath: '',
    }
  },
@@ -29,27 +29,6 @@
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面隐藏
   */
  onHide: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面卸载
   */
  onUnload: function () {
@@ -62,25 +41,4 @@
      complete: (res) => {},
    })
  },
  /**
   * é¡µé¢ç›¸å…³äº‹ä»¶å¤„理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  },
  /**
   * é¡µé¢ä¸Šæ‹‰è§¦åº•事件的处理函数
   */
  onReachBottom: function () {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage: function () {
  }
})
pages/promiseresult/promiseresult.wxml
@@ -1,5 +1,5 @@
<!--pages/promiseresult/promiseresult.wxml-->
<view class="">
<image src="{{promise.picPath}}" class="image"     show-menu-by-longpress="true" mode="widthFix"></image>
<image wx:for="{{promise.picPath}}" src="{{item}}" class="image"     show-menu-by-longpress="true" mode="widthFix"></image>
<!-- <image src="https://fyami.com.cn:447/images/commitment-restaurant-1659927781518.jpg" class="image"     show-menu-by-longpress="true" mode="widthFix"></image> -->
</view>
pages/test/test.js
@@ -214,32 +214,4 @@
      }, {}, true, true)
    })
  },
  /**
  * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面卸载
  */
  onUnload: function () {
  },
  /**
   * é¡µé¢ç›¸å…³äº‹ä»¶å¤„理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  },
  /**
   * é¡µé¢ä¸Šæ‹‰è§¦åº•事件的处理函数
   */
  onReachBottom: function () {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage: function () {
  }
})
pages/text/text.js
@@ -14,53 +14,4 @@
  onLoad: function (options) {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面隐藏
   */
  onHide: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面卸载
   */
  onUnload: function () {
  },
  /**
   * é¡µé¢ç›¸å…³äº‹ä»¶å¤„理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  },
  /**
   * é¡µé¢ä¸Šæ‹‰è§¦åº•事件的处理函数
   */
  onReachBottom: function () {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage: function () {
  }
})
res/icons/ass_1.png
res/icons/ass_2.png
res/icons/con_qa.png

res/icons/notice_1.png
Binary files differ
res/icons/notice_2.png
Binary files differ
res/icons/notice_3.png
Binary files differ
res/icons/wm_assessment.png

res/icons/wm_commitment.png

res/icons/wm_ledger.png

service/baserequest.js
@@ -11,12 +11,12 @@
const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
// const baseUrl = "http://127.0.0.1:8080"
// const baseUrl = "http://192.168.0.117:8080"
const baseUrl = "https://fyami.com.cn:447"
const baseUrl = "http://192.168.0.105:8080"
// const baseUrl = "https://fyami.com.cn:447"
// const basePicUrl = baseUrl + "/images/"
const basePicUrl = "https://fyami.com.cn:447/images/"
const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/"
const baseFileUrl = baseUrl + "/meeting/file/"
const baseFileUrl = "https://fyami.com.cn:447/meeting/file/"
function request(fun) {
  if (fun.params != undefined) {
service/consultservice.js
@@ -3,16 +3,34 @@
module.exports = {
  //根据关键字搜索法律法规
  searchLaw: function (userId, keyword, fun) {
  searchLaw: function (userId, keyword, page, perPage, fun, type) {
    let cb = {
      url: `/consultation/search/law`,
      params: {
        userId: userId,
        keyword: keyword
        keyword: keyword,
        page: page,
        perPage: perPage
      },
    }
    if (type) {
      cb.params.type = type
    }
    Object.assign(cb, fun)
    $f.get(cb)
    let fun1 = util.deepCopy(cb)
    fun1.success = function (res) {
      if (res.success) {
        if (cb.onPage) {
          cb.onPage(res.head)
        }
        cb.success(res.data)
      } else {
        cb.fail(res.message)
      }
    }
    $f.get(fun1)
  },
  //获取热门
@@ -27,7 +45,7 @@
    $f.get(cb)
  },
  //获取法律法规
  //获取法律法规文件
  getMgtFile: function (userId, fileId, fun) {
    let cb = {
      url: `/consultation/law/file`,
@@ -46,4 +64,24 @@
    $f.get(fun1)
  },
  //获取法律法规条目
  getMgtItem: function (userId, itemId, fun) {
    let cb = {
      url: `/consultation/law/item`,
      params: {
        userId: userId,
        itemId: itemId,
      },
    }
    Object.assign(cb, fun)
    // let fun1 = util.deepCopy(cb)
    // fun1.success = function (res) {
    //   res.mfFileUrl = $f.baseFileUrl + res.mfFileUrl
    //   cb.success(res)
    // }
    $f.get(cb)
  },
}
service/lawservice.js
@@ -3,16 +3,14 @@
module.exports = {
  //查找守法动态
  getLawRegulations: function (userId, page, sceneTypeId, fun) {
  getLawRegulations: function (userId, page, condition, fun, perPage = 30) {
    let cb = {
      url: `/laws/condition/${userId}`,
      params: {
        page: page,
        per_page: 30
        per_page: perPage
      },
      data: {
        sceneTypeId: sceneTypeId
      }
      data: condition
    }
    Object.assign(cb, fun)
service/promiseservice.js
@@ -15,13 +15,18 @@
      },
      success: (result) => {
        let res = JSON.parse(result.data)
        res.data = res.data.map((value, index) => {
        res.data[0] = res.data[0].split(';').map((value, index) => {
          return $f.basePicUrl + value
        })
        res.data[1] = $f.basePicUrl + res.data[1]
        fun.success(res)
      },
      fail: (res) => {fun.fail(res)},
      complete: (res) => {fun.complete(res)},
      fail: (res) => {
        fun.fail(res)
      },
      complete: (res) => {
        fun.complete(res)
      },
    })
  },
@@ -40,7 +45,9 @@
    let fun1 = util.deepCopy(cb)
    fun1.success = function (res) {
      res.forEach(r => {
        r.cmUrl = $f.basePicUrl + r.cmUrl
        r.cmUrl = r.cmUrl.split(';').map((url) => {
          return $f.basePicUrl + url
        })
        r.cmPdfUrl = $f.basePicUrl + r.cmPdfUrl
      });
      cb.success(res)
service/userservice.js
@@ -1,6 +1,16 @@
const $f = require('./baserequest')
module.exports = {
  //注册
  register: function (info, fun) {
    let cb = {
      url: '/userInfo/register2',
      data: info,
    }
    Object.assign(cb, fun)
    $f.post(cb)
  },
  //登录
  login: function (userName, password, fun) {
    let cb = {
template/loading.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
<template name="loading">
  <mp-loading type="circle"></mp-loading>
  <!-- <mp-loading type="circle" tips="{{tips}}"></mp-loading> -->
  <mp-loading duration="{{900}}" ext-class="demo0" type="dot-gray" show="{{true}}" animated="{{true}}"></mp-loading>
  <mp-loading type="dot-white" ext-class="demo1"></mp-loading>
</template>
template/nodata.wxml