2022.9.13
1. 智能咨询模块抽象出查询结果组件以及查询函数,调试完成;
2. 在线守法学习抽象出对应的查询结果组件及查询函数,调试完成;
3. 新增环保日程功能模块,完成初步页面UI及逻辑;
已修改41个文件
已添加37个文件
已重命名1个文件
| | |
| | | console.log('onLaunch'); |
| | | }, |
| | | globalData: { |
| | | perPage: 5, |
| | | userInfo: null, |
| | | accessToken: null, |
| | | isLogin: false |
| | |
| | | "entryPagePath": "pages/m_user/userlogin/userlogin", |
| | | "pages": [ |
| | | "pages/home/home", |
| | | |
| | | "pages/m_assessment/assessment/assessment", |
| | | "pages/m_assessment/grade/grade", |
| | | "pages/m_assessment/gradedetail/gradedetail", |
| | | "pages/m_assessment/gradereport/gradereport", |
| | | |
| | | "pages/m_common/pagevideo/pagevideo", |
| | | |
| | | "pages/m_consult/consulthome/consulthome", |
| | | "pages/m_consult/consultsearch/consultsearch", |
| | | "pages/m_consult/consultresult/consultresult", |
| | |
| | | "pages/m_consult/consultdetailitem/consultdetailitem", |
| | | "pages/m_consult/consultdetailqa/consultdetailqa", |
| | | "pages/m_consult/consultdetailcase/consultdetailcase", |
| | | |
| | | "pages/m_learn/learn/learn", |
| | | "pages/m_learn/learfile/learnfile", |
| | | "pages/m_learn/learncase/learncase", |
| | | |
| | | "pages/m_ledger/ledgerhome/ledgerhome", |
| | | "pages/m_ledger/ledgerupload/ledgerupload", |
| | | "pages/m_ledger/ledgerhistory/ledgerhistory", |
| | | |
| | | "pages/m_notice/notice/notice", |
| | | |
| | | "pages/m_promise/promiseinfo/promiseinfo", |
| | | "pages/m_promise/promisehome/promise", |
| | | "pages/m_promise/promisefile/promisefile", |
| | | "pages/m_promise/promiseresult/promiseresult", |
| | | "pages/m_promise/promisesign/promisesign", |
| | | |
| | | "pages/m_service/p_servicehome/servicehome", |
| | | |
| | | "pages/m_user/userloginpw/userloginpw", |
| | | "pages/m_user/userregistertype/userregistertype", |
| | | "pages/m_user/userregistergov/userregistergov", |
| | | "pages/m_user/userregistercompany/userregistercompany", |
| | | "pages/m_user/mine/mine", |
| | | "pages/m_user/userlogin/userlogin", |
| | | |
| | | "pages/icons/icons", |
| | | "pages/text/text", |
| | | "pages/test/test", |
| | | "pages/test2/test2" |
| | | "pages/test2/test2", |
| | | "pages/m_service/p_schedule/p_schedule", |
| | | "pages/m_service/p_scheduledetail/p_scheduledetail" |
| | | ], |
| | | "window": { |
| | | "backgroundTextStyle": "light", |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | height: 100vh; |
| | | height: 50vh; |
| | | } |
| | | |
| | | .no-data image { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | //å表页é¢åºç±»ï¼å®ä¹ä¸æå·æ°ä¸ä¸æ»å è½½å¨ä½ |
| | | const ListPage = function (options) { |
| | | return Page( |
| | | Object.assign({}, options, { |
| | | onPullDownRefresh() { |
| | | this.setData({ |
| | | pullDown: true |
| | | }) |
| | | }, |
| | | onReachBottom() { |
| | | this.setData({ |
| | | reachBottom: true |
| | | }) |
| | | } |
| | | }) |
| | | ) |
| | | } |
| | | |
| | | export default ListPage |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * æ°æ®å è½½çå¬ |
| | | */ |
| | | module.exports = Behavior({ |
| | | data: { |
| | | cPage: 1, |
| | | tPage: 1, |
| | | totalCount: 0, |
| | | loading: false, |
| | | needLoadMore: false |
| | | }, |
| | | observers: { |
| | | 'loading': function (loading) { |
| | | if (loading) { |
| | | this._loadStart() |
| | | this._loading() |
| | | } else { |
| | | this._loadComplete() |
| | | } |
| | | }, |
| | | 'cPage, tPage': function (cPage, tPage) { |
| | | this.setData({ |
| | | needLoadMore: cPage < tPage |
| | | }) |
| | | }, |
| | | 'reachBottom': function(reachBottom) { |
| | | if (reachBottom) { |
| | | this._onReachBottom() |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | _onReachBottom() { |
| | | console.log('_onReachBottom'); |
| | | let {cPage, tPage, loading} = this.data |
| | | if (!loading && cPage < tPage) { |
| | | if (typeof this.loadmore === 'function') { |
| | | this.loadmore(cPage) |
| | | } |
| | | } |
| | | }, |
| | | // å è½½å¼å§éç¥ |
| | | _loadStart() { |
| | | this.triggerEvent('loadStart') |
| | | if (typeof this.loadStart === 'function') { |
| | | this.loadStart() |
| | | } |
| | | }, |
| | | // å è½½ä¸éç¥ |
| | | _loading() { |
| | | this.triggerEvent('loading') |
| | | if (typeof this.loading === 'function') { |
| | | this.loading() |
| | | } |
| | | }, |
| | | // å è½½å®æéç¥ |
| | | _loadComplete() { |
| | | this.triggerEvent('loadComplete') |
| | | if (typeof this.loadComplete === 'function') { |
| | | this.loadComplete() |
| | | } |
| | | } |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // component/loadingstatus/loadingstatus.js |
| | | Component({ |
| | | options: { |
| | | addGlobalClass: true |
| | | }, |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | loading: { |
| | | type: Boolean, |
| | | value: false |
| | | }, |
| | | needLoadMore: { |
| | | type: Boolean, |
| | | value: false |
| | | }, |
| | | nodata: { |
| | | type: Boolean, |
| | | value: false |
| | | }, |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "mp-loading": "/component/loading/loading" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--component/loadingstatus/loadingstatus.wxml--> |
| | | <import src="/template/nodata.wxml"></import> |
| | | |
| | | <template wx:if="{{!loading && nodata}}" is="nodataPage"></template> |
| | | <block wx:else=""> |
| | | <view wx:if="{{!loading}}" class="load-more"> |
| | | <text wx:if="{{needLoadMore}}">䏿»å è½½</text> |
| | | <text wx:else="">ââå°åºäºââ</text> |
| | | </view> |
| | | <view wx:else class="load-more"> |
| | | <mp-loading duration="{{900}}" type="dot-gray" show="{{true}}" animated="{{true}}"></mp-loading> |
| | | </view> |
| | | </block> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* component/loadingstatus/loadingstatus.wxss */ |
| | | .load-more { |
| | | text-align: center; |
| | | font-size: 12px; |
| | | color: var(--fyui-text-color_3); |
| | | padding: 8px; |
| | | } |
| | |
| | | type: Array, |
| | | value: [] |
| | | }, |
| | | pageList: { |
| | | type: Array, |
| | | value: [] |
| | | //éç¥ç»ä»¶å·æ°é«åº¦ |
| | | refresh: { |
| | | type: Boolean, |
| | | value: false, |
| | | observer: 'refreshHeight' |
| | | }, |
| | | }, |
| | | |
| | |
| | | // pageheight: '600px', |
| | | }, |
| | | |
| | | observers: { |
| | | 'pageList': function() { |
| | | this.tabsHeight('.page0'); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | refreshHeight: function(e) { |
| | | // console.log(`refreshHeight: ${e}`); |
| | | if (e) { |
| | | setTimeout(() => { |
| | | const p = `.page${this.data.currentTab}` |
| | | this.tabsHeight(p); |
| | | }, 50); |
| | | } |
| | | }, |
| | | //计ç®swiperé«åº¦æ¹æ³ï¼å¨åæ¢çæ¶åè°ç¨ï¼ |
| | | tabsHeight(element) { |
| | | let that = this; |
| | | let query = this.createSelectorQuery(); //å¿
é¡»è¦å
å建ä¸ä¸ªæ¥è¯¢ |
| | | query.select(element).boundingClientRect(function (rect) { |
| | | // if (that.data.pageheight) { |
| | | // let pageheight = that.data.pageheight.split('px')[0] |
| | | // pageheight = parseInt(pageheight) |
| | | // if (rect.height > pageheight) { |
| | | // that.setData({ |
| | | // pageheight: rect.height + 'px' |
| | | // }); |
| | | // } |
| | | // } else { |
| | | // that.setData({ |
| | | // pageheight: rect.height + 'px' |
| | | // }); |
| | | // } |
| | | that.setData({ |
| | | pageheight: rect.height + 'px' |
| | | }); |
| | |
| | | } else { |
| | | that.setData({ |
| | | currentTab: e.target.dataset.current, |
| | | navScrollLeft: e.target.dataset.current >= 3 ? ((e.target.dataset.current) * 60) : 0 //夿å½åéä¸çä¸ªæ°æ¯å¦æ¯ç¬¬5个 |
| | | }) |
| | | // that.tabsHeight('.page' + e.target.dataset.current); //æ¥è¯¢åªä¸ä¸ªå
ç´ |
| | | } |
| | | }, |
| | | bindChange: function (e) { |
| | | var that = this; |
| | | that.setData({ |
| | | currentTab: e.detail.current, |
| | | navScrollLeft: e.detail.current >= 3 ? ((e.detail.current) * 60) : 0 //夿å½åéä¸çä¸ªæ°æ¯å¦æ¯ç¬¬5个 |
| | | }); |
| | | that.tabsHeight('.page' + e.detail.current); //æ¥è¯¢åªä¸ä¸ªå
ç´ |
| | | this.triggerEvent('tabchange', this.data.currentTab) |
| | | }, |
| | | } |
| | | }) |
| | |
| | | <!--component/switchtab/switchtab.wxml--> |
| | | <view class="swiper-tab"> |
| | | <scroll-view class="swiper-tab_view" scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true"> |
| | | <scroll-view class="swiper-tab_view" scroll-into-view="item{{currentTab}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true"> |
| | | <block wx:for="{{tabList}}" wx:key="i"> |
| | | <view class="swiper-tab-list {{currentTab==index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav"> |
| | | <view id="item{{index}}" class="swiper-tab-list {{currentTab==index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav"> |
| | | {{item.name}} |
| | | <text wx:if="{{item.tag > 0}}" class="swiper-tab-list__tag">{{item.tag}}</text> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <swiper current="{{currentTab}}" class="swiper-box" duration="300" bindchange="bindChange" style="height: {{pageheight}};"> |
| | | <block wx:for="{{pageList}}" wx:for-item="item" wx:key="index" wx:for-index="index"> |
| | | <block wx:for="{{tabList}}" wx:key="index"> |
| | | <swiper-item> |
| | | <view class="page{{index}}"> |
| | | <slot name="slot{{index}}"></slot> |
| | |
| | | width: 100%; |
| | | /* height: 70px; */ |
| | | margin-top: 1px; |
| | | background-color: white; |
| | | /* background-color: white; */ |
| | | } |
| | |
| | | "navigationBarBackgroundColor": "#EAFFF1", |
| | | "enablePullDownRefresh":true, |
| | | "usingComponents": { |
| | | "cp-notice": "/component/notice/notice" |
| | | "cp-notice": "/component/notice/notice", |
| | | "c-schedule": "../m_service/c_schedule/c_schedule" |
| | | } |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="flex-h"> |
| | | <view class="flex-h" style="margin-top: 4px;"> |
| | | <view class="flex-h_block"> |
| | | <view class="top-card" bindtap="goto" data-index="0"> |
| | | <view> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <c-schedule></c-schedule> |
| | | |
| | | <view class="fyui-panel"> |
| | | <view class="fyui-cell fyui-cell_select title"> |
| | | <view class="fyui-cell__hd"> |
| | |
| | | font-size: 18px; |
| | | color: var(--fyui-text-color_1); |
| | | /* font-weight: 600; */ |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .flex-h_block{ |
| | |
| | | <view class="page__ft"> |
| | | <view class="title">ç¸å
³è§é¢</view> |
| | | <view wx:for="{{resources}}" wx:key="index" wx:item="item"> |
| | | <view class="fyui-box fyui-panel" bindtap="gotoResource" data-index="{{index}}"> |
| | | <view class="fyui-box" bindtap="gotoResource" data-index="{{index}}"> |
| | | <view class="fyui-box__hd"> |
| | | <image src="{{item.lrPicurl}}" class="" mode="aspectFill"/> |
| | | </view> |
| | |
| | | font-weight: 600; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .fyui-box__content { |
| | | text-align: start; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * æºè½å¨è¯¢æ¥è¯¢ç»æå表ç»ä»¶ |
| | | */ |
| | | |
| | | Component({ |
| | | options: { |
| | | addGlobalClass: true, |
| | | }, |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | //æ¥è¯¢ç»æ |
| | | results: { |
| | | type: Array, |
| | | value: [] |
| | | }, |
| | | loading: { |
| | | type: Boolean, |
| | | value: false |
| | | }, |
| | | needLoadMore: { |
| | | type: Boolean, |
| | | value: false |
| | | }, |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | /** |
| | | * 跳转æ³è§æä»¶ãæ¡ç®ãæ¡ä¾ãé®çç详æ
çé¢ |
| | | */ |
| | | gotoDetail(e) { |
| | | const {index, type} = e.currentTarget.dataset |
| | | const id = this.data.results[index].id |
| | | let url = '' |
| | | switch (type) { |
| | | case 1: |
| | | url = '/pages/m_consult/consultdetail/consultdetail' |
| | | break; |
| | | case 2: |
| | | url = '/pages/m_consult/consultdetailitem/consultdetailitem' |
| | | break; |
| | | case 3: |
| | | url = '/pages/m_consult/consultdetailcase/consultdetailcase' |
| | | break; |
| | | case 4: |
| | | url = '/pages/m_consult/consultdetailqa/consultdetailqa' |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if (url != '') { |
| | | wx.navigateTo({ |
| | | url: url, |
| | | success: (res) => { |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | id: id |
| | | }) |
| | | }, |
| | | }) |
| | | } else { |
| | | console.log('b_search: gotoDetail, url为空'); |
| | | } |
| | | }, |
| | | |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "mp-loadingstatus": "/component/loadingstatus/loadingstatus" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <import src="/template/nodata.wxml"></import> |
| | | |
| | | <view> |
| | | <block wx:if="{{results.length > 0}}"> |
| | | <view wx:for="{{results}}" wx:key="index" data-index="{{index}}" data-type="{{item.typeId}}" bindtap="gotoDetail"> |
| | | <block wx:if="{{item.typeId == 1}}"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | {{item.name}} |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content tag"> |
| | | <view>æä»¶ç±»å«ï¼{{item.fileType}}</view> |
| | | <view>çææ¶é´ï¼{{item.effectiveDate}}</view> |
| | | <view wx:if="{{item.referenceNumber}}">æå·ï¼{{item.referenceNumber}}</view> |
| | | <view>ç¸å
³è¡ä¸ -> {{item.fileIndustry}}</view> |
| | | </view> |
| | | <view class="fyui-box__content des">{{item.des}}</view> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <text class="keyword">å
³é®è¯ï¼</text> |
| | | <view class="keyword-item"> |
| | | <text wx:for="{{item.keywords}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | |
| | | <block wx:elif="{{item.typeId == 2}}"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | <rich-text nodes="{{item.des}}" class="fyui-box__content des subtitle"></rich-text> |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <!-- <view class="fyui-box__content tag">ç¸å
³è¡ä¸ -> {{item.fileIndustry}}</view> --> |
| | | <text class="tag2">æå±ç« èï¼{{item.chapterName}} {{item.name ? ' ' + item.name : ''}}</text> |
| | | <text class="tag2">æå±æä»¶ï¼ã{{item.fileName}}ã</text> |
| | | <text class="tag2" wx:if="{{item.referenceNumber}}">æå±æå·ï¼{{item.referenceNumber}}</text> |
| | | </view> |
| | | <view class="fyui-box__ft_2"> |
| | | <text class="tag3 {{item.effective? '' : 'tag3_disable'}}">{{item.effective ? 'çæä¸':'已失æ' }}</text> |
| | | <text class="tag3 {{item.relatedItems? '' : 'tag3_disable'}}">{{item.relatedItems ? 'å
³èæ¡ç®' + item.relatedItems + '个 >':'æ å
³èæ¡ç®' }}</text> |
| | | <text class="tag3 {{item.relatedCases? '' : 'tag3_disable'}}">{{item.relatedCases ? 'å
³èæ¡ä¾' + item.relatedCases + '个 >':'æ å
³èæ¡ä¾' }}</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | |
| | | <block wx:elif="{{item.typeId == 3}}"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | <text class="fyui-box__content des subtitle">{{item.name}}</text> |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="case-bd"> |
| | | <rich-text class="tag2 des" nodes="{{item.des}}"></rich-text> |
| | | <image wx:if="{{item.imgUrl}}" src="{{item.imgUrl}}" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <text>æ¡åå°åï¼{{item.provinceName + item.cityName}}</text> |
| | | <text>æ¡åæ¶é´ï¼{{item.occurDate}}</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.punish}}"> |
| | | <image src="/res/icons/cq_punish.png"></image> |
| | | <text>è¡æ¿å¤ç½</text> |
| | | </view> |
| | | <view class="case-tag" wx:if="{{item.detained}}"> |
| | | <image src="/res/icons/cq_detained.png"></image> |
| | | <text>è¡æ¿æç</text> |
| | | </view> |
| | | <view class="case-tag" wx:if="{{item.illegal}}"> |
| | | <image src="/res/icons/cq_illegal.png"></image> |
| | | <text>åäºè´£ä»»</text> |
| | | </view> |
| | | <view class="case-tag" wx:if="{{item.shotSpot}}"> |
| | | <image src="/res/icons/cq_shotspot.png"></image> |
| | | <text>ç¯ä¿çç¹</text> |
| | | </view> |
| | | <view class="case-tag" wx:if="{{item.supervise}}"> |
| | | <image src="/res/icons/cq_supervise.png"></image> |
| | | <text>ç£å¯è¦ç¹</text> |
| | | </view> |
| | | <view class="case-tag" wx:if="{{item.minor}}"> |
| | | <image src="/res/icons/cq_minor.png"></image> |
| | | <text>è½»å¾®è¿æ³</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | |
| | | <block wx:elif="{{item.typeId == 4}}"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | <text class="fyui-box__content des subtitle">{{item.name}}</text> |
| | | </view> |
| | | <view class="fyui-box__bd answer"> |
| | | <view class="tag2">çï¼</view> |
| | | <rich-text class="tag2 des" nodes="{{item.des}}"></rich-text> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <text>æé®æ¶é´ï¼{{item.time}}</text> |
| | | <text>å夿¶é´ï¼{{item.time}}</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | </block> |
| | | <mp-loadingstatus loading="{{loading}}" needLoadMore="{{needLoadMore}}" nodata="{{results.length == 0}}"></mp-loadingstatus> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* --fyui-box */ |
| | | .keyword { |
| | | white-space: nowrap; |
| | | } |
| | | .keyword-item { |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .keyword-item>text { |
| | | white-space: nowrap; |
| | | margin-right: 8px; |
| | | padding: 0px 6px; |
| | | color: #2c7064; |
| | | } |
| | | |
| | | .des { |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 3; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | /* text-overflow: ellipsis; */ |
| | | } |
| | | |
| | | .fyui-box__text .fyui-box__bd .tag { |
| | | margin-bottom: 8px; |
| | | 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; |
| | | } |
| | | |
| | | .tag3{ |
| | | font-size: 10px; |
| | | background-color: var(--fyui-primary-color); |
| | | color: white; |
| | | border-radius: 2px; |
| | | padding: 2px 4px; |
| | | white-space: nowrap; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .tag3_disable{ |
| | | background-color: var(--fyui-text-color_3); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const consultservice = require("../../../service/consultservice") |
| | | const app = getApp() |
| | | |
| | | /** |
| | | * è·åç¯ä¿è¦ç´ åç±» |
| | | */ |
| | | module.exports = Behavior({ |
| | | data: { |
| | | 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 }, |
| | | ], |
| | | [], |
| | | [], |
| | | [], |
| | | [], |
| | | [], |
| | | [], |
| | | [], |
| | | [], |
| | | ], |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è¦ç´ 大类 |
| | | */ |
| | | 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}) |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | lifetimes: { |
| | | attached: function() { |
| | | this.getEnElementTypes() |
| | | this.getEnElementSubTypes() |
| | | } |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const b_loadingStatus = require("../../../base/behaviors/b_loadingStatus") |
| | | const consultservice = require("../../../service/consultservice") |
| | | const util = require("../../../utils/util") |
| | | const app = getApp() |
| | | |
| | | /** |
| | | * éè¿åç±»è·åé®é¢ |
| | | */ |
| | | module.exports = Behavior({ |
| | | behaviors: [b_loadingStatus], |
| | | data: { |
| | | //æç´¢ç»æ |
| | | questions: [], |
| | | }, |
| | | methods: { |
| | | loadmore(cPage) { |
| | | this.getQuestionsByType(++cPage, this.selectedValues) |
| | | }, |
| | | /** |
| | | * æ ¹æ®è¦ç´ ç±»åè·å对åºçé®é¢ |
| | | * @see "./b_element-types.js" |
| | | * @param page å页 |
| | | * @param selectedValues [i, j]ï¼éä¸çåç±»ç¼å·iååç±»ç¼å·jï¼iãj为null表示å
¨é¨ |
| | | */ |
| | | getQuestionsByType(page = 1, selectedValues) { |
| | | this.selectedValues = selectedValues |
| | | this.setData({loading: true}) |
| | | const t = setTimeout(() => { |
| | | this.setData({loading: false}) |
| | | }, 10000); |
| | | var that = this |
| | | consultservice.getQuestionsByType(app.globalData.accessToken.userId, selectedValues[0], selectedValues[1], page, app.globalData.perPage, { |
| | | onPage(head) { |
| | | that.setData({ |
| | | cPage: head.page, |
| | | tPage: head.totalPage, |
| | | totalCount: head.totalCount |
| | | }) |
| | | }, |
| | | success(res) { |
| | | res.forEach(r => { |
| | | r.time = util.formatTime(r.time) |
| | | r.des = r.des.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}) |
| | | clearTimeout(t) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const b_loadingStatus = require("../../../base/behaviors/b_loadingStatus") |
| | | const consultservice = require("../../../service/consultservice") |
| | | const app = getApp() |
| | | |
| | | /** |
| | | * æºè½å¨çº¿å¨è¯¢çæç´¢é»è¾ |
| | | */ |
| | | module.exports = Behavior({ |
| | | behaviors: [b_loadingStatus], |
| | | data: { |
| | | //æç´¢ç»æ |
| | | results: [] |
| | | }, |
| | | methods: { |
| | | loadmore(cPage) { |
| | | this.search(this.obj, ++cPage) |
| | | }, |
| | | /** |
| | | * æ ¹æ®å
³é®ååæ¥è¯¢ç±»åæç´¢ |
| | | * @param keyword å
³é®åï¼è¥å
³é®å为空ç½ï¼åæç
§çé¨çé»è¾æç´¢ |
| | | * @param type æ¥è¯¢ç±»åï¼å
æ¬[1ï¼æ³è§æä»¶ï¼2ï¼æ³è§æ¡ç®ï¼3ï¼æ§æ³æ¡ä¾ï¼4ï¼ç¯ä¿é®é¢]ï¼ä¸å¡«åæ¶è¡¨ç¤ºæ¥è¯¢ææç±»åçå5æ¡ |
| | | */ |
| | | search(obj, cPage = 1) { |
| | | this.obj = obj |
| | | this.setData({loading: true}) |
| | | const t = setTimeout(() => { this.setData({loading: false}) }, 10000); |
| | | var that = this |
| | | const {keyword, type} = obj |
| | | consultservice.searchLaw(app.globalData.accessToken.userId, keyword, cPage, app.globalData.perPage, { |
| | | onPage(head) { |
| | | that.setData({ |
| | | cPage: head.page, |
| | | tPage: head.totalPage, |
| | | }) |
| | | }, |
| | | success(res) { |
| | | let results = that.data.results |
| | | //å½å页为第ä¸é¡µæ¶ï¼ä»£è¡¨æ°æ®å
¨é¨å·æ°ï¼å å»ä¸ä¸æ¬¡è·åçè®°å½ï¼å¦å为è·åæ´å¤æ°æ®ï¼ä¿çå䏿¬¡è·åçè®°å½ |
| | | if (that.data.cPage == 1) results = [] |
| | | results = results.concat(res) |
| | | that.setData({ |
| | | results |
| | | }) |
| | | }, |
| | | complete() { |
| | | that.setData({loading: false}) |
| | | clearTimeout(t) |
| | | } |
| | | }, type) |
| | | }, |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const b_search = require("../behaviors/b_search") |
| | | |
| | | /** |
| | | * æºè½å¨è¯¢æ¥è¯¢ç»æå表ç»ä»¶ |
| | | */ |
| | | |
| | | Component({ |
| | | behaviors: [b_search], |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | keyobj: { |
| | | type: Object, |
| | | value: { |
| | | keyword: '', |
| | | type: undefined |
| | | }, |
| | | }, |
| | | reachBottom: { |
| | | type: Boolean, |
| | | value: false |
| | | } |
| | | }, |
| | | |
| | | observers: { |
| | | 'keyobj': function(keyobj) { |
| | | this.search(keyobj) |
| | | }, |
| | | // 'reachBottom': function(reachBottom) { |
| | | // if (reachBottom) { |
| | | // this._onReachBottom() |
| | | // } |
| | | // } |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | // _onReachBottom() { |
| | | // console.log('_onReachBottom'); |
| | | // let {cPage, tPage} = this.data |
| | | // console.log(this.data); |
| | | // if (cPage < tPage) { |
| | | // this.search(this.data.keyobj, ++cPage) |
| | | // } |
| | | // } |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "c-result-item": "../base_c/c_result-item/c_result-item" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <c-result-item results="{{results}}" loading="{{loading}}" needLoadMore="{{needLoadMore}}"></c-result-item> |
| | |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | fileId: 'Zi5EEhijAKugYeHe', |
| | | id: 'Zi5EEhijAKugYeHe', |
| | | content: {} |
| | | }, |
| | | |
| | |
| | | var that = this |
| | | this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) { |
| | | that.setData({ |
| | | fileId: data.fileId |
| | | id: data.id |
| | | }) |
| | | |
| | | that.getFile() |
| | |
| | | setTimeout(() => { |
| | | wx.hideLoading() |
| | | }, 20000); |
| | | consultservice.getMgtFile(app.globalData.accessToken.userId, this.data.fileId, { |
| | | consultservice.getMgtFile(app.globalData.accessToken.userId, this.data.id, { |
| | | success (res) { |
| | | res.mfReleaseDate = that.formateTime(res.mfReleaseDate) |
| | | res.mfEffectiveDate = that.formateTime(res.mfEffectiveDate) |
| | |
| | | var that = this |
| | | this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) { |
| | | that.setData({ |
| | | caseId: data.caseId |
| | | id: data.id |
| | | }) |
| | | that.getCase() |
| | | }) |
| | |
| | | showloading: true |
| | | }) |
| | | var that = this |
| | | consultservice.getCase(app.globalData.accessToken.userId, this.data.caseId, { |
| | | consultservice.getCase(app.globalData.accessToken.userId, this.data.id, { |
| | | success(res) { |
| | | let caseTag = [] |
| | | if (res.ecIsPunish) caseTag.push({icon: '/res/icons/cq_punish.png', name: 'æ¶åè¡æ¿å¤ç½'}) |
| | |
| | | var that = this |
| | | this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) { |
| | | that.setData({ |
| | | itemId: data.itemId |
| | | id: data.id |
| | | }) |
| | | |
| | | that.getItem() |
| | |
| | | setTimeout(() => { |
| | | wx.hideLoading() |
| | | }, 20000); |
| | | consultservice.getMgtItem(app.globalData.accessToken.userId, this.data.itemId, { |
| | | consultservice.getMgtItem(app.globalData.accessToken.userId, this.data.id, { |
| | | success (res) { |
| | | res.miItemContent = res.miItemContent.replaceAll('\\n', '<br/>') |
| | | that.setData({ |
| | |
| | | var that = this |
| | | this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) { |
| | | that.setData({ |
| | | qId: data.qId |
| | | id: data.id |
| | | }) |
| | | |
| | | that.getQuestion() |
| | |
| | | showloading: true |
| | | }) |
| | | var that = this |
| | | consultservice.getQuestion(app.globalData.accessToken.userId, this.data.qId, { |
| | | consultservice.getQuestion(app.globalData.accessToken.userId, this.data.id, { |
| | | success(res) { |
| | | let questionTag = [] |
| | | if (res.cqIsPunish) questionTag.push({icon: '/res/icons/cq_punish.png', name: 'æ¶åè¡æ¿å¤ç½'}) |
| | |
| | | showloading: true |
| | | }) |
| | | var that = this |
| | | consultservice.getAnswers(app.globalData.accessToken.userId, this.data.qId, { |
| | | consultservice.getAnswers(app.globalData.accessToken.userId, this.data.id, { |
| | | success(res) { |
| | | res.forEach(r => { |
| | | r.saContent = r.saContent.replaceAll('\\n', '<br/>') |
| | |
| | | // pages/m_consult/consulthome/consulthome.js |
| | | const consultservice = require("../../../service/consultservice") |
| | | const moment = require('../../../utils/moment.min') |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | | |
| | | // behaviors: [behavior], |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | searchTips: '请è¾å
¥å
³é®åæç´¢', |
| | | hotTopics: [], |
| | | |
| | | tabList: [{ |
| | | name: 'çé¨', |
| | | tag: 0 |
| | | }, { |
| | | name: 'æä»¶', |
| | | tag: 0 |
| | | }, { |
| | | name: 'æ¡ç®', |
| | | tag: 0 |
| | | }, { |
| | | name: 'é®ç', |
| | |
| | | }, { |
| | | name: 'æ¡ä¾', |
| | | tag: 0 |
| | | }], |
| | | |
| | | pageList: [ |
| | | [], |
| | | [], |
| | | [], |
| | | [], |
| | | [], |
| | | ], |
| | | |
| | | //æ¡ä¾ææ¶åçè¦ç¹ |
| | | caseTag: [] |
| | | }, { |
| | | name: 'æ¡ç®', |
| | | tag: 0 |
| | | }, { |
| | | name: 'æä»¶', |
| | | tag: 0 |
| | | }, ], |
| | | refresh: false, |
| | | // çé¨å
容æ¥è¯¢æ¡ä»¶ |
| | | keyAll: {keyword: '', type: undefined}, |
| | | key1: {keyword: '', type: 1}, |
| | | key2: {keyword: '', type: 2}, |
| | | key3: {keyword: '', type: 3}, |
| | | key4: {keyword: '', type: 4}, |
| | | reachBottom: [false, false, false, false, false], |
| | | tabIndex: 0 |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad: function (options) { |
| | | this.getHotTopic() |
| | | // this.getHotTopic() |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady: function () { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow: function () { |
| | | |
| | | onReachBottom() { |
| | | let reachBottom = [false, false, false, false, false] |
| | | reachBottom[this.data.tabIndex] = true |
| | | this.setData({reachBottom}) |
| | | }, |
| | | |
| | | // æç´¢ |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è·åçé¨æç´¢å
容 |
| | | */ |
| | | 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.formatTime(r.mfReleaseDate) |
| | | r.mfEffectiveDate = that.formatTime(r.mfEffectiveDate) |
| | | r.mfClosingDate = that.formatTime(r.mfClosingDate) |
| | | }); |
| | | that.setData({ |
| | | 'pageList[0]': res, |
| | | 'pageList[1]': res |
| | | loadingDone(e){ |
| | | this.setData({ |
| | | refresh: false |
| | | }) |
| | | this.setData({ |
| | | refresh: true |
| | | }) |
| | | }, |
| | | |
| | | onTabChange(e) { |
| | | console.log(e.detail); |
| | | this.setData({ |
| | | tabIndex: e.detail |
| | | }) |
| | | } |
| | | }) |
| | | // 2. ç鍿³å¾æ³è§æ¡ç® |
| | | consultservice.getTopicItem(app.globalData.accessToken.userId, { |
| | | success(res) { |
| | | res.forEach(r => { |
| | | 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] |
| | | const i2 = iList[1] |
| | | var fileId = this.data.pageList[i1][i2].mfGuid |
| | | wx.navigateTo({ |
| | | url: '/pages/m_consult/consultdetail/consultdetail', |
| | | success: (res) => { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | fileId: fileId |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | |
| | | // å»å¾æ¡ç®è¯¦æ
|
| | | gotoItem(e) { |
| | | const iList = e.currentTarget.dataset.index.split(',') |
| | | const i1 = iList[0] |
| | | const i2 = iList[1] |
| | | var itemId = this.data.pageList[i1][i2].miGuid |
| | | wx.navigateTo({ |
| | | url: '/pages/m_consult/consultdetailitem/consultdetailitem', |
| | | success: (res) => { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | itemId: itemId |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | |
| | | // å»å¾é®ç详æ
|
| | | 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/m_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/m_consult/consultdetailcase/consultdetailcase', |
| | | success: (res) => { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | caseId: caseId |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | |
| | | formatTime(t) { |
| | | if (t) { |
| | | return moment(t).format("YYYY.MM.DD") |
| | | } else { |
| | | return undefined |
| | | } |
| | | }, |
| | | }) |
| | |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon", |
| | | "switch-tab": "/component/switchtab/switchtab", |
| | | "mp-loading": "/component/loading/loading" |
| | | "mp-loading": "/component/loading/loading", |
| | | "c-result-item-search": "../c_result-item-search/c_result-item-search" |
| | | } |
| | | } |
| | |
| | | <mp-icon icon="search" size="15" color="black"></mp-icon> |
| | | <text>{{searchTips}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <view class="flex-h"> |
| | | <view class="card" bindtap="goto" data-index="0"> |
| | | <image src="/res/icons/con_pro_bg.png" class="card-bg" mode="scaleToFill" /> |
| | |
| | | <image src="/res/icons/con_qa.png" mode="aspectFit" class="icon"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <switch-tab tabList="{{tabList}}" pageList="{{pageList}}"> |
| | | <view slot="slot{{i1}}" wx:for="{{pageList}}" wx:for-item="page" wx:key="i1" wx:for-index="i1"> |
| | | <block wx:if="{{page.length > 0}}"> |
| | | |
| | | <block wx:if="{{i1 == 0 || i1 == 1}}"> |
| | | <view wx:for="{{page}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoFile"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | {{item.mfName}} |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content tag"> |
| | | <view>æä»¶ç±»å«ï¼{{item.mfFileType}}</view> |
| | | <view>çææ¶é´ï¼{{item.mfEffectiveDate}}</view> |
| | | <view>æå·ï¼{{item.mfReferenceNumber}}</view> |
| | | <view>ç¸å
³è¡ä¸ -> {{item.mfFileIndustry}}</view> |
| | | </view> |
| | | <view class="fyui-box__content des">{{item.mfSummary}}</view> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <text class="keyword">å
³é®è¯ï¼</text> |
| | | <view class="keyword-item"> |
| | | <text wx:for="{{item.mfKeywordLv1}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | |
| | | <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"> |
| | | <rich-text nodes="{{item.miItemContent}}" class="fyui-box__content des subtitle"></rich-text> |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <!-- <view class="fyui-box__content tag">ç¸å
³è¡ä¸ -> {{item.fileIndustry}}</view> --> |
| | | <text class="tag2">æå±ç« èï¼{{item.miChapterName}} {{item.miItemName ? ' ' + item.miItemName : ''}}</text> |
| | | <text class="tag2">æå±æä»¶ï¼ã{{item.mfName}}ã</text> |
| | | <text class="tag2" wx:if="{{item.miReferenceNumber}}">æå±æå·ï¼{{item.miReferenceNumber}}</text> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <!-- <text class="tag3 {{item.effective? '' : 'tag3_disable'}}">{{item.effective ? 'çæä¸':'已失æ' }}</text> |
| | | <text class="tag3 {{item.relatedItems? '' : 'tag3_disable'}}">{{item.relatedItems ? 'å
³èæ¡ç®' + item.relatedItems + '个 >':'æ å
³èæ¡ç®' }}</text> |
| | | <text class="tag3 {{item.relatedCases? '' : 'tag3_disable'}}">{{item.relatedCases ? 'å
³èæ¡ä¾' + item.relatedCases + '个 >':'æ å
³èæ¡ä¾' }}</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 == 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"> |
| | | <mp-loading duration="{{900}}" type="dot-gray" show="{{true}}" animated="{{true}}"></mp-loading> |
| | | </view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <switch-tab tabList="{{tabList}}" refresh="{{refresh}}" bindtabchange="onTabChange"> |
| | | <c-result-item-search slot="slot0" reachBottom="{{reachBottom[0]}}" keyobj="{{keyAll}}" data-index="0" bindloadComplete="loadingDone"></c-result-item-search> |
| | | <c-result-item-search slot="slot1" reachBottom="{{reachBottom[1]}}" keyobj="{{key4}}" data-index="1" bindloadComplete="loadingDone"></c-result-item-search> |
| | | <c-result-item-search slot="slot2" reachBottom="{{reachBottom[2]}}" keyobj="{{key3}}" data-index="2" bindloadComplete="loadingDone"></c-result-item-search> |
| | | <c-result-item-search slot="slot3" reachBottom="{{reachBottom[3]}}" keyobj="{{key2}}" data-index="3" bindloadComplete="loadingDone"></c-result-item-search> |
| | | <c-result-item-search slot="slot4" reachBottom="{{reachBottom[4]}}" keyobj="{{key1}}" data-index="4" bindloadComplete="loadingDone"></c-result-item-search> |
| | | </switch-tab> |
| | | |
| | | |
| | | <!-- <view class="fyui-cell fyui-cell_select"> |
| | | <view class="fyui-cell__bd">çé¨</view> |
| | | <view class="fyui-cell__ft">æ´å¤</view> |
| | | </view> --> |
| | | |
| | | </view> |
| | | <view class="page__ft"> |
| | | |
| | | </view> |
| | | <view class="page__ft"></view> |
| | | </view> |
| | |
| | | /* pages/m_consult/consulthome/consulthome.wxss */ |
| | | .page__bd { |
| | | padding: 10px; |
| | | /* padding: 10px; */ |
| | | } |
| | | |
| | | .search-bar { |
| | |
| | | text-align: left; |
| | | background-color: white; |
| | | border-radius: 10px; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .card { |
| | |
| | | .card .icon { |
| | | height: 56px; |
| | | width: 60px; |
| | | } |
| | | |
| | | |
| | | /* --fyui-box */ |
| | | .fyui-box__tag { |
| | | justify-content: space-evenly; |
| | | } |
| | | |
| | | .keyword { |
| | | white-space: nowrap; |
| | | } |
| | | .keyword-item { |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .keyword-item>text { |
| | | white-space: nowrap; |
| | | margin-right: 8px; |
| | | padding: 0px 6px; |
| | | color: #2c7064; |
| | | } |
| | | |
| | | .des { |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 3; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | /* text-overflow: ellipsis; */ |
| | | } |
| | | |
| | | .fyui-box__text .fyui-box__bd .tag { |
| | | margin-bottom: 8px; |
| | | 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/m_consult/consultonline/consultonline.js |
| | | const b_search = require("../behaviors/b_search") |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | | |
| | | behaviors: [b_search], |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | |
| | | time: '', |
| | | userId: 'system', |
| | | userName: 'æºè½å®¢æ', |
| | | type: 0, |
| | | text: 'ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºä½ æå¡', |
| | | }, |
| | | { |
| | |
| | | time: '', |
| | | userId: 'system', |
| | | userName: 'æºè½å®¢æ', |
| | | type: 0, |
| | | text: 'ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.', |
| | | }, |
| | | |
| | |
| | | |
| | | focus: false, |
| | | value: '', |
| | | placeholder: '请è¾å
¥å
³é®å' |
| | | placeholder: '请è¾å
¥æ³è¦æé®çå
容' |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | |
| | | userName: app.globalData.userInfo.acountname, |
| | | text: this.data.value, |
| | | }) |
| | | this.getAnswer(this.data.value) |
| | | const keyword = this.data.value |
| | | this.setData({ |
| | | record, |
| | | value: '' |
| | | }) |
| | | |
| | | this.getAnswer(keyword) |
| | | }, |
| | | |
| | | getAnswer(q) { |
| | | let record = this.data.record |
| | | this.search({ |
| | | keyword: q, |
| | | type: undefined |
| | | }) |
| | | }, |
| | | |
| | | setTimeout(() => { |
| | | loadComplete() { |
| | | const results = this.data.results |
| | | console.log(results); |
| | | |
| | | let record = this.data.record |
| | | results.forEach(r => { |
| | | record.push({ |
| | | id: 'system', |
| | | time: '', |
| | | userId: 'system', |
| | | userName: 'æºè½å®¢æ', |
| | | text: 'ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºä½ æå¡', |
| | | type: r.typeId, |
| | | text: r, |
| | | }) |
| | | }); |
| | | |
| | | this.setData({record}) |
| | | }, 1000); |
| | | } |
| | | }) |
| | |
| | | <!--pages/m_consult/consultonline/consultonline.wxml--> |
| | | <view class="consult-record"> |
| | | <block wx:for="{{record}}"> |
| | | <view wx:if="{{userId == item.userId}}" wx:key="index" class="consult-record_item_user"> |
| | | <block wx:for="{{record}}" wx:key="index"> |
| | | <view wx:if="{{userId == item.userId}}" class="consult-record_item_user"> |
| | | <view class="consult-text_user">{{item.text}}</view> |
| | | </view> |
| | | <view wx:else class="consult-record_item"> |
| | | <image src="/res/icons/avator_sys.png" class="consult-avator"></image> |
| | | <view class="consult-text">{{item.text}}</view> |
| | | <view wx:if="{{item.type == 0}}" class="consult-text">{{item.text}}</view> |
| | | <view wx:elif="{{item.type == 1}}" class="consult-text"> |
| | | {{item.text.name}} |
| | | </view> |
| | | <view wx:elif="{{item.type == 2}}" class="consult-text">{{item.text.name}}</view> |
| | | <view wx:elif="{{item.type == 3}}" class="consult-text">{{item.text.name}}</view> |
| | | <view wx:elif="{{item.type == 4}}" class="consult-text">{{item.text.name}}</view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | |
| | | // pages/m_consult/consultproblem/consultproblem.js |
| | | const consultservice = require("../../../service/consultservice") |
| | | const util = require("../../../utils/util") |
| | | const app = getApp() |
| | | import ListPage from '../../../base/ListPage' |
| | | const b_questions = require('../behaviors/b_questions') |
| | | const b_elementTypes = require('../behaviors/b_elementTypes') |
| | | |
| | | Page({ |
| | | |
| | | ListPage({ |
| | | behaviors: [b_questions, b_elementTypes], |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | 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 |
| | | }], |
| | | |
| | | questions: [] |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | this.getQuestionsByType(1) |
| | | this.getEnElementTypes() |
| | | this.getEnElementSubTypes() |
| | | }, |
| | | |
| | | 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 |
| | | const selectedValues = this.data.selected.map((obj, index) => { |
| | | return obj.value |
| | | }) |
| | | }, |
| | | 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}) |
| | | } |
| | | }) |
| | | this.getQuestionsByType(1, selectedValues) |
| | | }, |
| | | |
| | | openChooseType() { |
| | |
| | | }, |
| | | |
| | | 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/m_consult/consultdetailqa/consultdetailqa', |
| | | success: (res) => { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | qId: qId |
| | | }) |
| | | }, |
| | | }) |
| | | this.getQuestionsByType(1, [menu.value, item.value]) |
| | | }, |
| | | }) |
| | |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| | | "mp-loading": "/component/loading/loading", |
| | | "c-result-item": "../base_c/c_result-item/c_result-item", |
| | | "mp-sidebar": "/component/sidebar/sidebar" |
| | | } |
| | | } |
| | |
| | | |
| | | <view class="page"> |
| | | <view class="page__hd"> |
| | | <view class="flex-h"> |
| | | <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="more">å
±{{totalCount}}个é®é¢</view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <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> |
| | | <c-result-item results="{{questions}}" loading="{{loading}}" needLoadMore="{{needLoadMore}}"></c-result-item> |
| | | </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> |
| | |
| | | /* pages/m_consult/consultproblem/consultproblem.wxss */ |
| | | .page__hd { |
| | | 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); |
| | | width: 20vw; |
| | | background-color: white; |
| | | padding: 1vw; |
| | | margin-bottom: 8px; |
| | | text-align: center; |
| | | font-weight: 500; |
| | | font-size: 14px; |
| | | } |
| | | .switch-tab_selected { |
| | | background: linear-gradient(to bottom right, #65EAD2, #2BDEDC); |
| | | color: white; |
| | | } |
| | | |
| | | .fyui-box__content { |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .fyui-box__tag { |
| | | display: flex; |
| | | /* background-color: red; */ |
| | | width: 100%; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .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 { |
| | |
| | | </view> |
| | | |
| | | </block> |
| | | <block wx:else="{{catagory.typeId === 2}}"> |
| | | <block wx:elif="{{catagory.typeId === 2}}"> |
| | | <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | |
| | | { |
| | | "navigationBarTitleText": "ç¯ä¿ç¥è¯åºä¸é®æ¥è¯¢", |
| | | "navigationBarTitleText": "ç¯ä¿ç¥è¯åº", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/m_learn/base_c/c_learn-item/c_learn-item.js |
| | | import b_openFile from '../../behaviors/b_openFile' |
| | | |
| | | Component({ |
| | | behaviors: [b_openFile], |
| | | options: { |
| | | addGlobalClass: true, |
| | | }, |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | results: { |
| | | type: Array, |
| | | value: [] |
| | | }, |
| | | loading: { |
| | | type: Boolean, |
| | | value: false |
| | | }, |
| | | needLoadMore: { |
| | | type: Boolean, |
| | | value: false |
| | | }, |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon", |
| | | "mp-loadingstatus": "/component/loadingstatus/loadingstatus" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <view> |
| | | <view wx:for="{{results}}" wx:key="index" wx:item="item" bindtap="openFile" data-index="{{index}}"> |
| | | <view wx:if="{{item.lrResourcefiletype != 4}}" class="fyui-box fyui-panel"> |
| | | <view class="fyui-box__hd"> |
| | | <image src="{{item.lrPicurl}}" class="" mode="aspectFill" /> |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content">{{item.lrResourcetitle}}</view> |
| | | <view class="fyui-box__tag"> |
| | | <view>{{item.lrPublishdate}}</view> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/view.png" class="icon"></image>{{item.views}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view wx:else class="fyui-panel fyui-panel_video"> |
| | | <view style="position: relative;"> |
| | | <image src="{{item.lrPicurl}}" class="video-poster" mode="aspectFit" /> |
| | | <mp-icon class="video-play" icon="play" color="white" size="50" type="filled"></mp-icon> |
| | | </view> |
| | | <view class="video-title">{{item.lrResourcetitle}}</view> |
| | | <view class="tag"> |
| | | <view>{{item.lrPublishdate}}</view> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/view.png" class="icon"></image>{{item.views}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <mp-loadingstatus loading="{{loading}}" needLoadMore="{{needLoadMore}}" nodata="{{results.length == 0}}"></mp-loadingstatus> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/m_learn/base_c/c_learn-item/c_learn-item.wxss */ |
| | | .fyui-panel_video .video-poster { |
| | | width: 100%; |
| | | background-color: black; |
| | | } |
| | | |
| | | .fyui-panel_video .video-title{ |
| | | padding: 2px 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .fyui-panel_video .video-play { |
| | | position: absolute; |
| | | top: calc(50% - 25px); |
| | | left: calc(50% - 25px); |
| | | z-index: 10; |
| | | background-color: rgba(138, 138, 138, 0.712); |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .fyui-panel_video .tag{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | font-size: 12px; |
| | | color: var(--fyui-text-color_2); |
| | | padding: 4px 16px; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const b_loadingStatus = require("../../../base/behaviors/b_loadingStatus") |
| | | const lawservice = require("../../../service/lawservice") |
| | | const moment = require('../../../utils/moment.min') |
| | | const app = getApp() |
| | | |
| | | /** |
| | | * è·å宿³å¹è®ææ |
| | | */ |
| | | module.exports = Behavior({ |
| | | behaviors: [b_loadingStatus], |
| | | data: { |
| | | //æç´¢ç»æ |
| | | results: [] |
| | | }, |
| | | methods: { |
| | | loadmore(cPage) { |
| | | this.getResources(++cPage) |
| | | }, |
| | | |
| | | /** |
| | | * æ ¹æ®ç鿡件è·å宿³å¦ä¹ ææ |
| | | * @param fileType æä»¶ç±»åï¼å
æ¬[1ï¼officeææ¡£ï¼2ï¼ç½åï¼3ï¼é³é¢ï¼4ï¼è§é¢]ï¼ä¸å¡«åæ¶è¡¨ç¤ºæ¥è¯¢ææç±»å |
| | | */ |
| | | getResources(cPage = 1, fileType) { |
| | | this.setData({loading: true}) |
| | | const t = setTimeout(() => { this.setData({loading: false}) }, 10000); |
| | | var that = this |
| | | const user = app.globalData.userInfo |
| | | const condition = { |
| | | sceneTypeId: user.extension2 |
| | | } |
| | | if (fileType) { |
| | | condition.fileType = fileType |
| | | } |
| | | lawservice.getLawRegulations(user.guid, cPage, condition, { |
| | | onHead(header) { |
| | | that.setData({ |
| | | cPage: parseInt(header.currentPage), |
| | | tPage: parseInt(header.totalPage) |
| | | }) |
| | | }, |
| | | success(data) { |
| | | let results = that.data.results |
| | | data.forEach(d => { |
| | | d.views = parseInt(Math.random() * 1000 + 10) |
| | | d.lrPublishdate = moment(d.lrPublishdate).format('YYYYå¹´MMæDDæ¥') |
| | | }); |
| | | results = results.concat(data) |
| | | that.setData({ |
| | | results |
| | | }) |
| | | }, |
| | | complete() { |
| | | that.setData({loading: false}) |
| | | clearTimeout(t) |
| | | } |
| | | }, app.globalData.perPage) |
| | | }, |
| | | } |
| | | }) |
| ÎļþÃû´Ó pages/m_learn/behaviors/beLearn.js ÐÞ¸Ä |
| | |
| | | const app = getApp() |
| | | |
| | | /** |
| | | * 宿³å¦ä¹ ææçè·ååæå¼ |
| | | */ |
| | | module.exports = Behavior({ |
| | | data: { |
| | | resources: [], |
| | | }, |
| | | methods: { |
| | | /** |
| | | * 宿³å¦ä¹ ææå
容跳转 |
| | | */ |
| | | behaviorOpenFile: function (f) { |
| | | openFile(e) { |
| | | var index = e.currentTarget.dataset.index |
| | | let f = this.data.results[index] |
| | | var url = "" |
| | | switch (f.lrResourcefiletype) { |
| | | //ææ¡£ |
| | |
| | | wx.navigateTo({ |
| | | url: url, |
| | | success: (res) => { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', f) |
| | | }, |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }) |
| | |
| | | // pages/m_learn/learfile/learnfile.js |
| | | Page({ |
| | | import ListPage from '../../../base/ListPage' |
| | | import b_fetch from '../behaviors/b_fetch' |
| | | |
| | | ListPage({ |
| | | behaviors: [b_fetch], |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | //è§é¢ç±»åçæä»¶ |
| | | fileType: 4 |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | this.getResources(1, this.data.fileType) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "navigationBarTitleText": "宿³è§é¢", |
| | | "navigationBarBackgroundColor": "#65EAD2", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| | | "c-learn-item": "../base_c/c_learn-item/c_learn-item" |
| | | } |
| | | } |
| | |
| | | <!--pages/m_learn/learfile/learnfile.wxml--> |
| | | <view class="page "> |
| | | <view class="page__bd "> |
| | | <view wx:for="{{resources}}" wx:key="index" wx:item="item" bindtap="openFile" data-index="{{index}}"> |
| | | <view wx:if="{{item.lrResourcefiletype != 4}}" class="fyui-box fyui-panel"> |
| | | <view class="fyui-box__hd"> |
| | | <image src="{{item.lrPicurl}}" class="" mode="aspectFill" /> |
| | | <c-learn-item results="{{results}}" loading="{{loading}}" needLoadMore="{{needLoadMore}}"></c-learn-item> |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content">{{item.lrResourcetitle}}</view> |
| | | <view class="fyui-box__tag"> |
| | | <view>{{item.lrPublishdate}}</view> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/view.png" class="icon"></image>{{item.views}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view wx:else class="fyui-panel fyui-panel_video"> |
| | | <view style="position: relative;"> |
| | | <image src="{{item.lrPicurl}}" class="video-poster" mode="aspectFit" /> |
| | | <mp-icon class="video-play" icon="play" color="white" size="50" type="filled"></mp-icon> |
| | | </view> |
| | | <view class="video-title">{{item.lrResourcetitle}}</view> |
| | | <view class="tag"> |
| | | <view>{{item.lrPublishdate}}</view> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/view.png" class="icon"></image>{{item.views}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="page__ft"></view> |
| | | </view> |
| | |
| | | // pages/learn/learn.js |
| | | const lawservice = require("../../../service/lawservice") |
| | | const moment = require('../../../utils/moment.min') |
| | | const beLearn = require('../behaviors/beLearn') |
| | | const app = getApp() |
| | | import ListPage from '../../../base/ListPage' |
| | | import b_fetch from '../behaviors/b_fetch' |
| | | import b_openFile from '../behaviors/b_openFile' |
| | | |
| | | Page({ |
| | | behaviors: [beLearn], |
| | | ListPage({ |
| | | behaviors: [b_fetch, b_openFile], |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | |
| | | "name": "å¨çº¿çæµè®¾å¤" |
| | | } |
| | | ], |
| | | pageList: [ |
| | | |
| | | ], |
| | | banners: [ |
| | | { |
| | | pic: '', |
| | |
| | | fileType: '' |
| | | }, |
| | | ], |
| | | resources: [], |
| | | text2: [{ |
| | | title: "å è¿ç« 建çå¯¼è´æ§æ³", |
| | | content: "æ§æ³æè¿°ï¼ç¯ä¿ä¸»ç®¡é¨é¨å¯è°é
å¹¶ä½ä¸ºæ§æ³æº¯æºä¾æ®ä¹ä¸ç¯ä¿ä¸»ç®¡é¨é¨å¯è°é
å¹¶ä½ä¸ºæ§æ³æº¯æºä¾æ®ä¹ä¸", |
| | | tags: ['è¿æ³æå»º', '便³æé¤'], |
| | | views: 123, |
| | | time: '2021å¹´3æ2æ¥', |
| | | likes: 233 |
| | | }, { |
| | | title: "å è¿ç« 建çå¯¼è´æ§æ³", |
| | | content: "æ§æ³æè¿°ï¼ç¯ä¿ä¸»ç®¡é¨é¨å¯è°é
å¹¶ä½ä¸ºæ§æ³æº¯æºä¾æ®ä¹ä¸ç¯ä¿ä¸»ç®¡é¨é¨å¯è°é
å¹¶ä½ä¸ºæ§æ³æº¯æºä¾æ®ä¹ä¸", |
| | | tags: ['è¿æ³æå»º', '便³æé¤'], |
| | | views: 123, |
| | | time: '2021å¹´3æ2æ¥', |
| | | likes: 233 |
| | | }, { |
| | | title: "å è¿ç« 建çå¯¼è´æ§æ³", |
| | | content: "æ§æ³æè¿°ï¼ç¯ä¿ä¸»ç®¡é¨é¨å¯è°é
å¹¶ä½ä¸ºæ§æ³æº¯æºä¾æ®ä¹ä¸ç¯ä¿ä¸»ç®¡é¨é¨å¯è°é
å¹¶ä½ä¸ºæ§æ³æº¯æºä¾æ®ä¹ä¸", |
| | | tags: ['è¿æ³æå»º', '便³æé¤'], |
| | | views: 123, |
| | | time: '2021å¹´3æ2æ¥', |
| | | likes: 233 |
| | | }, { |
| | | title: "å è¿ç« 建çå¯¼è´æ§æ³", |
| | | content: "æ§æ³æè¿°ï¼ç¯ä¿ä¸»ç®¡é¨é¨å¯è°é
å¹¶ä½ä¸ºæ§æ³æº¯æºä¾æ®ä¹ä¸ç¯ä¿ä¸»ç®¡é¨é¨å¯è°é
å¹¶ä½ä¸ºæ§æ³æº¯æºä¾æ®ä¹ä¸", |
| | | tags: ['è¿æ³æå»º', '便³æé¤'], |
| | | views: 123, |
| | | time: '2021å¹´3æ2æ¥', |
| | | likes: 233 |
| | | }] |
| | | }, |
| | | //计ç®swiperé«åº¦æ¹æ³ï¼å¨åæ¢çæ¶åè°ç¨ï¼ |
| | | tabsHeight(element) { |
| | | let that = this; |
| | | let query = wx.createSelectorQuery(); //å¿
é¡»è¦å
å建ä¸ä¸ªæ¥è¯¢ |
| | | query.select(element).boundingClientRect(function (rect) { |
| | | that.setData({ |
| | | pageheight: rect.height + 'px' |
| | | }); |
| | | }).exec(); |
| | | }, |
| | | swichNav: function (e) { |
| | | var that = this; |
| | | if (this.data.currentTab === e.target.dataset.current) { |
| | | return false; |
| | | } else { |
| | | that.setData({ |
| | | currentTab: e.target.dataset.current, |
| | | navScrollLeft: e.target.dataset.current >= 4 ? ((e.target.dataset.current) * 60) : 0 //夿å½åéä¸çä¸ªæ°æ¯å¦æ¯ç¬¬5个 |
| | | }) |
| | | that.tabsHeight('.page' + e.target.dataset.current); //æ¥è¯¢åªä¸ä¸ªå
ç´ |
| | | } |
| | | }, |
| | | bindChange: function (e) { |
| | | var that = this; |
| | | that.setData({ |
| | | currentTab: e.detail.current, |
| | | navScrollLeft: e.detail.current >= 4 ? ((e.detail.current) * 60) : 0 //夿å½åéä¸çä¸ªæ°æ¯å¦æ¯ç¬¬5个 |
| | | }); |
| | | // that.tabsHeight('.page'+e.target.dataset.current); //æ¥è¯¢åªä¸ä¸ªå
ç´ |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad: function (options) { |
| | | // this.tabsHeight('.page0'); |
| | | this.getResources() |
| | | this.getResources(1) |
| | | }, |
| | | |
| | | onReachBottom () { |
| | | console.log('onReachBottom'); |
| | | if (this.cPage && this.tPage) { |
| | | if (this.cPage < this.tPage) { |
| | | this.getResources(this.cPage + 1) |
| | | } |
| | | } |
| | | loadComplete() { |
| | | this.getBanner() |
| | | }, |
| | | |
| | | getBanner() { |
| | | let banners = [] |
| | | for (let i = 0; i < 6; i++) { |
| | | const d = this.data.resources[i] |
| | | const results = this.data.results |
| | | const max = results.length > 5 ? 5 : results.length |
| | | for (let i = 0; i < max; i++) { |
| | | const d = this.data.results[i] |
| | | banners.push({ |
| | | pic: d.lrPicurl, |
| | | url: d.lrBodyurl, |
| | |
| | | }) |
| | | }, |
| | | |
| | | getResources(cPage = 1) { |
| | | var that = this |
| | | let user = app.globalData.userInfo |
| | | lawservice.getLawRegulations(user.guid, cPage, {sceneTypeId: user.extension2}, { |
| | | onHead(header) { |
| | | that.cPage = parseInt(header.currentPage) |
| | | that.tPage = parseInt(header.totalPage) |
| | | console.log(`cPage:${that.cPage}, tPage:${that.tPage}`); |
| | | }, |
| | | success(data) { |
| | | let resources = that.data.resources |
| | | data.forEach(d => { |
| | | d.views = parseInt(Math.random() * 1000 + 10) |
| | | d.lrPublishdate = moment(d.lrPublishdate).format('YYYYå¹´MMæDDæ¥') |
| | | }); |
| | | resources = resources.concat(data) |
| | | that.setData({ |
| | | resources |
| | | }) |
| | | if (that.cPage == 1) { |
| | | that.getBanner() |
| | | } |
| | | } |
| | | }, 10) |
| | | }, |
| | | |
| | | openFile(e) { |
| | | var index = e.currentTarget.dataset.index |
| | | let f = this.data.resources[index] |
| | | this.behaviorOpenFile(f) |
| | | }, |
| | | goto: function (e) { |
| | | var url = "" |
| | | var index = e.currentTarget.dataset.index |
| | | switch (index) { |
| | | case '0': |
| | | url = '/pages' |
| | | url = '/pages/m_learn/learfile/learnfile' |
| | | break; |
| | | case '1': |
| | | url = "" |
| | | url = "/pages/m_learn/learncase/learncase" |
| | | break; |
| | | } |
| | | if (url != "") { |
| | |
| | | "navigationBarBackgroundColor": "#65EAD2", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon" |
| | | "mp-icon": "/component/icon/icon", |
| | | "c-learn-item": "../base_c/c_learn-item/c_learn-item" |
| | | } |
| | | } |
| | |
| | | <view class="image-btn" bindtap="goto" data-index="0"> |
| | | <image src="/res/icons/learn_1.png" class="image-btn__2" mode="aspectFit" /> |
| | | <view class="image-btn_title"> |
| | | <view class="image-btn_title_t">ç¯ä¿å®æ³</view> |
| | | <view>è§é¢ãææ¡£ææ</view> |
| | | <view class="image-btn_title_t">宿³è§é¢</view> |
| | | <view>宿³å¹è®ææ</view> |
| | | <mp-icon class="image-btn_goto" icon="arrow" color="#7F7F7F" size="8" type="filled"></mp-icon> |
| | | </view> |
| | | |
| | |
| | | <image src="/res/icons/learn_2.png" class="image-btn__2" mode="aspectFit" /> |
| | | <view class="image-btn_title"> |
| | | <view class="image-btn_title_t">æ§æ³æ¡ä¾</view> |
| | | <view>ç¸å
³æ§æ³æ¡ä¾</view> |
| | | <view>æ§æ³ç£å¯æ¡ä¾</view> |
| | | <mp-icon class="image-btn_goto" icon="arrow" color="#7F7F7F" size="8" type="filled"></mp-icon> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="fyui-cell__bd">ç¯ä¿å®æ³</view> |
| | | <view class="fyui-cell__ft">æ´å¤</view> |
| | | </view> --> |
| | | <view wx:for="{{resources}}" wx:key="index" wx:item="item" bindtap="openFile" data-index="{{index}}"> |
| | | <view wx:if="{{item.lrResourcefiletype != 4}}" class="fyui-box fyui-panel"> |
| | | <view class="fyui-box__hd"> |
| | | <image src="{{item.lrPicurl}}" class="" mode="aspectFill" /> |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content">{{item.lrResourcetitle}}</view> |
| | | <view class="fyui-box__tag"> |
| | | <view>{{item.lrPublishdate}}</view> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/view.png" class="icon"></image>{{item.views}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view wx:else class="fyui-panel fyui-panel_video"> |
| | | <view style="position: relative;"> |
| | | <image src="{{item.lrPicurl}}" class="video-poster" mode="aspectFit" /> |
| | | <mp-icon class="video-play" icon="play" color="white" size="50" type="filled"></mp-icon> |
| | | </view> |
| | | <view class="video-title">{{item.lrResourcetitle}}</view> |
| | | <view class="tag"> |
| | | <view>{{item.lrPublishdate}}</view> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/view.png" class="icon"></image>{{item.views}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view class="fyui-cell fyui-cell_select title"> |
| | | <view class="fyui-cell__bd">æ§æ³æ¡ä¾</view> |
| | | <view class="fyui-cell__ft">æ´å¤</view> |
| | | </view> |
| | | <view wx:for="{{text2}}" wx:key="index" data-index="index" wx:for-item="item"> |
| | | <view class="fyui-box fyui-panel fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | {{item.title}} |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content">{{item.content}}</view> |
| | | <view class="fyui-box__tag"> |
| | | <view wx:for="{{item.tags}}" wx:key="i" data-index="i" wx:for-item="tag">{{tag}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/view.png" class="icon"></image>{{item.views}} |
| | | </view> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/like.png" class="icon"></image>{{item.likes}} |
| | | </view> |
| | | <view>{{item.time}}</view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <c-learn-item results="{{results}}" loading="{{loading}}" needLoadMore="{{needLoadMore}}"></c-learn-item> |
| | | |
| | | </view> |
| | | |
| | |
| | | text-align: center; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .fyui-panel_video .video-poster { |
| | | width: 100%; |
| | | background-color: black; |
| | | } |
| | | |
| | | .fyui-panel_video .video-title{ |
| | | padding: 2px 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .fyui-panel_video .video-play { |
| | | position: absolute; |
| | | top: calc(50% - 25px); |
| | | left: calc(50% - 25px); |
| | | z-index: 10; |
| | | background-color: rgba(138, 138, 138, 0.712); |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .fyui-panel_video .tag{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | font-size: 12px; |
| | | color: var(--fyui-text-color_2); |
| | | padding: 4px 16px; |
| | | } |
| | |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | //æç
§ç鍿¨èæºå¶è·åæ§æ³æ¡ä¾ |
| | | keyobj: {keyword: '', type: 3}, |
| | | //䏿»è§¦åºå è½½ |
| | | reachBottom: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | this.setData({ |
| | | reachBottom: true |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "navigationBarTitleText": "æ§æ³æ¡ä¾", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| | | "c-result-item-search": "../../m_consult/c_result-item-search/c_result-item-search" |
| | | } |
| | | } |
| | |
| | | <!--pages/m_learn/learncase/learncase.wxml--> |
| | | <text>pages/m_learn/learncase/learncase.wxml</text> |
| | | <view class="page"> |
| | | <view class="page__hd"></view> |
| | | <view class="page__bd"> |
| | | <c-result-item-search reachBottom="{{reachBottom}}" keyobj="{{keyobj}}"></c-result-item-search> |
| | | </view> |
| | | <view class="page__ft"></view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/m_service/c_schedule/c_schedule.js |
| | | const moment = require('../../../utils/moment.min') |
| | | |
| | | Component({ |
| | | options: { |
| | | addGlobalClass: true |
| | | }, |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | title: { |
| | | type: String, |
| | | value: 'è¥ä¸æ§ç
§ç»æ' |
| | | }, |
| | | time: { |
| | | type: String, |
| | | value: '2022-9-10 ææå
' |
| | | }, |
| | | leftDays: { |
| | | type: Number, |
| | | value: 2 |
| | | }, |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | lifetimes: { |
| | | attached: function () { |
| | | this._init() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | _init() { |
| | | moment.updateLocale('en', { |
| | | weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå
'.split('_') |
| | | }); |
| | | // console.log(moment.locales()); |
| | | // moment.locale('ch') |
| | | const now = moment().hour(0).minute(0).second(0).millisecond(0) |
| | | const s = moment(now).add(3, 'days') |
| | | |
| | | let leftDays = now.diff(s, 'days') |
| | | const time = s.format('YYYY-MM-DD dddd') |
| | | this.setData({ |
| | | time, |
| | | leftDays |
| | | }) |
| | | }, |
| | | goto() { |
| | | wx.navigateTo({ |
| | | url: '/pages/m_service/p_scheduledetail/p_scheduledetail', |
| | | success: (result) => {}, |
| | | }) |
| | | } |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": {} |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--pages/m_service/c_schedule/c_schedule.wxml--> |
| | | <view class="schedule-card {{leftDays < 0 ? 'schedule-card__2' : ''}}" bindtap="goto"> |
| | | <view class="schedule-tag">{{leftDays < 0 ? 'FUTURE' : 'TODAY'}}</view> |
| | | <view class="schedule-category"> |
| | | <image class="image-16" src="/res/icons/schedule_1.png"></image> |
| | | <text>ç¯ä¿æ¥ç¨</text> |
| | | </view> |
| | | <view class="schedule-title">{{title}}</view> |
| | | <view class="schedule-time"> |
| | | <text>{{time}}</text> |
| | | <text wx:if="{{leftDays > 0}}">è¿å»{{leftDays}}天</text> |
| | | <text wx:elif="{{leftDays == 0}}">ä»å¤©</text> |
| | | <text wx:else>è¿æ{{-leftDays}}天</text> |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/m_service/c_schedule/c_schedule.wxss */ |
| | | .schedule-card { |
| | | position: relative; |
| | | background: linear-gradient(0deg, #e9c07f, #F8BD6B, #FFAC38); |
| | | /* background-color: aqua; */ |
| | | margin: 0 10px; |
| | | padding: 8px; |
| | | color: rgb(255, 255, 255); |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | .schedule-card__2 { |
| | | background: linear-gradient(0deg, #7bc8fc, #72c4fc, #64BEFB); |
| | | } |
| | | |
| | | .schedule-tag { |
| | | font-size: 14px; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 4px; |
| | | color: rgba(255, 255, 255, 0.15); |
| | | font-size: 30px; |
| | | } |
| | | |
| | | .schedule-category { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .schedule-category>text { |
| | | margin-left: 4px; |
| | | } |
| | | |
| | | .schedule-title { |
| | | font-size: 20px; |
| | | margin: 12px 0; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .schedule-time { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/m_service/p_schedule/p_schedule.js |
| | | const moment = require('../../../utils/moment.min') |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | totals: 0, |
| | | schedules: [{ |
| | | category: '2022å¹´9æç¯ä¿å·¥ä½æ¥ç¨', |
| | | details: [{ |
| | | time: '9æ10æ¥', |
| | | name: 'ç¯ä¿æ¥ç¨', |
| | | left: 3, |
| | | }] |
| | | }] |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | const now = moment() |
| | | const year = moment().year() |
| | | const schedules = [] |
| | | let totals = 0 |
| | | for (let m = 1; m <= 12; m++) { |
| | | const s = { |
| | | category: `${year}å¹´${m}æç¯ä¿å·¥ä½æ¥ç¨`, |
| | | details: [] |
| | | } |
| | | //10,15,20 |
| | | let t1 = moment(`${year}-${m}-10`) |
| | | let d1 = t1.diff(now, 'days') |
| | | s.details.push({ |
| | | time: t1.format('MMæDDæ¥'), |
| | | name: 'ç¯ä¿æ¥ç¨ç¯ä¿æ¥ç¨ç¯ä¿æ¥ç¨ç¯ä¿æ¥ç¨ç¯ä¿æ¥ç¨ç¯ä¿æ¥ç¨', |
| | | left: d1, |
| | | }) |
| | | let t2 = moment(`${year}-${m}-15`) |
| | | let d2 = t2.diff(now, 'days') |
| | | s.details.push({ |
| | | time: t2.format('MMæDDæ¥'), |
| | | name: 'ç¯ä¿æ¥ç¨', |
| | | left: d2, |
| | | }) |
| | | let t3 = moment(`${year}-${m}-20`) |
| | | let d3 = t3.diff(now, 'days') |
| | | s.details.push({ |
| | | time: t3.format('MMæDDæ¥'), |
| | | name: 'ç¯ä¿æ¥ç¨', |
| | | left: d3, |
| | | }) |
| | | schedules.push(s) |
| | | totals += 3 |
| | | } |
| | | this.setData({schedules, totals}) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "navigationBarTitleText": "å
¨é¨æ¥ç¨", |
| | | "navigationBarBackgroundColor": "#EAFFF1", |
| | | "usingComponents": {} |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <view class="page"> |
| | | <view class="page__hd"> |
| | | <view>å
±æ{{totals}}æ¡æ¥ç¨è®°å½</view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <block wx:for="{{schedules}}" wx:key="index"> |
| | | <view class="sm-title">{{item.category}}</view> |
| | | <view wx:for="{{item.details}}" wx:key="i" wx:for-item="d" class="sm-card"> |
| | | <view class="sm-time">{{d.time}}</view> |
| | | <view class="history_icon"> |
| | | <view class="history_icon_1"> |
| | | <view></view> |
| | | </view> |
| | | <view class="history_icon_2">d</view> |
| | | </view> |
| | | <view class="{{d.left < 0 ? 'sm-content__past' : ''}} sm-content"> |
| | | <view class="sm-content__left">{{d.name}}</view> |
| | | <view class="sm-content__right">{{d.left >= 0 ? 'å©' : 'è¿å»'}}<text>{{d.left < 0 ? -d.left : d.left}}</text>天</view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | <view class="page__ft"> |
| | | |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/m_service/p_schedule/p_schedule.wxss */ |
| | | .page__bd { |
| | | padding: 10px; |
| | | background-color: white; |
| | | } |
| | | |
| | | .sm-title { |
| | | font-size: 14px; |
| | | margin-top: 16px; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .sm-card { |
| | | display: flex; |
| | | border-radius: 6px; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .sm-time { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .history_icon { |
| | | width: 10vw; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | |
| | | .history_icon .history_icon_1 { |
| | | width: 22px; |
| | | height: 22px; |
| | | background-color: #cce9f8; |
| | | border-radius: 50%; |
| | | opacity: 0.2; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .history_icon .history_icon_1>view { |
| | | width: 11px; |
| | | height: 11px; |
| | | background: #1addbd; |
| | | border-radius: 50%; |
| | | z-index: 10; |
| | | } |
| | | |
| | | .history_icon .history_icon_2 { |
| | | width: 0px; |
| | | height: 100%; |
| | | /* padding: 10px 0px; */ |
| | | border: 1px dashed #EBF8FF; |
| | | color: transparent; |
| | | } |
| | | |
| | | .sm-content { |
| | | background-color: #EBF8FF; |
| | | border-radius: 6px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding-left: 10px; |
| | | width: 50%; |
| | | flex: 1; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .sm-content__left{ |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | width: 50%; |
| | | } |
| | | |
| | | .sm-content__right { |
| | | background-color: #64BEFB; |
| | | padding: 10px 16px; |
| | | color: white; |
| | | white-space: nowrap; |
| | | width: 30%; |
| | | text-align: center; |
| | | border-top-right-radius: 6px; |
| | | border-bottom-right-radius: 6px; |
| | | } |
| | | |
| | | .sm-content__right>text { |
| | | font-size: 20px; |
| | | } |
| | | |
| | | .sm-content__past { |
| | | background: #F5F5F5; |
| | | color: #ADADAD; |
| | | } |
| | | |
| | | .sm-content__past .sm-content__left { |
| | | } |
| | | |
| | | .sm-content__past .sm-content__right { |
| | | background-color: #E4E4E4; |
| | | color: #ADADAD; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/m_service/p_scheduledetail/p_scheduledetail.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | steps:[{ |
| | | index: '01', |
| | | title: ['åå¾ç¯', 'ä¿é¨é¨'], |
| | | content: 'åå¾ç¸å
³ç¯ä¿é¨é¨æä¾ç¸å
³è¯ä»¶ï¼å¯è¿è¡è¥ä¸æ§ç
§ç»æã' |
| | | },{ |
| | | index: '02', |
| | | title: ['è¥ä¸æ§', 'ç
§ç»æ'], |
| | | content: 'åå¾ç¸å
³ç¯ä¿é¨é¨æä¾ç¸å
³è¯ä»¶ï¼å¯è¿è¡è¥ä¸æ§ç
§ç»æã' |
| | | },{ |
| | | index: '03', |
| | | title: ['è¥ä¸æ§', 'ç
§ç»æ'], |
| | | content: 'åå¾ç¸å
³ç¯ä¿é¨é¨æä¾ç¸å
³è¯ä»¶ï¼å¯è¿è¡è¥ä¸æ§ç
§ç»æã' |
| | | }] |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | onSubmit() { |
| | | wx.navigateTo({ |
| | | url: '/pages/m_service/p_schedule/p_schedule', |
| | | success: (result) => {}, |
| | | }) |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "navigationBarTitleText": "æ¥ç¨è¯¦æ
", |
| | | "navigationBarBackgroundColor": "#EAFFF1", |
| | | "usingComponents": {} |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--pages/m_service/p_scheduledetail/p_scheduledetail.wxml--> |
| | | <view class="page"> |
| | | <view class="page__hd"> |
| | | <view class="sd-card"> |
| | | <view class="sd-card__title">仿¥</view> |
| | | <view class="sd-card__content">è¥ä¸æ§ç
§ç»æ</view> |
| | | </view> |
| | | |
| | | <view class="sd-item"> |
| | | <view>æ¥ç¨ç±»å«</view> |
| | | <view>ç¯ä¿æ¥ç¨</view> |
| | | </view> |
| | | <view class="sd-item"> |
| | | <view>å¼å§æ¶é´</view> |
| | | <view class="sd-item__time">2022å¹´9æ01æ¥</view> |
| | | </view> |
| | | <view class="sd-item"> |
| | | <view>ç»ææ¶é´</view> |
| | | <view class="sd-item__time">2022å¹´9æ10æ¥</view> |
| | | </view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <view class="sd-divider"> <text>* * *</text> æ¥ç¨æä½æµç¨æç¤º <text>* * *</text> </view> |
| | | <view class="sd-step" wx:for="{{steps}}" wx:key="index"> |
| | | <text class="sd-step__index">{{item.index}}</text> |
| | | <view class="sd-step__title">{{item.title[0]}}<text>{{item.title[1]}}</text></view> |
| | | <view class="sd-step__content">{{item.content}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="page__ft"> |
| | | <view class="submit" bindtap="onSubmit">æ¥çå
¨é¨æ¥ç¨</view> |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/m_service/p_scheduledetail/p_scheduledetail.wxss */ |
| | | .page__hd { |
| | | padding: 10px 16px 10px 16px; |
| | | } |
| | | |
| | | .sd-card { |
| | | background-color: #FEB145; |
| | | border-radius: 6px; |
| | | color: white; |
| | | } |
| | | |
| | | .sd-card__title { |
| | | text-align: center; |
| | | font-size: 16px; |
| | | padding: 8px; |
| | | } |
| | | |
| | | .sd-card__content { |
| | | font-size: 20px; |
| | | text-align: center; |
| | | background-color: #FFF5E8; |
| | | color: #FFAD3A; |
| | | padding: 8px 8px 20px 8px; |
| | | |
| | | } |
| | | |
| | | .sd-item { |
| | | font-size: 14px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | /* background-color: white; */ |
| | | margin-top: 16px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .sd-item__time { |
| | | background-color: #FFAC38; |
| | | border-radius: 6px; |
| | | color: white; |
| | | padding: 4px 14px; |
| | | } |
| | | |
| | | .sd-divider { |
| | | font-size: 20px; |
| | | text-align: center; |
| | | margin-top: 30px; |
| | | } |
| | | |
| | | .sd-divider>text { |
| | | vertical-align: middle; |
| | | color: #FFAC38; |
| | | } |
| | | |
| | | .sd-step { |
| | | position: relative; |
| | | padding: 4px 16px; |
| | | } |
| | | |
| | | .sd-step__index{ |
| | | position: absolute; |
| | | font-size: 32px; |
| | | color: #ffe3bc; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .sd-step__title { |
| | | margin-top: 26px; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .sd-step__title>text { |
| | | color: #FEB34C; |
| | | } |
| | | |
| | | .sd-step__content { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .submit{ |
| | | background: linear-gradient(270deg, #FEB145 0%, #FFBF6C 100%); |
| | | } |
| | |
| | | showPreview: true |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * è·åçé¨æç´¢å
容 |
| | | */ |
| | | 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.formatTime(r.mfReleaseDate) |
| | | r.mfEffectiveDate = that.formatTime(r.mfEffectiveDate) |
| | | r.mfClosingDate = that.formatTime(r.mfClosingDate) |
| | | }); |
| | | that.setData({ |
| | | 'pageList[0]': res, |
| | | 'pageList[4]': res |
| | | }) |
| | | } |
| | | }) |
| | | // 2. ç鍿³å¾æ³è§æ¡ç® |
| | | consultservice.getTopicItem(app.globalData.accessToken.userId, { |
| | | success(res) { |
| | | res.forEach(r => { |
| | | r.miItemContent = r.miItemContent.replaceAll('\\n', '<br/>') |
| | | }); |
| | | that.setData({ |
| | | 'pageList[3]': res |
| | | }) |
| | | } |
| | | }) |
| | | // 3. çé¨é®ç |
| | | consultservice.getTopicQA(app.globalData.accessToken.userId, { |
| | | success(res) { |
| | | res.forEach(r => { |
| | | r.cqCreateTime = that.formatTime(r.cqCreateTime) |
| | | }); |
| | | that.setData({ |
| | | 'pageList[1]': 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[2]': res |
| | | }) |
| | | console.log(that.data.pageList); |
| | | } |
| | | }) |
| | | }, |
| | | }) |
| | |
| | | "useCompilerPlugins": false, |
| | | "ignoreUploadUnusedFiles": false, |
| | | "useStaticServer": true, |
| | | "minifyWXML": true |
| | | "minifyWXML": true, |
| | | "ignoreDevUnusedFiles": false |
| | | }, |
| | | "compileType": "miniprogram", |
| | | "libVersion": "2.25.2", |
| | | "libVersion": "2.26.0", |
| | | "appid": "wxffd1438dd373fcf6", |
| | | "projectname": "ep-law-abiding", |
| | | "editorSetting": { |
| | |
| | | |
| | | const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete']; |
| | | // const baseUrl = "http://127.0.0.1:8080" |
| | | // const baseUrl = "http://192.168.1.106:8080" |
| | | const baseUrl = "https://fyami.com.cn:447" |
| | | const baseUrl = "http://192.168.0.106:8080" |
| | | // const baseUrl = "https://fyami.com.cn:447" |
| | | // const basePicUrl = baseUrl + "/images/" |
| | | const basePicUrl = "https://fyami.com.cn:447/images/" |
| | | const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/" |
| | |
| | | let fun1 = util.deepCopy(cb) |
| | | fun1.success = function (res) { |
| | | if (res.success) { |
| | | res.data.forEach(r => { |
| | | if (r.imgUrl && r.imgUrl != '' && r.imgUrl != null) { |
| | | r.imgUrl = $f.basePicUrl + r.imgUrl |
| | | } |
| | | r.time = util.formatTime(r.time) |
| | | r.des = r.des.replaceAll('\\n', '<br/>') |
| | | }); |
| | | if (cb.onPage) { |
| | | cb.onPage(res.head) |
| | | } |
| | | cb.success(res.data) |
| | | } else { |
| | | if (cb.fail) { |
| | | cb.fail(res.message) |
| | | } |
| | | } |
| | | } |
| | | |
| | | $f.get(fun1) |
| | | }, |