From bf580d5477d65f5eefb70a8fb9a6b37eaf0ae9bb Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 06 九月 2022 09:16:25 +0800
Subject: [PATCH] 2022.9.6
---
component/actionsheet/actionsheet.wxss | 27
pages/module_consult/consultproblem/consultproblem.wxml | 52
res/icons/bg_star.png | 0
res/icons/link_4.png | 0
component/sidebar/sidebar.json | 6
pages/module_consult/consulthome/consulthome.wxss | 52 +
res/icons/like.png | 0
pages/mine/mine.wxss | 4
component/mygallery/mygallery.wxml | 33
pages/module_consult/consultdetailitem/consultdetailitem.js | 6
pages/module_ledger/ledgerhistory/ledgerhistory.js | 23
pages/gradereport/gradereport.js | 2
pages/module_consult/consultproblem/consultproblem.js | 295 ++++--
res/icons/cq_punish.png | 0
service/baserequest.js | 2
res/icons/filter.png | 0
pages/test2/test2.json | 5
component/actionsheet/actionsheet.json | 6
component/gallery/gallery.wxss | 8
res/icons/favourite1.png | 0
res/icons/cq_detained.png | 0
pages/module_consult/consultresult/consultresult.js | 2
pages/module_ledger/ledgerhistory/ledgerhistory.wxml | 5
component/sidebar/sidebar.wxss | 90 ++
pages/module_consult/consultdetailcase/consultdetailcase.js | 96 ++
pages/module_consult/consultdetailcase/consultdetailcase.json | 11
component/actionsheet/actionsheet.js | 193 ++++
res/icons/like1.png | 0
pages/module_consult/consultdetailcase/consultdetailcase.wxml | 78 +
component/switchtab/switchtab.js | 29
pages/module_consult/consultdetailqa/consultdetailqa.js | 108 ++
res/icons/locate.png | 0
utils/util.js | 6
pages/module_ledger/ledgerhistory/ledgerhistory.json | 3
pages/test2/test2.wxml | 7
res/icons/cq_minor.png | 0
pages/module_consult/consultdetailqa/consultdetailqa.wxml | 72 +
pages/module_consult/consultproblem/consultproblem.wxss | 40
component/sidebar/sidebar.js | 118 ++
component/actionsheet/actionsheet.wxml | 55 +
app.wxss | 11
pages/module_consult/consulthome/consulthome.wxml | 72 +
res/icons/time.png | 0
res/icons/favourite.png | 0
pages/mine/mine.wxml | 29
pages/module_consult/consultonline/consultonline.wxml | 2
component/mygallery/mygallery.wxss | 154 +++
pages/module_consult/consultresultmore/consultresultmore.js | 2
pages/module_consult/consultdetailqa/consultdetailqa.json | 10
component/mygallery/mygallery.json | 6
res/icons/link_2.png | 0
res/icons/cq_shotspot.png | 0
component/sidebar/sidebar.wxml | 32
service/consultservice.js | 153 +++
component/mygallery/mygallery.js | 328 +++++++
res/icons/link_1.png | 0
res/icons/case_forfeit.png | 0
pages/test2/test2.js | 53 +
pages/module_consult/consultdetailcase/consultdetailcase.wxss | 105 ++
app.json | 10
res/icons/link_3.png | 0
res/icons/cq_supervise.png | 0
pages/module_consult/consulthome/consulthome.js | 97 +
pages/module_consult/consultproblem/consultproblem.json | 5
res/icons/cq_illegal.png | 0
pages/test2/test2.wxss | 16
pages/module_consult/consultdetailqa/consultdetailqa.wxss | 114 ++
67 files changed, 2,465 insertions(+), 168 deletions(-)
diff --git a/app.json b/app.json
index c32bc0e..6208b1f 100644
--- a/app.json
+++ b/app.json
@@ -16,6 +16,7 @@
"pages/notice/notice",
"pages/gradereport/gradereport",
"pages/test/test",
+ "pages/test2/test2",
"pages/promisesign/promisesign",
"pages/module_consult/consulthome/consulthome",
"pages/module_consult/consultsearch/consultsearch",
@@ -35,16 +36,19 @@
"pages/module_consult/consultresultmore/consultresultmore",
"pages/module_consult/consultdetailitem/consultdetailitem",
"pages/module_learn/learfile/learnfile",
- "pages/module_learn/learncase/learncase"
+ "pages/module_learn/learncase/learncase",
+ "pages/module_consult/consultdetailqa/consultdetailqa",
+ "pages/module_consult/consultdetailcase/consultdetailcase"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "涓皬浼佷笟鐜瀹堟硶鏈嶅姟骞冲彴",
- "navigationBarTextStyle": "black"
+ "navigationBarTextStyle": "black",
+ "backgroundColor": "#57E4CB"
},
"tabBar": {
- "selectedColor": "#0963F5",
+ "selectedColor": "#59D5B3",
"list": [
{
"pagePath": "pages/home/home",
diff --git a/app.wxss b/app.wxss
index a3fd5cd..29994ec 100644
--- a/app.wxss
+++ b/app.wxss
@@ -10,6 +10,10 @@
--fyui-BG-COLOR-ACTIVE: #ececec5d;
}
+view {
+ /* font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; */
+}
+
/********************************** 閫氱敤-start ***********************************/
.statusbar-title {
text-align: center;
@@ -104,6 +108,11 @@
font-size: 14px;
color: var(--fyui-primary-color);
padding: 2px 4px 2px 18px;
+}
+
+.image-16 {
+ width: 16px;
+ height: 16px;
}
/********************************** 閫氱敤-end ***********************************/
@@ -221,7 +230,7 @@
.fyui-box:before{
content: " ";
- width: 100%;
+ width: 90%;
height: 1px;
background-color: var(--fyui-BG_1);
top: -2px;
diff --git a/component/actionsheet/actionsheet.js b/component/actionsheet/actionsheet.js
new file mode 100644
index 0000000..e89857b
--- /dev/null
+++ b/component/actionsheet/actionsheet.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 = 1);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */,
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Component({
+ options: {
+ multipleSlots: true,
+ // 鍦ㄧ粍浠跺畾涔夋椂鐨勯�夐」涓惎鐢ㄥslot鏀寔
+ addGlobalClass: true
+ },
+ properties: {
+ title: {
+ // 鏍囬
+ type: String,
+ value: ''
+ },
+ showCancel: {
+ // 鏄惁鏄剧ず鍙栨秷鎸夐挳
+ type: Boolean,
+ value: true
+ },
+ cancelText: {
+ // 鍙栨秷鎸夐挳鏂囨
+ type: String,
+ value: '鍙栨秷'
+ },
+ maskClass: {
+ // 閬僵灞俢lass
+ type: String,
+ value: ''
+ },
+ extClass: {
+ // 寮瑰嚭绐� class
+ type: String,
+ value: ''
+ },
+ maskClosable: {
+ // 鐐瑰嚮閬僵 鍏抽棴 actionsheet
+ type: Boolean,
+ value: true
+ },
+ mask: {
+ // 鏄惁闇�瑕� 閬僵灞�
+ type: Boolean,
+ value: true
+ },
+ show: {
+ // 鏄惁寮�鍚� actionsheet
+ type: Boolean,
+ value: false
+ },
+ actions: {
+ // actions 鍒楄〃
+ type: Array,
+ value: [],
+ // {text, extClass}
+ observer: '_groupChange'
+ }
+ },
+ methods: {
+ _groupChange(e) {
+ // 鏀寔 涓�缁存暟缁� 鍐欐硶
+ if (e.length > 0 && typeof e[0] !== 'string' && !(e[0] instanceof Array)) {
+ this.setData({
+ actions: [this.data.actions]
+ });
+ }
+ },
+
+ buttonTap(e) {
+ const {
+ value,
+ groupindex,
+ index
+ } = e.currentTarget.dataset;
+ this.triggerEvent('actiontap', {
+ value,
+ groupindex,
+ index
+ });
+ },
+
+ closeActionSheet(e) {
+ const {
+ type
+ } = e.currentTarget.dataset;
+
+ if (this.data.maskClosable || type) {
+ // 鐐瑰嚮 action 閲岄潰鐨� 鍙栨秷
+ this.setData({
+ show: false
+ }); // 鍏抽棴鍥炶皟浜嬩欢
+
+ this.triggerEvent('close');
+ }
+ }
+
+ }
+});
+
+/***/ })
+/******/ ]);
\ No newline at end of file
diff --git a/component/actionsheet/actionsheet.json b/component/actionsheet/actionsheet.json
new file mode 100644
index 0000000..68ffa25
--- /dev/null
+++ b/component/actionsheet/actionsheet.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "mp-icon": "../icon/icon"
+ }
+}
\ No newline at end of file
diff --git a/component/actionsheet/actionsheet.wxml b/component/actionsheet/actionsheet.wxml
new file mode 100644
index 0000000..78e6ef2
--- /dev/null
+++ b/component/actionsheet/actionsheet.wxml
@@ -0,0 +1,55 @@
+<wxs module="utils">
+ var join = function(a,b) {
+ return a+b
+ };
+ var isNotSlot = function(v) {
+ return typeof v !== 'string'
+ }
+ module.exports = {
+ join: join,
+ isNotSlot: isNotSlot
+ }
+</wxs>
+
+<view wx:if="{{mask}}" class="weui-mask {{show ? '' : 'weui-mask_hidden'}} {{maskClass}}" bindtap="closeActionSheet"></view>
+<view class="weui-actionsheet {{show ? 'weui-actionsheet_toggle' : ''}} {{extClass}}">
+ <!-- 鍏抽棴鍥炬爣 -->
+ <view class="close">
+ <mp-icon bindtap="closeActionSheet" icon="close" size="{{20}}"></mp-icon>
+ </view>
+ <!-- 鏍囬 -->
+ <block wx:if="{{title}}">
+ <view class="weui-actionsheet__title">
+ <view class="weui-actionsheet__title-text">{{title}}</view>
+ </view>
+ </block>
+ <slot name="title" wx:else></slot>
+ <view
+ class="{{ !showCancel && index === actions.length-1 ? 'weui-actionsheet__action' : 'weui-actionsheet__menu' }}"
+ wx:key="index"
+ wx:for-item="actionItem"
+ wx:for-index="index"
+ wx:for="{{actions}}"
+ >
+ <block wx:if="{{utils.isNotSlot(actionItem)}}">
+ <view
+ class="weui-actionsheet__cell {{item.type === 'warn' ? 'weui-actionsheet__cell_warn' : '' }}"
+ hover-class="weui-active"
+ wx:key="actionIndex"
+ wx:for="{{actionItem}}"
+ wx:for-index="actionIndex"
+ data-groupindex="{{index}}"
+ data-index="{{actionIndex}}"
+ data-value="{{item.value}}"
+ bindtap="buttonTap"
+ >
+ {{item.text}}
+ </view>
+ </block>
+ <slot name="{{actionItem}}" wx:else></slot>
+ </view>
+ <!-- 鍙栨秷鎸夐挳 -->
+ <view class="weui-actionsheet__action" wx:if="{{showCancel}}">
+ <view class="weui-actionsheet__cell" hover-class="weui-active" data-type="close" id="iosActionsheetCancel" bindtap="closeActionSheet">{{cancelText}}</view>
+ </view>
+</view>
diff --git a/component/actionsheet/actionsheet.wxss b/component/actionsheet/actionsheet.wxss
new file mode 100644
index 0000000..c5fc940
--- /dev/null
+++ b/component/actionsheet/actionsheet.wxss
@@ -0,0 +1,27 @@
+.weui-actionsheet {
+ background-color: white;
+}
+
+.weui-mask.weui-mask_hidden {
+ opacity: 0;
+ transform: scale3d(1, 1, 0)
+}
+
+.weui-mask {
+ opacity: 1;
+ transform: scale3d(1, 1, 1);
+ transition: all .3s
+}
+
+.close {
+ display: block;
+ text-align: end;
+ /* background-color: red; */
+ padding: 8px;
+}
+
+.close>mp-icon {
+ background-color: #F0F0F0;
+ border-radius: 50%;
+ padding: 4px;
+}
\ No newline at end of file
diff --git a/component/gallery/gallery.wxss b/component/gallery/gallery.wxss
index c6010c5..02cf7a6 100644
--- a/component/gallery/gallery.wxss
+++ b/component/gallery/gallery.wxss
@@ -1 +1,7 @@
-.weui-gallery{display:none}.weui-gallery_show.weui-gallery{display:flex}
\ No newline at end of file
+.weui-gallery {
+ display: none
+}
+
+.weui-gallery_show.weui-gallery {
+ display: flex
+}
\ No newline at end of file
diff --git a/component/mygallery/mygallery.js b/component/mygallery/mygallery.js
new file mode 100644
index 0000000..481f0ad
--- /dev/null
+++ b/component/mygallery/mygallery.js
@@ -0,0 +1,328 @@
+// component/mygallery/mygallery.js
+Component({
+ options: {
+ addGlobalClass: true
+ },
+ properties: {
+ imgUrls: {
+ type: Array,
+ value: [],
+
+ observer(newVal) {
+ this.setData({
+ currentImgs: newVal
+ });
+ }
+
+ },
+ title: {
+ type: String,
+ value: ''
+ },
+ remark: {
+ type: String,
+ value: ''
+ },
+ show: {
+ type: Boolean,
+ value: true,
+
+ observer(newVal) {
+ if (newVal) {
+ let that = this;
+ let query = this.createSelectorQuery(); //蹇呴』瑕佸厛鍒涘缓涓�涓煡璇�
+ setTimeout(() => {
+ query.select('.fyui-gallery__img').boundingClientRect(function (rect) {
+ console.log('observer');
+ console.log(rect);
+ that.setData({
+ imgHeight: rect.height,
+ imgWidth: rect.width,
+ xLimit: [0, 0],
+ yLimit: [0, 0],
+ });
+ }).exec();
+ }, 500);
+ }
+ }
+ },
+ current: {
+ type: Number,
+ value: 0
+ },
+ hideOnClick: {
+ type: Boolean,
+ value: true
+ },
+ extClass: {
+ type: String,
+ value: ''
+ }
+ },
+ data: {
+ currentImgs: [],
+ tabList: [],
+ pageList: [],
+ showRemark: true,
+
+ imgHeight: 0, //鍥剧墖楂樺害
+ imgWidth: 0, //鍥剧墖瀹藉害
+ xLimit: [], //缂╂斁鍚巟杞寸Щ鍔ㄨ寖鍥�
+ yLimit: [], //缂╂斁鍚巠杞寸Щ鍔ㄨ寖鍥�
+ translateX: 0, // 浣嶇Щx鍧愭爣 鍗曚綅px
+ translateY: 0, // 浣嶇Щy鍧愭爣 鍗曚綅px
+ distance: undefined, // 鍙屾寚鎺ヨЕ鐐硅窛绂�
+ scale: 1, // 缂╂斁鍊嶆暟
+ endScale: 1,
+ rotate: 0, // 鏃嬭浆瑙掑害
+ oldRotate: 0, // 涓婁竴娆℃棆杞仠姝㈠悗鐨勮搴�
+ startMove: { // 璧峰浣嶇Щ璺濈
+ x: 0,
+ y: 0,
+ },
+ startTouches: [] // 璧峰鐐箃ouch鏁扮粍
+ },
+
+ pageLifetimes: {
+ // 缁勪欢鎵�鍦ㄩ〉闈㈢殑鐢熷懡鍛ㄦ湡鍑芥暟
+ show: function () {
+
+ },
+ },
+
+ ready() {
+ const data = this.data;
+ this.setData({
+ currentImgs: data.imgUrls
+ });
+ },
+
+ methods: {
+ change(e) {
+ this.setData({
+ current: e.detail.current
+ });
+ this.triggerEvent('change', {
+ current: e.detail.current
+ }, {});
+
+ //鍥剧墖澶嶄綅
+ this.setData({
+ scale: 1,
+ translateX: 0,
+ translateY: 0,
+ rotate: 0
+ })
+ },
+
+ deleteImg() {
+ const data = this.data;
+ const imgs = data.currentImgs;
+ const url = imgs.splice(data.current, 1);
+ this.triggerEvent('delete', {
+ url: url[0],
+ index: data.current
+ }, {});
+
+ if (imgs.length === 0) {
+ // @ts-ignore
+ this.hideGallery();
+ return;
+ }
+
+ this.setData({
+ current: 0,
+ currentImgs: imgs
+ });
+ },
+
+ hideGallery() {
+ const data = this.data;
+
+ if (data.hideOnClick) {
+ this.setData({
+ show: false,
+ scale: 1,
+ endScale: 1,
+ showRemark: true,
+ translateX: 0,
+ translateY: 0,
+ rotate: 0
+ });
+ this.triggerEvent('hide', {}, {});
+ }
+ },
+
+ /**
+ * 搴曢儴鍥剧墖瀵艰埅鏍忛�夋嫨浜嬩欢
+ */
+ swichNav(e) {
+ var that = this;
+ if (this.data.currentTab === e.target.dataset.current) {
+ return false;
+ } else {
+ that.setData({
+ current: e.target.dataset.current,
+ })
+ }
+ },
+
+ /**
+ * 搴曢儴鍥剧墖瀵艰埅鏍忋�佹枃鏈樉闅愪簨浠�
+ */
+ toggle() {
+ const showRemark = !this.data.showRemark
+ this.setData({
+ showRemark
+ })
+ },
+
+ rotateImg(e) {
+ const clockwise = e.currentTarget.dataset.clockwise
+ let rotate = this.data.rotate
+ if (clockwise) {
+ rotate += 90
+ } else {
+ rotate -= 90
+ }
+ rotate = rotate > 360 ? rotate - 360 : rotate
+ rotate = rotate < 0 ? rotate + 360 : rotate
+
+ const imgWidth = this.data.imgHeight
+ const imgHeight = this.data.imgWidth
+ this.setData({rotate, imgWidth, imgHeight})
+ },
+
+ touchStart(e) {
+ const touches = e.touches
+ console.log('touchStart:');
+ console.log(touches);
+ const { translateX, translateY } = this.data
+ const { clientX, clientY } = touches[0]
+ this.setData({
+ startMove:{
+ x: clientX - translateX,
+ y: clientY - translateY
+ }
+ })
+ this.setData({
+ startTouches:touches,
+ })
+ },
+
+ touchMove(e) {
+ console.log('touchMove:');
+ const touches = e.touches
+ const { clientX: onePageX, clientY: onePageY } = touches[0]
+ const { startMove, scale, distance: oldDistance, startTouches, oldRotate } = this.data
+ if (touches.length === 2 && startTouches.length === 2) {
+ // 鍙屾寚缂╂斁
+ const { pageX: twoPageX, pageY: twoPageY } = touches[1]
+ // 姹傚嚭褰撳墠鍙屾寚璺濈
+ const distance = Math.sqrt((twoPageX - onePageX) ** 2 + (twoPageY - onePageY) ** 2)
+ this.setData({distance})
+
+ // 鍙屾寚鏃嬭浆
+ let rotate = this.getAngle(touches[0], touches[1]) - this.getAngle(startTouches[0], startTouches[1]) + oldRotate
+ // 濡傛灉澶т簬360搴︼紝灏卞噺鍘�360
+ rotate = rotate > 360 ? rotate - 360 : rotate
+
+ this.setData({
+ scale: scale * (distance / (oldDistance || distance)),
+ // rotate
+ })
+ } else if (scale > 1 && startTouches.length !== 2) {
+ // 鍗曟寚鎷栨嫿
+ // const xL = this.data.xLimit
+ // const yL = this.data.yLimit
+ let x = onePageX - startMove.x
+ let y = onePageY - startMove.y
+ // if (x < xL[0]) {
+ // x = xL[0]
+ // } else if (x > xL[1]) {
+ // x = xL[1]
+ // }
+ // if (y < yL[0]) {
+ // y = yL[0]
+ // } else if (y > yL[1]) {
+ // y = yL[1]
+ // }
+ this.setData({
+ translateX: x,
+ translateY: y
+ })
+ }
+ },
+ getAngle(p1, p2) {
+ const x = p1.clientX - p2.clientX
+ const y = p1.clientY- p2.clientY
+ return Math.atan2(y, x) * 180 / Math.PI
+ },
+ touchEnd() {
+ console.log('touchEnd:');
+ // 淇濆瓨褰撳墠鏃嬭浆瑙掑害锛屾竻绌哄弻鎸囪窛绂�
+ const oldRotate = this.data.rotate
+ this.setData({
+ oldRotate,
+ distance: undefined,
+ })
+ // 鏈�灏忕缉鏀句负1鍊嶏紝鍚屾椂鍥剧墖绉诲姩澶嶄綅
+ if (this.data.scale < 1) {
+ this.setData({
+ scale: 1,
+ translateX: 0,
+ translateY: 0
+ })
+ }
+
+ // 淇濆瓨鏈�鍚庣缉鏀剧殑鍊嶇巼
+ const s = this.data.scale
+ this.setData({
+ endScale: s,
+ })
+
+ // 璁$畻褰撳墠缂╂斁鍊嶇巼涓嬶紝鍥剧墖鍙Щ鍔ㄨ寖鍥�
+ const h = this.data.imgHeight
+ const w = this.data.imgWidth
+ const sH = h * s
+ const sW = w * s
+ const rH = (sH - h) / 2
+ const rW = (sW - w) / 2
+ const xLimit = [-rW, rW]
+ const yLimit = [-rH, rH]
+ this.setData({
+ xLimit,
+ yLimit
+ })
+ console.log('yLimit');
+ console.log(yLimit);
+
+ let that = this;
+ let query = this.createSelectorQuery(); //蹇呴』瑕佸厛鍒涘缓涓�涓煡璇�
+ query.select('.fyui-gallery__img').boundingClientRect(function (rect) {
+ console.log('imgHeight:' + that.data.imgHeight);
+ console.log('imgWidth:' + that.data.imgWidth);
+ console.log(rect);
+ console.log('endScale:' + that.data.endScale);
+ }).exec();
+
+ // 缂╂斁鍚庡洖褰掕嚦褰撳墠绉诲姩浣嶇疆
+ let translateX = this.data.translateX
+ let translateY = this.data.translateY
+ const xL = this.data.xLimit
+ const yL = this.data.yLimit
+ if (translateX < xL[0]) {
+ translateX = xL[0]
+ } else if (translateX > xL[1]) {
+ translateX = xL[1]
+ }
+ if (translateY < yL[0]) {
+ translateY = yL[0]
+ } else if (translateY > yL[1]) {
+ translateY = yL[1]
+ }
+ this.setData({ translateX, translateY})
+ },
+
+ }
+})
diff --git a/component/mygallery/mygallery.json b/component/mygallery/mygallery.json
new file mode 100644
index 0000000..68ffa25
--- /dev/null
+++ b/component/mygallery/mygallery.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "mp-icon": "../icon/icon"
+ }
+}
\ No newline at end of file
diff --git a/component/mygallery/mygallery.wxml b/component/mygallery/mygallery.wxml
new file mode 100644
index 0000000..0be9eaf
--- /dev/null
+++ b/component/mygallery/mygallery.wxml
@@ -0,0 +1,33 @@
+<!--component/mygallery/mygallery.wxml-->
+<page-container show="{{show}}">
+ <view class="fyui-gallery {{show ? 'fyui-gallery_show' : ''}} {{extClass}}">
+ <mp-icon wx:if="{{showRemark}}" class="fyui-gallery__close" icon="close" color="white" size="26" bindtap="hideGallery"></mp-icon>
+ <view class="fyui-gallery__info" wx:if="{{true}}">{{current+1}} / {{currentImgs.length}}</view>
+ <swiper class="fyui-gallery__img__wrp" bindtap="toggle" indicator-dots="{{false}}" bindanimationfinish="change" current="{{current}}" autoplay="{{false}}" duration="{{500}}">
+ <block wx:for="{{currentImgs}}" wx:key="index">
+ <swiper-item>
+ <image mode="aspectFit" src="{{item}}" class="fyui-gallery__img"
+ style="transform: translate({{translateX}}px, {{translateY}}px) scale({{scale}}) rotate({{rotate}}deg);"
+ bindtouchstart="touchStart"
+ bindtouchmove="{{endScale <= 1 ? 'touchMove' : ''}}"
+ capture-catch:touchmove="{{endScale > 1 ? 'touchMove' : undefined}}"
+ bindtouchend="touchEnd"
+ ></image>
+ </swiper-item>
+ </block>
+ </swiper>
+ <view class="fyui-gallery__opr" wx:if="{{showRemark}}">
+ <view class="fyui-gallery__title">{{title}}</view>
+ <view class="fyui-gallery__des">{{remark}}</view>
+ </view>
+ <scroll-view wx:if="{{showRemark}}" class="swiper-tab" scroll-into-view="item{{current > 2 ? current - 2 : 0}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true">
+ <block wx:for="{{currentImgs}}" wx:key="i">
+ <image id="item{{index}}" src="{{item}}" class="swiper-tab-list {{current == index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav" mode="aspectFit"></image>
+ </block>
+ </scroll-view>
+ <view wx:if="{{showRemark}}" class="fyui-gallery__tool">
+ <mp-icon mode="filled" class="fyui-gallery__tool__rotate" icon="refresh" color="white" size="26" data-clockwise="{{true}}" bindtap="rotateImg"></mp-icon>
+ <mp-icon mode="filled" class="fyui-gallery__tool__rotate left" icon="refresh" color="white" size="26" data-clockwise="{{false}}" bindtap="rotateImg"></mp-icon>
+ </view>
+ </view>
+</page-container>
\ No newline at end of file
diff --git a/component/mygallery/mygallery.wxss b/component/mygallery/mygallery.wxss
new file mode 100644
index 0000000..5b1635a
--- /dev/null
+++ b/component/mygallery/mygallery.wxss
@@ -0,0 +1,154 @@
+/* component/mygallery/mygallery.wxss */
+.fyui-gallery {
+ display: none;
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: #000;
+ z-index: 1000;
+ /* display: -webkit-box;
+ display: -webkit-flex; */
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -webkit-flex-direction: column;
+ flex-direction: column;
+ -webkit-flex-wrap: nowrap;
+ flex-wrap: nowrap
+}
+
+.fyui-gallery_show {
+ display: flex
+}
+
+.fyui-gallery__info {
+ position: absolute;
+ width: 100%;
+ color: #fff;
+ font-size: 17px;
+ line-height: 5vh;
+ /* min-height: 60px; */
+ text-align: center;
+ padding-top: 8px;
+ /* background-color: rgba(128, 128, 128, 0.233); */
+ z-index: 2;
+}
+
+.fyui-gallery__close {
+ position: absolute;
+ top: 0;
+ right: 0;
+ padding: 8px 8px 16px 16px;
+ /* background-color: blue; */
+ z-index: 3;
+}
+
+.fyui-gallery__img,
+.fyui-gallery__opr {
+ /* position: absolute; */
+ left: 0;
+ left: constant(safe-area-inset-left);
+ left: env(safe-area-inset-left);
+ right: 0;
+ right: constant(safe-area-inset-right);
+ right: env(safe-area-inset-right)
+}
+
+.fyui-gallery__img {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ top: constant(safe-area-inset-top);
+ top: env(safe-area-inset-top);
+ bottom: 60px;
+ bottom: calc(60px + constant(safe-area-inset-bottom));
+ bottom: calc(60px + env(safe-area-inset-bottom));
+ background: 50% no-repeat;
+ background-size: contain;
+ /* background-color: red; */
+}
+
+.fyui-gallery__opr {
+ position: absolute;
+ bottom: calc(12vh + env(safe-area-inset-bottom));
+ bottom: calc(12vh + constant(safe-area-inset-bottom));
+ /* background-color: #0d0d0d; */
+ background-color: rgba(0, 0, 0, 0.219);
+ color: white;
+ padding: 8px;
+}
+
+.fyui-gallery__title {
+ font-size: 16px;
+ font-weight: 550;
+}
+.fyui-gallery__des {
+ font-size: 14px;
+}
+
+.fyui-gallery__img__wrp {
+ -webkit-box-flex: 1;
+ -webkit-flex: 1;
+ flex: 1;
+ position: relative;
+ font-size: 0
+}
+
+.swiper-tab{
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ /* text-align: center; */
+ height: 12vh;
+ white-space: nowrap;
+ z-index: 2;
+ /* background-color: rgba(36, 36, 36, 0.473); */
+ background-color: rgba(0, 0, 0, 0.219);
+ /* background-color: rgba(148, 147, 147, 0.473); */
+ padding-left: 8px;
+ padding-right: 8px;
+ padding-bottom: 0;
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
+}
+
+.swiper-tab-list{
+ position: relative;
+ height: 8vh;
+ width: 8vh;
+ border: 1px solid rgb(99, 99, 99);
+ margin-right: 8px;
+ border-radius: 4px;
+}
+
+.on{
+ height: 10vh;
+ width: 10vh;
+ color: white;
+ border: 1px solid white;
+}
+
+.fyui-gallery__tool {
+ position: absolute;
+ display: block;
+ right: 0;
+ top: 45%;
+ display: flex;
+ flex-direction: column;
+ z-index: 10;
+}
+.fyui-gallery__tool__rotate {
+ padding: 8px;
+ background-color: rgba(0, 0, 0, 0.384);
+ /* transform: rotate(90deg); */
+ border-radius: 8px;
+}
+
+.left {
+ transform: rotateY(180deg);
+ /* background-color: red; */
+ margin-top: 8px;
+}
\ No newline at end of file
diff --git a/component/sidebar/sidebar.js b/component/sidebar/sidebar.js
new file mode 100644
index 0000000..05fc3d2
--- /dev/null
+++ b/component/sidebar/sidebar.js
@@ -0,0 +1,118 @@
+// component/sidebar/sidebar.js
+Component({
+ options: {
+ multipleSlots: true,
+ // 鍦ㄧ粍浠跺畾涔夋椂鐨勯�夐」涓惎鐢ㄥslot鏀寔
+ addGlobalClass: true
+ },
+ properties: {
+ maskClass: {
+ // 閬僵灞俢lass
+ type: String,
+ value: ''
+ },
+ extClass: {
+ // 寮瑰嚭绐� class
+ type: String,
+ value: ''
+ },
+ maskClosable: {
+ // 鐐瑰嚮閬僵 鍏抽棴 actionsheet
+ type: Boolean,
+ value: true
+ },
+ mask: {
+ // 鏄惁闇�瑕� 閬僵灞�
+ type: Boolean,
+ value: true
+ },
+ show: {
+ // 鏄惁寮�鍚� actionsheet
+ type: Boolean,
+ value: false
+ },
+ menus: {
+ // 涓�绾ц彍鍗� 鍒楄〃
+ type: Array,
+ value: [],
+ },
+ items: {
+ // 浜岀骇鑿滃崟 鍒楄〃
+ type: Array,
+ value: [],
+ }
+ },
+ data: {
+ selectedIndex: [0, 0],
+ tempSelectedIndex: [0, 0]
+ },
+ methods: {
+ _groupChange(e) {
+ // 鏀寔 涓�缁存暟缁� 鍐欐硶
+ if (e.length > 0 && typeof e[0] !== 'string' && !(e[0] instanceof Array)) {
+ this.setData({
+ actions: [this.data.actions]
+ });
+ }
+ },
+
+ buttonTap(e) {
+ const {
+ value,
+ groupindex,
+ index
+ } = e.currentTarget.dataset;
+ this.triggerEvent('actiontap', {
+ value,
+ groupindex,
+ index
+ });
+ },
+
+ closeActionSheet(e) {
+ this.setData({
+ tempSelectedIndex: this.data.selectedIndex
+ })
+ const {
+ type
+ } = e.currentTarget.dataset;
+
+ if (this.data.maskClosable || type) {
+ // 鐐瑰嚮 action 閲岄潰鐨� 鍙栨秷
+ this.setData({
+ show: false
+ }); // 鍏抽棴鍥炶皟浜嬩欢
+
+ this.triggerEvent('close');
+ }
+ },
+
+ chooseMenu(e) {
+ const {
+ index
+ } = e.currentTarget.dataset;
+ this.setData({
+ tempSelectedIndex: [index, 0]
+ })
+ },
+
+ chooseItem(e) {
+ const {
+ index
+ } = e.currentTarget.dataset;
+ this.setData({
+ 'tempSelectedIndex[1]': index
+ })
+ },
+
+ submit() {
+ this.setData({
+ selectedIndex: this.data.tempSelectedIndex
+ })
+ this.triggerEvent('submit', this.data.selectedIndex);
+ this.setData({
+ show: false
+ });
+ }
+ }
+})
diff --git a/component/sidebar/sidebar.json b/component/sidebar/sidebar.json
new file mode 100644
index 0000000..68ffa25
--- /dev/null
+++ b/component/sidebar/sidebar.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "mp-icon": "../icon/icon"
+ }
+}
\ No newline at end of file
diff --git a/component/sidebar/sidebar.wxml b/component/sidebar/sidebar.wxml
new file mode 100644
index 0000000..03bb429
--- /dev/null
+++ b/component/sidebar/sidebar.wxml
@@ -0,0 +1,32 @@
+<wxs module="utils">
+ var join = function (a, b) {
+ return a + b
+ };
+ var isNotSlot = function (v) {
+ return typeof v !== 'string'
+ }
+ module.exports = {
+ join: join,
+ isNotSlot: isNotSlot
+ }
+</wxs>
+
+<view wx:if="{{mask}}" class="fyui-mask {{show ? '' : 'fyui-mask_hidden'}} {{maskClass}}" bindtap="closeActionSheet"></view>
+<view class="fyui-sidebar {{show ? 'fyui-sidebar_toggle' : ''}} {{extClass}}">
+ <view class="fyui-sidebar__menu">
+ <block wx:for="{{menus}}" wx:key="index">
+ <view class="{{index == tempSelectedIndex[0] ? 'selected' : ''}}" bindtap="chooseMenu" data-index="{{index}}">{{item.name}}</view>
+ </block>
+ </view>
+ <view class="fyui-sidebar__content">
+ <block wx:for="{{items[tempSelectedIndex[0]]}}" wx:key="index">
+ <view class="{{index == tempSelectedIndex[1] ? 'selected' : ''}}" bindtap="chooseItem" data-index="{{index}}">{{item.name}}</view>
+ </block>
+ </view>
+ <view class="fyui-sidebar__check">
+ <!-- <mp-icon bindtap="submit" icon="done" size="{{30}}" color="white" extClass="fyui-sidebar__check_btn"></mp-icon>
+ <mp-icon bindtap="closeActionSheet" icon="close" size="{{30}}" color="white" extClass="fyui-sidebar__check_btn"></mp-icon> -->
+ <view class="submit" bindtap="submit">纭畾</view>
+ <view class="submit submit_cancel" bindtap="closeActionSheet">鍙栨秷</view>
+ </view>
+</view>
\ No newline at end of file
diff --git a/component/sidebar/sidebar.wxss b/component/sidebar/sidebar.wxss
new file mode 100644
index 0000000..767f90c
--- /dev/null
+++ b/component/sidebar/sidebar.wxss
@@ -0,0 +1,90 @@
+.fyui-mask.fyui-mask_hidden {
+ opacity: 0;
+ transform: scale3d(1, 1, 0)
+}
+
+.fyui-mask {
+ opacity: 1;
+ transform: scale3d(1, 1, 1);
+ transition: all .3s
+}
+
+.fyui-sidebar {
+ position: fixed;
+ left: 0;
+ top: 0;
+ -webkit-transform: translateX(-100%);
+ transform: translateX(-100%);
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
+ z-index: 5000;
+ /* min-width: 60%; */
+ height: 100%;
+ background-color: var(--fyui-BG_1);
+ -webkit-transition: -webkit-transform .3s;
+ transition: -webkit-transform .3s;
+ transition: transform .3s;
+ transition: transform .3s, -webkit-transform .3s;
+ border-bottom-right-radius: 12px;
+ border-top-right-radius: 12px;
+ overflow: hidden;
+ /* background-color: rgb(136, 136, 136); */
+ display: flex;
+}
+
+.fyui-sidebar_toggle {
+ -webkit-transform: translate(0);
+ transform: translate(0)
+}
+.fyui-sidebar__menu {
+ font-size: 14px;
+ border-right: 1px solid var(--fyui-text-color_3);
+}
+
+.fyui-sidebar__menu>view{
+ /* width: 20%; */
+ text-align: center;
+ padding: 8px 16px;
+ overflow: hidden;
+ overflow-y: auto;
+}
+.fyui-sidebar__content {
+ position: relative;
+ display: block;
+ font-size: 14px;
+}
+
+.fyui-sidebar__content>view{
+ display: block;
+ width: 100%;
+ /* text-align: center; */
+ padding: 8px 16px;
+ margin-right: 40px;
+ /* background-color: teal; */
+}
+
+.selected {
+ background-color: #1cebc5;
+ color: white;
+}
+
+.fyui-sidebar__check {
+ background-color: var(--fyui-BG_1);
+ display: flex;
+ flex-direction: column;
+ padding-bottom: 40px;
+ padding-bottom: calc(40px + constant(safe-area-inset-bottom));
+ padding-bottom: calc(40px + env(safe-area-inset-bottom));
+ z-index: 6000;
+}
+
+.fyui-sidebar__check>mp-icon {
+ background-color: #1cebc5;
+ margin-bottom: 8px;
+ border-radius: 50%;
+ padding: 16px;
+}
+
+.submit_cancel {
+ background: linear-gradient(to right, #b3b3b3, #b3b3b3);
+}
\ No newline at end of file
diff --git a/component/switchtab/switchtab.js b/component/switchtab/switchtab.js
index 74c8aa2..59d2ed3 100644
--- a/component/switchtab/switchtab.js
+++ b/component/switchtab/switchtab.js
@@ -42,19 +42,22 @@
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'
- });
- }
+ // 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'
+ // });
+ // }
+ that.setData({
+ pageheight: rect.height + 'px'
+ });
}).exec();
},
swichNav: function (e) {
diff --git a/pages/gradereport/gradereport.js b/pages/gradereport/gradereport.js
index 03df02c..a4d2ea5 100644
--- a/pages/gradereport/gradereport.js
+++ b/pages/gradereport/gradereport.js
@@ -247,7 +247,7 @@
if (app.globalData.userInfo.extension2 === '1') {
const i = r.third.indexOf('锛�')
r.third = r.third.slice(i+1)
- r.third = r.third.replace('浣�', '鎮�')
+ r.third = r.third.replaceAll('浣�', '鎮�')
}
p.itemlist.push({
ruleName: r.first,
diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml
index d316170..1f38c59 100644
--- a/pages/mine/mine.wxml
+++ b/pages/mine/mine.wxml
@@ -10,28 +10,49 @@
</view>
</view>
<view class="page__bd">
- <view class="fyui-panel" bindtap="goto" data-index="1">
- <view class="fyui-cell fyui-cell_select title">
+ <view class="fyui-panel">
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="0">
<view class="fyui-cell__hd">
<image src="/res/icons/icon3.png" class="icon" />
</view>
<view class="fyui-cell__bd">浼佷笟璁よ瘉</view>
<view class="fyui-cell__ft"></view>
</view>
- <view class="fyui-cell fyui-cell_select title">
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="1">
<view class="fyui-cell__hd">
<image src="/res/icons/icon4.png" class="icon" />
</view>
<view class="fyui-cell__bd">閫氱煡绠$悊</view>
<view class="fyui-cell__ft"></view>
</view>
- <view class="fyui-cell fyui-cell_select title">
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="2">
<view class="fyui-cell__hd">
<image src="/res/icons/icon5.png" class="icon" />
</view>
<view class="fyui-cell__bd">闂鍙嶉</view>
<view class="fyui-cell__ft"></view>
</view>
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="3">
+ <view class="fyui-cell__hd">
+ <image src="/res/icons/icon5.png" class="icon" />
+ </view>
+ <view class="fyui-cell__bd">鎴戠殑鏀惰棌</view>
+ <view class="fyui-cell__ft"></view>
+ </view>
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="4">
+ <view class="fyui-cell__hd">
+ <image src="/res/icons/icon5.png" class="icon" />
+ </view>
+ <view class="fyui-cell__bd">鎴戣鍜ㄨ</view>
+ <view class="fyui-cell__ft"></view>
+ </view>
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="5">
+ <view class="fyui-cell__hd">
+ <image src="/res/icons/icon5.png" class="icon" />
+ </view>
+ <view class="fyui-cell__bd">鐜繚鏃ョ▼</view>
+ <view class="fyui-cell__ft"></view>
+ </view>
</view>
</view>
diff --git a/pages/mine/mine.wxss b/pages/mine/mine.wxss
index 4e985b8..623d764 100644
--- a/pages/mine/mine.wxss
+++ b/pages/mine/mine.wxss
@@ -38,4 +38,8 @@
.user-tag {
font-size: 12px;
color: var(--fyui-text-color_2);
+}
+
+.title:active {
+ background-color: var(--fyui-BG-COLOR-ACTIVE);
}
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailcase/consultdetailcase.js b/pages/module_consult/consultdetailcase/consultdetailcase.js
new file mode 100644
index 0000000..78b3a5b
--- /dev/null
+++ b/pages/module_consult/consultdetailcase/consultdetailcase.js
@@ -0,0 +1,96 @@
+// pages/module_consult/consultdetailcase/consultdetailcase.js
+const consultservice = require("../../../service/consultservice")
+const util = require("../../../utils/util")
+const app = getApp()
+
+Page({
+
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ showloading: false,
+ case: {},
+ caseTag: [],
+
+ showDialog: false,
+ groups: [
+ 'actionSlot1',
+ ]
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+ var that = this
+ this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
+ that.setData({
+ caseId: data.caseId
+ })
+ that.getCase()
+ })
+ },
+
+ getCase() {
+ this.setData({
+ showloading: true
+ })
+ var that = this
+ consultservice.getCase(app.globalData.accessToken.userId, this.data.caseId, {
+ success(res) {
+ let caseTag = []
+ if (res.ecIsPunish) caseTag.push({icon: '/res/icons/cq_punish.png', name: '娑夊強琛屾斂澶勭綒'})
+ if (res.ecIsIllegal) caseTag.push({icon: '/res/icons/cq_illegal.png', name: '娑夊強鍒戜簨璐d换'})
+ if (res.ecIsSupervise) caseTag.push({icon: '/res/icons/cq_supervise.png', name: '娑夊強鐜繚鐫e療瑕佺偣'})
+ if (res.ecIsShotspot) caseTag.push({icon: '/res/icons/cq_shotspot.png', name: '娑夊強鐜繚绠$悊鐑偣'})
+ if (res.ecIsMinor) caseTag.push({icon: '/res/icons/cq_minor.png', name: '娑夊強杞诲井杩濇硶'})
+ if (res.ecIsDetained) caseTag.push({icon: '/res/icons/cq_detained.png', name: '娑夊強琛屾斂鎷樼暀'})
+
+ res.ecSummary = res.ecSummary.replaceAll('\\n', '<br/>')
+ res.ecMeaning = res.ecMeaning.replaceAll('\\n', '<br/>')
+ res.ecExamined = res.ecExamined.replaceAll('\\n', '<br/>')
+ res.ecEnlightenment = res.ecEnlightenment.replaceAll('\\n', '<br/>')
+ res.ecOccurDate = util.formatTime(res.ecOccurDate)
+ that.setData({
+ case: res,
+ caseTag
+ })
+ console.log(res);
+ },
+ complete(res) {
+ that.setData({
+ showloading: false
+ })
+ }
+ })
+ },
+
+ openDialog: function () {
+ this.setData({
+ showDialog: true
+ })
+ },
+ closeDialog: function () {
+ this.setData({
+ showDialog: false
+ })
+ },
+ btnClick(e) {
+ console.log(e)
+ this.closeDialog()
+ },
+
+ previewImage(e) {
+ const i = e.currentTarget.dataset.index
+ // const img = this.data.case.ecAppendixUrl[i]
+ const remark = this.data.case.ecAppendixText[i]
+ const previewImageUrls = this.data.case.ecAppendixUrl;
+ this.setData({
+ previewImageUrls,
+ remark,
+ previewCurrent: 0,
+ showPreview: true
+ });
+ },
+})
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailcase/consultdetailcase.json b/pages/module_consult/consultdetailcase/consultdetailcase.json
new file mode 100644
index 0000000..5ec34b0
--- /dev/null
+++ b/pages/module_consult/consultdetailcase/consultdetailcase.json
@@ -0,0 +1,11 @@
+{
+ "navigationBarTitleText": "妗堜緥璇︽儏",
+ "navigationBarBackgroundColor": "#57E4CB",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {
+ "mp-loading": "/component/loading/loading",
+ "mp-actionSheet": "/component/actionsheet/actionsheet",
+ "mp-icon": "/component/icon/icon",
+ "my-gallery": "/component/mygallery/mygallery"
+ }
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailcase/consultdetailcase.wxml b/pages/module_consult/consultdetailcase/consultdetailcase.wxml
new file mode 100644
index 0000000..bcea466
--- /dev/null
+++ b/pages/module_consult/consultdetailcase/consultdetailcase.wxml
@@ -0,0 +1,78 @@
+<!--pages/module_consult/consultdetailcase/consultdetailcase.wxml-->
+<view class="page">
+ <view class="page__hd">
+ <view class="fyui-box fyui-box__text">
+ <view class="fyui-box__hd">
+ <view>{{case.ecTitle}}</view>
+ </view>
+ <view class="fyui-box__bd">
+ <view class="q-tag" bindtap="openDialog">
+ <block wx:for="{{caseTag}}" wx:key="index">
+ <image src="{{item.icon}}"></image>
+ </block>
+ </view>
+ </view>
+ <view class="fyui-box__ft" style="flex-direction: column;">
+ <view class="flex-h" style="justify-content: flex-start;"><image class="image-16" src="/res/icons/locate.png"></image>妗堝彂鍦板潃锛歿{case.ecProvinceName + case.ecCityName}}</view>
+ <view class="flex-h" style="justify-content: flex-start;"><image class="image-16" src="/res/icons/time.png"></image>妗堝彂鏃堕棿锛歿{case.ecOccurDate}}</view>
+ </view>
+ </view>
+ </view>
+ <view class="page__bd">
+ <view class="fyui-panel flex-h">
+ <view class="flex-h" style="justify-content: flex-start;">
+ <image class="image-16" src="/res/icons/case_forfeit.png"></image>
+ 缃氭鏁伴
+ </view>
+ <view style="color: red;">{{case.ecForfeit}}涓囧厓</view>
+ </view>
+ <view class="fyui-panel">
+ <view>妗堜緥绫诲埆锛歿{case.ecType}}</view>
+ <view>瑕佺礌绫诲埆锛歿{case.ecEpItemType}}</view>
+ <view>瑕佺礌瀛愮被锛歿{case.ecEpItemSubtype}}</view>
+ </view>
+ <view class="fyui-panel">
+ <view class="case-type">妗堟儏绠�浠�</view>
+ <view class="case-image-group" wx:for="{{case.ecAppendixUrl}}" wx:key="index">
+ <image src="{{item}}" mode="widthFix" bindtap="previewImage" data-index="{{index}}"></image>
+ <view>{{case.ecAppendixText[index]}}</view>
+ </view>
+ <rich-text nodes="{{case.ecSummary}}"></rich-text>
+ </view>
+ <view class="fyui-panel" style="background-color: #FFF8DE;">
+ <view class="case-type" style="background-color: #FFEBA6;">鏌ュ鎯呭喌</view>
+ <rich-text nodes="{{case.ecExamined}}"></rich-text>
+ </view>
+ <view class="fyui-panel" style="background-color: #E6F6FC;">
+ <view class="case-type" style="background-color: #AFEAFD;">妗堜緥鎰忎箟</view>
+ <rich-text nodes="{{case.ecMeaning}}"></rich-text>
+ </view>
+ <view class="fyui-panel" style="background-color: #E6FCF4;">
+ <view class="case-type" style="background-color: #AAFFE0;">妗堜欢鍚ず</view>
+ <rich-text nodes="{{case.ecEnlightenment}}"></rich-text>
+ </view>
+ <view class="fyui-panel q-link-group">
+ <view wx:if="{{case.ecIsAssociated}}" class="q-link">
+ <image src="/res/icons/link_1.png"></image>
+ 鐩稿叧鏉$洰
+ </view>
+ </view>
+ </view>
+ <view class="page__ft">
+ <mp-loading duration="{{900}}" type="dot-gray" show="{{showloading}}" animated="{{true}}"></mp-loading>
+ </view>
+
+ <mp-actionSheet bindactiontap="btnClick" show="{{showDialog}}" actions="{{groups}}" showCancel="{{false}}">
+ <view slot="{{'actionSlot' + '1'}}" class="custom-action">
+ <image class="custom-action__bg" src="/res/icons/bg_star.png"></image>
+ <block wx:for="{{caseTag}}" wx:key="index">
+ <view class="custom-action__tag" style="{{questionTag.length == 1 ? 'flex: 1;' : ''}}">
+ <image src="{{item.icon}}"></image>
+ <view>{{item.name}}</view>
+ </view>
+ </block>
+ </view>
+ </mp-actionSheet>
+
+ <my-gallery hide-on-click="{{true}}" show-delete="{{false}}" show="{{showPreview}}" img-urls="{{previewImageUrls}}" current="{{previewCurrent}}" remark="{{remark}}"></my-gallery>
+</view>
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailcase/consultdetailcase.wxss b/pages/module_consult/consultdetailcase/consultdetailcase.wxss
new file mode 100644
index 0000000..dd09590
--- /dev/null
+++ b/pages/module_consult/consultdetailcase/consultdetailcase.wxss
@@ -0,0 +1,105 @@
+/* pages/module_consult/consultdetailcase/consultdetailcase.wxss */
+.page__hd {
+ padding: 0;
+}
+
+.fyui-box .fyui-box__hd {
+ display: flex;
+}
+
+.q-tag {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.q-tag>image {
+ width: 16px;
+ height: 16px;
+ /* background-color: red; */
+ padding: 4px;
+}
+
+.q-link-group {
+ display: flex;
+}
+
+.q-link{
+ display: flex;
+ align-items: center;
+ background-color: #CFFFF7;
+ color: #25D4B6;
+ padding: 6px 8px;
+ border-radius: 6px;
+}
+
+.q-link>image{
+ width: 16px;
+ height: 16px;
+}
+
+.fyui-box__bd {
+ margin-top: 8px;
+ font-size: 14px;
+}
+
+.custom-action {
+ position: relative;
+ min-height: 40vh;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.custom-action__bg{
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+.custom-action__tag{
+ font-size: 14px;
+ color: var(--fyui-text-color_1);
+ font-weight: 600;
+ width: 50%;
+ text-align: center;
+ z-index: 2;
+}
+
+.custom-action__tag>image{
+ width: 64px;
+ height: 64px;
+}
+
+.fyui-panel {
+ margin: 10px 0 0 0 ;
+ padding: 10px 16px;
+ font-size: 14px;
+ border-radius: 0;
+}
+
+.case-type {
+ display: inline-block;
+ border-radius: 8px;
+ background-color: #F6F6F6;
+ padding: 4px 12px;
+ font-size: 14px;
+ margin-bottom: 4px;
+}
+
+.case-image-group {
+ /* display: flex;
+ flex-direction: column;
+ justify-content: flex-start; */
+}
+
+.case-image-group>image {
+ width: 100%;
+}
+
+.case-image-group>view {
+ font-size: 12px;
+ text-align: center;
+ color: var(--fyui-text-color_3);
+ margin-bottom: 8px;
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailitem/consultdetailitem.js b/pages/module_consult/consultdetailitem/consultdetailitem.js
index 365f089..84beb96 100644
--- a/pages/module_consult/consultdetailitem/consultdetailitem.js
+++ b/pages/module_consult/consultdetailitem/consultdetailitem.js
@@ -56,7 +56,7 @@
success (res) {
let result = that.data.result
res.forEach(r => {
- r.des = r.des.replace('\\n', '<br/>')
+ r.des = r.des.replaceAll('\\n', '<br/>')
if (result.length === 0) {
result.push({
typeId: r.typeId,
@@ -71,7 +71,7 @@
result
})
console.log(result);
- },
+ },
complete (res) {
wx.hideLoading()
}
@@ -92,7 +92,7 @@
}, 20000);
consultservice.getMgtItem(app.globalData.accessToken.userId, this.data.itemId, {
success (res) {
- res.miItemContent = res.miItemContent.replace('\\n', '<br/>')
+ res.miItemContent = res.miItemContent.replaceAll('\\n', '<br/>')
that.setData({
content: res
})
diff --git a/pages/module_consult/consultdetailqa/consultdetailqa.js b/pages/module_consult/consultdetailqa/consultdetailqa.js
new file mode 100644
index 0000000..c10baae
--- /dev/null
+++ b/pages/module_consult/consultdetailqa/consultdetailqa.js
@@ -0,0 +1,108 @@
+// pages/module_consult/consultdetailqa/consultdetailqa.js
+const consultservice = require("../../../service/consultservice")
+const app = getApp()
+
+Page({
+
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ showloading: false,
+ question: {},
+ //闂娑夊強鐨勯」鐩�
+ questionTag: [{
+ icon: '',
+ name: ''
+ }],
+ answers: [],
+
+ showDialog: false,
+ groups: [
+ 'actionSlot1',
+ // { text: '绀轰緥鑿滃崟', value: 1 },
+ // { text: '绀轰緥鑿滃崟', value: 2 },
+ // { text: '璐熷悜鑿滃崟', type: 'warn', value: 3 }
+ ]
+},
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+ var that = this
+ this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
+ that.setData({
+ qId: data.qId
+ })
+
+ that.getQuestion()
+ that.getAnswers()
+ })
+ },
+
+ getQuestion() {
+ this.setData({
+ showloading: true
+ })
+ var that = this
+ consultservice.getQuestion(app.globalData.accessToken.userId, this.data.qId, {
+ success(res) {
+ let questionTag = []
+ if (res.cqIsPunish) questionTag.push({icon: '/res/icons/cq_punish.png', name: '娑夊強琛屾斂澶勭綒'})
+ if (res.cqIsIllegal) questionTag.push({icon: '/res/icons/cq_illegal.png', name: '娑夊強鍒戜簨璐d换'})
+ if (res.cqIsSupervise) questionTag.push({icon: '/res/icons/cq_supervise.png', name: '娑夊強鐜繚鐫e療瑕佺偣'})
+ if (res.cqIsShotspot) questionTag.push({icon: '/res/icons/cq_shotspot.png', name: '娑夊強鐜繚绠$悊鐑偣'})
+ that.setData({
+ question: res,
+ questionTag
+ })
+ console.log(res);
+ },
+ complete(res) {
+ that.setData({
+ showloading: false
+ })
+ }
+ })
+ },
+
+ getAnswers() {
+ this.setData({
+ showloading: true
+ })
+ var that = this
+ consultservice.getAnswers(app.globalData.accessToken.userId, this.data.qId, {
+ success(res) {
+ res.forEach(r => {
+ r.saContent = r.saContent.replaceAll('\\n', '<br/>')
+ });
+ that.setData({
+ answers: res
+ })
+ console.log(res);
+ },
+ complete(res) {
+ that.setData({
+ showloading: false
+ })
+ }
+ })
+ },
+
+
+ openDialog: function () {
+ this.setData({
+ showDialog: true
+ })
+ },
+ closeDialog: function () {
+ this.setData({
+ showDialog: false
+ })
+ },
+ btnClick(e) {
+ console.log(e)
+ this.closeDialog()
+ }
+})
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailqa/consultdetailqa.json b/pages/module_consult/consultdetailqa/consultdetailqa.json
new file mode 100644
index 0000000..b3fcf90
--- /dev/null
+++ b/pages/module_consult/consultdetailqa/consultdetailqa.json
@@ -0,0 +1,10 @@
+{
+ "navigationBarTitleText": "鐜繚闂瓟",
+ "navigationBarBackgroundColor": "#57E4CB",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {
+ "mp-loading": "/component/loading/loading",
+ "mp-actionSheet": "/component/actionsheet/actionsheet",
+ "mp-icon": "/component/icon/icon"
+ }
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailqa/consultdetailqa.wxml b/pages/module_consult/consultdetailqa/consultdetailqa.wxml
new file mode 100644
index 0000000..db5c319
--- /dev/null
+++ b/pages/module_consult/consultdetailqa/consultdetailqa.wxml
@@ -0,0 +1,72 @@
+<!--pages/module_consult/consultdetailqa/consultdetailqa.wxml-->
+<view class="page">
+ <view class="page__hd">
+ <view class="fyui-box fyui-box__text">
+ <view class="fyui-box__hd">
+ <view>{{question.cqContent}}</view>
+ </view>
+ <view class="fyui-box__bd">
+ <view class="q-tag" bindtap="openDialog">
+ <block wx:for="{{questionTag}}" wx:key="index">
+ <image src="{{item.icon}}"></image>
+ </block>
+ <!-- <image wx:if="{{question.cqIsPunish}}" src="/res/icons/cq_punish.png"></image>
+ <image wx:if="{{question.cqIsIllegal}}" src="/res/icons/cq_illegal.png"></image>
+ <image wx:if="{{question.cqIsSupervise}}" src="/res/icons/cq_supervise.png"></image>
+ <image wx:if="{{question.cqIsShotspot}}" src="/res/icons/cq_shotspot.png"></image> -->
+ </view>
+ </view>
+ <view class="fyui-box__ft" style="flex-direction: column;">
+ <view>鍏眥{answers.length}}鏉″洖绛�</view>
+ <view class="q-link-group">
+ <view wx:if="{{question.cqIsAssociated}}" class="q-link">
+ <image src="/res/icons/link_1.png"></image>
+ 鐩稿叧鏉$洰
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="page__bd">
+ <block wx:for="{{answers}}" wx:for-index="index" wx:key="index">
+ <view class="fyui-box fyui-box__text">
+ <view class="fyui-box__hd">
+ <image class="user-avator" src="/res/icons/con_qa.png"></image>
+ <view>
+ <view class="user-name">鐜繚鏅鸿兘鍔╂墜</view>
+ <view class="user-tag">鐜繚鏅鸿兘鍔╂墜</view>
+ </view>
+ </view>
+ <view class="fyui-box__bd">
+ <!-- <view class="fyui-box__content tag">鐩稿叧琛屼笟 -> {{item.fileIndustry}}</view> -->
+ <rich-text nodes="{{item.saContent}}" class=""></rich-text>
+ </view>
+ <view class="a-tag-group">
+ <view class="a-tag">
+ <image class="image-16" src="/res/icons/favourite.png"></image>156
+ </view>
+ <view class="a-tag">
+ <image class="image-16" src="/res/icons/like.png"></image>156
+ </view>
+ </view>
+ </view>
+ <view wx:if="{{index < answers.length - 1}}" class="next-answer"></view>
+ <view wx:else class="next-answer">鈥斺�斿埌搴曚簡鈥斺��</view>
+ </block>
+ </view>
+ <view class="page__ft">
+ <mp-loading duration="{{900}}" type="dot-gray" show="{{showloading}}" animated="{{true}}"></mp-loading>
+ </view>
+
+ <mp-actionSheet bindactiontap="btnClick" show="{{showDialog}}" actions="{{groups}}" showCancel="{{false}}">
+ <view slot="{{'actionSlot' + '1'}}" class="custom-action">
+ <image class="custom-action__bg" src="/res/icons/bg_star.png"></image>
+ <block wx:for="{{questionTag}}" wx:key="index">
+ <view class="custom-action__tag" style="{{questionTag.length == 1 ? 'flex: 1;' : ''}}">
+ <image src="{{item.icon}}"></image>
+ <view>{{item.name}}</view>
+ </view>
+ </block>
+ </view>
+ </mp-actionSheet>
+</view>
\ No newline at end of file
diff --git a/pages/module_consult/consultdetailqa/consultdetailqa.wxss b/pages/module_consult/consultdetailqa/consultdetailqa.wxss
new file mode 100644
index 0000000..fbfc265
--- /dev/null
+++ b/pages/module_consult/consultdetailqa/consultdetailqa.wxss
@@ -0,0 +1,114 @@
+/* pages/module_consult/consultdetailqa/consultdetailqa.wxss */
+.page__hd {
+ padding: 0;
+}
+
+.fyui-box .fyui-box__hd {
+ display: flex;
+}
+
+.q-tag {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.q-tag>image {
+ width: 16px;
+ height: 16px;
+ /* background-color: red; */
+ padding: 4px;
+}
+
+.q-link-group {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.q-link{
+ display: flex;
+ align-items: center;
+ background-color: #CFFFF7;
+ color: #25D4B6;
+ padding: 6px 8px;
+ border-radius: 6px;
+}
+
+.q-link>image{
+ width: 16px;
+ height: 16px;
+}
+
+.fyui-box .fyui-box__hd .user-avator{
+ width: 36px;
+ height: 36px;
+ border-radius: 50%;
+}
+
+.fyui-box .fyui-box__hd .user-name{
+ margin-left: 8px;
+ font-size: 14px;
+ font-weight: 500;
+ color: var(--fyui-text-color_1);
+}
+
+.user-tag {
+ margin-left: 8px;
+ font-size: 10px;
+ font-weight: 100;
+ color: var(--fyui-text-color_2);
+}
+
+.fyui-box__bd {
+ margin-top: 8px;
+ font-size: 14px;
+}
+
+.next-answer {
+ text-align: center;
+ font-size: 12px;
+ color: var(--fyui-text-color_3);
+ padding: 8px;
+}
+
+.a-tag-group {
+ display: flex;
+ justify-content: flex-end;
+ color: var(--fyui-text-color_3);
+ font-size: 12px;
+}
+
+.a-tag {
+ display: flex;
+ align-items: center;
+ line-height: 20px;
+ margin-left: 8px;
+}
+
+.custom-action {
+ position: relative;
+ min-height: 40vh;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.custom-action__bg{
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+.custom-action__tag{
+ font-size: 14px;
+ color: var(--fyui-text-color_1);
+ font-weight: 600;
+ width: 50%;
+ text-align: center;
+ z-index: 2;
+}
+
+.custom-action__tag>image{
+ width: 64px;
+ height: 64px;
+}
\ No newline at end of file
diff --git a/pages/module_consult/consulthome/consulthome.js b/pages/module_consult/consulthome/consulthome.js
index 855cdbc..f292fcd 100644
--- a/pages/module_consult/consulthome/consulthome.js
+++ b/pages/module_consult/consulthome/consulthome.js
@@ -22,6 +22,9 @@
name: '鏉$洰',
tag: 0
}, {
+ name: '闂瓟',
+ tag: 0
+ }, {
name: '妗堜緥',
tag: 0
}],
@@ -31,7 +34,11 @@
[],
[],
[],
- ]
+ [],
+ ],
+
+ //妗堜緥鎵�娑夊強鐨勮鐐�
+ caseTag: []
},
/**
@@ -39,7 +46,6 @@
*/
onLoad: function (options) {
this.getHotTopic()
- this.getTopicItem()
},
/**
@@ -56,12 +62,14 @@
},
+ // 鎼滅储
gotoSearch() {
wx.navigateTo({
url: "/pages/module_consult/consultsearch/consultsearch"
})
},
+ // 鍔熻兘鎸夐挳
goto(e) {
var url = ""
var index = e.currentTarget.dataset.index
@@ -95,13 +103,14 @@
*/
getHotTopic() {
var that = this
+ // 1. 鐑棬娉曞緥娉曡
consultservice.getTopicLaw(app.globalData.accessToken.userId, {
success(res) {
res.forEach(r => {
r.mfKeywordLv1 = r.mfKeywordLv1.split('銆�').slice(0, 5)
- r.mfReleaseDate = that.formateTime(r.mfReleaseDate)
- r.mfEffectiveDate = that.formateTime(r.mfEffectiveDate)
- r.mfClosingDate = that.formateTime(r.mfClosingDate)
+ r.mfReleaseDate = that.formatTime(r.mfReleaseDate)
+ r.mfEffectiveDate = that.formatTime(r.mfEffectiveDate)
+ r.mfClosingDate = that.formatTime(r.mfClosingDate)
});
that.setData({
'pageList[0]': res,
@@ -109,27 +118,48 @@
})
}
})
- },
-
- getTopicItem() {
- var that = this
+ // 2. 鐑棬娉曞緥娉曡鏉$洰
consultservice.getTopicItem(app.globalData.accessToken.userId, {
success(res) {
res.forEach(r => {
- r.miItemContent = r.miItemContent.replace('\\n', '<br/>')
- // r.mfKeywordLv1 = r.mfKeywordLv1.split('銆�').slice(0, 5)
- // r.mfReleaseDate = that.formateTime(r.mfReleaseDate)
- // r.mfEffectiveDate = that.formateTime(r.mfEffectiveDate)
- // r.mfClosingDate = that.formateTime(r.mfClosingDate)
+ r.miItemContent = r.miItemContent.replaceAll('\\n', '<br/>')
});
that.setData({
'pageList[2]': res
+ })
+ }
+ })
+ // 3. 鐑棬闂瓟
+ consultservice.getTopicQA(app.globalData.accessToken.userId, {
+ success(res) {
+ res.forEach(r => {
+ r.cqCreateTime = that.formatTime(r.cqCreateTime)
+ });
+ that.setData({
+ 'pageList[3]': res
+ })
+ }
+ })
+ // 4. 鐑棬妗堜緥
+ consultservice.getTopicCase(app.globalData.accessToken.userId, {
+ success(res) {
+ res.forEach(r => {
+ r.ecSummary = r.ecSummary.replaceAll('\\n', '<br/>')
+ r.ecMeaning = r.ecMeaning.replaceAll('\\n', '<br/>')
+ r.ecExamined = r.ecExamined.replaceAll('\\n', '<br/>')
+ r.ecEnlightenment = r.ecEnlightenment.replaceAll('\\n', '<br/>')
+ r.ecOccurDate = that.formatTime(r.ecOccurDate)
+ });
+ that.setData({
+ 'pageList[4]': res
})
console.log(that.data.pageList);
}
})
},
+
+ // 鍘诲線鏂囦欢璇︽儏
gotoFile(e) {
const iList = e.currentTarget.dataset.index.split(',')
const i1 = iList[0]
@@ -146,6 +176,7 @@
})
},
+ // 鍘诲線鏉$洰璇︽儏
gotoItem(e) {
const iList = e.currentTarget.dataset.index.split(',')
const i1 = iList[0]
@@ -162,9 +193,43 @@
})
},
- formateTime(t) {
+ // 鍘诲線闂瓟璇︽儏
+ gotoQA(e) {
+ const iList = e.currentTarget.dataset.index.split(',')
+ const i1 = iList[0]
+ const i2 = iList[1]
+ var qId = this.data.pageList[i1][i2].cqGuid
+ wx.navigateTo({
+ url: '/pages/module_consult/consultdetailqa/consultdetailqa',
+ success: (res) => {
+ // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', {
+ qId: qId
+ })
+ },
+ })
+ },
+
+ // 鍘诲線妗堜緥璇︽儏
+ gotoCase(e) {
+ const iList = e.currentTarget.dataset.index.split(',')
+ const i1 = iList[0]
+ const i2 = iList[1]
+ var caseId = this.data.pageList[i1][i2].ecGuid
+ wx.navigateTo({
+ url: '/pages/module_consult/consultdetailcase/consultdetailcase',
+ success: (res) => {
+ // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', {
+ caseId: caseId
+ })
+ },
+ })
+ },
+
+ formatTime(t) {
if (t) {
- return moment(t).format("YYYY骞碝M鏈圖D鏃�")
+ return moment(t).format("YYYY.MM.DD")
} else {
return undefined
}
diff --git a/pages/module_consult/consulthome/consulthome.wxml b/pages/module_consult/consulthome/consulthome.wxml
index a3d186c..13faa4a 100644
--- a/pages/module_consult/consulthome/consulthome.wxml
+++ b/pages/module_consult/consulthome/consulthome.wxml
@@ -60,7 +60,7 @@
</view>
</block>
- <block wx:else="{{i1 == 2}}">
+ <block wx:elif="{{i1 == 2}}">
<view wx:for="{{page}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoItem">
<view class="fyui-box fyui-box__text">
<view class="fyui-box__hd">
@@ -82,6 +82,76 @@
</view>
</view>
</block>
+
+ <block wx:elif="{{i1 == 3}}">
+ <view wx:for="{{page}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoQA">
+ <view class="fyui-box fyui-box__text">
+ <view class="fyui-box__hd">
+ <text class="fyui-box__content des subtitle">{{item.cqContent}}</text>
+ </view>
+ <view class="fyui-box__bd answer">
+ <!-- <view class="fyui-box__content tag">鐩稿叧琛屼笟 -> {{item.fileIndustry}}</view> -->
+ <view class="tag2">绛旓細</view>
+ <rich-text class="tag2 des" nodes="{{item.answer}}"></rich-text>
+ </view>
+ <view class="fyui-box__ft">
+ <text class="tag3">鎻愰棶鏃堕棿锛歿{item.cqCreateTime}}</text>
+ <text class="tag3">鍥炲鏃堕棿锛歿{item.cqCreateTime}}</text>
+ <!-- <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:elif="{{i1 == 4}}">
+ <view wx:for="{{page}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoCase">
+ <view class="fyui-box fyui-box__text">
+ <view class="fyui-box__hd">
+ <text class="fyui-box__content des subtitle">{{item.ecTitle}}</text>
+ </view>
+ <view class="fyui-box__bd">
+ <view class="case-bd">
+ <rich-text class="tag2 des" nodes="{{item.ecSummary}}"></rich-text>
+ <image wx:if="{{item.ecAppendixUrl.length > 0}}" src="{{item.ecAppendixUrl[0]}}" mode="aspectFill"></image>
+ </view>
+ </view>
+ <view class="fyui-box__ft">
+ <text class="tag3">妗堝彂鍦板潃锛歿{item.ecProvinceName + item.ecCityName}}</text>
+ <text class="tag3">妗堝彂鏃堕棿锛歿{item.ecOccurDate}}</text>
+ </view>
+ <view class="fyui-box__ft_2">
+ <view style="white-space: nowrap;">娑夊強锛�</view>
+ <view class="case-tag-group">
+ <view class="case-tag" wx:if="{{item.ecIsPunish}}">
+ <image src="/res/icons/cq_punish.png"></image>
+ <text>琛屾斂澶勭綒</text>
+ </view>
+ <view class="case-tag" wx:if="{{item.ecIsDetained}}">
+ <image src="/res/icons/cq_detained.png"></image>
+ <text>琛屾斂鎷樼暀</text>
+ </view>
+ <view class="case-tag" wx:if="{{item.ecIsIllegal}}">
+ <image src="/res/icons/cq_illegal.png"></image>
+ <text>鍒戜簨璐d换</text>
+ </view>
+ <view class="case-tag" wx:if="{{item.ecIsShotspot}}">
+ <image src="/res/icons/cq_shotspot.png"></image>
+ <text>鐜繚鐑偣</text>
+ </view>
+ <view class="case-tag" wx:if="{{item.ecIsSupervise}}">
+ <image src="/res/icons/cq_supervise.png"></image>
+ <text>鐫e療瑕佺偣</text>
+ </view>
+ <view class="case-tag" wx:if="{{item.ecIsMinor}}">
+ <image src="/res/icons/cq_minor.png"></image>
+ <text>杞诲井杩濇硶</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ </block>
</block>
<view wx:else class="page__ft">
diff --git a/pages/module_consult/consulthome/consulthome.wxss b/pages/module_consult/consulthome/consulthome.wxss
index 3b16beb..4c191da 100644
--- a/pages/module_consult/consulthome/consulthome.wxss
+++ b/pages/module_consult/consulthome/consulthome.wxss
@@ -77,7 +77,7 @@
.des {
display: -webkit-box;
-webkit-box-orient: vertical;
- -webkit-line-clamp: 4;
+ -webkit-line-clamp: 3;
width: 100%;
overflow: hidden;
/* text-overflow: ellipsis; */
@@ -88,11 +88,61 @@
font-size: 14px;
}
+.fyui-box .answer {
+ display: flex;
+ flex-direction: row;
+ /* justify-content: space-between; */
+ /* background-color: red; */
+}
+
.subtitle{
font-size: 15px;
}
.tag2{
+ line-height: 18px;
font-size: 12px;
color: var(--fyui-text-color_3);
+}
+
+.fyui-box__text .fyui-box__ft {
+ font-size: 12px;
+}
+
+.case-bd{
+ display: flex;
+}
+
+.case-bd>image{
+ width: 60%;
+ height: 54px;
+ border-radius: 4px;
+ margin-left: 4px;
+}
+
+.fyui-box__ft_2 {
+ display: flex;
+ font-size: 12px;
+ color: var(--fyui-text-color_3);
+ margin-top: 16px;
+}
+
+.case-tag-group {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.case-tag {
+ display: flex;
+ align-items: center;
+}
+.case-tag>image {
+ width: 14px;
+ height: 14px;
+}
+
+.case-tag>text {
+ white-space: nowrap;
+ margin-left: 4px;
+ margin-right: 4px;
}
\ No newline at end of file
diff --git a/pages/module_consult/consultonline/consultonline.wxml b/pages/module_consult/consultonline/consultonline.wxml
index 67249ed..1a27ec0 100644
--- a/pages/module_consult/consultonline/consultonline.wxml
+++ b/pages/module_consult/consultonline/consultonline.wxml
@@ -1,7 +1,7 @@
<!--pages/module_consult/consultonline/consultonline.wxml-->
<view class="consult-record">
<block wx:for="{{record}}">
- <view wx:if="{{userId == item.userId}}" class="consult-record_item_user">
+ <view wx:if="{{userId == item.userId}}" wx:key="index" class="consult-record_item_user">
<view class="consult-text_user">{{item.text}}</view>
</view>
<view wx:else class="consult-record_item">
diff --git a/pages/module_consult/consultproblem/consultproblem.js b/pages/module_consult/consultproblem/consultproblem.js
index e4967b2..9b6950e 100644
--- a/pages/module_consult/consultproblem/consultproblem.js
+++ b/pages/module_consult/consultproblem/consultproblem.js
@@ -1,111 +1,228 @@
// pages/module_consult/consultproblem/consultproblem.js
+const consultservice = require("../../../service/consultservice")
+const util = require("../../../utils/util")
+const app = getApp()
+
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- problemTypes: ['鍗卞簾杞Щ','浼佷笟鎺掓薄','鎺掓薄绾崇','璁惧缁存姢','璁惧瀹夎','搴熸皵娌荤悊','鍥哄簾杞Щ','鏇村 >'],
- selectedIndex: 0,
-
- problems: [
- [
- {
- q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
- a: [{
- text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
- author: 'NickName',
- time: '2022-05-03'
- },{
- text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
- author: 'NickName',
- time: '2022-05-03'
- }],
- viewed: 120,
- like: 123,
- favorite: 50
- },
- {
- q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
- a: [{
- text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
- author: 'NickName',
- time: '2022-05-03'
- }],
- viewed: 120,
- like: 123,
- favorite: 50
- },
- {
- q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
- a: [{
- text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
- author: 'NickName',
- time: '2022-05-03'
- }],
- viewed: 120,
- like: 123,
- favorite: 50
- },
- {
- q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
- a: [{
- text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
- author: 'NickName',
- time: '2022-05-03'
- }],
- viewed: 120,
- like: 123,
- favorite: 50
- },
- ],
- [
- {
- q: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬶紵',
- a: [{
- text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
- author: 'NickName',
- time: '2022-05-03'
- },{
- text: '浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅浼佷笟鍗卞簾杞Щ鑱斿崟杩囨湡鐨勮ˉ鍔炴祦绋嬪涓嬩紒涓氬嵄搴熻浆绉昏仈鍗曡繃鏈熺殑琛ュ姙娴佺▼濡備笅',
- author: 'NickName',
- time: '2022-05-03'
- }],
- viewed: 120,
- like: 123,
- favorite: 50
- },
- ],
+ loading: false,
+ menus: [
+ { name: '澶ф皵', value: 1 },
+ { name: '姘�', value: 2 },
+ { name: '娴锋磱', value: 3 },
+ { name: '鍦熷¥', value: 4 },
+ { name: '鍣0', value: 5 },
+ { name: '鍏�', value: 6 },
+ { name: '杈愬皠', value: 7 },
+ { name: '鏍�', value: 8 },
+ { name: '鍥轰綋搴熺墿', value: 9 },
+ { name: '鍖栧鍝�', value: 10 },
+ { name: '鍙拌处', value: 21 },
+ { name: '鎵ф硶', value: 31 },
+ { name: '鐫e療', value: 41 },
+ { name: '鐩戞祴', value: 51 },
+ { name: '鏈嶅姟', value: 61 },
+ { name: '鍏朵粬', value: 99 }
],
- problemIndex: 0,
+ items: [
+ [
+ { name: 'PM', value: 1 },
+ { name: 'NOX', value: 2 },
+ { name: 'O3', value: 3 },
+ { name: 'VOCs', value: 4 },
+ { name: '宸ヤ笟搴熸皵', value: 5 },
+ { name: '鏈哄姩杞﹀熬姘�', value: 6 },
+ { name: '鎵皹', value: 7 },
+ { name: '椁愰ギ娌圭儫', value: 8 },
+ { name: '鎭惰嚟', value: 9 },
+ { name: '鍏朵粬', value: 99 },
+ ],
+ [
+ { name: '鍦拌〃姘�', value: 1 },
+ { name: '鍦颁笅姘�', value: 2 },
+ { name: '楗敤姘�', value: 3 },
+ { name: '宸ヤ笟搴熸按', value: 4 },
+ { name: '鐢熸椿姹℃按', value: 5 },
+ { name: '鍟嗕笟姹℃按', value: 6 },
+ { name: '鍏朵粬', value: 99 },
+ ],
+ [
+ { name: '鐭虫补鍙婂叾浜у搧', value: 1 },
+ { name: '閲嶉噾灞炲拰閰哥⒈', value: 2 },
+ { name: '鍐滆嵂', value: 3 },
+ { name: '鏈夋満鐗╄川鍜岃惀鍏荤洂绫�', value: 4 },
+ { name: '鏀惧皠鎬ф牳绱�', value: 5 },
+ { name: '鍥轰綋搴熺墿', value: 6 },
+ { name: '搴熺儹', value: 7 },
+ { name: '鍏朵粬', value: 99 },
+ ],
+ [
+ { name: '鍐滅敯鑰曞湴', value: 1 },
+ { name: '宸ヤ笟浼佷笟鐢ㄥ湴', value: 2 },
+ { name: '鐭虫补寮�閲囩敤鍦�', value: 3 },
+ { name: '鐭垮北寮�閲囩敤鍦�', value: 4 },
+ { name: '鍏朵粬', value: 99 },
+ ],
+ [
+ { name: '宸ヤ笟鐢熶骇鍣0', value: 1 },
+ { name: '浜ら�氳繍杈撳櫔澹�', value: 2 },
+ { name: '寤虹瓚鏂藉伐鍣0', value: 3 },
+ { name: '绀句細鐢熸椿鍣0', value: 4 },
+ { name: '鍏朵粬', value: 99 },
+ ],
+ [
+ { name: '鐧戒寒姹℃煋', value: 1 },
+ { name: '浜哄伐鐧芥樇姹℃煋', value: 2 },
+ { name: '褰╁厜姹℃煋', value: 3 },
+ { name: '鍏朵粬', value: 99 },
+ ],
+ [
+ { name: '鐢电杈愬皠', value: 1 },
+ { name: '鏀惧皠鎬ц緪灏�', value: 2 },
+ { name: '鍏朵粬', value: 99 },
+ ],
+ [],
+ [],
+ [],
+ [],
+ [],
+ [],
+ [],
+ [],
+ ],
+ selected: [{
+ name: '鍏ㄩ儴',
+ value: null
+ },{
+ name: '鍏ㄩ儴',
+ value: null
+ }],
+
+ questions: []
},
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad(options) {
-
+ this.getQuestionsByType(1)
+ this.getEnElementTypes()
+ this.getEnElementSubTypes()
},
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
- onReady() {
-
+ getQuestionsByType(page = 1) {
+ this.setData({loading: true})
+ setTimeout(() => {
+ this.setData({loading: false})
+ }, 100000);
+ var that = this
+ consultservice.getQuestionsByType(
+ app.globalData.accessToken.userId,
+ this.data.selected[0].value, this.data.selected[1].value,
+ page, 10, {
+ onPage(head) {
+ that.cPage = head.page
+ that.tPage = head.totalPage
+ that.setData({
+ totalCount: head.totalCount
+ })
+ },
+ success(res) {
+ res.forEach(r => {
+ r.cqCreateTime = util.formatTime(r.cqCreateTime)
+ r.answer = r.answer.replaceAll('\\n', '<br/>')
+ });
+ let questions = that.data.questions
+ if (page == 1) {
+ questions = []
+ }
+ questions = questions.concat(res)
+ that.setData({questions})
+ },
+ complete(e) {
+ that.setData({loading: false})
+ }
+ })
},
- selectProblemType(e) {
- const selectedIndex = e.currentTarget.dataset.index
- this.setData({selectedIndex})
- this.getProblems()
+ getEnElementTypes() {
+ var that = this
+ consultservice.getEnElementTypes(app.globalData.accessToken.userId, {
+ success(res) {
+ const menus = [{
+ name: '鍏ㄩ儴',
+ value: null,
+ }]
+ res.forEach(r => {
+ menus.push({
+ name: r.first,
+ value: r.second,
+ })
+ });
+ that.setData({menus})
+ }
+ })
},
- getProblems() {
- let index = this.data.selectedIndex
- let length = this.data.problems.length
+ getEnElementSubTypes() {
+ var that = this
+ consultservice.getEnElementSubTypes(app.globalData.accessToken.userId, {
+ success(res) {
+ const items = [
+ [{
+ name: '鍏ㄩ儴',
+ value: null,
+ }]
+ ]
+ res.forEach(r => {
+ const l = []
+ r.forEach(s => {
+ l.push({
+ name: s.first,
+ value: s.second,
+ })
+ });
+ items.push(l)
+ });
+ that.setData({items})
+ }
+ })
+ },
- let problemIndex = index % length
- this.setData({problemIndex})
- console.log(problemIndex);
- }
+ openChooseType() {
+ this.setData({
+ showMenu: true
+ })
+ },
+
+ chooseMenu(e) {
+ console.log('chooseMenu');
+ console.log(e);
+ const i = e.detail
+ const menu = this.data.menus[i[0]]
+ const item = this.data.items[i[0]][i[1]]
+ this.setData({
+ selected: [menu, item]
+ })
+ this.getQuestionsByType()
+ },
+
+ // 鍘诲線闂瓟璇︽儏
+ gotoQA(e) {
+ const index = e.currentTarget.dataset.index
+ var qId = this.data.questions[index].cqGuid
+ wx.navigateTo({
+ url: '/pages/module_consult/consultdetailqa/consultdetailqa',
+ success: (res) => {
+ // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', {
+ qId: qId
+ })
+ },
+ })
+ },
})
\ No newline at end of file
diff --git a/pages/module_consult/consultproblem/consultproblem.json b/pages/module_consult/consultproblem/consultproblem.json
index f7a9e67..280d969 100644
--- a/pages/module_consult/consultproblem/consultproblem.json
+++ b/pages/module_consult/consultproblem/consultproblem.json
@@ -2,5 +2,8 @@
"navigationBarTitleText": "甯歌闂",
"navigationBarBackgroundColor": "#57E4CB",
"navigationBarTextStyle": "white",
- "usingComponents": {}
+ "usingComponents": {
+ "mp-loading": "/component/loading/loading",
+ "mp-sidebar": "/component/sidebar/sidebar"
+ }
}
\ No newline at end of file
diff --git a/pages/module_consult/consultproblem/consultproblem.wxml b/pages/module_consult/consultproblem/consultproblem.wxml
index 10b04c5..95589bf 100644
--- a/pages/module_consult/consultproblem/consultproblem.wxml
+++ b/pages/module_consult/consultproblem/consultproblem.wxml
@@ -1,32 +1,38 @@
<!--pages/module_consult/consultproblem/consultproblem.wxml-->
-<!--pages/module_consult/consulthome/consulthome.wxml-->
+<import src="/template/nodata.wxml"></import>
+
<view class="page">
<view class="page__hd">
- <view class="switch-tab {{selectedIndex == index ? 'switch-tab_selected' : ''}}" wx:for="{{problemTypes}}" wx:index="index" data-index="{{index}}" bindtap="selectProblemType">{{item}}</view>
+ <text style="color: #57E4CB;">{{selected[0].name}} > {{selected[1].name}}</text>
+ <view class="filter" bindtap="openChooseType">
+ <image src="/res/icons/filter.png" class="image-16"></image>
+ 绛涢��
+ </view>
</view>
<view class="page__bd">
- <block wx:for="{{problems[problemIndex]}}" wx:key="index">
- <view class="fyui-box fyui-box__text">
- <view class="fyui-box__hd">
- Q. {{item.q}}
- </view>
- <view class="fyui-box__bd">
- <view class="fyui-box__content">{{item.a.length > 0 ? item.a[0].text : ''}}</view>
- </view>
- <view class="fyui-box__ft">
- <view class="fyui-box__tag">
- <view class="flex-h">
- <image src="/res/icons/view.png" class="icon"></image>{{item.viewed}}
- </view>
- <view class="flex-h">
- <image src="/res/icons/like.png" class="icon"></image><view>{{item.like}}</view>
- </view>
+ <block wx:if="{{!loading}}">
+ <block wx:if="{{questions.length > 0}}">
+ <block wx:for="{{questions}}" wx:key="index">
+ <view class="fyui-box fyui-box__text" bindtap="gotoQA" data-index="{{index}}">
+ <view class="fyui-box__hd">
+ <text class="fyui-box__content des subtitle">{{item.cqContent}}</text>
</view>
- </view>
- </view>
+ <view class="fyui-box__bd answer">
+ <view>绛旓細</view>
+ <rich-text class="des" nodes="{{item.answer}}"></rich-text>
+ </view>
+ <view class="fyui-box__ft">
+ <text class="tag3">鎻愰棶鏃堕棿锛歿{item.cqCreateTime}}</text>
+ <text class="tag3">鍥炲鏃堕棿锛歿{item.cqCreateTime}}</text>
+ </view>
+ </view>
+ <view wx:if="{{index == questions.length - 1}}" class="next-answer">鈥斺�斿埌搴曚簡鈥斺��</view>
+ </block>
+ </block>
+ <template wx:else is="nodataPage"></template>
</block>
-
+ <mp-loading duration="{{900}}" type="dot-gray" show="{{loading}}" animated="{{true}}"></mp-loading>
</view>
- <view class="page__ft">
- </view>
+
+ <mp-sidebar show="{{showMenu}}" menus="{{menus}}" items="{{items}}" bindsubmit="chooseMenu"></mp-sidebar>
</view>
\ No newline at end of file
diff --git a/pages/module_consult/consultproblem/consultproblem.wxss b/pages/module_consult/consultproblem/consultproblem.wxss
index c3ca5d5..2abf1f5 100644
--- a/pages/module_consult/consultproblem/consultproblem.wxss
+++ b/pages/module_consult/consultproblem/consultproblem.wxss
@@ -3,7 +3,10 @@
display: flex;
flex-wrap: wrap;
justify-content: space-between;
+ background-color: white;
+ padding: 16px;
}
+
.switch-tab {
border-radius: 8px;
color: var(--fyui-text-color_1);
@@ -33,4 +36,41 @@
.fyui-box__tag .flex-h{
margin-right: 16px;
+}
+
+.fyui-box .answer {
+ display: flex;
+ flex-direction: row;
+ line-height: 18px;
+ font-size: 12px;
+ color: var(--fyui-text-color_3);
+}
+
+.des {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+ width: 100%;
+ overflow: hidden;
+ /* text-overflow: ellipsis; */
+}
+
+.subtitle{
+ font-size: 15px;
+}
+
+.next-answer {
+ text-align: center;
+ font-size: 12px;
+ color: var(--fyui-text-color_3);
+ padding: 8px;
+}
+
+.filter {
+ display: flex;
+ align-items: center;
+}
+
+.filter:active {
+ background-color: var(--fyui-BG-COLOR-ACTIVE);
}
\ No newline at end of file
diff --git a/pages/module_consult/consultresult/consultresult.js b/pages/module_consult/consultresult/consultresult.js
index 6a65873..98f4f94 100644
--- a/pages/module_consult/consultresult/consultresult.js
+++ b/pages/module_consult/consultresult/consultresult.js
@@ -46,7 +46,7 @@
let thisTypeId = ''
let thisIndex = -1
res.forEach(r => {
- r.des = r.des.replace('\\n', '<br/>')
+ r.des = r.des.replaceAll('\\n', '<br/>')
if (thisTypeId === '' || thisTypeId != r.typeId) {
thisTypeId = r.typeId
thisIndex++
diff --git a/pages/module_consult/consultresultmore/consultresultmore.js b/pages/module_consult/consultresultmore/consultresultmore.js
index bd1699b..1224c19 100644
--- a/pages/module_consult/consultresultmore/consultresultmore.js
+++ b/pages/module_consult/consultresultmore/consultresultmore.js
@@ -58,7 +58,7 @@
success (res) {
let result = that.data.result
res.forEach(r => {
- r.des = r.des.replace('\\n', '<br/>')
+ r.des = r.des.replaceAll('\\n', '<br/>')
if (result.length === 0) {
result.push({
typeId: r.typeId,
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.js b/pages/module_ledger/ledgerhistory/ledgerhistory.js
index 361aaa1..bee1bb9 100644
--- a/pages/module_ledger/ledgerhistory/ledgerhistory.js
+++ b/pages/module_ledger/ledgerhistory/ledgerhistory.js
@@ -51,7 +51,11 @@
}],
selectedMonIndex: 0,
- recordList: []
+ recordList: [],
+
+ previewImageUrls:[],
+ previewCurrent: 0,
+ showPreview: false,
},
/**
@@ -200,4 +204,21 @@
},
})
},
+
+ previewImage(e) {
+ var i = e.currentTarget.dataset.index.split(',')
+ var indexGroup = [parseInt(i[0]), parseInt(i[1])]
+ var ledger = this.data.recordList[indexGroup[0]].ledgers[indexGroup[1]]
+
+ const ledgerTitle = ledger.ledgerName
+ const ledgerRemark = ledger.remark1
+ const previewImageUrls = ledger.path1;
+ this.setData({
+ previewImageUrls,
+ ledgerRemark,
+ ledgerTitle,
+ previewCurrent: 0,
+ showPreview: true
+ });
+ },
})
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.json b/pages/module_ledger/ledgerhistory/ledgerhistory.json
index b1c9f5d..2f2cabf 100644
--- a/pages/module_ledger/ledgerhistory/ledgerhistory.json
+++ b/pages/module_ledger/ledgerhistory/ledgerhistory.json
@@ -2,6 +2,7 @@
"navigationBarTitleText": "鍘嗗彶鍙拌处",
"navigationBarBackgroundColor": "#57E4CB",
"usingComponents": {
- "mp-icon": "/component/icon/icon"
+ "mp-icon": "/component/icon/icon",
+ "my-gallery": "/component/mygallery/mygallery"
}
}
\ No newline at end of file
diff --git a/pages/module_ledger/ledgerhistory/ledgerhistory.wxml b/pages/module_ledger/ledgerhistory/ledgerhistory.wxml
index 765d54d..e8372a7 100644
--- a/pages/module_ledger/ledgerhistory/ledgerhistory.wxml
+++ b/pages/module_ledger/ledgerhistory/ledgerhistory.wxml
@@ -23,7 +23,7 @@
<view class="ledger-type_2">({{item.ledgers.length}} / {{item.total}})</view>
</view>
<view class="ledger-group">
- <view wx:for="{{item.ledgers}}" wx:for-item="ledger" wx:for-index="i2" wx:key="i2" class="ledger-group_item" bindtap="gotoLedgerDetail" data-index="{{i1}},{{i2}}">
+ <view wx:for="{{item.ledgers}}" wx:for-item="ledger" wx:for-index="i2" wx:key="i2" class="ledger-group_item" bindtap="previewImage" data-index="{{i1}},{{i2}}">
<image class="" src="{{ledger.path1[0]}}" mode="aspectFill"></image>
<view>{{ledger.ledgerName}}</view>
</view>
@@ -32,4 +32,5 @@
</block>
<template wx:else is="nodataPage"></template>
</view>
-</view>
\ No newline at end of file
+</view>
+<my-gallery hide-on-click="{{true}}" show-delete="{{false}}" show="{{showPreview}}" img-urls="{{previewImageUrls}}" current="{{previewCurrent}}" title="{{ledgerTitle}}" remark="{{ledgerRemark}}"></my-gallery>
\ No newline at end of file
diff --git a/pages/test2/test2.js b/pages/test2/test2.js
new file mode 100644
index 0000000..db9fc64
--- /dev/null
+++ b/pages/test2/test2.js
@@ -0,0 +1,53 @@
+// pages/test2/test2.js
+Page({
+
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ imgFiles: [
+ '/res/icons/ass_1.png',
+ '/res/icons/ass_2.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ '/res/icons/ass_3.png',
+ ],
+ ledgerRemark: '鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞鍙拌处澶囨敞',
+ previewImageUrls:[],
+ previewCurrent: 0,
+ showPreview: false,
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+ */
+ onReady() {
+
+ },
+
+ 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/test2/test2.json b/pages/test2/test2.json
new file mode 100644
index 0000000..bdc600f
--- /dev/null
+++ b/pages/test2/test2.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "my-gallery": "/component/mygallery/mygallery"
+ }
+}
\ No newline at end of file
diff --git a/pages/test2/test2.wxml b/pages/test2/test2.wxml
new file mode 100644
index 0000000..6768f55
--- /dev/null
+++ b/pages/test2/test2.wxml
@@ -0,0 +1,7 @@
+<!--pages/test2/test2.wxml-->
+<view class="img-group">
+ <view wx:for="{{imgFiles}}" wx:key="index">
+ <image class="img-group_img" src="{{item}}" mode="aspectFill" bindtap="previewImage" data-index="{{index}}"></image>
+ </view>
+</view>
+<my-gallery class="gallery" hide-on-click="{{true}}" show-delete="{{false}}" show="{{showPreview}}" img-urls="{{previewImageUrls}}" current="{{previewCurrent}}" remark="{{ledgerRemark}}"></my-gallery>
\ No newline at end of file
diff --git a/pages/test2/test2.wxss b/pages/test2/test2.wxss
new file mode 100644
index 0000000..553dfca
--- /dev/null
+++ b/pages/test2/test2.wxss
@@ -0,0 +1,16 @@
+/* pages/test2/test2.wxss */
+.img-group {
+ display: flex;
+ flex-wrap: wrap;
+ background-color: black;
+}
+
+.img-group>view {
+ width: 30vw;
+ text-align: center;
+}
+
+.img-group .img-group_img {
+ width: 29vw;
+ height: 29vw;
+}
\ No newline at end of file
diff --git a/res/icons/bg_star.png b/res/icons/bg_star.png
new file mode 100644
index 0000000..9a5c821
--- /dev/null
+++ b/res/icons/bg_star.png
Binary files differ
diff --git a/res/icons/case_forfeit.png b/res/icons/case_forfeit.png
new file mode 100644
index 0000000..f7f349e
--- /dev/null
+++ b/res/icons/case_forfeit.png
Binary files differ
diff --git a/res/icons/cq_detained.png b/res/icons/cq_detained.png
new file mode 100644
index 0000000..1705848
--- /dev/null
+++ b/res/icons/cq_detained.png
Binary files differ
diff --git a/res/icons/cq_illegal.png b/res/icons/cq_illegal.png
new file mode 100644
index 0000000..7a614dd
--- /dev/null
+++ b/res/icons/cq_illegal.png
Binary files differ
diff --git a/res/icons/cq_minor.png b/res/icons/cq_minor.png
new file mode 100644
index 0000000..0e28a92
--- /dev/null
+++ b/res/icons/cq_minor.png
Binary files differ
diff --git a/res/icons/cq_punish.png b/res/icons/cq_punish.png
new file mode 100644
index 0000000..4282942
--- /dev/null
+++ b/res/icons/cq_punish.png
Binary files differ
diff --git a/res/icons/cq_shotspot.png b/res/icons/cq_shotspot.png
new file mode 100644
index 0000000..28be2fd
--- /dev/null
+++ b/res/icons/cq_shotspot.png
Binary files differ
diff --git a/res/icons/cq_supervise.png b/res/icons/cq_supervise.png
new file mode 100644
index 0000000..0fe680b
--- /dev/null
+++ b/res/icons/cq_supervise.png
Binary files differ
diff --git a/res/icons/favourite.png b/res/icons/favourite.png
new file mode 100644
index 0000000..b101022
--- /dev/null
+++ b/res/icons/favourite.png
Binary files differ
diff --git a/res/icons/favourite1.png b/res/icons/favourite1.png
new file mode 100644
index 0000000..5ac490d
--- /dev/null
+++ b/res/icons/favourite1.png
Binary files differ
diff --git a/res/icons/filter.png b/res/icons/filter.png
new file mode 100644
index 0000000..a6f1a4f
--- /dev/null
+++ b/res/icons/filter.png
Binary files differ
diff --git a/res/icons/like.png b/res/icons/like.png
index 30a0b7d..7b4f107 100644
--- a/res/icons/like.png
+++ b/res/icons/like.png
Binary files differ
diff --git a/res/icons/like1.png b/res/icons/like1.png
new file mode 100644
index 0000000..4810a99
--- /dev/null
+++ b/res/icons/like1.png
Binary files differ
diff --git a/res/icons/link_1.png b/res/icons/link_1.png
new file mode 100644
index 0000000..ed4c1a4
--- /dev/null
+++ b/res/icons/link_1.png
Binary files differ
diff --git a/res/icons/link_2.png b/res/icons/link_2.png
new file mode 100644
index 0000000..9084b70
--- /dev/null
+++ b/res/icons/link_2.png
Binary files differ
diff --git a/res/icons/link_3.png b/res/icons/link_3.png
new file mode 100644
index 0000000..445f5c8
--- /dev/null
+++ b/res/icons/link_3.png
Binary files differ
diff --git a/res/icons/link_4.png b/res/icons/link_4.png
new file mode 100644
index 0000000..db0261c
--- /dev/null
+++ b/res/icons/link_4.png
Binary files differ
diff --git a/res/icons/locate.png b/res/icons/locate.png
new file mode 100644
index 0000000..9958ecf
--- /dev/null
+++ b/res/icons/locate.png
Binary files differ
diff --git a/res/icons/time.png b/res/icons/time.png
new file mode 100644
index 0000000..b8133fa
--- /dev/null
+++ b/res/icons/time.png
Binary files differ
diff --git a/service/baserequest.js b/service/baserequest.js
index 0eec8ca..464bfb6 100644
--- a/service/baserequest.js
+++ b/service/baserequest.js
@@ -11,7 +11,7 @@
const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
// const baseUrl = "http://127.0.0.1:8080"
-// const baseUrl = "http://192.168.0.106:8080"
+// const baseUrl = "http://192.168.1.106:8080"
const baseUrl = "https://fyami.com.cn:447"
// const basePicUrl = baseUrl + "/images/"
const basePicUrl = "https://fyami.com.cn:447/images/"
diff --git a/service/consultservice.js b/service/consultservice.js
index 7f59674..2be7708 100644
--- a/service/consultservice.js
+++ b/service/consultservice.js
@@ -57,6 +57,43 @@
$f.get(cb)
},
+ //鑾峰彇鐑棬闂瓟
+ getTopicQA: function (userId, fun) {
+ let cb = {
+ url: `/consultation/topic/qa`,
+ params: {
+ userId: userId,
+ },
+ }
+ Object.assign(cb, fun)
+ $f.get(cb)
+ },
+
+ //鑾峰彇鐑棬妗堜緥
+ getTopicCase: function (userId, fun) {
+ let cb = {
+ url: `/consultation/topic/case`,
+ params: {
+ userId: userId,
+ },
+ }
+ Object.assign(cb, fun)
+
+ let fun1 = util.deepCopy(cb)
+ fun1.success = function (res) {
+ res.forEach(r => {
+ if (r.ecAppendixUrl && r.ecAppendixUrl != '' && r.ecAppendixUrl != null) {
+ r.ecAppendixUrl = r.ecAppendixUrl.split(';').map((value, index) => {
+ return $f.basePicUrl + value
+ })
+ }
+ });
+ cb.success(res)
+ }
+
+ $f.get(fun1)
+ },
+
//鑾峰彇娉曞緥娉曡鏂囦欢
getMgtFile: function (userId, fileId, fun) {
let cb = {
@@ -96,4 +133,120 @@
$f.get(cb)
},
+
+ //鏍规嵁绫诲瀷鑾峰彇闂
+ getQuestionsByType: function (userId, kind, subKind, page, perPage, fun) {
+ let cb = {
+ url: `/consultation/question/type`,
+ params: {
+ userId: userId,
+ page: page,
+ perPage: perPage
+ },
+ }
+ if (kind != null) {
+ cb.params.kind = kind
+ }
+ if (subKind != null) {
+ cb.params.subKind = subKind
+ }
+ Object.assign(cb, fun)
+
+ let fun1 = util.deepCopy(cb)
+ fun1.success = function (res) {
+ if (cb.onPage) {
+ cb.onPage(res.head)
+ }
+ if (res.success) {
+ cb.success(res.data)
+ } else {
+ if (cb.fail) {
+ cb.fail(res.message)
+ }
+ }
+ }
+
+ $f.get(fun1)
+ },
+
+ //鑾峰彇闂
+ getQuestion: function (userId, qId, fun) {
+ let cb = {
+ url: `/consultation/law/question`,
+ params: {
+ userId: userId,
+ qId: qId,
+ },
+ }
+ Object.assign(cb, fun)
+ $f.get(cb)
+ },
+
+ //鑾峰彇绛旀
+ getAnswers: function (userId, qId, fun) {
+ let cb = {
+ url: `/consultation/law/answer`,
+ params: {
+ userId: userId,
+ qId: qId,
+ },
+ }
+ Object.assign(cb, fun)
+ $f.get(cb)
+ },
+
+ //鑾峰彇妗堜緥
+ getCase: function (userId, caseId, fun) {
+ let cb = {
+ url: `/consultation/law/case`,
+ params: {
+ userId: userId,
+ caseId: caseId,
+ },
+ }
+ Object.assign(cb, fun)
+
+ let fun1 = util.deepCopy(cb)
+ fun1.success = function (res) {
+ if (res.ecAppendixUrl && res.ecAppendixUrl != '' && res.ecAppendixUrl != null) {
+ let urls = []
+ let texts = []
+ res.ecAppendixUrl.split(';').forEach(r => {
+ urls.push($f.basePicUrl + r)
+ const i1 = r.lastIndexOf('/') + 1
+ const i2 = r.lastIndexOf('.')
+ texts.push(r.slice(i1, i2))
+ });
+ res.ecAppendixUrl = urls
+ res.ecAppendixText = texts
+ }
+ cb.success(res)
+ }
+
+ $f.get(fun1)
+ },
+
+ //鑾峰彇鐜繚瑕佺礌澶х被
+ getEnElementTypes: function (userId, fun) {
+ let cb = {
+ url: `/consultation/elementtype`,
+ params: {
+ userId: userId,
+ },
+ }
+ Object.assign(cb, fun)
+ $f.get(cb)
+ },
+
+ //鑾峰彇鐜繚瑕佺礌灏忕被
+ getEnElementSubTypes: function (userId, fun) {
+ let cb = {
+ url: `/consultation/elementsubtype`,
+ params: {
+ userId: userId,
+ },
+ }
+ Object.assign(cb, fun)
+ $f.get(cb)
+ },
}
\ No newline at end of file
diff --git a/utils/util.js b/utils/util.js
index d59968c..3aa9e77 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -15,14 +15,14 @@
const thisDay = now.date()
if (timeYear < thisYear) {
- return time.format('YYYY骞碝M鏈�')
+ return time.format('YYYY-MM-DD')
} else if (timeMonth < thisMonth) {
- return time.format('MM鏈圖D鏃�')
+ return time.format('MM-DD')
} else if (timeDay < thisDay) {
if (timeDay + 1 == thisDay) {
return '鏄ㄥぉ'
} else {
- return time.format('MM鏈圖D鏃�')
+ return time.format('MM-DD')
}
} else {
return time.fromNow()
--
Gitblit v1.9.3