forked from nsjcy/frontEnd/nsjcy

LAPTOP-RI7D261L\Mr Ke
2020-02-04 d25d5769416fbb2e861e8f434c5a6770ff69c482
同步代码
1 files deleted
12 files added
11 files modified
870 ■■■■■ changed files
SunshineIns/src/fetch/_fetch.js 5 ●●●●● patch | view | raw | blame | history
SunshineIns/src/fetch/export.js 9 ●●●●● patch | view | raw | blame | history
SunshineIns/src/fetch/finds.js 9 ●●●●● patch | view | raw | blame | history
SunshineIns/src/fetch/importExcel.js 9 ●●●●● patch | view | raw | blame | history
SunshineIns/src/fetch/index.js 11 ●●●●● patch | view | raw | blame | history
SunshineIns/src/fetch/test1.js 47 ●●●●● patch | view | raw | blame | history
SunshineIns/src/page/Active.jsx 9 ●●●● patch | view | raw | blame | history
SunshineIns/src/page/Login.jsx 4 ●●●● patch | view | raw | blame | history
SunshineIns/src/view/BulidMakingView/index.jsx 288 ●●●●● patch | view | raw | blame | history
SunshineIns/src/view/BulidMakingView/style.scss 34 ●●●● patch | view | raw | blame | history
SunshineIns/src/view/HeadView/style.scss 3 ●●●● patch | view | raw | blame | history
SunshineIns/src/view/TableBtnView/style.scss 1 ●●●● patch | view | raw | blame | history
SunshineLnsMinApp/app.js 4 ●●●● patch | view | raw | blame | history
SunshineLnsMinApp/app.json 2 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzxkt/fzxkt.js 66 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzxkt/fzxkt.json 7 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzxkt/fzxkt.wxml 40 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzxkt/fzxkt.wxss 61 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzxktDetail/fzxktDetail.js 106 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzxktDetail/fzxktDetail.json 6 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzxktDetail/fzxktDetail.wxml 54 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzxktDetail/fzxktDetail.wxss 72 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/index/index.wxml 6 ●●●●● patch | view | raw | blame | history
project.config.json 17 ●●●●● patch | view | raw | blame | history
SunshineIns/src/fetch/_fetch.js
@@ -1,8 +1,7 @@
import fetch from 'hife/fetch';
export const base = 'http://xnwj.gznsjc.gov.cn';
//export const base = 'http://192.168.0.22:8085';
// export const base = 'http://xnwj.gznsjc.gov.cn';
export const base = 'http://192.168.0.147:8081';
export const domain = base + '/nsjc-charge/';
SunshineIns/src/fetch/export.js
New file
@@ -0,0 +1,9 @@
import fetch from './_fetch';
import { message } from 'antd';
export default () => fetch(`api/statistics/export`)
    .then(
        json => json
    )
    .catch(
        error => message.error('解锁失败,请联系管理员', 2)
    );
SunshineIns/src/fetch/finds.js
New file
@@ -0,0 +1,9 @@
import fetch from './_fetch';
import { message } from 'antd';
export default () => fetch(`api/statistics/finds`)
    .then(
        json => json
    )
    .catch(
        error => message.error('解锁失败,请联系管理员', 2)
    );
SunshineIns/src/fetch/importExcel.js
New file
@@ -0,0 +1,9 @@
import fetch from './_fetch';
import { message } from 'antd';
export default () => fetch(`api/statistics/importExcel`)
    .then(
        json => json
    )
    .catch(
        error => message.error('解锁失败,请联系管理员', 2)
    );
SunshineIns/src/fetch/index.js
@@ -65,6 +65,11 @@
import unlocking from './unlocking';
import deleteUser from './deleteUser';
import getUserLog from './getUserLog';
import test1 from './test1';
import finds from './finds';
import importExcel from './importExcel';
import Eexport from './export';
export default {
  domain,
  getMenu,
@@ -132,5 +137,9 @@
  getLog,
  unlocking,
  deleteUser,
  getUserLog
  getUserLog,
  test1,
  finds,
  importExcel,
  Eexport
};
SunshineIns/src/fetch/test1.js
New file
@@ -0,0 +1,47 @@
import toPromise, { arrayFromSeed } from './fetchUtils';
export default () => toPromise({
  table1: arrayFromSeed({
    date: ['2019'],
    type: ['已处理', '未处理', '处理中', '总量'],
    appeal: ['1', '2', '3', '4'],
    damage: ['4', '3', '2', '1'],
    petition: ['5', '6', '7', '8'],
    judicial: ['8', '7', '6', '5'],
  }, 4).map((row, index) => ({
    ...row,
    key: index + 1,
  })),
  table2: arrayFromSeed({
    date: ['2019'],
    type: ['已处理', '未处理', '处理中', '总量'],
    appeal: ['1', '2', '3', '4'],
    damage: ['4', '3', '2', '1'],
    petition: ['5', '6', '7', '8'],
    judicial: ['8', '7', '6', '5'],
  }, 4).map((row, index) => ({
    ...row,
    key: index + 1,
  })),
  table3: arrayFromSeed({
    date: ['2019'],
    type: ['已处理', '未处理', '处理中', '总量'],
    appeal: ['1', '2', '3', '4'],
    damage: ['4', '3', '2', '1'],
    petition: ['5', '6', '7', '8'],
    judicial: ['8', '7', '6', '5'],
  }, 4).map((row, index) => ({
    ...row,
    key: index + 1,
  })),
  table4: arrayFromSeed({
    date: ['2019'],
    type: ['已处理', '未处理', '处理中', '总量'],
    appeal: ['1', '2', '3', '4'],
    damage: ['4', '3', '2', '1'],
    petition: ['5', '6', '7', '8'],
    judicial: ['8', '7', '6', '5'],
  }, 4).map((row, index) => ({
    ...row,
    key: index + 1,
  })),
});
SunshineIns/src/page/Active.jsx
@@ -1,6 +1,6 @@
/**
 * 徐祥健<xuxj@hugeinfo.com.cn>
 * 2018年7月22日 16:42
 * 刘文浩<xuxj@hugeinfo.com.cn>
 * 2019年9月27日 16:42
 *
 */
@@ -17,11 +17,6 @@
    this.state = {
      data: null
    };
  }
  componentDidMount() {
    document.title = '南检活动管理';
    // const { id } = this.props.match.params;
  }
  render() {
SunshineIns/src/page/Login.jsx
@@ -38,8 +38,12 @@
      password = btoa(password);
    }
    Fetch.userLogin({ userName, password }).then(res => {
      console.log(res)
      // debugger;
      // location.href ='http://192.168.0.159:8080/index.html#/'
      if (res.code === 0) {
        location.href = res.data;
        // location.href ='http://192.168.0.159:8080/index.html#/'
      } else {
        message.error(res.msg, 2)
      }
SunshineIns/src/view/BulidMakingView/index.jsx
@@ -1,18 +1,296 @@
/**
 * 徐祥健<xuxj@hugeinfo.com.cn>
 * 2018年7月22日 16:40
 * 刘文浩<xuxj@hugeinfo.com.cn>
 * 2019年9月27日 16:42
 *
 */
import React from 'react';
import './style.scss';
import { Table, Card, Button, Upload, Icon, message } from 'antd';
import Fetch from '../../fetch';
import { domain } from '../../fetch/_fetch';
import moment from 'moment';
export default function BulidMakingView({ loading }) {
export default class BulidMakingView extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      data: null,
      loading: false,
    };
  }
  componentDidMount() {
    // const { id } = this.props.match.params;
    console.log(1111)
    this.loadstate();
  }
  loadstate = () => {
    Fetch.finds().then(res => {
      if (res.code === 0) {
        console.log(res.data)
        this.setState({
          data: res.data
        })
      } else {
        message.error(res.msg, 2)
      }
    })
  }
  render() {
    // 业务报表
    const columns = [
      {
        title: '日期',
        dataIndex: 'date',
        render: (value, row, index) => {
          const obj = {
            children: moment(new Date()).format("YYYY") + '年',
            props: {},
          };
          if (index === 0) {
            obj.props.rowSpan = 4;
          } if (index === 1) {
            obj.props.rowSpan = 0;
          } if (index === 2) {
            obj.props.rowSpan = 0;
          } if (index === 3) {
            obj.props.rowSpan = 0;
          }
          return obj;
        },
      },
      {
        title: '类型',
        className: 'column-type',
        dataIndex: 'type',
      },
      {
        title: '在线申诉',
        className: 'column-appeal',
        dataIndex: 'appeal',
      },
      {
        title: '国家赔偿',
        className: 'column-compensate',
        dataIndex: 'compensate',
      },
      {
        title: '信访预约',
        className: 'column-appointment',
        dataIndex: 'appointment',
      },
      {
        title: '司法救助',
        className: 'column-judicial',
        dataIndex: 'judicial',
      },
    ];
    //事项申请报表
    const columns1 = [
      {
        title: '日期',
        dataIndex: 'date',
        render: (value, row, index) => {
          const obj = {
            children: moment(new Date()).format("YYYY") + '年',
            props: {},
          };
          if (index === 0) {
            obj.props.rowSpan = 4;
          } if (index === 1) {
            obj.props.rowSpan = 0;
          } if (index === 2) {
            obj.props.rowSpan = 0;
          } if (index === 3) {
            obj.props.rowSpan = 0;
          }
          return obj;
        },
      },
      {
        title: '类型',
        className: 'column-type',
        dataIndex: 'type',
      },
      {
        title: '申请司法救助',
        className: 'column-judicial ',
        dataIndex: 'judicial',
      },
      {
        title: '申请国家赔偿',
        className: 'column-compensate',
        dataIndex: 'compensate',
      },
      {
        title: '申请活动报名',
        className: 'column-registration',
        dataIndex: 'registration',
      },
      {
        title: '其他申请',
        className: 'column-otherApply',
        dataIndex: 'otherApply',
      },
    ];
    //账号报表
    const columns2 = [
      {
        title: '类型',
        className: 'column-type',
        dataIndex: 'type',
      },
      {
        title: '启动中',
        className: 'column-appeal',
        dataIndex: 'using',
      },
      {
        title: '停用',
        className: 'column-damage',
        dataIndex: 'stop',
      },
      {
        title: '总览',
        className: 'column-petition',
        dataIndex: 'petition',
        render: (text, record) => {
          return record.using ? (Number(record.using) + Number(record.stop)) : ''
        }
      }
    ];
    //投诉建议报表
    const columns3 = [
      {
        title: '日期',
        dataIndex: 'date',
        render: (value, row, index) => {
          const obj = {
            children: moment(new Date()).format("YYYY") + '年',
            props: {},
          };
          if (index === 0) {
            obj.props.rowSpan = 4;
          } if (index === 1) {
            obj.props.rowSpan = 0;
          } if (index === 2) {
            obj.props.rowSpan = 0;
          } if (index === 3) {
            obj.props.rowSpan = 0;
          }
          return obj;
        },
      },
      {
        title: '类型',
        className: 'column-type',
        dataIndex: 'type',
      },
      {
        title: '扫黑除恶',
        className: 'column-purify',
        dataIndex: 'purify',
      },
      {
        title: '公益诉讼',
        className: 'column-welfare',
        dataIndex: 'welfare',
      },
      {
        title: '信访投诉',
        className: 'column-petition',
        dataIndex: 'petition',
      },
      {
        title: '其他投诉',
        className: 'column-otherComplaint',
        dataIndex: 'otherComplaint',
      },
    ];
    const { data } = this.state;
    const props = {
      multiple: false,
      showUploadList: false,
      name: 'excel',
      action: domain + `api/statistics/importExcel`,
      headers: {
        authorization: 'authorization-text',
      },
      onChange: (info) => {
        if (info.file.status !== 'uploading') {
          console.log(info.file, info.fileList);
        }
        if (info.file.response.code === 0) {
          message.success(`${info.file.name}导入成功!`);
          console.log('刷新页面')
          this.loadstate()
        } else if (info.file.response.code === -1) {
          message.error(`${info.file.name} 导入失败!`);
        }else {
          message.error(`${info.file.name} 导入异常!`);
        }
      },
    };
  return (
    <div className="bulid-making-view-main">
      功能开发中......
        <div className='bulid-making-view-button'>
          <Upload {...props}>
            <Button type="primary" size="large" className="bulid-making-view-margin">一键导入</Button>
          </Upload>
          <Button size="large" className="bulid-making-view-margin"><a href={domain + `api/statistics/export`}>一键导出</a></Button>
        </div>
        <div className="bulid-making-view-row">
          <Card title="业务报表" hoverable className="bulid-making-view-row-table bulid-making-view-marginTop">
            <Table
              className="bulid-making-view-row-table1"
              columns={columns}
              dataSource={data ? data.businessReportList : []}
              pagination={false}
              bordered
            />
          </Card>
          <Card title="事项申请报表" hoverable className="bulid-making-view-row-table bulid-making-view-marginTop">
            <Table
              className="bulid-making-view-row-table1"
              columns={columns1}
              dataSource={data ? data.applyReportList : []}
              pagination={false}
              bordered
            />
          </Card>
        </div>
        <div className="bulid-making-view-row">
          <Card title="账号报表" hoverable className="bulid-making-view-row-table">
            <Table
              className="bulid-making-view-row-table1"
              columns={columns2}
              dataSource={data ? data.accountReportList : []}
              pagination={false}
              bordered
            />
          </Card>
          <Card title="投诉建议报表" hoverable className="bulid-making-view-row-table">
            <Table
              className="bulid-making-view-row-table1"
              columns={columns3}
              dataSource={data ? data.complaintReportList : []}
              pagination={false}
              bordered
            />
          </Card>
        </div>
    </div>
  );
  }
}
SunshineIns/src/view/BulidMakingView/style.scss
@@ -1,6 +1,6 @@
/**
 * 徐祥健<xuxj@hugeinfo.com.cn>
 * 2018年7月22日 16:40
 * 刘文浩<xuxj@hugeinfo.com.cn>
 * 2019年9月27日 16:42
 *
 */
@@ -9,13 +9,27 @@
.bulid-making-view {
  &-main {
    height: 85vh;
    margin: 20px;
    background: #fff;
    align-items: center;
    display: flex;
    justify-content: space-around;
    font-size: 40px;
    height: 90vh;
  }
  &-row {
    display: flex;
  }
  &-button {
    height: 10vh;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  &-margin {
    margin: 0 24px;
    width: 16vh;
  }
  &-row-table {
    flex: 1;
    border: 1px solid #eee;
    margin: 2vh;
  }
  &-marginTop {
    margin-top: 0px
  }
}
SunshineIns/src/view/HeadView/style.scss
@@ -11,9 +11,8 @@
  &-main {
    background-color: #fff;
    padding: 1% 1% 1% 1%;
    height: 10%;
    height: 10vh;
    line-height: 30px;
    margin-bottom: 20px;
  }
  &-name {
SunshineIns/src/view/TableBtnView/style.scss
@@ -31,5 +31,6 @@
  &-btn {
    margin-left: 90%;
    margin-bottom: 20px;
    margin-top: 20px;
  }
}
SunshineLnsMinApp/app.js
@@ -13,8 +13,8 @@
     //url: 'https://hugeinfo.com.cn/nsjc-charge',
  //url: 'http://192.168.0.31:8085/nsjc-charge',
    //imgUrl: 'https://hugeinfo.com.cn/nsjc-charge',
     url: 'https://xnwj.gznsjc.gov.cn/nsjc-charge',
    imgUrl: 'https://xnwj.gznsjc.gov.cn/nsjc-charge'
    url: 'http://nsjc.vaiwan.com/nsjc-charge',
    imgUrl: 'http://nsjc.vaiwan.com/nsjc-charge'
  },
  // 过滤数组
  where: (collection, source) => {
SunshineLnsMinApp/app.json
@@ -5,6 +5,8 @@
    "pages/zhwj/zhwj",
    "pages/fzpx/fzpx",
    "pages/fzpxInfo/fzpxInfo",
    "pages/fzxkt/fzxkt",
    "pages/fzxktDetail/fzxktDetail",
    "pages/weiwc/weiwc",
    "pages/zhgh/zhgh",
    "pages/zhghInfo/zhghInfo",
SunshineLnsMinApp/pages/fzxkt/fzxkt.js
New file
@@ -0,0 +1,66 @@
// pages/fzxkt/fzxkt.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
    TabCur: 0,
    scrollLeft: 0,
    tabList: ['未成年人', '公益诉讼', '其他'],
    dataSet: [{
      createTime: '2020/2/3 15:30',
      readCount: 2,
      title: '课堂名称'
    }, {
      createTime: '2020/2/3 15:30',
      readCount: 2,
      title: '课堂名称'
    }],
    isHideLoadMore: true, //loading样式
    isHideMorebtn: true, //更多按钮样式
    isHideEnd: true, //有底线样式  (三者默认隐藏)
    size: 10
  },
  tabSelect(e) {
    this.setData({
      TabCur: e.currentTarget.dataset.id,
      scrollLeft: (e.currentTarget.dataset.id - 1) * 60
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function() {
  }
})
SunshineLnsMinApp/pages/fzxkt/fzxkt.json
New file
@@ -0,0 +1,7 @@
{
  "usingComponents": {},
  "navigationBarTitleText": "法制小课堂",
  "backgroundTextStyle": "light",
  "navigationBarBackgroundColor": "#fff",
  "navigationBarTextStyle": "black"
}
SunshineLnsMinApp/pages/fzxkt/fzxkt.wxml
New file
@@ -0,0 +1,40 @@
<!--pages/fzxkt/fzxkt.wxml-->
<scroll-view scroll-x class="bg-white nav solid-top">
  <view class="flex text-center">
    <view class="cu-item flex-sub {{index==TabCur?'text-blue cur':''}}" wx:for="{{tabList}}" wx:key bindtap="tabSelect" data-id="{{index}}">
      {{item}}
    </view>
  </view>
</scroll-view>
<view class="lawPublicity-list">
  <view wx:for="{{dataSet}}" wx:key="{{item.id}}">
    <view class="lawPublicity-item">
      <view class="content-right" data-Id="{{item.id}}" bindtap="link">
        <image src="{{item.coverUrl}}"></image>
      </view>
      <view class="content-left">
        <view class="headLineTitle" data-Id="{{item.id}}" bindtap="link">
          {{item.title}}
        </view>
        <text class="cuIcon-favorfill lg text-blue"></text>
        <view class="headLineInfo">
          <view class="info-source">{{item.createTime}}</view>
          <view class="info-viewer">{{item.readCount}}人观看</view>
        </view>
      </view>
    </view>
    <view class="border">
    </view>
  </view>
</view>
<view class="weui-loadmore" hidden="{{isHideMorebtn}}">
  <view class="weui-loadmore__tips" bindtap='getMore'>点击加载更多</view>
</view>
<view class="weui-loadmore" hidden="{{isHideLoadMore}}">
  <view class="weui-loading"></view>
  <view class="weui-loadmore__tips">正在加载</view>
</view>
<view class="weui-loadmore" hidden="{{isHideEnd}}">
  <view class="weui-loadmore__tips">------------我是有底线的------------</view>
</view>
SunshineLnsMinApp/pages/fzxkt/fzxkt.wxss
New file
@@ -0,0 +1,61 @@
/* pages/fzxkt/fzxkt.wxss */
.lawPublicity-list {
  margin: 12rpx 0;
}
.border {
  margin-left: 24rpx;
  height: 1px;
  background: #ccc;
  margin: 12rpx 0 12rpx 24rpx;
}
.lawPublicity-item {
  height: 148rpx;
  display: flex;
  flex-direction: row;
  color: rgba(51, 51, 51, 1);
  text-align: left;
  font-family: PingFangSC-Regular;
  padding: 12rpx 24rpx;
  /* border-bottom: 1rpx solid #eee; */
}
.content-left {
  width: 416rpx;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.content-right {
  flex: 1;
  margin-right: 50rpx;
  background: #ccc;
  width: 100%;
  height: 100%;
}
.content-right image {
  width: 100%;
  height: 100%;
}
.headLineTitle {
  /* height: 88rpx; */
  font-size: 16px;
  line-break: 44rpx;
  color: rgba(51, 51, 51, 1);
  /* margin-bottom: 26rpx; */
}
.headLineInfo {
  display: flex;
  font-size: 12px;
  color: rgba(153, 153, 153, 1);
}
.info-source {
  margin-right: 20rpx;
}
SunshineLnsMinApp/pages/fzxktDetail/fzxktDetail.js
New file
@@ -0,0 +1,106 @@
// lawPublicityDetail.js
const app = getApp();
var WxParse = require('../wxParse/wxParse.js');
Page({
  /**
   * 页面的初始数据
   */
  data: {
    content: '',
    attList: {},
    excelSrc: app.globalData.imgUrl +'/image/fileIcon/excel.svg',
    fileSrc: app.globalData.imgUrl +'/image/fileIcon/file.svg',
    mp3Src: app.globalData.imgUrl +'/image/fileIcon/mp3.svg',
    mp4Src: app.globalData.imgUrl +'/image/fileIcon/mp4.svg',
    pdfSrc: app.globalData.imgUrl +'/image/fileIcon/pdf.svg',
    pictureSrc: app.globalData.imgUrl +'/image/fileIcon/picture.svg',
    pptSrc: app.globalData.imgUrl +'/image/fileIcon/ppt.svg',
    wordSrc: app.globalData.imgUrl +'/image/fileIcon/word.svg',
    zipSrc: app.globalData.imgUrl +'/image/fileIcon/zip.svg',
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    wx.request({
      url: app.globalData.url + '/api/article/legalServiceInfo?articleId=' + options.id,
      success: function(res) {
        if (res.data.code == 0){
          var article = res.data.data.content;
          WxParse.wxParse('article', 'html', article, that, 5);
          var attList = res.data.data.attList;
          var attList21 = app.where(attList, { type: 21 }) || [];
          attList21.forEach(e => {
            e.iconSrc = that.data.mp4Src
          })
          var attList22 = app.where(attList, { type: 22 }) || [];
          attList22.forEach(e => {
            e.iconSrc = that.data.pictureSrc
          })
          var attList23 = app.where(attList, { type: 23 }) || [];
          attList23.forEach(e => {
            e.iconSrc = that.data.wordSrc
          })
          var attList24 = app.where(attList, { type: 24 }) || [];
          attList24.forEach(e => {
            e.iconSrc = that.data.excelSrc
          })
          var attList25 = app.where(attList, { type: 25 }) || [];
          attList25.forEach(e => {
            e.iconSrc = that.data.pptSrc
          })
          var attList26 = app.where(attList, { type: 26 }) || [];
          attList26.forEach(e => {
            e.iconSrc = that.data.pdfSrc
          })
          var attList27 = app.where(attList, { type: 27 }) || [];
          attList27.forEach(e => {
            e.iconSrc = that.data.zipSrc
          })
          var attList28 = app.where(attList, { type: 28 }) || [];
          attList28.forEach(e => {
            e.iconSrc = that.data.fileSrc
          })
          var attList99 = app.where(attList, { type: 99 }) || [];
          attList99.forEach(e => {
            e.iconSrc = that.data.fileSrc
          })
          var attList = { attList21, attList22, attList23, attList24, attList25, attList26, attList27, attList28, attList99 };
          console.log(attList)
          that.setData({
            attList
          })
        } else{
          wx.showModal({
            title: '提示',
            content: "请求失败!"
          })
        }
      }
    })
  },
  // 预览附件
  open:function(e) {
    var path = e.currentTarget.dataset.path;
    console.log(path)
    wx.downloadFile({
      url: path,
      success: function (res) {
        const filePath = res.tempFilePath
        wx.openDocument({
          filePath: filePath,
          success: function (res) {
            console.log('打开文档成功')
          }
        })
      }
    })
  }
})
7
SunshineLnsMinApp/pages/fzxktDetail/fzxktDetail.json
New file
@@ -0,0 +1,6 @@
{
  "navigationBarTitleText": "法律宣传",
  "backgroundTextStyle": "light",
  "navigationBarBackgroundColor": "#fff",
  "navigationBarTextStyle": "black"
}
SunshineLnsMinApp/pages/fzxktDetail/fzxktDetail.wxml
New file
@@ -0,0 +1,54 @@
<!--lawPublicityDetail.wxml-->
<import src="../wxParse/wxParse.wxml"/>
<view class="detail">
  <template is="wxParse" data="{{wxParseData:article.nodes}}" />
  <view wx:for="{{attList.attList21}}" wx:key="{{key}}">
    <video id="myVideo" src="{{item.path}}"
    danmu-list="{{danmuList}}" enable-danmu danmu-btn controls></video>
  </view>
</view>
<div class="index-gray"></div>
<div class="detail-main">
  <div class="detail-message">
    <span></span>
    <span>相关附件</span>
  </div>
  <div class="detail-img">
    <view class="attList"  wx:for="{{attList.attList22}}" class="file" wx:key="{{key}}">
      <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image>
      <div class="detail-img-bottom">{{item.name}}</div>
    </view>
    <view class="attList"  wx:for="{{attList.attList23}}" class="file" wx:key="{{key}}">
      <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image>
      <div class="detail-img-bottom">{{item.name}}</div>
    </view>
    <view class="attList"  wx:for="{{attList.attList24}}" class="file" wx:key="{{key}}">
      <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image>
      <div class="detail-img-bottom">{{item.name}}</div>
    </view>
    <view class="attList"  wx:for="{{attList.attList25}}" class="file" wx:key="{{key}}">
      <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image>
      <div class="detail-img-bottom">{{item.name}}</div>
    </view>
    <view class="attList"  wx:for="{{attList.attList26}}" class="file" wx:key="{{key}}">
      <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image>
      <div class="detail-img-bottom">{{item.name}}</div>
    </view>
    <view class="attList"  wx:for="{{attList.attList27}}" class="file" wx:key="{{key}}">
      <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image>
      <div class="detail-img-bottom">{{item.name}}</div>
    </view>
    <view class="attList"  wx:for="{{attList.attList28}}" class="file" wx:key="{{key}}">
      <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image>
      <div class="detail-img-bottom">{{item.name}}</div>
    </view>
    <view class="attList"  wx:for="{{attList.attList99}}" class="file" wx:key="{{key}}">
      <image src="{{item.iconSrc}}" class="fileIcon" bindtap="open" data-path="{{item.path}}" class="detail-img-top"></image>
      <div class="detail-img-bottom">{{item.name}}</div>
    </view>
  </div>
</div>
SunshineLnsMinApp/pages/fzxktDetail/fzxktDetail.wxss
New file
@@ -0,0 +1,72 @@
/* lawPublicityDetail.wxss */
@import "../wxParse/wxParse.wxss";
.detail{
  font-size: 14px;
  line-height:22px;
  padding: 20rpx;
  box-shadow: 0px 6px 6px 0 rgba(80, 119, 170, 0.06);
}
.file{
  display: inline-block;
}
.file .fileIcon{
  width: 72rpx;
  height: 54rpx;
  padding: 10rpx;
}
.red-tips{
  color: red;
  font-size: 14px;
  margin:20rpx 0 0 20rpx;
}
#myVideo{
  display: block;
  width: 100%;
}
.file {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.detail-img {
  display: flex;
  flex-direction: columns;
  align-items: center;
  padding: 2vh;
}
.detail-img-top {
  width: 48px;
  height: 48px;
}
.detail-img-bottom {
  font-size: 12px;
  color: #333;
  width: 70px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.detail-message {
  display: flex;
  padding: 2vh;
  border-top: 1px solid #f2f2f2;
  border-bottom: 1px solid #f2f2f2;
}
.detail-message span:nth-child(1) {
  border-left: 3px solid #2195ff;
}
.detail-message span:nth-child(2) {
  padding-left: 1vh;
  font-size: 18px;
  font-weight: bold;
}
SunshineLnsMinApp/pages/index/index.wxml
@@ -270,9 +270,15 @@
          </view>
        </view>
        <view class="bg-img" style="margin: 6px;height: 78px;flex: 1; line-height: 78px;">
          <view class="bg-img" data-str="fzxkt" bindtap='linkFunction' style="background-image: url('https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1291150546,1510144282&fm=26&gp=0.jpg');">
            <view class="bg-shadeTop">
              法治小课堂
            </view>
          </view>
        </view>
        <!-- <view class='VerticalNav-flex-div'></view> -->
      </view>
      <!-- <view class='VerticalNav-flex-t'>
        <view class='VerticalNav-flex-div'>信访预约</view>
        <view class='VerticalNav-flex-div'>监督联络站</view>
project.config.json
File was deleted