Commit e637ffbb authored by 实打实的's avatar 实打实的

小修改

parent b546d22d
...@@ -121,7 +121,7 @@ export const dosign = { ...@@ -121,7 +121,7 @@ export const dosign = {
export const judgeAuthority = { export const judgeAuthority = {
"code": 10012, "code": 10012,
"data": { "data": {
"authority": "yes" "authority": "no"
}, },
"message": null, "message": null,
"success": true "success": true
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"@spark/guideact": "^1.0.11", "@spark/guideact": "^1.0.11",
"@spark/projectx": "^1.0.3", "@spark/projectx": "^1.0.3",
"@spark/share": "^1.0.29", "@spark/share": "^1.0.29",
"@spark/ui": "^1.0.25", "@spark/ui": "^2.0.36",
"axios": "^0.19.2", "axios": "^0.19.2",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"duiba-utils": "^1.0.2", "duiba-utils": "^1.0.2",
......
'use strict'; 'use strict';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Toast } from '@spark/ui'; import { Toast, Loading } from '@spark/ui';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList';
import API from '../../api'; import API from '../../api';
import './task.less'; import './task.less';
...@@ -10,16 +10,20 @@ class Task extends Component { ...@@ -10,16 +10,20 @@ class Task extends Component {
super(props); super(props);
this.state = { this.state = {
resList: resList, resList: resList,
flag: true flag: ''
}; };
} }
componentDidMount() { componentDidMount() {
Loading.show();
this.judgeAuthority(); this.judgeAuthority();
} }
judgeAuthority = async () => { judgeAuthority = async () => {
const result = await API.judgeAuthority(); let result = await API.judgeAuthority();
if (result && result.success) { if (result && result.success) {
if (typeof result.data == 'string') {
result.data = JSON.parse(result.data);
}
if (result.data.authority == 'yes') { if (result.data.authority == 'yes') {
this.setState({ this.setState({
flag: false, flag: false,
...@@ -34,6 +38,7 @@ class Task extends Component { ...@@ -34,6 +38,7 @@ class Task extends Component {
Toast("网络错误,请刷新页面后重试"); Toast("网络错误,请刷新页面后重试");
} }
Loading.hide();
} }
toApplyCard = () => { toApplyCard = () => {
...@@ -56,11 +61,7 @@ class Task extends Component { ...@@ -56,11 +61,7 @@ class Task extends Component {
<img className="xing_qiu_da_zuo_zhan " src={this.state.resList['654f2e6f-aea1-4555-979b-3ca520ed7381'].url} /> <img className="xing_qiu_da_zuo_zhan " src={this.state.resList['654f2e6f-aea1-4555-979b-3ca520ed7381'].url} />
<img className="dong_wu_lian_meng " src={this.state.resList['b635ec14-2e70-4f6c-b304-d031e4b0b5d9'].url} /> <img className="dong_wu_lian_meng " src={this.state.resList['b635ec14-2e70-4f6c-b304-d031e4b0b5d9'].url} />
</div> </div>
<img
className="fan_hui_nong_chang_an_niu "
src={this.state.resList['74bb50cd-5998-4274-af3e-e91b20099433'].url}
onClick={this.props.closeWin}
/>
<div className="jiao_hu_kuang "> <div className="jiao_hu_kuang ">
<img className="qian_jing " src={this.state.resList['d9131617-ff12-4e1b-87ea-97304f2f5316'].url} /> <img className="qian_jing " src={this.state.resList['d9131617-ff12-4e1b-87ea-97304f2f5316'].url} />
{this.state.flag && <img className="qu_ban_li md14" src={this.state.resList['bd9cf4ad-19c0-42b7-a003-fd3a0e948215'].url} onClick={this.toApplyCard} />} {this.state.flag && <img className="qu_ban_li md14" src={this.state.resList['bd9cf4ad-19c0-42b7-a003-fd3a0e948215'].url} onClick={this.toApplyCard} />}
...@@ -86,6 +87,11 @@ class Task extends Component { ...@@ -86,6 +87,11 @@ class Task extends Component {
} }
/> />
</div> </div>
<img
className="fan_hui_nong_chang_an_niu "
src={this.state.resList['74bb50cd-5998-4274-af3e-e91b20099433'].url}
onClick={this.props.closeWin}
/>
</div> </div>
); );
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment