更新对不使用/使用区块链的判断适配 #506
|
@ -23,5 +23,5 @@ export const getUser = async (login)=>{
|
|||
|
||||
// 获取用户对应项目内的信息(例如:用户对某个项目的贡献情况) author: zxh
|
||||
export const getUser4Proj = async (login, projectsId)=>{
|
||||
return (await axios.get(`/users/${login}/hovercard4proj.json?project_name=${projectsId}`)).data;
|
||||
return (await axios.get(`/users/${login}/hovercard4proj.json?project_identifier=${projectsId}`)).data;
|
||||
}
|
|
@ -644,13 +644,6 @@ class MessageCount extends Component {
|
|||
value={this.state.body}
|
||||
onChange={this.changbodypr}
|
||||
/>
|
||||
{/*<Input*/}
|
||||
{/* type="select"*/}
|
||||
{/* placeholder="请选择解决的issue"*/}
|
||||
{/* style={{ marginTop: 20 }}*/}
|
||||
{/* value={this.state.fix_issue_id}*/}
|
||||
{/* onChange={this.changefixissue}*/}
|
||||
{/*/>*/}
|
||||
<Select
|
||||
id = {'select_project'}
|
||||
style={{ marginTop: 20, width: "500px" }}
|
||||
|
|
|
@ -52,7 +52,7 @@ class Index extends Component {
|
|||
languageFlag:false,
|
||||
ignoreFlag:false,
|
||||
licenseFlag:false,
|
||||
show_div:"hidden",
|
||||
display: "none",
|
||||
}
|
||||
}
|
||||
componentDidMount = () => {
|
||||
|
@ -303,13 +303,13 @@ class Index extends Component {
|
|||
|
||||
// add by zxh: handleBlockchainChange
|
||||
handleBlockchainChange = (event) => {
|
||||
if (this.state.show_div == 'hidden') {
|
||||
if (this.state.display == "none") {
|
||||
this.setState({
|
||||
show_div: "visible"
|
||||
display: "block"
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
show_div: "hidden"
|
||||
display: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -578,40 +578,6 @@ class Index extends Component {
|
|||
<Checkbox value="limit">将项目设为私有<span className="font-13 color-grey-9">(只有项目所有人或拥有权限的项目成员才能看到)</span></Checkbox>
|
||||
)}
|
||||
</Form.Item >
|
||||
{/*增加区块链选项,不要求必选,默认是选择的*/}
|
||||
<Form.Item
|
||||
label="确权"
|
||||
style={{ margin: "0px" }}
|
||||
className="privatePart"
|
||||
>
|
||||
{getFieldDecorator('blockchain')(
|
||||
<Checkbox value="limit" onClick={this.handleBlockchainChange}>项目加入确权机制<span className="ml15 font-13 color-grey-9">(贡献确权上链并使用权益证明代表贡献)</span></Checkbox>
|
||||
)}
|
||||
</Form.Item >
|
||||
|
||||
<Form.Item
|
||||
style={{ margin: "15px", display: "block" }}
|
||||
className="privatePart"
|
||||
ref={(blockchain_item => {this.blockchain_item = blockchain_item})}
|
||||
>
|
||||
<div class="div_flex_row" style={{visibility: this.state.show_div == "visible" ? "visible": "hidden"}}>
|
||||
{getFieldDecorator('blockchain_token_all', {
|
||||
rules: [{
|
||||
required: false, message: '请填写项目token总数(单位:枚)'
|
||||
}],
|
||||
})(
|
||||
<Input type={'number'} min={0} step={1} placeholder="请填写项目token总数(单位:枚)" />
|
||||
)}
|
||||
|
||||
{getFieldDecorator('blockchain_init_token', {
|
||||
rules: [{
|
||||
required: false, message: '请填写项目创始人获取token的百分比(%)'
|
||||
}],
|
||||
})(
|
||||
<Input type={'number'} min={0} max={100} step={1} placeholder="请填写项目创始人获取token的百分比(%)" />
|
||||
)}
|
||||
</div>
|
||||
</Form.Item>
|
||||
|
||||
{
|
||||
projectsType && projectsType === "mirror" &&
|
||||
|
@ -680,6 +646,42 @@ class Index extends Component {
|
|||
)}
|
||||
</Form.Item>
|
||||
}
|
||||
|
||||
{/*增加区块链选项,不要求必选,默认是选择的*/}
|
||||
<Form.Item
|
||||
label="确权"
|
||||
style={{ margin: "0px" }}
|
||||
className="privatePart"
|
||||
>
|
||||
{getFieldDecorator('blockchain')(
|
||||
<Checkbox value="limit" onClick={this.handleBlockchainChange}>项目加入确权机制<span className="ml15 font-13 color-grey-9">(贡献确权上链并使用权益证明代表贡献)</span></Checkbox>
|
||||
)}
|
||||
</Form.Item >
|
||||
|
||||
<Form.Item
|
||||
style={{ margin: "15px", display: "block" }}
|
||||
className="privatePart"
|
||||
ref={(blockchain_item => {this.blockchain_item = blockchain_item})}
|
||||
>
|
||||
<div class="div_flex_row" style={{display: this.state.display == "block" ? "block": "none"}}>
|
||||
{getFieldDecorator('blockchain_token_all', {
|
||||
rules: [{
|
||||
required: false, message: '请填写项目token总数(单位:枚)'
|
||||
}],
|
||||
})(
|
||||
<Input type={'number'} min={0} step={1} placeholder="请填写项目token总数(单位:枚)" />
|
||||
)}
|
||||
|
||||
{getFieldDecorator('blockchain_init_token', {
|
||||
rules: [{
|
||||
required: false, message: '请填写项目创始人获取token的百分比(%)'
|
||||
}],
|
||||
})(
|
||||
<Input type={'number'} min={0} max={100} step={1} placeholder="请填写项目创始人获取token的百分比(%)" />
|
||||
)}
|
||||
</div>
|
||||
</Form.Item>
|
||||
|
||||
<div className="mt20">
|
||||
注:<span className="ant-form-item-required"></span> 为必填项,否则为选填
|
||||
</div>
|
||||
|
|
|
@ -42,8 +42,8 @@ class Detail extends Component {
|
|||
}
|
||||
|
||||
componentDidMount = () => {
|
||||
this.getDetail();
|
||||
this.getBlockchainTokenNum();
|
||||
this.getDetail();
|
||||
};
|
||||
|
||||
componentDidUpdate=()=>{
|
||||
|
@ -362,10 +362,13 @@ class Detail extends Component {
|
|||
)}
|
||||
</span>
|
||||
</p>
|
||||
<p className="grid-item-left pb15">
|
||||
{
|
||||
this.state.blockchain_token_num != -1 ? <p className="grid-item-left pb15">
|
||||
<span className="issue_detail_info">悬赏金额:</span>
|
||||
<span>{this.state.blockchain_token_num}</span>
|
||||
</p>
|
||||
</p> : ""
|
||||
}
|
||||
|
||||
<p className="grid-item-left pb15">
|
||||
<span className="issue_detail_info">里程碑:</span>
|
||||
<span className="title_overflow">
|
||||
|
|
|
@ -490,10 +490,11 @@ class order_form extends Component {
|
|||
</div>
|
||||
<div className="list-left list-left-padding issue-edit-form-right">
|
||||
<div className="pd20 background-f issue-form-right">
|
||||
{issue_chosen && issue_chosen.use_blockchain ?
|
||||
<Form.Item label="悬赏金额">
|
||||
{getFieldDecorator("issue_token_num", {rules: []})(
|
||||
{getFieldDecorator("issue_token_num", { rules: [] })(
|
||||
<Input
|
||||
ref={(input) => this.input_token=input}
|
||||
ref={(input) => this.input_token = input}
|
||||
type={"number"}
|
||||
min={0}
|
||||
max={this.state.issue_token_num}
|
||||
|
@ -502,6 +503,8 @@ class order_form extends Component {
|
|||
/>
|
||||
)}
|
||||
</Form.Item>
|
||||
: ""}
|
||||
|
||||
<Form.Item label="指派成员">
|
||||
{getFieldDecorator("assigned_to_id", {rules: []})(
|
||||
<Select
|
||||
|
|
Loading…
Reference in New Issue