Browse Source

修改栏目bug

yu_ber 4 years ago
parent
commit
38cd939d68
2 changed files with 323 additions and 221 deletions
  1. 7 24
      UI/src/pages/ArticleContentManage/index.js
  2. 316 197
      UI/src/pages/contentManage/columnManage.js

+ 7 - 24
UI/src/pages/ArticleContentManage/index.js

@@ -198,33 +198,15 @@ class ArticleManage extends React.Component {
     }).then((data) => {
       const returned = data.result
       const { typeItem } = this.state
-      if (returned.articlePhotoaddress) {
-        // const imgUrlMini = returned.articlePhotoaddress;
-        // if (imgUrlMini) {
-        //   let SsoToken = util.auth.getToken();
-        //   let imgSeperator = "?";
-        //   if (imgUrlMini.indexOf("?") !== -1) imgSeperator = "&";
-        //   if (imgUrlMini.indexOf("&") !== -1) imgSeperator = "&";
-        //   imgUrlMini = imgUrlMini.indexOf('Sso-Token') > -1 ? imgUrlMini : imgUrlMini + imgSeperator + 'Sso-Token=' + SsoToken;
-        //   console.log(imgUrlMini,'no默认的');
-        // }
-
-        // const url = this.updeImg(imgUrlMini)
-        //   this.setState({
-        //     headImgList:url,
-        //   })
-        // } else {
-        //   this.setState({
-        //     headImgList:[],
-        //   })
-      }
-
+  
+      var SsoToken = util.auth.getToken();
       const imgUrlMini = returned.articlePhotoaddress;
+      console.log(imgUrlMini,'imgUrlMini--imgUrlMini')
       var imgObj = [{
         uid: '-1',
-        url: imgUrlMini,
+        url: imgUrlMini+"?Sso-Token="+SsoToken,
       }]
-      console.log(imgObj);
+     console.log(imgUrlMini,'imgUrlMini');
       if (imgUrlMini) {
         this.setState({
           headImgList: imgObj,
@@ -234,6 +216,7 @@ class ArticleManage extends React.Component {
           headImgList: [],
         })
       }
+      console.log(this.state.headImgList)
       var typographicTypeList = []
       var checkedList = returned.typographicTypeList
       for (let i = 0; i < checkedList.length; i++) {
@@ -243,7 +226,7 @@ class ArticleManage extends React.Component {
           }
         }
       }
-      console.log(returned, 'returned');
+
       this.setState({
         defaultName: returned.column ? returned.column.columnName : "", // 栏目
         tagId: returned.column ? returned.column.columnId : "", // 栏目

File diff suppressed because it is too large
+ 316 - 197
UI/src/pages/contentManage/columnManage.js