From d828320e6384df831839bde49f09cf2ad1c49899 Mon Sep 17 00:00:00 2001
From: liuwh <liuwh@hugeinfo.com.cn>
Date: Thu, 27 Feb 2020 08:43:55 +0800
Subject: [PATCH] 提交
---
SunshineIns/src/page/ActiveManage.jsx | 2
SunshineIns/src/fetch/_fetch.js | 4 +-
SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js | 6 +-
SunshineIns/src/page/ActiveManageEdit.jsx | 52 +++++++++++++++++++++++--
SunshineIns/src/data/menu.js | 2
SunshineIns/src/page/Login.jsx | 4 +-
6 files changed, 56 insertions(+), 14 deletions(-)
diff --git a/SunshineIns/src/data/menu.js b/SunshineIns/src/data/menu.js
index d336d7e..9103b77 100644
--- a/SunshineIns/src/data/menu.js
+++ b/SunshineIns/src/data/menu.js
@@ -85,7 +85,7 @@
path: '/sweeping'
}, {
id: 'activeManage',
- name: '法制活动',
+ name: '法治活动',
icon: active,
iconCheck: activeCheck,
path: '/activeManage'
diff --git a/SunshineIns/src/fetch/_fetch.js b/SunshineIns/src/fetch/_fetch.js
index dbde3fd..c1f0b48 100644
--- a/SunshineIns/src/fetch/_fetch.js
+++ b/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';
diff --git a/SunshineIns/src/page/ActiveManage.jsx b/SunshineIns/src/page/ActiveManage.jsx
index 1eebd18..2eacf29 100644
--- a/SunshineIns/src/page/ActiveManage.jsx
+++ b/SunshineIns/src/page/ActiveManage.jsx
@@ -89,7 +89,7 @@
}
componentDidMount() {
- document.title = '活动管理';
+ document.title = '法治活动';
this.getData();
}
diff --git a/SunshineIns/src/page/ActiveManageEdit.jsx b/SunshineIns/src/page/ActiveManageEdit.jsx
index c7651cd..dcf8803 100644
--- a/SunshineIns/src/page/ActiveManageEdit.jsx
+++ b/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' }}>
diff --git a/SunshineIns/src/page/Login.jsx b/SunshineIns/src/page/Login.jsx
index 5e13db0..eeddbb1 100644
--- a/SunshineIns/src/page/Login.jsx
+++ b/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)
}
diff --git a/SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js b/SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js
index d63220d..4704e66 100644
--- a/SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js
+++ b/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'
})
}
--
Gitblit v1.8.0