Browse Source

修改拼团

魏超 5 years ago
parent
commit
af8f4ed659

+ 1
- 1
src/pages/activity/groupActivity/editGroupActivity.jsx View File

140
       submitValue.endTime = moment(endTime).format('YYYY-MM-DD HH:mm');
140
       submitValue.endTime = moment(endTime).format('YYYY-MM-DD HH:mm');
141
       console.log('submit data --->', submitValue)
141
       console.log('submit data --->', submitValue)
142
       if (groupActivityId) {
142
       if (groupActivityId) {
143
-        submitValue.groupActicityId = groupActivityId
143
+        submitValue.groupActivityId = groupActivityId
144
         request({ ...apis.groupActivity.update, data: submitValue }).then((data) => {
144
         request({ ...apis.groupActivity.update, data: submitValue }).then((data) => {
145
           message.info("保存成功")
145
           message.info("保存成功")
146
           cancelPage()
146
           cancelPage()

+ 0
- 1
src/pages/activity/groupActivity/helpRecord.jsx View File

32
 
32
 
33
   componentDidUpdate (preProps, preState) {
33
   componentDidUpdate (preProps, preState) {
34
     const { groupActivityId } = this.props.visibleData
34
     const { groupActivityId } = this.props.visibleData
35
-    console.log("groupActivityId",this.props.visibleData);
36
     if (this.props.visibleData.visible !== preState.visibleData.visible) {
35
     if (this.props.visibleData.visible !== preState.visibleData.visible) {
37
       this.getList({ ...this.props.visibleData, pageNumber: 1, pageSize: 5 })
36
       this.getList({ ...this.props.visibleData, pageNumber: 1, pageSize: 5 })
38
       this.setState({ visibleData: this.props.visibleData });
37
       this.setState({ visibleData: this.props.visibleData });

+ 6
- 6
src/pages/activity/groupActivity/list.jsx View File

101
           {row.activityStatus === 0 &&
101
           {row.activityStatus === 0 &&
102
           <AuthButton name="admin.SignList.get" noRight={null}>
102
           <AuthButton name="admin.SignList.get" noRight={null}>
103
         
103
         
104
-            <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.groupActicityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span>
104
+            <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span>
105
             <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
105
             <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
106
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
106
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
107
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
107
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
109
 
109
 
110
           {row.activityStatus === 1 &&
110
           {row.activityStatus === 1 &&
111
            <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
111
            <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
112
-                      <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditActivity(row.groupActicityId)}>编辑<Icon type="form" className={styles.edit} /></span>
112
+                      <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditActivity(row.groupActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
113
                       <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
113
                       <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
114
                       <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
114
                       <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
115
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
115
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
118
 
118
 
119
           {row.activityStatus === 2 &&
119
           {row.activityStatus === 2 &&
120
         <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
120
         <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
121
-           <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.groupActicityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span>
121
+           <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span>
122
            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
122
            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
123
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
123
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
124
         </AuthButton>
124
         </AuthButton>
156
   
156
   
157
   //结束活动
157
   //结束活动
158
   const endGroupActivity = (row) => () => {
158
   const endGroupActivity = (row) => () => {
159
-      request({ ...apis.groupActivity.finish, urlData: { id: row.groupActicityId} }).then((data) => {
159
+      request({ ...apis.groupActivity.finish, urlData: { id: row.groupActivityId} }).then((data) => {
160
           console.log(data)
160
           console.log(data)
161
           message.info('操作成功!')
161
           message.info('操作成功!')
162
           getList({ pageNum: 1, pageSize: 10 })
162
           getList({ pageNum: 1, pageSize: 10 })
168
 
168
 
169
   //置顶
169
   //置顶
170
   const topGroupActivity = (row, weight) => () => {
170
   const topGroupActivity = (row, weight) => () => {
171
-    request({ ...apis.groupActivity.top, data: { groupActicityId: row.groupActicityId, weight: weight } }).then((data) => {
171
+    request({ ...apis.groupActivity.top, data: { groupActivityId: row.groupActivityId, weight: weight } }).then((data) => {
172
         console.log(data)
172
         console.log(data)
173
         message.info('操作成功!')
173
         message.info('操作成功!')
174
         getList({ pageNum: 1, pageSize: 10 })
174
         getList({ pageNum: 1, pageSize: 10 })
180
 
180
 
181
   //首页推荐
181
   //首页推荐
182
   const recommendGroupActivity = (row, code) => () => {
182
   const recommendGroupActivity = (row, code) => () => {
183
-    request({ ...apis.groupActivity.top, data: { groupActicityId: row.groupActicityId, sort: row.sort } }).then((data) => {
183
+    request({ ...apis.groupActivity.top, data: { groupActivityId: row.groupActivityId, sort: row.sort } }).then((data) => {
184
         console.log(data)
184
         console.log(data)
185
         message.info('操作成功!')
185
         message.info('操作成功!')
186
         getList({ pageNum: 1, pageSize: 10 })
186
         getList({ pageNum: 1, pageSize: 10 })