|  | @@ -8,8 +8,16 @@ import ajax from 'jquery/src/ajax/xhr.js';
 | 
												
													
														
															|  |  import $ from 'jquery/src/ajax';
 |  |  import $ from 'jquery/src/ajax';
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  function uploadImg(s) {
 |  |  function uploadImg(s) {
 | 
												
													
														
															|  | 
 |  | +<<<<<<< HEAD
 | 
												
													
														
															|  |      let myform = new FormData();
 |  |      let myform = new FormData();
 | 
												
													
														
															|  |      myform.append('file', document.getElementById("fileToUpload").files[0]);
 |  |      myform.append('file', document.getElementById("fileToUpload").files[0]);
 | 
												
													
														
															|  | 
 |  | +=======
 | 
												
													
														
															|  | 
 |  | +    let myform = new FormData(), file = document.getElementById("fileToUpload").files[0];
 | 
												
													
														
															|  | 
 |  | +    if (!file) {
 | 
												
													
														
															|  | 
 |  | +        return;
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  | 
 |  | +    myform.append('file', file);
 | 
												
													
														
															|  | 
 |  | +>>>>>>> 6216a1d29e2cfc72eae6df5c9bb1dad2b513a700
 | 
												
													
														
															|  |      myform.append('sign', 'news_content_picture');
 |  |      myform.append('sign', 'news_content_picture');
 | 
												
													
														
															|  |      $.ajax({
 |  |      $.ajax({
 | 
												
													
														
															|  |          method: "post",
 |  |          method: "post",
 | 
												
											
												
													
														
															|  | @@ -22,19 +30,33 @@ function uploadImg(s) {
 | 
												
													
														
															|  |              if (data.error && data.error.length) {
 |  |              if (data.error && data.error.length) {
 | 
												
													
														
															|  |                  message.warning(data.error[0].message);
 |  |                  message.warning(data.error[0].message);
 | 
												
													
														
															|  |              } else {
 |  |              } else {
 | 
												
													
														
															|  | 
 |  | +<<<<<<< HEAD
 | 
												
													
														
															|  |                  let theUrl = data.data;
 |  |                  let theUrl = data.data;
 | 
												
													
														
															|  |                  const cursorPosition = s.quill.getSelection().index
 |  |                  const cursorPosition = s.quill.getSelection().index
 | 
												
													
														
															|  |                  s.quill.insertEmbed(cursorPosition, 'image', globalConfig.avatarHost + '/upload' + theUrl)
 |  |                  s.quill.insertEmbed(cursorPosition, 'image', globalConfig.avatarHost + '/upload' + theUrl)
 | 
												
													
														
															|  | 
 |  | +=======
 | 
												
													
														
															|  | 
 |  | +                const cursorPosition = s.quill.getSelection().index
 | 
												
													
														
															|  | 
 |  | +                s.quill.insertEmbed(cursorPosition, 'image', globalConfig.avatarHost + '/upload' + data.data)
 | 
												
													
														
															|  | 
 |  | +>>>>>>> 6216a1d29e2cfc72eae6df5c9bb1dad2b513a700
 | 
												
													
														
															|  |                  s.quill.setSelection(cursorPosition + 1)
 |  |                  s.quill.setSelection(cursorPosition + 1)
 | 
												
													
														
															|  |              };
 |  |              };
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |      })
 |  |      })
 | 
												
													
														
															|  |  }
 |  |  }
 | 
												
													
														
															|  |  function fileSelect() {
 |  |  function fileSelect() {
 | 
												
													
														
															|  | 
 |  | +<<<<<<< HEAD
 | 
												
													
														
															|  |      let uploader = document.getElementById("fileToUpload"), _me = this;
 |  |      let uploader = document.getElementById("fileToUpload"), _me = this;
 | 
												
													
														
															|  |      uploader.onchange = () => {
 |  |      uploader.onchange = () => {
 | 
												
													
														
															|  |          uploadImg(_me);
 |  |          uploadImg(_me);
 | 
												
													
														
															|  |      };
 |  |      };
 | 
												
													
														
															|  | 
 |  | +=======
 | 
												
													
														
															|  | 
 |  | +    let uploader = document.getElementById("fileToUpload");
 | 
												
													
														
															|  | 
 |  | +    if (!uploader.onchange) {
 | 
												
													
														
															|  | 
 |  | +        uploader.onchange = () => {
 | 
												
													
														
															|  | 
 |  | +            uploadImg(this)
 | 
												
													
														
															|  | 
 |  | +        }
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  | 
 |  | +>>>>>>> 6216a1d29e2cfc72eae6df5c9bb1dad2b513a700
 | 
												
													
														
															|  |      uploader.click();
 |  |      uploader.click();
 | 
												
													
														
															|  |  }
 |  |  }
 | 
												
													
														
															|  |  const Avatar = React.createClass({
 |  |  const Avatar = React.createClass({
 | 
												
											
												
													
														
															|  | @@ -511,6 +533,7 @@ const News = React.createClass({
 | 
												
													
														
															|  |                                          <Radio value={1}>是</Radio>
 |  |                                          <Radio value={1}>是</Radio>
 | 
												
													
														
															|  |                                      </Radio.Group>
 |  |                                      </Radio.Group>
 | 
												
													
														
															|  |                                  </div>
 |  |                                  </div>
 | 
												
													
														
															|  | 
 |  | +<<<<<<< HEAD
 | 
												
													
														
															|  |                              </div>
 |  |                              </div>
 | 
												
													
														
															|  |                          </div>
 |  |                          </div>
 | 
												
													
														
															|  |                          <div className="modal-box">
 |  |                          <div className="modal-box">
 | 
												
											
												
													
														
															|  | @@ -525,6 +548,21 @@ const News = React.createClass({
 | 
												
													
														
															|  |                              name="fileToUpload"
 |  |                              name="fileToUpload"
 | 
												
													
														
															|  |                              id="fileToUpload"
 |  |                              id="fileToUpload"
 | 
												
													
														
															|  |                              style={{ "display": "none" }} />
 |  |                              style={{ "display": "none" }} />
 | 
												
													
														
															|  | 
 |  | +=======
 | 
												
													
														
															|  | 
 |  | +                            </Tabs.TabPane>
 | 
												
													
														
															|  | 
 |  | +                            <Tabs.TabPane tab="详情" key="2">
 | 
												
													
														
															|  | 
 |  | +                                <ReactQuill theme="snow"
 | 
												
													
														
															|  | 
 |  | +                                    value={this.state.RowData.content}
 | 
												
													
														
															|  | 
 |  | +                                    modules={modules}
 | 
												
													
														
															|  | 
 |  | +                                    formats={formats}
 | 
												
													
														
															|  | 
 |  | +                                    onChange={this.handleRichText} />
 | 
												
													
														
															|  | 
 |  | +                                <input type="file"
 | 
												
													
														
															|  | 
 |  | +                                    name="fileToUpload"
 | 
												
													
														
															|  | 
 |  | +                                    id="fileToUpload"
 | 
												
													
														
															|  | 
 |  | +                                    style={{ "display": "none" }} />
 | 
												
													
														
															|  | 
 |  | +                            </Tabs.TabPane>
 | 
												
													
														
															|  | 
 |  | +                        </Tabs>
 | 
												
													
														
															|  | 
 |  | +>>>>>>> 6216a1d29e2cfc72eae6df5c9bb1dad2b513a700
 | 
												
													
														
															|  |                          <div className="modal-box">
 |  |                          <div className="modal-box">
 | 
												
													
														
															|  |                              <Button type="primary" onClick={this.submit}>提交</Button>
 |  |                              <Button type="primary" onClick={this.submit}>提交</Button>
 | 
												
													
														
															|  |                              <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>
 |  |                              <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>
 |