From 8fbd6b8d09e70494d920cc0b77812e9643be3196 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 23 八月 2022 17:37:31 +0800
Subject: [PATCH] 2022.8.23
---
pages/assessment/assessment.wxml | 73 +
pages/promise/promise.js | 20
res/icons/ass_1.png | 0
pages/module_consult/consulthome/consulthome.wxss | 2
component/loading/loading.json | 4
component/progress/progress.wxml | 2
pages/mine/mine.wxss | 3
pages/grade/grade.wxml | 3
pages/promise/promise.wxss | 6
service/promiseservice.js | 17
res/icons/ass_2.png | 0
pages/module_consult/consultdetailitem/consultdetailitem.js | 55 +
pages/module_ledger/ledgerhistory/ledgerhistory.js | 1
pages/gradereport/gradereport.js | 64
pages/module_common/pagevideo/pagevideo.wxss | 14
res/icons/wm_commitment.png | 0
service/baserequest.js | 6
pages/mine/mine.js | 49
pages/home/home.wxss | 67 +
pages/learn/learn.wxss | 27
pages/module_ledger/ledgerhome/ledgerhome.wxml | 18
pages/gradereport/gradereport.wxml | 21
pages/home/home.json | 1
pages/module_consult/consultresult/consultresult.js | 74 +
component/loading/loading.wxss | 16
pages/module_consult/consultdetail/consultdetail.wxml | 17
pages/module_ledger/ledgerhistory/ledgerhistory.wxml | 4
pages/module_ledger/ledgerupload/ledgerupload.wxml | 5
pages/gradedetail/gradedetail.js | 49
pages/module_consult/consultresultmore/consultresultmore.wxss | 52 +
pages/text/text.js | 49
pages/module_consult/consultresult/consultresult.wxss | 23
pages/notice/notice.wxml | 2
component/switchtab/switchtab.js | 81 +
pages/module_ledger/ledgerhome/ledgerhome.js | 29
pages/module_consult/consulthome/consulthome.json | 4
pages/assessment/assessment.json | 1
component/loading/loading.js | 193 +++
pages/module_ledger/ledgerhistory/ledgerhistory.json | 2
pages/module_consult/consultdetailitem/consultdetailitem.wxml | 52 +
component/switchtab/switchtab.wxml | 21
res/icons/con_qa.png | 0
pages/promisefile/promisefile.js | 22
template/loading.wxml | 6
pages/assessment/assessment.wxss | 98 +
pages/home/home.js | 16
pages/assessment/assessment.js | 55
app.wxss | 5
component/switchtab/switchtab.json | 4
pages/module_consult/consulthome/consulthome.wxml | 86
pages/promiseresult/promiseresult.wxml | 2
service/lawservice.js | 8
component/progress/progress.wxss | 1
component/progress/progress.js | 46
pages/promise/promise.wxml | 5
pages/module_user/userregistergov/userregistergov.js | 49
app.js | 16
pages/grade/grade.json | 3
pages/module_common/pagevideo/pagevideo.wxml | 42
pages/module_consult/consultdetailitem/consultdetailitem.json | 6
pages/module_common/pagevideo/pagevideo.js | 86 +
pages/module_consult/consultresultmore/consultresultmore.js | 80 +
pages/module_ledger/ledgerupload/ledgerupload.js | 27
pages/home/home.wxml | 35
pages/learn/learn.wxml | 173 +-
pages/module_ledger/ledgerhome/ledgerhome.wxss | 16
pages/module_user/userlogin/userlogin.js | 39
pages/gradereport/gradereport.wxss | 8
pages/module_consult/behaviors/behConsultItem.js | 109 ++
pages/module_ledger/ledgerhistory/ledgerhistory.wxss | 9
pages/module_consult/consultresultmore/consultresultmore.json | 6
service/consultservice.js | 46
component/loading/loading.wxml | 9
pages/module_ledger/ledgerupload/ledgerupload.json | 3
res/icons/wm_ledger.png | 0
pages/module_consult/consultresult/consultresult.wxml | 67
pages/module_consult/consultresultmore/consultresultmore.wxml | 48
pages/module_user/userregistercompany/userregistercompany.js | 76 +
app.json | 5
/dev/null | 0
template/nodata.wxml | 0
pages/learn/learn.js | 397 ++----
pages/module_consult/consulthome/consulthome.js | 32
component/switchtab/switchtab.wxss | 52 +
pages/module_common/pagevideo/pagevideo.json | 6
pages/module_consult/consultdetailitem/consultdetailitem.wxss | 89 +
res/icons/wm_assessment.png | 0
pages/promiseresult/promiseresult.js | 44
pages/test/test.js | 28
service/userservice.js | 10
pages/learn/learn.json | 4
91 files changed, 2,229 insertions(+), 872 deletions(-)
diff --git a/app.js b/app.js
index 5ccbb7d..f562a3c 100644
--- a/app.js
+++ b/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,
diff --git a/app.json b/app.json
index 9d9dbd8..33d4b92 100644
--- a/app.json
+++ b/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",
diff --git a/app.wxss b/app.wxss
index 9e5df28..a3fd5cd 100644
--- a/app.wxss
+++ b/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; */
}
diff --git a/component/loading/loading.js b/component/loading/loading.js
new file mode 100644
index 0000000..9beb142
--- /dev/null
+++ b/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' // 鍙栧�糳ot-white銆乨ot-gray銆乧ircle
+
+ },
+ tips: {
+ // type鏄痗ircle鐨勬椂鍊欐墠鏈夋晥
+ 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);
+ }
+
+ }
+});
+
+/***/ })
+
+/******/ });
\ No newline at end of file
diff --git a/component/loading/loading.json b/component/loading/loading.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/component/loading/loading.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/component/loading/loading.wxml b/component/loading/loading.wxml
new file mode 100644
index 0000000..00b30ec
--- /dev/null
+++ b/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>
\ No newline at end of file
diff --git a/component/loading/loading.wxss b/component/loading/loading.wxss
new file mode 100644
index 0000000..7e27113
--- /dev/null
+++ b/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
+}
\ No newline at end of file
diff --git a/component/progress/progress.js b/component/progress/progress.js
index 6583c70..e72e1c8 100644
--- a/component/progress/progress.js
+++ b/component/progress/progress.js
@@ -12,6 +12,8 @@
*/
data: {
progress_txt: '淇$敤杈冨樊',
+ progress_txt_color1: '#f1fefc',
+ progress_txt_color2: '#b4f7ec',
count: 0, // 璁剧疆 璁℃暟鍣� 鍒濆涓�0
countTimer: null, // 璁剧疆 瀹氭椂鍣� 鍒濆涓簄ull
x: 100,
@@ -25,17 +27,30 @@
observers: {
'progress': function (progress) {
- if (progress >= 90) {
- this.setData({
- progress_txt: '淇$敤浼樼'
- })
- } else if (progress >= 60) {
- this.setData({
- progress_txt: '淇$敤涓�鑸�'
- })
+ 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: '淇$敤杈冨樊'
+ progress_txt_color1: '#f1fefc',
+ progress_txt_color2: '#b4f7ec',
})
}
this.drawProgressCircle(progress / 100)
@@ -95,7 +110,7 @@
ctx.setStrokeStyle('#76ECD3');
ctx.setFillStyle('#76ECD3')
- for (let i = 0; i <5; i++) {
+ for (let i = 0; i < 5; i++) {
var radian = Math.PI / 4 * i
var x1 = x - Math.sin(radian) * (r - 10)
var y1 = y + Math.cos(radian) * (r - 10)
@@ -114,7 +129,7 @@
var text = i / 4 * 100 + ''
var metrics = ctx.measureText(text)
var w = metrics.width
- ctx.fillText(text, x3 - w / 2, y3+4)
+ ctx.fillText(text, x3 - w / 2, y3 + 4)
}
}
@@ -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);
diff --git a/component/progress/progress.wxml b/component/progress/progress.wxml
index 98d83ba..8d4a306 100644
--- a/component/progress/progress.wxml
+++ b/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>
diff --git a/component/progress/progress.wxss b/component/progress/progress.wxss
index be14ca4..7e5d7a9 100644
--- a/component/progress/progress.wxss
+++ b/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;
diff --git a/component/switchtab/switchtab.js b/component/switchtab/switchtab.js
new file mode 100644
index 0000000..74c8aa2
--- /dev/null
+++ b/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); //鏌ヨ鍝竴涓厓绱�
+ },
+ }
+})
\ No newline at end of file
diff --git a/component/switchtab/switchtab.json b/component/switchtab/switchtab.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/component/switchtab/switchtab.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/component/switchtab/switchtab.wxml b/component/switchtab/switchtab.wxml
new file mode 100644
index 0000000..9137a41
--- /dev/null
+++ b/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>
\ No newline at end of file
diff --git a/component/switchtab/switchtab.wxss b/component/switchtab/switchtab.wxss
new file mode 100644
index 0000000..b1ae106
--- /dev/null
+++ b/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;
+}
\ No newline at end of file
diff --git a/pages/assessment/assessment.js b/pages/assessment/assessment.js
index 630854e..bf6226a 100644
--- a/pages/assessment/assessment.js
+++ b/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) => {},
+ })
}
})
},
diff --git a/pages/assessment/assessment.json b/pages/assessment/assessment.json
index 6bb5a2c..2419e5a 100644
--- a/pages/assessment/assessment.json
+++ b/pages/assessment/assessment.json
@@ -1,5 +1,6 @@
{
"navigationBarTitleText": "鑷祴鏅鸿瘎",
+ "enablePullDownRefresh":true,
"usingComponents": {
"cp-progress": "/component/progress/progress",
"ec-canvas": "/component/ec-canvas/ec-canvas",
diff --git a/pages/assessment/assessment.wxml b/pages/assessment/assessment.wxml
index fc5df52..de3bd9a 100644
--- a/pages/assessment/assessment.wxml
+++ b/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,20 +70,31 @@
<view class="fyui-cell__bd">鍘嗗彶娴嬭瘎</view>
<view class="fyui-cell__ft">鏌ョ湅鏇村</view>
</view>
- <view wx:for="{{historys}}" wx:key="index" data-index="index">
- <view class="h-cell fyui-panel">
- <view class="h-line_1">
- <view class="h-score" style="background-color: {{item.color}};">
- {{item.score}}
- </view>
- <view class="h-rank">
- <view>椋庨櫓鎺掑悕锛歿{item.rank}}</view>
- <view>椋庨櫓绛夌骇锛歿{item.level}}</view>
- </view>
+ <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="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 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>
+ <view class="h-rank">
+ <view>椋庨櫓鎺掑悕锛歿{item.rank}}</view>
+ <view>椋庨櫓绛夌骇锛歿{item.level}}</view>
+ </view>
+ </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>
diff --git a/pages/assessment/assessment.wxss b/pages/assessment/assessment.wxss
index f449fe7..d775a13 100644
--- a/pages/assessment/assessment.wxss
+++ b/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 {
@@ -76,4 +83,93 @@
padding: 4px 16px;
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;
}
\ No newline at end of file
diff --git a/pages/grade/grade.json b/pages/grade/grade.json
index 3ce490a..416607c 100644
--- a/pages/grade/grade.json
+++ b/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"
}
}
\ No newline at end of file
diff --git a/pages/grade/grade.wxml b/pages/grade/grade.wxml
index b7ba2db..eaa3cfd 100644
--- a/pages/grade/grade.wxml
+++ b/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>
diff --git a/pages/gradedetail/gradedetail.js b/pages/gradedetail/gradedetail.js
index 5d890dd..9498e6e 100644
--- a/pages/gradedetail/gradedetail.js
+++ b/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 () {
-
- }
})
\ No newline at end of file
diff --git a/pages/gradereport/gradereport.js b/pages/gradereport/gradereport.js
index 03e8e16..02c2f6a 100644
--- a/pages/gradereport/gradereport.js
+++ b/pages/gradereport/gradereport.js
@@ -95,11 +95,11 @@
*/
data: {
ec: {
- lazyLoad: false
+ lazyLoad: true
},
creditText: '----------------------',
gradeDetails: [{
- name: '鑰冩牳寰楀垎',
+ name: '鑷瘎寰楀垎',
detail: '--'
}, {
name: '椋庨櫓鎺掑悕',
@@ -108,20 +108,27 @@
name: '椋庨櫓绛夌骇',
detail: '--'
}, {
- name: '鑰冩牳鍛ㄦ湡',
+ name: '鑷瘎鍛ㄦ湡',
detail: '--'
}, {
name: '鑷瘎鏃堕棿',
detail: '--'
}],
+
+ //澶卞垎鐨勭被鍨�
+ losePointsItem: [],
losePoints: [{
- ruleName: '----',
- score: '--',
- remark: '------------'
- }, {
- ruleName: '----',
- score: '--',
- remark: '------------'
+ baseRule: '',
+ name: '',
+ itemlist: [{
+ ruleName: '----',
+ score: '--',
+ remark: '------------'
+ },{
+ 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)
}
diff --git a/pages/gradereport/gradereport.wxml b/pages/gradereport/gradereport.wxml
index 090342c..1136b29 100644
--- a/pages/gradereport/gradereport.wxml
+++ b/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">寰楀垎瑙h</view>
+ <view class="fyui-panel_title">鑷瘎瑙h</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>
diff --git a/pages/gradereport/gradereport.wxss b/pages/gradereport/gradereport.wxss
index 79fda6b..124bd72 100644
--- a/pages/gradereport/gradereport.wxss
+++ b/pages/gradereport/gradereport.wxss
@@ -56,4 +56,12 @@
.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;
}
\ No newline at end of file
diff --git a/pages/home/home.js b/pages/home/home.js
index 3211b13..84fd0bc 100644
--- a/pages/home/home.js
+++ b/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
}
})
diff --git a/pages/home/home.json b/pages/home/home.json
index b6264be..feafd09 100644
--- a/pages/home/home.json
+++ b/pages/home/home.json
@@ -1,5 +1,6 @@
{
"navigationBarBackgroundColor": "#EAFFF1",
+ "enablePullDownRefresh":true,
"usingComponents": {
"cp-notice": "/component/notice/notice"
}
diff --git a/pages/home/home.wxml b/pages/home/home.wxml
index a91fd27..9567bf9 100644
--- a/pages/home/home.wxml
+++ b/pages/home/home.wxml
@@ -23,23 +23,26 @@
</view>
</view> -->
<view class="flex-h">
- <view class="top-card" bindtap="goto" data-index="0">
- <view class="top-card__score"><text class="top-card__num">{{historyPoint.score}}</text>鍒�</view>
- <view class="top-card__time">鑷祴鏅鸿瘎寰楀垎 ></view>
- <view class="top-card__tag">鐐瑰嚮鏌ョ湅鏈湡鑷祴鏅鸿瘎鎯呭喌</view>
- <image src="/res/icons/wm_assessment.png"></image>
+ <view 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>
+ <image src="/res/icons/wm_assessment.png"></image>
+ </view>
</view>
- <view class="top-card" bindtap="goto" data-index="5">
- <view class="top-card__score"><text class="top-card__num">{{monthInfo.percent}}</text>%</view>
- <view class="top-card__time">鍙拌处瀹屾垚鐜� ></view>
- <view class="top-card__tag">鐐瑰嚮鏌ョ湅鏈湡鍙拌处涓婁紶鎯呭喌</view>
- <image src="/res/icons/wm_ledger.png"></image>
- </view>
- <view class="top-card" bindtap="goto" data-index="6">
- <view class="top-card__score">鍓╀綑<text class="top-card__num">{{promsieInfo.leftDays}}</text>澶�</view>
- <view class="top-card__time">鎵胯鏈夋晥鍊掕鏃� ></view>
- <view class="top-card__tag">鐐瑰嚮鏌ョ湅鏈湡鎵胯瀹屾垚鎯呭喌</view>
- <image src="/res/icons/wm_commitment.png"></image>
+ <view 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>
+ <image src="/res/icons/wm_ledger.png"></image>
+ </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>
diff --git a/pages/home/home.wxss b/pages/home/home.wxss
index b3ed0bd..4a6b587 100644
--- a/pages/home/home.wxss
+++ b/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 {
diff --git a/pages/learn/learn.js b/pages/learn/learn.js
index 9bb510d..7529990 100644
--- a/pages/learn/learn.js
+++ b/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,244 +24,45 @@
}
],
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',
- ],
- 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
- }]
- },{
- 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
- }]
- }
- ]
+ pic: '',
+ url: '',
+ fileType: ''
+ },
+ ],
+ resources: [],
+ 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) {
@@ -278,7 +83,7 @@
currentTab: e.target.dataset.current,
navScrollLeft: e.target.dataset.current >= 4 ? ((e.target.dataset.current) * 60) : 0 //鍒ゆ柇褰撳墠閫変腑鐨勪釜鏁版槸鍚︽槸绗�5涓�
})
- that.tabsHeight('.page'+e.target.dataset.current); //鏌ヨ鍝竴涓厓绱�
+ that.tabsHeight('.page' + e.target.dataset.current); //鏌ヨ鍝竴涓厓绱�
}
},
bindChange: function (e) {
@@ -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骞碝M鏈圖D鏃�')
+ });
+ 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)
+ },
})
}
}
diff --git a/pages/learn/learn.json b/pages/learn/learn.json
index 502cbf8..c8fcfef 100644
--- a/pages/learn/learn.json
+++ b/pages/learn/learn.json
@@ -2,5 +2,7 @@
"navigationBarTitleText": "瀹堟硶瀛︿範",
"navigationBarBackgroundColor": "#65EAD2",
"navigationBarTextStyle": "white",
- "usingComponents": {}
+ "usingComponents": {
+ "mp-icon": "/component/icon/icon"
+ }
}
\ No newline at end of file
diff --git a/pages/learn/learn.wxml b/pages/learn/learn.wxml
index d7f4871..33599d4 100644
--- a/pages/learn/learn.wxml
+++ b/pages/learn/learn.wxml
@@ -1,97 +1,112 @@
<!--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 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'>
- <swiper-item>
- <image src='{{item}}' mode="aspectFill" class='swiper-item-images' />
- </swiper-item>
- </block>
- </swiper>
- </view>
- <view class="flex-h" style="padding: 8px 10px;">
- <view class="image-btn" bindtap="goto" data-index="0">
- <image src="../../res/icons/btn_bg_3.png" class="image-btn__1" />
- </view>
- <view class="flex-v">
- <view class="image-btn" bindtap="goto">
- <image src="../../res/icons/btn_bg_4.png" class="image-btn__2" />
- </view>
- <view class="image-btn" bindtap="goto" data-index="2">
- <image src="../../res/icons/btn_bg_5.png" class="image-btn__2" />
- </view>
- </view>
- </view>
-
- <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 class="fyui-box__hd">
- <image src="{{item.pic}}" class="" />
- </view>
- <view class="fyui-box__bd">
- <view class="fyui-box__content">{{item.title}}</view>
- <view class="fyui-box__tag">
- <view>{{item.time}}</view>
- <view class="flex-h">
- <image src="/res/icons/view.png" class="icon"></image>{{item.views}}
- </view>
- </view>
- </view>
- </view>
- </view>
-
- <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 class="fyui-box fyui-panel fyui-box__text">
- <view class="fyui-box__hd">
- {{item.title}}
- </view>
- <view class="fyui-box__bd">
- <view class="fyui-box__content">{{item.content}}</view>
- <view class="fyui-box__tag">
- <view wx:for="{{item.tags}}" wx:key="i" data-index="i" wx:for-item="tag">{{tag}}</view>
- </view>
- </view>
- <view class="fyui-box__ft">
- <view class="flex-h">
- <image src="/res/icons/view.png" class="icon"></image>{{item.views}}
- </view>
- <view class="flex-h">
- <image src="/res/icons/like.png" class="icon"></image>{{item.likes}}
- </view>
- <view>{{item.time}}</view>
- </view>
- </view>
- </view>
-
- </view>
-
- <view class="page__ft"></view>
</view>
</swiper-item>
</block>
- </swiper>
+ </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='{{banners}}' wx:key='u'>
+ <swiper-item>
+ <image src='{{item.pic}}' mode="aspectFill" class='swiper-item-images' data-index="{{index}}" bindtap="gotoBanner" />
+ </swiper-item>
+ </block>
+ </swiper>
+ </view>
+
+ <view class="flex-h" style="padding: 8px 10px;">
+ <view class="image-btn" bindtap="goto" data-index="0">
+ <image src="../../res/icons/btn_bg_3.png" class="image-btn__1" />
+ </view>
+ <view class="flex-v">
+ <view class="image-btn" bindtap="goto">
+ <image src="../../res/icons/btn_bg_4.png" class="image-btn__2" />
+ </view>
+ <view class="image-btn" bindtap="goto" data-index="2">
+ <image src="../../res/icons/btn_bg_5.png" class="image-btn__2" />
+ </view>
+ </view>
+ </view>
+
+ <!-- <view class="fyui-cell fyui-cell_select title">
+ <view class="fyui-cell__bd">鐜繚瀹堟硶</view>
+ <view class="fyui-cell__ft">鏇村</view>
+ </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.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 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__bd">鎵ф硶妗堜緥</view>
+ <view class="fyui-cell__ft">鏇村</view>
+ </view>
+ <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}}
+ </view>
+ <view class="fyui-box__bd">
+ <view class="fyui-box__content">{{item.content}}</view>
+ <view class="fyui-box__tag">
+ <view wx:for="{{item.tags}}" wx:key="i" data-index="i" wx:for-item="tag">{{tag}}</view>
+ </view>
+ </view>
+ <view class="fyui-box__ft">
+ <view class="flex-h">
+ <image src="/res/icons/view.png" class="icon"></image>{{item.views}}
+ </view>
+ <view class="flex-h">
+ <image src="/res/icons/like.png" class="icon"></image>{{item.likes}}
+ </view>
+ <view>{{item.time}}</view>
+ </view>
+ </view>
+ </view> -->
+
+ </view>
+
+ <view class="page__ft"></view>
</view>
\ No newline at end of file
diff --git a/pages/learn/learn.wxss b/pages/learn/learn.wxss
index dc7aea4..ab84bef 100644
--- a/pages/learn/learn.wxss
+++ b/pages/learn/learn.wxss
@@ -67,4 +67,31 @@
.image-btn__2 {
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;
}
\ No newline at end of file
diff --git a/pages/mine/mine.js b/pages/mine/mine.js
index b87dee6..88f8f4d 100644
--- a/pages/mine/mine.js
+++ b/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 () {
-
- }
})
\ No newline at end of file
diff --git a/pages/mine/mine.wxss b/pages/mine/mine.wxss
index 9eb74bb..4e985b8 100644
--- a/pages/mine/mine.wxss
+++ b/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;
}
diff --git a/pages/module_common/pagevideo/pagevideo.js b/pages/module_common/pagevideo/pagevideo.js
new file mode 100644
index 0000000..6359bb8
--- /dev/null
+++ b/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骞碝M鏈圖D鏃�')
+ });
+ resources = resources.concat(data)
+ that.setData({
+ resources
+ })
+ }
+ }, 4)
+ },
+})
\ No newline at end of file
diff --git a/pages/module_common/pagevideo/pagevideo.json b/pages/module_common/pagevideo/pagevideo.json
new file mode 100644
index 0000000..d4ecc0c
--- /dev/null
+++ b/pages/module_common/pagevideo/pagevideo.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "瑙嗛鎾斁",
+ "navigationBarBackgroundColor": "#65EAD2",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/module_common/pagevideo/pagevideo.wxml b/pages/module_common/pagevideo/pagevideo.wxml
new file mode 100644
index 0000000..2b66f49
--- /dev/null
+++ b/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>
\ No newline at end of file
diff --git a/pages/module_common/pagevideo/pagevideo.wxss b/pages/module_common/pagevideo/pagevideo.wxss
new file mode 100644
index 0000000..4275664
--- /dev/null
+++ b/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;
+}
\ No newline at end of file
diff --git a/pages/module_consult/behaviors/behConsultItem.js b/pages/module_consult/behaviors/behConsultItem.js
new file mode 100644
index 0000000..7a8e5c4
--- /dev/null
+++ b/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;
+ }
+ },
+ }
+})
\ No newline at end of file
diff --git a/pages/module_consult/consultdetail/consultdetail.wxml b/pages/module_consult/consultdetail/consultdetail.wxml
index 4d4de5e..47525f0 100644
--- a/pages/module_consult/consultdetail/consultdetail.wxml
+++ b/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>
diff --git a/pages/module_consult/consultdetailitem/consultdetailitem.js b/pages/module_consult/consultdetailitem/consultdetailitem.js
new file mode 100644
index 0000000..ad78e52
--- /dev/null
+++ b/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()
+ }
+ })
+ },
+})
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailitem/consultdetailitem.json b/pages/module_consult/consultdetailitem/consultdetailitem.json
new file mode 100644
index 0000000..55ec7ef
--- /dev/null
+++ b/pages/module_consult/consultdetailitem/consultdetailitem.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "娉曡缁嗗垯",
+ "navigationBarBackgroundColor": "#57E4CB",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailitem/consultdetailitem.wxml b/pages/module_consult/consultdetailitem/consultdetailitem.wxml
new file mode 100644
index 0000000..e5da87d
--- /dev/null
+++ b/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>
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailitem/consultdetailitem.wxss b/pages/module_consult/consultdetailitem/consultdetailitem.wxss
new file mode 100644
index 0000000..88895f6
--- /dev/null
+++ b/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);
+}
\ No newline at end of file
diff --git a/pages/module_consult/consulthome/consulthome.js b/pages/module_consult/consulthome/consulthome.js
index 66ac077..36071c1 100644
--- a/pages/module_consult/consulthome/consulthome.js
+++ b/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) => {
@@ -102,9 +124,9 @@
})
},
- formateTime (t) {
+ formateTime(t) {
if (t) {
- return moment(t).format("YYYY骞碝M鏈圖D鏃�")
+ return moment(t).format("YYYY骞碝M鏈圖D鏃�")
} else {
return undefined
}
diff --git a/pages/module_consult/consulthome/consulthome.json b/pages/module_consult/consulthome/consulthome.json
index dc42aff..b732a06 100644
--- a/pages/module_consult/consulthome/consulthome.json
+++ b/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"
}
}
\ No newline at end of file
diff --git a/pages/module_consult/consulthome/consulthome.wxml b/pages/module_consult/consulthome/consulthome.wxml
index 45f365c..832bf4a 100644
--- a/pages/module_consult/consulthome/consulthome.wxml
+++ b/pages/module_consult/consulthome/consulthome.wxml
@@ -10,68 +10,70 @@
<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">
+
+ <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}}
+ </view>
+ <view class="fyui-box__bd">
+ <view class="fyui-box__content tag">
+ <view>鏂囦欢绫诲埆锛歿{item.mfFileType}}</view>
+ <view>鐢熸晥鏃堕棿锛歿{item.mfEffectiveDate}}</view>
+ <view>鏂囧彿锛歿{item.mfReferenceNumber}}</view>
+ <view>鐩稿叧琛屼笟 -> {{item.mfFileIndustry}}</view>
+ </view>
+ <view class="fyui-box__content des">{{item.mfSummary}}</view>
+ </view>
+ <view class="fyui-box__ft">
+ <text class="keyword">鍏抽敭璇嶏細</text>
+ <view class="keyword-item">
+ <text wx:for="{{item.mfKeywordLv1}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text>
+ </view>
+ </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 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> -->
- <view class="fyui-box fyui-box__text">
- <view class="fyui-box__hd">
- {{item.mfName}}
- </view>
- <view class="fyui-box__bd">
- <view class="fyui-box__content tag">
- <view>鏂囦欢绫诲埆锛歿{item.mfFileType}}</view>
- <view>鐢熸晥鏃堕棿锛歿{item.mfEffectiveDate}}</view>
- <view>鏂囧彿锛歿{item.mfReferenceNumber}}</view>
- <view>鐩稿叧琛屼笟 -> {{item.mfFileIndustry}}</view>
- </view>
- <view class="fyui-box__content des">{{item.mfSummary}}</view>
- </view>
- <view class="fyui-box__ft">
- <text class="keyword">鍏抽敭璇嶏細</text>
- <view class="keyword-item">
- <text wx:for="{{item.mfKeywordLv1}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text>
- </view>
- </view>
- </view>
- </view>
+ </view> -->
</view>
<view class="page__ft">
+
</view>
</view>
\ No newline at end of file
diff --git a/pages/module_consult/consulthome/consulthome.wxss b/pages/module_consult/consulthome/consulthome.wxss
index 7a2da05..dab8746 100644
--- a/pages/module_consult/consulthome/consulthome.wxss
+++ b/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);
}
diff --git a/pages/module_consult/consultresult/consultresult.js b/pages/module_consult/consultresult/consultresult.js
index 05c2a12..6a65873 100644
--- a/pages/module_consult/consultresult/consultresult.js
+++ b/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) {
+ 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: res
+ 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
})
},
})
diff --git a/pages/module_consult/consultresult/consultresult.wxml b/pages/module_consult/consultresult/consultresult.wxml
index 78e8d38..aa66034 100644
--- a/pages/module_consult/consultresult/consultresult.wxml
+++ b/pages/module_consult/consultresult/consultresult.wxml
@@ -1,26 +1,49 @@
<!--pages/module_consult/consultresult/consultresult.wxml-->
<view class="page">
- <view class="page__hd">
- <view><text>{{keyword}}</text>鐨勬硶寰嬫硶瑙� ></view>
- </view>
- <view class="page__bd">
- <view class="fyui-panel">
- <view wx:for="{{result}}" wx:key="index" data-index="{{index}}" 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>
+ <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>
- </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 class="btn-more" data-typeid="{{catagory.typeId}}" bindtap="gotoMore">鏌ョ湅鏇村</view>
+ </view>
+ </block>
<view class="page__ft"></view>
-</view>
+</view>
\ No newline at end of file
diff --git a/pages/module_consult/consultresult/consultresult.wxss b/pages/module_consult/consultresult/consultresult.wxss
index bd08e33..f3d3371 100644
--- a/pages/module_consult/consultresult/consultresult.wxss
+++ b/pages/module_consult/consultresult/consultresult.wxss
@@ -26,4 +26,27 @@
.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);
}
\ No newline at end of file
diff --git a/pages/module_consult/consultresultmore/consultresultmore.js b/pages/module_consult/consultresultmore/consultresultmore.js
new file mode 100644
index 0000000..43ba971
--- /dev/null
+++ b/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)
+ },
+})
\ No newline at end of file
diff --git a/pages/module_consult/consultresultmore/consultresultmore.json b/pages/module_consult/consultresultmore/consultresultmore.json
new file mode 100644
index 0000000..a4ab906
--- /dev/null
+++ b/pages/module_consult/consultresultmore/consultresultmore.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "鏇村缁撴灉",
+ "navigationBarBackgroundColor": "#57E4CB",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultresultmore/consultresultmore.wxml b/pages/module_consult/consultresultmore/consultresultmore.wxml
new file mode 100644
index 0000000..92962c6
--- /dev/null
+++ b/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>
diff --git a/pages/module_consult/consultresultmore/consultresultmore.wxss b/pages/module_consult/consultresultmore/consultresultmore.wxss
new file mode 100644
index 0000000..f3d3371
--- /dev/null
+++ b/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);
+}
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.js b/pages/module_ledger/ledgerhistory/ledgerhistory.js
index e6976db..361aaa1 100644
--- a/pages/module_ledger/ledgerhistory/ledgerhistory.js
+++ b/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) => {
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.json b/pages/module_ledger/ledgerhistory/ledgerhistory.json
index 6b5f028..b1c9f5d 100644
--- a/pages/module_ledger/ledgerhistory/ledgerhistory.json
+++ b/pages/module_ledger/ledgerhistory/ledgerhistory.json
@@ -1,4 +1,6 @@
{
+ "navigationBarTitleText": "鍘嗗彶鍙拌处",
+ "navigationBarBackgroundColor": "#57E4CB",
"usingComponents": {
"mp-icon": "/component/icon/icon"
}
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.wxml b/pages/module_ledger/ledgerhistory/ledgerhistory.wxml
index 629c4ef..765d54d 100644
--- a/pages/module_ledger/ledgerhistory/ledgerhistory.wxml
+++ b/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>
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.wxss b/pages/module_ledger/ledgerhistory/ledgerhistory.wxss
index 88aad3a..8327502 100644
--- a/pages/module_ledger/ledgerhistory/ledgerhistory.wxss
+++ b/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;
}
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhome/ledgerhome.js b/pages/module_ledger/ledgerhome/ledgerhome.js
index d72761e..b4f9d86 100644
--- a/pages/module_ledger/ledgerhome/ledgerhome.js
+++ b/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) {
-
- // }
- that.setData({
- pageheight: rect.height + 'px'
- });
+ 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(){
diff --git a/pages/module_ledger/ledgerhome/ledgerhome.wxml b/pages/module_ledger/ledgerhome/ledgerhome.wxml
index 00fbec0..55f24c2 100644
--- a/pages/module_ledger/ledgerhome/ledgerhome.wxml
+++ b/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> -->
diff --git a/pages/module_ledger/ledgerhome/ledgerhome.wxss b/pages/module_ledger/ledgerhome/ledgerhome.wxss
index 3d153f8..577b4fe 100644
--- a/pages/module_ledger/ledgerhome/ledgerhome.wxss
+++ b/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;
diff --git a/pages/module_ledger/ledgerupload/ledgerupload.js b/pages/module_ledger/ledgerupload/ledgerupload.js
index fc3f692..9ef73a9 100644
--- a/pages/module_ledger/ledgerupload/ledgerupload.js
+++ b/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
+ });
+ },
})
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerupload/ledgerupload.json b/pages/module_ledger/ledgerupload/ledgerupload.json
index 9388875..16f6fbb 100644
--- a/pages/module_ledger/ledgerupload/ledgerupload.json
+++ b/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"
}
}
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerupload/ledgerupload.wxml b/pages/module_ledger/ledgerupload/ledgerupload.wxml
index d11297b..ba3c489 100644
--- a/pages/module_ledger/ledgerupload/ledgerupload.wxml
+++ b/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>
\ No newline at end of file
diff --git a/pages/module_user/userlogin/userlogin.js b/pages/module_user/userlogin/userlogin.js
index 5609ece..dd378ee 100644
--- a/pages/module_user/userlogin/userlogin.js
+++ b/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
diff --git a/pages/module_user/userregistercompany/userregistercompany.js b/pages/module_user/userregistercompany/userregistercompany.js
index 66ef194..d9a76a2 100644
--- a/pages/module_user/userregistercompany/userregistercompany.js
+++ b/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',
+ })
+ }
+ })
+ }
+ })
+ },
})
\ No newline at end of file
diff --git a/pages/module_user/userregistergov/userregistergov.js b/pages/module_user/userregistergov/userregistergov.js
index 35fcbdb..a97ff35 100644
--- a/pages/module_user/userregistergov/userregistergov.js
+++ b/pages/module_user/userregistergov/userregistergov.js
@@ -14,53 +14,4 @@
onLoad(options) {
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
- onReady() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
- */
- onShow() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
- */
- onHide() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
- */
- onUnload() {
-
- },
-
- /**
- * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
- */
- onReachBottom() {
-
- },
-
- /**
- * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
- */
- onShareAppMessage() {
-
- }
})
\ No newline at end of file
diff --git a/pages/notice/notice.wxml b/pages/notice/notice.wxml
index ec340f0..7bb07a2 100644
--- a/pages/notice/notice.wxml
+++ b/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">
diff --git a/pages/promise/promise.js b/pages/promise/promise.js
index 6ad099e..cbc5ea7 100644
--- a/pages/promise/promise.js
+++ b/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骞碝M鏈圖D鏃�")
+ 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,
})
diff --git a/pages/promise/promise.wxml b/pages/promise/promise.wxml
index 659c39d..36f5bb0 100644
--- a/pages/promise/promise.wxml
+++ b/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>
diff --git a/pages/promise/promise.wxss b/pages/promise/promise.wxss
index 6752da5..cc528fb 100644
--- a/pages/promise/promise.wxss
+++ b/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{
diff --git a/pages/promisefile/promisefile.js b/pages/promisefile/promisefile.js
index a46f424..7125f15 100644
--- a/pages/promisefile/promisefile.js
+++ b/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) {
diff --git a/pages/promiseresult/promiseresult.js b/pages/promiseresult/promiseresult.js
index f2afc6b..65f808c 100644
--- a/pages/promiseresult/promiseresult.js
+++ b/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 () {
-
- }
})
\ No newline at end of file
diff --git a/pages/promiseresult/promiseresult.wxml b/pages/promiseresult/promiseresult.wxml
index 67d735b..7da1965 100644
--- a/pages/promiseresult/promiseresult.wxml
+++ b/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>
diff --git a/pages/test/test.js b/pages/test/test.js
index 54b13a5..539737f 100644
--- a/pages/test/test.js
+++ b/pages/test/test.js
@@ -214,32 +214,4 @@
}, {}, true, true)
})
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
- */
- onUnload: function () {
-
- },
-
- /**
- * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
- */
- onShareAppMessage: function () {
-
- }
})
\ No newline at end of file
diff --git a/pages/text/text.js b/pages/text/text.js
index 7484b5a..210817a 100644
--- a/pages/text/text.js
+++ b/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 () {
-
- }
})
\ No newline at end of file
diff --git a/res/icons/ass_1.png b/res/icons/ass_1.png
new file mode 100644
index 0000000..d51d3c2
--- /dev/null
+++ b/res/icons/ass_1.png
Binary files differ
diff --git a/res/icons/ass_2.png b/res/icons/ass_2.png
new file mode 100644
index 0000000..0701734
--- /dev/null
+++ b/res/icons/ass_2.png
Binary files differ
diff --git a/res/icons/con_qa.png b/res/icons/con_qa.png
index 68f9565..5c1fccb 100644
--- a/res/icons/con_qa.png
+++ b/res/icons/con_qa.png
Binary files differ
diff --git a/res/icons/notice_1.png b/res/icons/notice_1.png
deleted file mode 100644
index 7537d82..0000000
--- a/res/icons/notice_1.png
+++ /dev/null
Binary files differ
diff --git a/res/icons/notice_2.png b/res/icons/notice_2.png
deleted file mode 100644
index 9307e2c..0000000
--- a/res/icons/notice_2.png
+++ /dev/null
Binary files differ
diff --git a/res/icons/notice_3.png b/res/icons/notice_3.png
deleted file mode 100644
index d76da33..0000000
--- a/res/icons/notice_3.png
+++ /dev/null
Binary files differ
diff --git a/res/icons/wm_assessment.png b/res/icons/wm_assessment.png
index 62360f2..07acf6d 100644
--- a/res/icons/wm_assessment.png
+++ b/res/icons/wm_assessment.png
Binary files differ
diff --git a/res/icons/wm_commitment.png b/res/icons/wm_commitment.png
index c71afa2..9fa8655 100644
--- a/res/icons/wm_commitment.png
+++ b/res/icons/wm_commitment.png
Binary files differ
diff --git a/res/icons/wm_ledger.png b/res/icons/wm_ledger.png
index b11e2b0..ca4e6a3 100644
--- a/res/icons/wm_ledger.png
+++ b/res/icons/wm_ledger.png
Binary files differ
diff --git a/service/baserequest.js b/service/baserequest.js
index c5b0c65..20db2fc 100644
--- a/service/baserequest.js
+++ b/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) {
diff --git a/service/consultservice.js b/service/consultservice.js
index 5932e20..3ef5c06 100644
--- a/service/consultservice.js
+++ b/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)
+ },
}
\ No newline at end of file
diff --git a/service/lawservice.js b/service/lawservice.js
index 70643e4..6740779 100644
--- a/service/lawservice.js
+++ b/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)
diff --git a/service/promiseservice.js b/service/promiseservice.js
index 4b2d32f..da0d4ee 100644
--- a/service/promiseservice.js
+++ b/service/promiseservice.js
@@ -15,18 +15,23 @@
},
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)
+ },
})
},
//鑾峰彇鐢ㄦ埛鎵胯涔﹀巻鍙茶褰�
- getCommitment: function(userId, fun, page = 1, perPage = 30) {
+ getCommitment: function (userId, fun, page = 1, perPage = 30) {
let cb = {
url: '/commitment/letter',
params: {
@@ -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)
diff --git a/service/userservice.js b/service/userservice.js
index f76a313..5396440 100644
--- a/service/userservice.js
+++ b/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 = {
diff --git a/template/loading.wxml b/template/loading.wxml
new file mode 100644
index 0000000..56b82bd
--- /dev/null
+++ b/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>
\ No newline at end of file
diff --git a/template/nodata/nodata.wxml b/template/nodata.wxml
similarity index 100%
rename from template/nodata/nodata.wxml
rename to template/nodata.wxml
--
Gitblit v1.9.3