forked from nsjcy/frontEnd/nsjcy

liuwh
2020-02-27 d828320e6384df831839bde49f09cf2ad1c49899
提交
6 files modified
70 ■■■■ changed files
SunshineIns/src/data/menu.js 2 ●●● patch | view | raw | blame | history
SunshineIns/src/fetch/_fetch.js 4 ●●●● patch | view | raw | blame | history
SunshineIns/src/page/ActiveManage.jsx 2 ●●● patch | view | raw | blame | history
SunshineIns/src/page/ActiveManageEdit.jsx 52 ●●●●● patch | view | raw | blame | history
SunshineIns/src/page/Login.jsx 4 ●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js 6 ●●●● patch | view | raw | blame | history
SunshineIns/src/data/menu.js
@@ -85,7 +85,7 @@
  path: '/sweeping'
}, {
  id: 'activeManage',
  name: '法制活动',
  name: '法治活动',
  icon: active,
  iconCheck: activeCheck,
  path: '/activeManage'
SunshineIns/src/fetch/_fetch.js
@@ -1,8 +1,8 @@
import fetch from 'hife/fetch';
// export const base = 'http://xnwj.gznsjc.gov.cn';
export const base = 'http://nsjc.vaiwan.com';
// export const base = 'http://nsjcy.hugeinfo.com.cn';
// export const base = 'http://nsjc.vaiwan.com';
export const base = 'http://nsjcy.hugeinfo.com.cn';
// export const base = 'http://192.168.0.147:8081';
SunshineIns/src/page/ActiveManage.jsx
@@ -89,7 +89,7 @@
    }
    componentDidMount() {
        document.title = '活动管理';
        document.title = '法治活动';
        this.getData();
    }
SunshineIns/src/page/ActiveManageEdit.jsx
@@ -77,7 +77,7 @@
                if (endTime == null) {
                    endTime = Date.now();
                }
                console.log
                console.log(res.attachments)
                this.setState({
                    savedate: {
                        ...res.activity,
@@ -93,6 +93,7 @@
                    status: res.activity.activityStatus || '',
                    disabled: res.activity.activityStatus == 0 ? false : true,
                    dateSource: res.personList || [],
                    // fileList: res.attachments.length > 0 ? res.attachments.filter(item=>(item.typeId==1000)) : [],
                    fileList: res.attachments || [],
                    loading: false,
                });
@@ -295,14 +296,35 @@
    handleCancel = () => this.setState({ previewVisible: false })
    render() {
        const { savedate, previewVisible, previewImage,editorState, fileList, dateSource, code, hitList, activityType, disabled, loading } = this.state;
        console.log('disabled', disabled)
        const { savedate, previewVisible, previewImage, editorState, fileList, dateSource, code, hitList, activityType, disabled, loading } = this.state;
        console.log('disabled', fileList)
        const props = {
            action: domain + 'api/v1/attachment/materials?entityId=' + savedate.id,
            onChange: ({ file, fileList }) => {
                this.setState({ fileList });
            },
            fileList: fileList,
            fileList: fileList.filter(item=>(item.typeId==1000)),
            onRemove: (file) => {
                Fetch.deleteAttachment(file.uid)
                    .then(res => {
                        message.success("移除成功!");
                    });
                this.setState(({ fileList }) => {
                    const index = fileList.indexOf(file);
                    const newFileList = fileList.slice();
                    newFileList.splice(index, 1);
                    return {
                        fileList: newFileList,
                    };
                });
            }
        };
        const bottmProps = {
            action: domain + 'api/v1/attachment/materials?entityId=' + savedate.id,
            onChange: ({ file, fileList }) => {
                this.setState({ fileList });
            },
            fileList: fileList.filter(item=>(item.typeId==1020)),
            onRemove: (file) => {
                Fetch.deleteAttachment(file.uid)
                    .then(res => {
@@ -382,7 +404,7 @@
                <Spin spinning={loading}>
                    <HeadView history={this.props.history} />
                    <Breadcrumb style={{ padding: '20px' }}>
                        <Breadcrumb.Item><a href="index.html#/activeManage">活动管理</a></Breadcrumb.Item>
                        <Breadcrumb.Item><a href="index.html#/activeManage">法治活动</a></Breadcrumb.Item>
                        <Breadcrumb.Item>活动发布</Breadcrumb.Item>
                    </Breadcrumb>
                    <BusDetailView type='活动发布' >
@@ -514,6 +536,26 @@
                                </div> : null) : null
                        }
                        {
                            activityType == 'act_2' || activityType == 'act_3' ? (dateSource.length > 0 ?
                                <div style={divStyle}>
                                    <Divider orientation="left" style={{ margin: '20px', width: '97%' }}>培训结果</Divider>
                                    <div style={divStyle}>
                                        <Row type="flex" align='top' justify="space-around">
                                            <Col span={6} pull={0} style={{ textAlign: 'center' }}><span>添加图片</span></Col>
                                            <Col span={18} push={0} >
                                                <Upload disabled={disabled} listType="picture-card" onPreview={this.handlePreview} {...bottmProps}>
                                                </Upload>
                                                <Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
                                                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
                                                </Modal>
                                            </Col>
                                        </Row>
                                    </div>
                                </div> : null) : null
                        }
                        {
                            activityType == 'act_1' && (
                                savedate.activityStatus == null || savedate.activityStatus == 0 ?
                                    <div style={{ display: 'flex', justifyContent: 'center' }}>
SunshineIns/src/page/Login.jsx
@@ -40,10 +40,10 @@
    Fetch.userLogin({ userName, password }).then(res => {
      console.log(res)
      // debugger;
      location.href ='http://localhost:8080/index.html#/'
      // location.href ='http://localhost:8080/index.html#/'
      if (res.code === 0) {
        // location.href = res.data;
        // location.href ='http://192.168.0.159:8080/index.html#/'
        location.href ='http://nsjcy.hugeinfo.com.cn/nsjc-charge/pc/index.html#/'
      } else {
        message.error(res.msg, 2)
      }
SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js
@@ -53,7 +53,7 @@
            that.setData({
              signStatus: options.signStatus
            })
          } else {
          } else {sign
            if (options.flag == 'true') {
              //可报名
              console.log('可报名')
@@ -138,7 +138,7 @@
          title: '识别中',
        })
        wx.request({
          url: app.globalData.url + '/api/activity/sign?id'+id+'&code='+res.result+'&userId='+userId,
          url: app.globalData.url + '/api/activity/sign?id='+id+'&code='+res.result+'&userId='+userId,
          method: 'GET',
          header: {
            "Content-Type": "application/json"
@@ -153,7 +153,7 @@
              })
            } else {
              wx.showToast({
                title: '报名失败,请稍后重试!',
                title: '签到失败,请稍后重试!',
                icon: 'none'
              })
            }