riku
2022-09-19 47e86f543415585ab1e1b2b1ed1d98830817a1be
2022.9.16
已修改27个文件
已删除4个文件
已添加12个文件
939 ■■■■ 文件已修改
app.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.wxss 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base/behaviors/b_loadingStatus.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/loadingstatus/loadingstatus.wxml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/mygallery/mygallery.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/switchtab/switchtab.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_common/pagevideo/pagevideo.js 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_common/pagevideo/pagevideo.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_common/pagevideo/pagevideo.wxml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_common/pagevideo/pagevideo.wxss 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/base_c/c_result-item/c_result-item.wxml 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/base_c/c_result-item/c_result-item.wxss 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/c_result-item-search/c_result-item-search.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/c_reult-item-tab/c_reult-item-tab.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/c_reult-item-tab/c_reult-item-tab.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/c_reult-item-tab/c_reult-item-tab.wxml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/c_reult-item-tab/c_reult-item-tab.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consulthome/consulthome.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consulthome/consulthome.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consultonline/consultonline.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consultresult/consultresult.js 125 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consultresult/consultresult.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consultresult/consultresult.wxml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consultresultmore/consultresultmore.js 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consultresultmore/consultresultmore.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consultresultmore/consultresultmore.wxml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_consult/consultresultmore/consultresultmore.wxss 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_learn/behaviors/b_openFile.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_learn/p_learnvideo/p_learnvideo.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_learn/p_learnvideo/p_learnvideo.json 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_learn/p_learnvideo/p_learnvideo.wxml 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_learn/p_learnvideo/p_learnvideo.wxss 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/mine/mine.wxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/mine/mine.wxss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/userlogin/userlogin.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/my_consult.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/my_favor.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/my_schedule.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/qa.png 补丁 | 查看 | 原始文档 | blame | 历史
service/baserequest.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/lawservice.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.js
@@ -19,5 +19,26 @@
    userInfo: null,
    accessToken: null,
    isLogin: false
  },
  // æ™ºèƒ½å’¨è¯¢ç»“果类型文本转换
  cosultTypeName: (typeId) => {
    let name = ''
    switch (typeId) {
      case 1:
        name = '相关文件'
        break;
      case 2:
        name = '相关条目'
        break;
      case 3:
        name = '执法案例'
        break;
      case 4:
        name = '环保问题'
        break;
      default:
        break;
    }
    return name
  }
})
app.json
@@ -1,12 +1,12 @@
{
  "entryPagePath": "pages/m_user/userlogin/userlogin",
  "pages": [
    "pages/m_user/userlogin/userlogin",
    "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",
@@ -17,6 +17,7 @@
    "pages/m_consult/consultdetailitem/consultdetailitem",
    "pages/m_consult/consultdetailqa/consultdetailqa",
    "pages/m_consult/consultdetailcase/consultdetailcase",
    "pages/m_learn/p_learnvideo/p_learnvideo",
    "pages/m_learn/learn/learn",
    "pages/m_learn/learfile/learnfile",
    "pages/m_learn/learncase/learncase",
@@ -30,18 +31,17 @@
    "pages/m_promise/promiseresult/promiseresult",
    "pages/m_promise/promisesign/promisesign",
    "pages/m_service/p_servicehome/servicehome",
    "pages/m_service/p_scheduledetail/p_scheduledetail",
    "pages/m_service/p_schedule/p_schedule",
    "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/m_service/p_schedule/p_schedule",
    "pages/m_service/p_scheduledetail/p_scheduledetail"
    "pages/test2/test2"
  ],
  "window": {
    "backgroundTextStyle": "light",
app.wxss
@@ -39,8 +39,8 @@
}
.icon {
  width: 16px;
  height: 16px;
  width: 20px;
  height: 20px;
}
.fyui-selector {
@@ -249,7 +249,7 @@
  /* background-color: greenyellow; */
}
.fyui-box .fyui-box__hd>image {
.fyui-box .fyui-box__hd .fyui-box__hd_image {
  width: 120px;
  height: 80px;
}
base/behaviors/b_loadingStatus.js
@@ -32,7 +32,7 @@
  },
  methods: {
    _onReachBottom() {
      console.log('_onReachBottom');
      // console.log('_onReachBottom');
      let {cPage, tPage, loading} = this.data
      if (!loading && cPage < tPage) {
        if (typeof this.loadmore === 'function') {
component/loadingstatus/loadingstatus.wxml
@@ -4,10 +4,12 @@
<template wx:if="{{!loading && nodata}}" is="nodataPage"></template>
<block wx:else>
  <view wx:if="{{!loading}}" class="load-more">
    <view wx:if="{{!scrollable}}" class="btn-more" bindtap="gotoMore">查看更多</view>
    <block wx:if="{{!scrollable}}">
      <view wx:if="{{needLoadMore}}" class="btn-more" bindtap="gotoMore">查看更多</view>
    </block>
    <block wx:else>
      <text wx:if="{{needLoadMore}}">上滑加载</text>
      <text wx:else="">——到底了——</text>
      <text wx:else>——到底了——</text>
    </block>
  </view>
component/mygallery/mygallery.js
@@ -30,7 +30,7 @@
      observer(newVal) {
        if (newVal) {
          let that = this;
          let query = this.createSelectorQuery(); //必须要先创建一个查询
          let query = this.createSelectorQuery().in(this); //必须要先创建一个查询
          setTimeout(() => {
            query.select('.fyui-gallery__img').boundingClientRect(function (rect) {
              console.log('observer');
@@ -298,7 +298,7 @@
      console.log(yLimit);
      let that = this;
      let query = this.createSelectorQuery(); //必须要先创建一个查询
      let query = this.createSelectorQuery().in(this); //必须要先创建一个查询
      query.select('.fyui-gallery__img').boundingClientRect(function (rect) {
        console.log('imgHeight:' + that.data.imgHeight);
        console.log('imgWidth:' + that.data.imgWidth);
component/switchtab/switchtab.js
@@ -57,7 +57,7 @@
      if (e) {
        setTimeout(() => {
          const p = `.page${this.data.currentTab}`
          console.log(p);
          // console.log(p);
          this.tabsHeight(p);
        }, 50);
      }
@@ -65,7 +65,7 @@
    //计算swiper高度方法(在切换的时候调用)
    tabsHeight(element) {
      let that = this;
      let query = this.createSelectorQuery(); //必须要先创建一个查询
      let query = this.createSelectorQuery().in(this); //必须要先创建一个查询
      query.select(element).boundingClientRect(function (rect) {
        that.setData({
          pageheight: rect.height + 'px'
pages/home/home.wxml
@@ -123,7 +123,7 @@
            </view>
          </view>
          <view class="fyui-box__hd">
            <image src="{{item.pic}}" class="" />
            <image src="{{item.pic}}" class="fyui-box__hd_image" mode="aspectFill"/>
          </view>
        </view>
      </view>
pages/m_common/pagevideo/pagevideo.js
ÎļþÒÑɾ³ý
pages/m_common/pagevideo/pagevideo.json
ÎļþÒÑɾ³ý
pages/m_common/pagevideo/pagevideo.wxml
ÎļþÒÑɾ³ý
pages/m_common/pagevideo/pagevideo.wxss
ÎļþÒÑɾ³ý
pages/m_consult/base_c/c_result-item/c_result-item.wxml
@@ -60,7 +60,7 @@
            <text>案发地址:{{item.provinceName + item.cityName}}</text>
            <text>案发时间:{{item.occurDate}}</text>
          </view>
          <view class="fyui-box__ft_2">
          <view class="fyui-box__ft_2" wx:if="{{item.punish || item.illegal || item.shotSpot || item.supervise || item.detained || item.minor}}">
            <view style="white-space: nowrap;">涉及:</view>
            <view class="case-tag-group">
              <view class="case-tag" wx:if="{{item.punish}}">
@@ -95,15 +95,45 @@
      <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 class="qa-title">
              <image class="icon" src="/res/icons/qa.png"></image>
              <text class="fyui-box__content des subtitle">{{item.name}}?</text>
          </view>
          <view class="fyui-box__bd answer">
            <view class="tag2">答:</view>
          </view>
          <view class="fyui-box__bd">
            <!-- <view class="answer">
              <image class="user-avator" src="/res/icons/con_qa.png"></image>
              <view class="user-name">环保智能助手</view>
            </view> -->
            <view>
              <!-- <view class="tag2">答:</view> -->
            <rich-text class="tag2 des" nodes="{{item.des}}"></rich-text>
          </view>
          <view class="fyui-box__ft">
          </view>
          <!-- <view class="fyui-box__ft">
            <text>提问时间:{{item.time}}</text>
            <text>回复时间:{{item.time}}</text>
          </view> -->
          <view class="fyui-box__ft_2" wx:if="{{item.punish || item.illegal || item.shotSpot || item.supervise}}">
            <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.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>
          </view>
        </view>
      </block>
pages/m_consult/base_c/c_result-item/c_result-item.wxss
@@ -31,7 +31,8 @@
.fyui-box .answer {
  display: flex;
  flex-direction: row;
  align-items: center;
  /* flex-direction: row; */
  /* justify-content: space-between; */
  /* background-color: red; */
}
@@ -102,3 +103,24 @@
  background-color: var(--fyui-text-color_3);
}
.qa-title {
  display: flex;
  align-items: flex-start;
}
.qa-title>image {
  margin-right: 4px;
  margin-top: 2px;
}
.user-avator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.user-name {
  color: var(--fyui-text-color_2);
  font-size: 12px;
  margin-left: 4px;
}
pages/m_consult/c_result-item-search/c_result-item-search.js
@@ -14,7 +14,7 @@
    keyobj: {
      type: Object,
      value: {
        keyword: '',
        keyword: null,
        type: undefined
      },
    },
@@ -34,7 +34,9 @@
  observers: {
    'keyobj': function (keyobj) {
      if (keyobj != null && keyobj.keyword != null) {
      this.search(keyobj, 1, this.data.sPerPage)
      }
    },
  },
pages/m_consult/c_reult-item-tab/c_reult-item-tab.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
// pages/m_consult/c_reult-item-tab/c_reult-item-tab.js
Component({
  /**
   * ç»„件的属性列表
   */
  properties: {
    tabList: [
      {name: '热门',tag: 0},
      {name: '问答',tag: 0},
      {name: '案例',tag: 0},
      {name: '条目',tag: 0},
      {name: '文件',tag: 0},
    ],
    refresh: false,
    keywords: [
      {keyword: '', type: undefined},
      {keyword: '', type: 1},
      {keyword: '', type: 2},
      {keyword: '', type: 3},
      {keyword: '', type: 4},
    ],
    reachBottom: [false, false, false, false, false],
    tabIndex: 0
  },
  /**
   * ç»„件的初始数据
   */
  data: {
  },
  /**
   * ç»„件的方法列表
   */
  methods: {
    onTabChange(e) {
      this.setData({
        tabIndex: e.detail
      })
    }
  }
})
pages/m_consult/c_reult-item-tab/c_reult-item-tab.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
{
  "component": true,
  "usingComponents": {
    "switch-tab": "/component/switchtab/switchtab",
    "c-result-item-search": "../c_result-item-search/c_result-item-search"
  }
}
pages/m_consult/c_reult-item-tab/c_reult-item-tab.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
<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>
pages/m_consult/c_reult-item-tab/c_reult-item-tab.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
/* pages/m_consult/c_reult-item-tab/c_reult-item-tab.wxss */
pages/m_consult/consulthome/consulthome.js
@@ -93,7 +93,7 @@
  },
  onTabChange(e) {
    console.log(e.detail);
    // console.log(e.detail);
    this.setData({
      tabIndex: e.detail
    })
pages/m_consult/consulthome/consulthome.json
@@ -5,7 +5,6 @@
  "usingComponents": {
    "mp-icon": "/component/icon/icon",
    "switch-tab": "/component/switchtab/switchtab",
    "mp-loading": "/component/loading/loading",
    "c-result-item-search": "../c_result-item-search/c_result-item-search"
  }
}
pages/m_consult/consultonline/consultonline.wxml
@@ -11,7 +11,7 @@
        <view wx:elif="{{item.type == 1}}" class="consult-text consult-qa">
          <switch-tab tabList="{{item.text.tabList}}" refresh="{{item.refresh}}">
            <block wx:for="{{item.text.pageList}}" wx:key="i" wx:for-item="p" wx:for-index="i">
              <c-result-item results="{{p}}" loading="{{false}}" needLoadMore="{{false}}" scrollable="{{false}}" slot="slot{{i}}" data-index="{{[index, i]}}" bindgotoMore="gotoMore"></c-result-item>
              <c-result-item results="{{p}}" loading="{{false}}" needLoadMore="{{true}}" scrollable="{{false}}" slot="slot{{i}}" data-index="{{[index, i]}}" bindgotoMore="gotoMore"></c-result-item>
            </block>
            <!-- <c-result-item-search scrollable="{{false}}" slot="slot0" keyobj="{{item.text.key4}}" sPerPage="{{1}}" bindloadComplete="loadComplete"></c-result-item-search>
            <c-result-item-search scrollable="{{false}}" slot="slot1" keyobj="{{item.text.key3}}" sPerPage="{{1}}"></c-result-item-search>
pages/m_consult/consultresult/consultresult.js
@@ -10,7 +10,21 @@
   */
  data: {
    keyword: '',
    result: []
    tabList: [
      {name: '全部',tag: 0},
      {name: '问答',tag: 0},
      {name: '案例',tag: 0},
      {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
  },
  /**
@@ -21,103 +35,36 @@
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      console.log(data);
      that.setData({
        keyword: data.keyword
        keyAll: {keyword: data.keyword, type: undefined},
        key1: {keyword: data.keyword, type: 1},
        key2: {keyword: data.keyword, type: 2},
        key3: {keyword: data.keyword, type: 3},
        key4: {keyword: data.keyword, type: 4},
      })
      that.search()
      // that.search()
    })
  },
  search () {
    var that = this
    wx.showLoading({
      title: '搜索中',
      mask: true,
      success: (res) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
    setTimeout(() => {
      wx.hideLoading()
    }, 20000);
    consultservice.searchLaw(app.globalData.accessToken.userId, this.data.keyword, 1, 5, {
      success (res) {
        let result = []
        let thisTypeId = ''
        let thisIndex = -1
        res.forEach(r => {
          r.des = r.des.replaceAll('\\n', '<br/>')
          if (thisTypeId === '' || thisTypeId != r.typeId) {
            thisTypeId = r.typeId
            thisIndex++
            result.push({
              typeId: r.typeId,
              typeName: r.typeName,
              contents: [r]
            })
          } else {
            result[thisIndex].contents.push(r)
          }
        });
        that.setData({
          result
        })
        console.log(result);
  onReachBottom() {
    let reachBottom = [false, false, false, false, false]
    reachBottom[this.data.tabIndex] = true
    this.setData({reachBottom})
      },
      complete (res) {
        wx.hideLoading()
      }
  loadingDone(e){
    this.setData({
      refresh: false
    })
    this.setData({
      refresh: true
    })
  },
  // gotoDetail (e) {
  //   const iList = e.currentTarget.dataset.index.split(',')
  //   const i1 = iList[0]
  //   const i2 = iList[1]
  //   const r = this.data.result[i1]
  //   switch (r.typeId) {
  //     //法律法规文件
  //     case 1:
  //       const fileId = r.contents[i2].id
  //       wx.navigateTo({
  //         url: '/pages/m_consult/consultdetail/consultdetail',
  //         success: (res) => {
  //           // é€šè¿‡ eventChannel å‘被打开页面传送数据
  //           res.eventChannel.emit('acceptDataFromOpenerPage', {
  //             fileId: fileId
  //           })
  //         },
  //       })
  //       break;
  //     //法律法规条目
  //     case 2:
  //       break;
  //     //执法案例
  //     case 3:
  //       break;
  //     //环保问题
  //     case 4:
  //       break;
  //     default:
  //       break;
  //   }
  // },
  gotoMore(e){
    const typeId = e.currentTarget.dataset.typeid
    const keyword = this.data.keyword
    wx.navigateTo({
      url: '/pages/m_consult/consultresultmore/consultresultmore',
      success: (res) => {
        // é€šè¿‡ eventChannel å‘被打开页面传送数据
        res.eventChannel.emit('acceptDataFromOpenerPage', {
          typeId: typeId,
          keyword: keyword
        })
      },
  onTabChange(e) {
    console.log(e.detail);
    this.setData({
      tabIndex: e.detail
    })
  }
})
pages/m_consult/consultresult/consultresult.json
@@ -3,6 +3,8 @@
  "navigationBarBackgroundColor": "#57E4CB",
  "navigationBarTextStyle": "white",
  "usingComponents": {
    "mp-icon": "/component/icon/icon"
    "mp-icon": "/component/icon/icon",
    "switch-tab": "/component/switchtab/switchtab",
    "c-result-item-search": "../c_result-item-search/c_result-item-search"
  }
}
pages/m_consult/consultresult/consultresult.wxml
@@ -2,12 +2,10 @@
<import src="/template/nodata.wxml"></import>
<view class="page">
  <block wx:if="{{result.length > 0}}">
    <block wx:for="{{result}}" wx:key="i1" wx:for-item="catagory" wx:for-index="i1">
      <view class="page__hd">
    <!-- <block wx:if="{{result.length > 0}}">
      <block wx:for="{{result}}" wx:key="i1" wx:for-item="catagory" wx:for-index="i1">
        <view><text style="color: #57E4CB;">{{keyword}}</text>的{{catagory.typeName}} ></view>
      </view>
      <view class="page__bd">
        <view class="fyui-panel">
          <block wx:if="{{catagory.typeId === 1}}">
            <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail">
@@ -34,7 +32,6 @@
                  <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>
@@ -43,17 +40,24 @@
                  <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>
        </view>
        <view class="btn-more" data-typeid="{{catagory.typeId}}" bindtap="gotoMore">查看更多</view>
      </block>
    </block>
    <template wx:else is="nodataPage"></template> -->
    <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>
    </block>
  </block>
  <template wx:else is="nodataPage"></template>
  <view class="page__ft"></view>
</view>
pages/m_consult/consultresultmore/consultresultmore.js
@@ -1,15 +1,15 @@
// pages/m_consult/consultresultmore/consultresultmore.js
const consultservice = require("../../../service/consultservice")
const app = getApp()
const behavior = require('../behaviors/behConsultItem')
Page({
  behaviors: [behavior],
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    // result: []
    keyobj: {keyword: null, type: undefined},
    typeName: '',
    //上滑触底加载
    reachBottom: false
  },
  /**
@@ -18,65 +18,21 @@
  onLoad(options) {
    var that = this
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      console.log('getOpenerEventChannel:');
      console.log(data);
      that.setData({
        keyobj: {
        keyword: data.keyword,
        typeId: data.typeId,
          type: data.typeId,
        },
        typeName: app.cosultTypeName(data.typeId)
      })
      that.search(1)
    })
  },
  onReachBottom () {
    console.log('onReachBottom');
    if (this.cPage && this.tPage) {
      if (this.cPage < this.tPage) {
        this.search(this.cPage + 1)
      }
    }
  },
  search (cPage = 1) {
    var that = this
    wx.showLoading({
      title: '搜索中',
      mask: true,
      success: (res) => {},
      fail: (res) => {},
      complete: (res) => {},
    this.setData({
      reachBottom: true
    })
    setTimeout(() => {
      wx.hideLoading()
    }, 20000);
    consultservice.searchLaw(app.globalData.accessToken.userId, this.data.keyword, cPage, 5, {
      onPage(head){
        that.cPage = head.page
        that.tPage = head.totalPage
      },
      success (res) {
        let result = that.data.result
        res.forEach(r => {
          r.des = r.des.replaceAll('\\n', '<br/>')
          if (result.length === 0) {
            result.push({
              typeId: r.typeId,
              typeName: r.typeName,
              contents: [r]
            })
          } else {
            result[0].contents.push(r)
          }
        });
        that.setData({
          result
        })
        console.log(result);
      },
      complete (res) {
        wx.hideLoading()
      }
    }, this.data.typeId)
  },
})
pages/m_consult/consultresultmore/consultresultmore.json
@@ -2,5 +2,7 @@
  "navigationBarTitleText": "更多结果",
  "navigationBarBackgroundColor": "#57E4CB",
  "navigationBarTextStyle": "white",
  "usingComponents": {}
  "usingComponents": {
    "c-result-item-search": "../c_result-item-search/c_result-item-search"
  }
}
pages/m_consult/consultresultmore/consultresultmore.wxml
@@ -1,48 +1,10 @@
<!--pages/m_consult/consultresultmore/consultresultmore.wxml-->
<view class="page">
  <block wx:for="{{result}}" wx:key="i1" wx:for-item="catagory" wx:for-index="i1">
    <view class="page__hd">
      <view><text style="color: #57E4CB;">{{keyword}}</text>的{{catagory.typeName}} ></view>
      <view><text style="color: #57E4CB;">{{keyobj.keyword}}</text>的{{typeName}} ></view>
    </view>
    <view class="page__bd">
      <view class="fyui-panel">
        <block wx:if="{{catagory.typeId === 1}}">
          <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail">
            <view class="fyui-box  fyui-box__text">
              <view class="fyui-box__hd">
                {{item.name}}
      <c-result-item-search reachBottom="{{reachBottom}}" keyobj="{{keyobj}}"></c-result-item-search>
              </view>
              <view class="fyui-box__bd">
                <view class="fyui-box__content tag">相关行业 -> {{item.fileIndustry}}</view>
                <view class="fyui-box__content des">{{item.des}}</view>
              </view>
              <view class="fyui-box__ft">
                <text class="keyword">关键词:</text>
                <view class="keyword-item"><text wx:for="{{item.keywords}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text></view>
              </view>
            </view>
          </view>
        </block>
        <block wx:else="{{catagory.typeId === 2}}">
          <view wx:for="{{catagory.contents}}" wx:key="i2" wx:for-index="i2" data-index="{{i1}},{{i2}}" bindtap="gotoDetail">
            <view class="fyui-box  fyui-box__text">
              <view class="fyui-box__hd">
                <rich-text nodes="{{item.des}}" class="fyui-box__content des subtitle"></rich-text>
              </view>
              <view class="fyui-box__bd">
                <!-- <view class="fyui-box__content tag">相关行业 -> {{item.fileIndustry}}</view> -->
                <text class="tag2">来源:《{{item.fileName}}》 {{item.chapterName}}{{item.name ? ' ' + item.name : ''}}</text>
              </view>
              <view class="fyui-box__ft">
                <text class="keyword">关键词:</text>
                <view class="keyword-item"><text wx:for="{{item.keywords}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text></view>
              </view>
            </view>
          </view>
        </block>
      </view>
    </view>
  </block>
  <view class="page__ft"></view>
</view>
pages/m_consult/consultresultmore/consultresultmore.wxss
@@ -1,52 +1,4 @@
/* pages/m_consult/consultresult/consultresult.wxss */
.keyword {
  white-space: nowrap;
}
.keyword-item {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.keyword-item>text {
  white-space: nowrap;
  margin-right: 8px;
  padding: 0px 6px;
  color: #2c7064;
}
.des {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  width: 100%;
  overflow: hidden;
  /* text-overflow: ellipsis; */
}
.tag {
  margin-bottom: 8px;
}
.subtitle{
  font-size: 15px;
}
.tag2{
  font-size: 12px;
  color: var(--fyui-text-color_3);
}
.btn-more{
  text-align: center;
  background-color: white;
  margin: 0 10px;
  border-top: 1px solid var(--fyui-BG_1);
  color: var(--fyui-text-color_2);
  padding: 8px;
  font-size: 12px;
}
.btn-more:active{
  background-color: var(--fyui-BG-COLOR-ACTIVE);
.page__hd {
  padding-bottom: 8px;
}
pages/m_learn/behaviors/b_openFile.js
@@ -47,7 +47,7 @@
          break;
          //视频
        case 4:
          url = "/pages/m_common/pagevideo/pagevideo"
          url = "/pages/m_learn/p_learnvideo/p_learnvideo"
          break;
      }
      if (url != "") {
pages/m_learn/p_learnvideo/p_learnvideo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,85 @@
// pages/module_common/pagevideo/pagevideo.js
import ListPage from '../../../base/ListPage'
import b_fetch from '../behaviors/b_fetch'
const lawservice = require("../../../service/lawservice")
const moment = require('../../../utils/moment.min')
const app = getApp()
ListPage({
  behaviors: [b_fetch],
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    video: {},
    series: [],
    thisVideo: 1,
    showDialog: false,
    groups: [
      'actionSlot1',
    ]
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
    var that = this
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      setTimeout(() => {
        that.setData({
          video: data
        })
      }, 500);
      // é¡µé¢æ ‡é¢˜
      if (data.lrResourcetitle) {
        wx.setNavigationBarTitle({
          title: data.lrResourcetitle,
        })
      }
      // è§†é¢‘所在合集
      if (data.lrExtension2 && data.lrExtension2 != '') {
        if (data.lrExtension3) {
          that.setData({
            thisVideo: parseInt(data.lrExtension3)
          })
        }
        that.getSerise(data.lrExtension2)
      }
    })
    this.getResources({fileType: 4})
  },
  getSerise(seriesId) {
    var that = this
    lawservice.getSerise(app.globalData.userInfo.guid, seriesId, {
      success(data) {
        that.setData({
          series: data
        })
      },
    })
  },
  showSeries() {
    this.setData({
      showDialog: true
    })
  },
  selectVideo(e) {
    let thisVideo = e.currentTarget.dataset.index
    const video = this.data.series[thisVideo]
    thisVideo++
    this.setData({
      video,
      thisVideo,
      showDialog: false
    })
  }
})
pages/m_learn/p_learnvideo/p_learnvideo.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
{
  "navigationBarTitleText": "视频播放",
  "navigationBarBackgroundColor": "#65EAD2",
  "navigationBarTextStyle": "white",
  "usingComponents": {
    "mp-icon": "/component/icon/icon",
    "c-learn-item": "../base_c/c_learn-item/c_learn-item",
    "mp-actionSheet": "/component/actionsheet/actionsheet"
  }
}
pages/m_learn/p_learnvideo/p_learnvideo.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
<!--pages/module_common/pagevideo/pagevideo.wxml-->
<view class="page">
  <view class="page__hd">
    <video class="video" id="myVideo" src="{{video.lrBodyurl}}" binderror="videoErrorCallback" show-center-play-btn='{{false}}' show-play-btn="{{true}}" controls autoplay custom-cache="{{false}}" poster="{{video.lrPicurl}}" picture-in-picture-mode="{{['push', 'pop']}}" bindenterpictureinpicture='bindVideoEnterPictureInPicture' bindleavepictureinpicture='bindVideoLeavePictureInPicture'></video>
  </view>
  <view class="page__bd">
    <view class="fyui-box  fyui-box__text">
      <view class="fyui-box__hd">
        {{video.lrResourcetitle}}
      </view>
      <view class="fyui-box__bd">
        <view class="fyui-box__content">{{video.lrResourcedesc}}</view>
      </view>
      <view class="fyui-box__ft">
        <view>{{video.lrPublishdate}}</view>
        <view class="flex-h">
          <image src="/res/icons/view.png" class="icon" style="margin-right: 4px;"></image>{{video.views}}
        </view>
      </view>
    </view>
    <view>
      <view wx:if="{{series.length > 0}}" class="fyui-box  fyui-box__text">
        <view class="video-series" bindtap="showSeries">
          <view>视频合集({{thisVideo}}/{{series.length}})</view>
          <mp-icon icon="arrow" class="icon-down" size="14" color="#7F7F7F"></mp-icon>
        </view>
      </view>
    </view>
  </view>
  <view class="page__ft">
    <view class="title">相关视频</view>
    <!-- <c-learn-item results="{{results}}" loading="{{loading}}" needLoadMore="{{needLoadMore}}"></c-learn-item> -->
    <view wx:for="{{results}}" wx:key="index" wx:item="item">
      <view class="fyui-box" bindtap="gotoResource" data-index="{{index}}">
        <view class="fyui-box__hd">
          <image src="{{item.lrPicurl}}" class="" mode="aspectFill" />
        </view>
        <view class="fyui-box__bd">
          <view class="fyui-box__content">{{item.lrResourcetitle}}</view>
          <view class="fyui-box__tag">
            <view>{{item.lrPublishdate}}</view>
            <view class="flex-h">
              <image src="/res/icons/view.png" class="icon" style="margin-right: 4px;"></image>{{item.views}}
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
  <mp-actionSheet show="{{showDialog}}" actions="{{groups}}" showCancel="{{false}}">
    <view slot="actionSlot1" class="custom-action">
      <view class="custom-action__series">
        <view wx:for="{{series}}" wx:key="index" data-index="{{index}}" bindtap="selectVideo">
          <view class="custom-action__video {{thisVideo == index + 1 ? 'selected' : ''}}">
            {{index+1}}. {{item.lrResourcetitle}}
          </view>
        </view>
      </view>
    </view>
  </mp-actionSheet>
</view>
pages/m_learn/p_learnvideo/p_learnvideo.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
/* pages/module_common/pagevideo/pagevideo.wxss */
.page__hd{
  padding: 0;
}
.page__ft{
  text-align: left;
}
.video{
  width: 100%;
}
.video-series {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--fyui-BG_1);
  border-radius: 4px;
  padding: 2px 16px;
  font-size: 14px;
  color: var(--fyui-text-color_2);
}
.title{
  text-align: start;
  padding: 0 16px;
  font-weight: 600;
  font-size: 16px;
}
.fyui-box__content {
  text-align: start;
}
.custom-action {
  position: relative;
  min-height: 40vh;
}
.custom-action__series {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  /* background-color: blueviolet; */
}
.custom-action__series>view {
  width: 50%;
  /* background-color: rosybrown; */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.custom-action__video {
  width: 86%;
  color: var(--fyui-text-color_2);
  border: 1px solid var(--fyui-text-color_2);
  border-radius: 4px;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selected{
  color: white;
  border: 1px solid var(--fyui-primary-color);
  background-color: var(--fyui-primary-color);
}
pages/m_user/mine/mine.wxml
@@ -34,21 +34,21 @@
      </view>
      <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="3">
        <view class="fyui-cell__hd">
          <image src="/res/icons/icon5.png" class="icon" />
          <image src="/res/icons/my_favor.png" class="icon" />
        </view>
        <view class="fyui-cell__bd">我的收藏</view>
        <view class="fyui-cell__ft"></view>
      </view>
      <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="4">
        <view class="fyui-cell__hd">
          <image src="/res/icons/icon5.png" class="icon" />
          <image src="/res/icons/my_consult.png" class="icon" />
        </view>
        <view class="fyui-cell__bd">我要咨询</view>
        <view class="fyui-cell__ft"></view>
      </view>
      <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="5">
        <view class="fyui-cell__hd">
          <image src="/res/icons/icon5.png" class="icon" />
          <image src="/res/icons/my_schedule.png" class="icon" />
        </view>
        <view class="fyui-cell__bd">环保日程</view>
        <view class="fyui-cell__ft"></view>
pages/m_user/mine/mine.wxss
@@ -5,6 +5,13 @@
  padding-bottom: 30px;
}
.fyui-cell_select {
  font-size: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fyui-BG_1);
}
.flex-h {
  justify-content: flex-start;
  align-items: center;
pages/m_user/userlogin/userlogin.js
@@ -40,14 +40,6 @@
      desc: '用于显示,提示用户当前已登录',
      success(res) {
        console.log(res);
        // wx.login({
        //   timeout: 10000,
        //   success: (result) => {
        //     console.log(result);
        //   },
        //   fail: (res) => {},
        //   complete: (res) => {},
        // })
        that.login()
      }
res/icons/my_consult.png
res/icons/my_favor.png
res/icons/my_schedule.png
res/icons/qa.png
service/baserequest.js
@@ -11,8 +11,8 @@
const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
// const baseUrl = "http://127.0.0.1:8080"
// const baseUrl = "http://192.168.0.106:8080"
const baseUrl = "https://fyami.com.cn:447"
const baseUrl = "http://192.168.0.111: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/"
@@ -37,7 +37,8 @@
  }
  var fun1 = util.deepCopy(fun)
  fun1.success = function (res) {
    console.log("--------------请求结果----------------" + fun.url);
    // console.log("--------------请求结果----------------");
    console.log("|--访问: " + fun.url);
    console.log(res);
    if (fun.onHead) {
service/lawservice.js
@@ -25,4 +25,27 @@
    $f.post(fun1)
  },
  //获取资源所在系列
  getSerise: function (userId, seriesId, fun) {
    let cb = {
      url: `/laws/series`,
      params: {
        userId: userId,
        seriesId: seriesId
      },
    }
    Object.assign(cb, fun)
    let fun1 = util.deepCopy(cb)
    fun1.success = function (res) {
      res.forEach(r => {
        r.lrPicurl = $f.basePicUrl + r.lrPicurl
        r.lrBodyurl = $f.baseFileUrl + r.lrBodyurl
      });
      cb.success(res)
    }
    $f.post(fun1)
  },
}