| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | --fyui-BG-COLOR-ACTIVE: #ececec5d; |
| | | } |
| | | |
| | | view { |
| | | /* font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; */ |
| | | } |
| | | |
| | | /********************************** éç¨-start ***********************************/ |
| | | .statusbar-title { |
| | | text-align: center; |
| | |
| | | font-size: 14px; |
| | | color: var(--fyui-primary-color); |
| | | padding: 2px 4px 2px 18px; |
| | | } |
| | | |
| | | .image-16 { |
| | | width: 16px; |
| | | height: 16px; |
| | | } |
| | | |
| | | /********************************** éç¨-end ***********************************/ |
| | |
| | | |
| | | .fyui-box:before{ |
| | | content: " "; |
| | | width: 100%; |
| | | width: 90%; |
| | | height: 1px; |
| | | background-color: var(--fyui-BG_1); |
| | | top: -2px; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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: { |
| | | // é®ç½©å±class |
| | | 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'); |
| | | } |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | /***/ }) |
| | | /******/ ]); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "mp-icon": "../icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | .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; |
| | | } |
| | |
| | | .weui-gallery{display:none}.weui-gallery_show.weui-gallery{display:flex} |
| | | .weui-gallery { |
| | | display: none |
| | | } |
| | | |
| | | .weui-gallery_show.weui-gallery { |
| | | display: flex |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 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: [], //缩æ¾åxè½´ç§»å¨èå´ |
| | | yLimit: [], //缩æ¾åyè½´ç§»å¨èå´ |
| | | translateX: 0, // ä½ç§»xåæ åä½px |
| | | translateY: 0, // ä½ç§»yåæ åä½px |
| | | distance: undefined, // åææ¥è§¦ç¹è·ç¦» |
| | | scale: 1, // 缩æ¾åæ° |
| | | endScale: 1, |
| | | rotate: 0, // æè½¬è§åº¦ |
| | | oldRotate: 0, // ä¸ä¸æ¬¡æè½¬åæ¢åçè§åº¦ |
| | | startMove: { // èµ·å§ä½ç§»è·ç¦» |
| | | x: 0, |
| | | y: 0, |
| | | }, |
| | | startTouches: [] // èµ·å§ç¹touchæ°ç» |
| | | }, |
| | | |
| | | 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}) |
| | | }, |
| | | |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "mp-icon": "../icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* 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; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // component/sidebar/sidebar.js |
| | | Component({ |
| | | options: { |
| | | multipleSlots: true, |
| | | // å¨ç»ä»¶å®ä¹æ¶çé项ä¸å¯ç¨å¤slotæ¯æ |
| | | addGlobalClass: true |
| | | }, |
| | | properties: { |
| | | maskClass: { |
| | | // é®ç½©å±class |
| | | 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 |
| | | }); |
| | | } |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "mp-icon": "../icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | .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); |
| | | } |
| | |
| | | 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) { |
| | | // 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' |
| | | }); |
| | | } |
| | | } else { |
| | | that.setData({ |
| | | pageheight: rect.height + 'px' |
| | | }); |
| | | } |
| | | }).exec(); |
| | | }, |
| | | swichNav: function (e) { |
| | |
| | | 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, |
| | |
| | | </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> |
| | | |
| | |
| | | font-size: 12px; |
| | | color: var(--fyui-text-color_2); |
| | | } |
| | | |
| | | .title:active { |
| | | background-color: var(--fyui-BG-COLOR-ACTIVE); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 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: 'æ¶ååäºè´£ä»»'}) |
| | | if (res.ecIsSupervise) caseTag.push({icon: '/res/icons/cq_supervise.png', name: 'æ¶åç¯ä¿ç£å¯è¦ç¹'}) |
| | | 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 |
| | | }); |
| | | }, |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "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" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* 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; |
| | | } |
| | |
| | | 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, |
| | |
| | | }, 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 |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 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: 'æ¶ååäºè´£ä»»'}) |
| | | if (res.cqIsSupervise) questionTag.push({icon: '/res/icons/cq_supervise.png', name: 'æ¶åç¯ä¿ç£å¯è¦ç¹'}) |
| | | 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() |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "navigationBarTitleText": "ç¯ä¿é®ç", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| | | "mp-loading": "/component/loading/loading", |
| | | "mp-actionSheet": "/component/actionsheet/actionsheet", |
| | | "mp-icon": "/component/icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* 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; |
| | | } |
| | |
| | | name: 'æ¡ç®', |
| | | tag: 0 |
| | | }, { |
| | | name: 'é®ç', |
| | | tag: 0 |
| | | }, { |
| | | name: 'æ¡ä¾', |
| | | tag: 0 |
| | | }], |
| | |
| | | [], |
| | | [], |
| | | [], |
| | | ] |
| | | [], |
| | | ], |
| | | |
| | | //æ¡ä¾ææ¶åçè¦ç¹ |
| | | caseTag: [] |
| | | }, |
| | | |
| | | /** |
| | |
| | | */ |
| | | onLoad: function (options) { |
| | | this.getHotTopic() |
| | | this.getTopicItem() |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | }, |
| | | |
| | | // æç´¢ |
| | | gotoSearch() { |
| | | wx.navigateTo({ |
| | | url: "/pages/module_consult/consultsearch/consultsearch" |
| | | }) |
| | | }, |
| | | |
| | | // åè½æé® |
| | | goto(e) { |
| | | var url = "" |
| | | var index = e.currentTarget.dataset.index |
| | |
| | | */ |
| | | 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, |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | 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] |
| | |
| | | }) |
| | | }, |
| | | |
| | | // å»å¾æ¡ç®è¯¦æ
|
| | | gotoItem(e) { |
| | | const iList = e.currentTarget.dataset.index.split(',') |
| | | const i1 = iList[0] |
| | |
| | | }) |
| | | }, |
| | | |
| | | 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å¹´MMæDDæ¥") |
| | | return moment(t).format("YYYY.MM.DD") |
| | | } else { |
| | | return undefined |
| | | } |
| | |
| | | </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"> |
| | |
| | | </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>åäºè´£ä»»</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>ç£å¯è¦ç¹</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"> |
| | |
| | | .des { |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 4; |
| | | -webkit-line-clamp: 3; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | /* text-overflow: ellipsis; */ |
| | |
| | | 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; |
| | | } |
| | |
| | | <!--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"> |
| | |
| | | // pages/module_consult/consultproblem/consultproblem.js |
| | | const consultservice = require("../../../service/consultservice") |
| | | const util = require("../../../utils/util") |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | problemTypes: ['å±åºè½¬ç§»','ä¼ä¸ææ±¡','ææ±¡çº³ç®¡','设å¤ç»´æ¤','设å¤å®è£
','åºæ°æ²»ç','åºåºè½¬ç§»','æ´å¤ >'], |
| | | selectedIndex: 0, |
| | | loading: false, |
| | | menus: [ |
| | | { name: '大æ°', value: 1 }, |
| | | { name: 'æ°´', value: 2 }, |
| | | { name: 'æµ·æ´', value: 3 }, |
| | | { name: 'å壤', value: 4 }, |
| | | { name: 'åªå£°', value: 5 }, |
| | | { name: 'å
', value: 6 }, |
| | | { name: 'è¾å°', value: 7 }, |
| | | { name: 'æ ¸', value: 8 }, |
| | | { name: 'åºä½åºç©', value: 9 }, |
| | | { name: 'åå¦å', value: 10 }, |
| | | { name: 'å°è´¦', value: 21 }, |
| | | { name: 'æ§æ³', value: 31 }, |
| | | { name: 'ç£å¯', value: 41 }, |
| | | { name: 'çæµ', value: 51 }, |
| | | { name: 'æå¡', value: 61 }, |
| | | { name: 'å
¶ä»', value: 99 } |
| | | ], |
| | | 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: 'å·¥ä¸ç产åªå£°', value: 1 }, |
| | | { name: '交éè¿è¾åªå£°', value: 2 }, |
| | | { name: 'å»ºçæ½å·¥åªå£°', value: 3 }, |
| | | { name: '社ä¼çæ´»åªå£°', 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 |
| | | }], |
| | | |
| | | 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 |
| | | }, |
| | | ], |
| | | ], |
| | | problemIndex: 0, |
| | | 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 |
| | | }) |
| | | }, |
| | | |
| | | selectProblemType(e) { |
| | | const selectedIndex = e.currentTarget.dataset.index |
| | | this.setData({selectedIndex}) |
| | | this.getProblems() |
| | | }, |
| | | |
| | | getProblems() { |
| | | let index = this.data.selectedIndex |
| | | let length = this.data.problems.length |
| | | |
| | | let problemIndex = index % length |
| | | this.setData({problemIndex}) |
| | | console.log(problemIndex); |
| | | 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}) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | 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}) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | 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}) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | 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 |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | }) |
| | |
| | | "navigationBarTitleText": "常è§é®é¢", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "mp-loading": "/component/loading/loading", |
| | | "mp-sidebar": "/component/sidebar/sidebar" |
| | | } |
| | | } |
| | |
| | | <!--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"> |
| | | <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"> |
| | | Q. {{item.q}} |
| | | <text class="fyui-box__content des subtitle">{{item.cqContent}}</text> |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content">{{item.a.length > 0 ? item.a[0].text : ''}}</view> |
| | | <view class="fyui-box__bd answer"> |
| | | <view>çï¼</view> |
| | | <rich-text class="des" nodes="{{item.answer}}"></rich-text> |
| | | </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> |
| | | <text class="tag3">æé®æ¶é´ï¼{{item.cqCreateTime}}</text> |
| | | <text class="tag3">å夿¶é´ï¼{{item.cqCreateTime}}</text> |
| | | </view> |
| | | </view> |
| | | </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> |
| | | <view class="page__ft"> |
| | | </view> |
| | | <mp-sidebar show="{{showMenu}}" menus="{{menus}}" items="{{items}}" bindsubmit="chooseMenu"></mp-sidebar> |
| | | </view> |
| | |
| | | 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); |
| | |
| | | .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); |
| | | } |
| | |
| | | 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++ |
| | |
| | | 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, |
| | |
| | | }], |
| | | selectedMonIndex: 0, |
| | | |
| | | recordList: [] |
| | | recordList: [], |
| | | |
| | | previewImageUrls:[], |
| | | previewCurrent: 0, |
| | | showPreview: false, |
| | | }, |
| | | |
| | | /** |
| | |
| | | }, |
| | | }) |
| | | }, |
| | | |
| | | 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 |
| | | }); |
| | | }, |
| | | }) |
| | |
| | | "navigationBarTitleText": "åå²å°è´¦", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon" |
| | | "mp-icon": "/component/icon/icon", |
| | | "my-gallery": "/component/mygallery/mygallery" |
| | | } |
| | | } |
| | |
| | | <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> |
| | |
| | | <template wx:else is="nodataPage"></template> |
| | | </view> |
| | | </view> |
| | | <my-gallery hide-on-click="{{true}}" show-delete="{{false}}" show="{{showPreview}}" img-urls="{{previewImageUrls}}" current="{{previewCurrent}}" title="{{ledgerTitle}}" remark="{{ledgerRemark}}"></my-gallery> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 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 |
| | | }); |
| | | }, |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "usingComponents": { |
| | | "my-gallery": "/component/mygallery/mygallery" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* 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; |
| | | } |
| | |
| | | |
| | | 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/" |
| | |
| | | $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 = { |
| | |
| | | |
| | | $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) |
| | | }, |
| | | } |
| | |
| | | const thisDay = now.date() |
| | | |
| | | if (timeYear < thisYear) { |
| | | return time.format('YYYYå¹´MMæ') |
| | | return time.format('YYYY-MM-DD') |
| | | } else if (timeMonth < thisMonth) { |
| | | return time.format('MMæDDæ¥') |
| | | return time.format('MM-DD') |
| | | } else if (timeDay < thisDay) { |
| | | if (timeDay + 1 == thisDay) { |
| | | return 'æ¨å¤©' |
| | | } else { |
| | | return time.format('MMæDDæ¥') |
| | | return time.format('MM-DD') |
| | | } |
| | | } else { |
| | | return time.fromNow() |