yee 7 yıl önce
ebeveyn
işleme
d0e920e4f9
1 değiştirilmiş dosya ile 0 ekleme ve 34 silme
  1. 0 34
      js/component/manageCenter/idea/news/news.jsx

+ 0 - 34
js/component/manageCenter/idea/news/news.jsx

@@ -8,16 +8,11 @@ import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
 function uploadImg(s) {
-<<<<<<< HEAD
-    let myform = new FormData();
-    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');
     $.ajax({
         method: "post",
@@ -30,33 +25,20 @@ function uploadImg(s) {
             if (data.error && data.error.length) {
                 message.warning(data.error[0].message);
             } else {
-<<<<<<< HEAD
-                let theUrl = data.data;
-                const cursorPosition = s.quill.getSelection().index
-                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)
             };
         }
     })
 }
 function fileSelect() {
-<<<<<<< HEAD
-    let uploader = document.getElementById("fileToUpload"), _me = this;
-    uploader.onchange = () => {
-        uploadImg(_me);
-    };
-=======
     let uploader = document.getElementById("fileToUpload");
     if (!uploader.onchange) {
         uploader.onchange = () => {
             uploadImg(this)
         }
     }
->>>>>>> 6216a1d29e2cfc72eae6df5c9bb1dad2b513a700
     uploader.click();
 }
 const Avatar = React.createClass({
@@ -533,7 +515,6 @@ const News = React.createClass({
                                         <Radio value={1}>是</Radio>
                                     </Radio.Group>
                                 </div>
-<<<<<<< HEAD
                             </div>
                         </div>
                         <div className="modal-box">
@@ -548,21 +529,6 @@ const News = React.createClass({
                             name="fileToUpload"
                             id="fileToUpload"
                             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">
                             <Button type="primary" onClick={this.submit}>提交</Button>
                             <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>