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

小修改

parent b546d22d
......@@ -121,7 +121,7 @@ export const dosign = {
export const judgeAuthority = {
"code": 10012,
"data": {
"authority": "yes"
"authority": "no"
},
"message": null,
"success": true
......
......@@ -13,7 +13,7 @@
"@spark/guideact": "^1.0.11",
"@spark/projectx": "^1.0.3",
"@spark/share": "^1.0.29",
"@spark/ui": "^1.0.25",
"@spark/ui": "^2.0.36",
"axios": "^0.19.2",
"css-loader": "^3.6.0",
"duiba-utils": "^1.0.2",
......
'use strict';
import React, { Component } from 'react';
import { Toast } from '@spark/ui';
import { Toast, Loading } from '@spark/ui';
import resList from '../../resconfig/resList';
import API from '../../api';
import './task.less';
......@@ -10,16 +10,20 @@ class Task extends Component {
super(props);
this.state = {
resList: resList,
flag: true
flag: ''
};
}
componentDidMount() {
Loading.show();
this.judgeAuthority();
}
judgeAuthority = async () => {
const result = await API.judgeAuthority();
let result = await API.judgeAuthority();
if (result && result.success) {
if (typeof result.data == 'string') {
result.data = JSON.parse(result.data);
}
if (result.data.authority == 'yes') {
this.setState({
flag: false,
......@@ -34,6 +38,7 @@ class Task extends Component {
Toast("网络错误,请刷新页面后重试");
}
Loading.hide();
}
toApplyCard = () => {
......@@ -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="dong_wu_lian_meng " src={this.state.resList['b635ec14-2e70-4f6c-b304-d031e4b0b5d9'].url} />
</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 ">
<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} />}
......@@ -86,6 +87,11 @@ class Task extends Component {
}
/>
</div>
<img
className="fan_hui_nong_chang_an_niu "
src={this.state.resList['74bb50cd-5998-4274-af3e-e91b20099433'].url}
onClick={this.props.closeWin}
/>
</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