Browse Source

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

QuYueTing 6 tháng trước cách đây
mục cha
commit
c39e8ae1df
23 tập tin đã thay đổi với 210 bổ sung46 xóa
  1. 1 2
      fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/controller/ArticleController.java
  2. 64 0
      fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/controller/CommonUploadController.java
  3. 2 0
      fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/pojo/Article.java
  4. 1 1
      fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/pojo/ArticleCoverImg.java
  5. 1 2
      fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/service/ArticleService.java
  6. 11 14
      fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/service/impl/ArticleServiceImpl.java
  7. 6 1
      fhKeeper/formulahousekeeper/ArticleOperation/src/main/resources/application.yml
  8. 9 0
      fhKeeper/formulahousekeeper/ArticleOperation/src/main/resources/com/my/bigevent/mapper/ArticleMapper.xml
  9. 5 0
      fhKeeper/formulahousekeeper/articleBackend/src/api/article.js
  10. 26 10
      fhKeeper/formulahousekeeper/articleBackend/src/views/article/ArticleManage.vue
  11. 2 2
      fhKeeper/formulahousekeeper/articleBackend/vite.config.js
  12. 1 1
      fhKeeper/formulahousekeeper/inva_4_tivo/knowledge.ftl
  13. 2 2
      fhKeeper/formulahousekeeper/inva_4_tivo/knowledgeDetails.ftl
  14. 4 0
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/java/com/firerock/webttkuaiban/demos/controller/ArticleTemplateController.java
  15. 60 0
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/java/com/firerock/webttkuaiban/demos/controller/CommonUploadController.java
  16. 1 0
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/java/com/firerock/webttkuaiban/demos/pojo/Article.java
  17. 3 1
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/java/com/firerock/webttkuaiban/demos/pojo/ArticleCoverImg.java
  18. 2 1
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/application.properties
  19. 3 3
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/mapper/ArticleMapper.xml
  20. 1 1
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/static/knowledge.ftl
  21. 2 2
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/static/knowledgeDetails.ftl
  22. 1 1
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/templates/knowledge.ftl
  23. 2 2
      fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/templates/knowledgeDetails.ftl

+ 1 - 2
fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/controller/ArticleController.java

@@ -8,7 +8,6 @@ import com.my.bigevent.pojo.Result;
 import com.my.bigevent.service.ArticleService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 
@@ -73,7 +72,7 @@ public class ArticleController
                                          @RequestParam(value = "content",required = true) String content,
                                          @RequestParam(value = "profile",required = false) String profile,
                                          @RequestParam(value = "state",required = true) String state,
-                                         @RequestParam(value = "coverImage",required = false) MultipartFile coverImage,
+                                         @RequestParam(value = "coverImage",required = false) String coverImage,
                                          @RequestParam(value = "id",required = false) Integer id,
                                          @RequestParam(value = "productId",required = true) String productId
                                         )

+ 64 - 0
fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/controller/CommonUploadController.java

@@ -0,0 +1,64 @@
+package com.my.bigevent.controller;
+
+import com.my.bigevent.pojo.Result;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.UUID;
+
+@RestController
+@RequestMapping("/common")
+public class CommonUploadController {
+
+
+    @Value(value = "${upload.path}")
+    private String path;
+
+    @Value(value = "${upload.getPath}")
+    private String getPath;
+
+
+    @RequestMapping(value="uploadFile")
+    public Object uploadFile(MultipartFile multipartFile) {
+
+        //然后处理文件
+        String fileName = multipartFile.getOriginalFilename();
+        String[] split = fileName.split("\\.");
+        String serverName = UUID.randomUUID().toString().replaceAll("-", "") + "."+split[split.length-1];
+
+        //检查目录
+        File dir = new File(path);
+        if (!dir.exists()) {
+            dir.mkdir();
+        }
+        File file = new File(dir, serverName);
+        InputStream inputStream = null;
+        OutputStream outputStream = null;
+        try {
+            inputStream = multipartFile.getInputStream();
+            outputStream = new FileOutputStream(file);
+            byte[] buffer = new byte[4096];
+            int temp = 0;
+            while ((temp = inputStream.read(buffer, 0, 4096)) != -1) {
+                outputStream.write(buffer, 0, temp);
+            }
+            inputStream.close();
+            outputStream.close();
+
+            String url = getPath + serverName;
+            return Result.success(url);
+
+        } catch (Exception exception) {
+            exception.printStackTrace();
+        }
+
+        return null;
+    }
+
+}

+ 2 - 0
fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/pojo/Article.java

@@ -36,6 +36,8 @@ public class Article {
     private String productId;
     private String categoryNames;
 
+    private String coverImgUrl;
+
     @JsonFormat(pattern = "yyyy-MM-dd")
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     private LocalDateTime createTime;//创建时间

+ 1 - 1
fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/pojo/ArticleCoverImg.java

@@ -8,5 +8,5 @@ public class ArticleCoverImg {
 
     private Integer articleId;
 
-    private byte[] coverImgData;
+    private String coverImgData;
 }

+ 1 - 2
fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/service/ArticleService.java

@@ -3,7 +3,6 @@ package com.my.bigevent.service;
 import com.my.bigevent.pojo.Article;
 import com.my.bigevent.pojo.PageBean;
 import com.my.bigevent.pojo.Result;
-import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 
@@ -17,7 +16,7 @@ public interface ArticleService
 
     Article getArticleById(Integer id);
 
-    void insertOrUpdateArticle(String title, String categoryIds,String profile, String content, String state, MultipartFile coverImage,Integer id,String productId);
+    void insertOrUpdateArticle(String title, String categoryIds,String profile, String content, String state, String coverImage,Integer id,String productId);
 
     PageBean<Article> PageList(Integer pageIndex, Integer pageSize, String info);
 

+ 11 - 14
fhKeeper/formulahousekeeper/ArticleOperation/src/main/java/com/my/bigevent/service/impl/ArticleServiceImpl.java

@@ -106,9 +106,9 @@ public class ArticleServiceImpl implements ArticleService
         if (!as.isEmpty()){
             for (Article a : as) {
                 ArticleCoverImg articleCoverImg= coverImgMapper.selectByArticleId(a.getId());
-                if(null!=articleCoverImg&&articleCoverImg.getCoverImgData()!=null){
-                    a.setCoverImg(articleCoverImg.getCoverImgData());
-                }
+//                if(null!=articleCoverImg&&articleCoverImg.getCoverImgData()!=null){
+//                    a.setCoverImg(articleCoverImg.getCoverImgData());
+//                }
 
                 if (a.getCategoryIds()!=null&&!a.getCategoryIds().isEmpty()) {
                     List<String> categoryIds = JSONObject.parseArray(a.getCategoryIds(), String.class);
@@ -138,7 +138,7 @@ public class ArticleServiceImpl implements ArticleService
 
     @Override
     @Transactional
-    public void insertOrUpdateArticle(String title, String categoryIds,String profile, String content, String state, MultipartFile coverImage, Integer id,String productId) {
+    public void insertOrUpdateArticle(String title, String categoryIds,String profile, String content, String state, String coverImage, Integer id,String productId) {
         Optional.ofNullable(title).orElseThrow(() -> new RuntimeException("请传标题"));
         Optional.ofNullable(content).orElseThrow(() -> new RuntimeException("请书写文章内容"));
         Optional.ofNullable(state).orElseThrow(() -> new RuntimeException("请传递发布类型"));
@@ -160,13 +160,15 @@ public class ArticleServiceImpl implements ArticleService
             article.setUpdateTime(LocalDateTime.now());
             article.setCreateUser(6);
             article.setProductId(productId);
+            article.setCoverImgUrl(coverImage);
 
             articleMapper.insert(article);
             log.info("文章的id{}", article.getId());
 
-            if (coverImage != null) {
-                handleCoverImage(coverImage, article.getId());
-            }
+//            if (coverImage != null) {
+////                handleCoverImage(coverImage, article.getId());
+//
+//            }
         }
         // 修改
         else {
@@ -182,14 +184,9 @@ public class ArticleServiceImpl implements ArticleService
             article.setUpdateTime(LocalDateTime.now());
             article.setId(id);
             article.setProductId(productId);
+            article.setCoverImgUrl(coverImage);
             articleMapper.update(article);
 
-            if (coverImage != null) {
-                coverImgMapper.deleteByArticleId(id);
-                handleCoverImage(coverImage, article.getId());
-            } else {
-                coverImgMapper.deleteByArticleId(id);
-            }
         }
     }
 
@@ -250,7 +247,7 @@ public class ArticleServiceImpl implements ArticleService
             byte[] bytes = coverImage.getBytes();
             ArticleCoverImg articleCoverImg = new ArticleCoverImg();
             articleCoverImg.setArticleId(articleId);
-            articleCoverImg.setCoverImgData(bytes);
+//            articleCoverImg.setCoverImgData(bytes);
             coverImgMapper.insert(articleCoverImg);
         } catch (IOException e) {
             throw new RuntimeException("保存封面图片失败", e);

+ 6 - 1
fhKeeper/formulahousekeeper/ArticleOperation/src/main/resources/application.yml

@@ -17,4 +17,9 @@ mybatis:
     map-underscore-to-camel-case: true
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 server:
-  port: 8091
+  port: 8091
+#upload:
+#  path: C:/Users/12871/Downloads/
+upload:
+  path: /www/staticproject/Article/upload/
+  getPath: /upload/

+ 9 - 0
fhKeeper/formulahousekeeper/ArticleOperation/src/main/resources/com/my/bigevent/mapper/ArticleMapper.xml

@@ -34,6 +34,9 @@
             <if test=" productId!=null and productId!=''">
                 product_id,
             </if>
+            <if test=" coverImgUrl!=null and coverImgUrl!=''">
+                cover_img_url,
+            </if>
         </trim>
         <trim prefix=" values (" suffix=")" suffixOverrides=",">
             <if test="title !=null and title !=''">
@@ -63,6 +66,9 @@
             <if test=" productId!=null and productId!=''">
                 #{productId},
             </if>
+            <if test=" coverImgUrl!=null and coverImgUrl!=''">
+                #{coverImgUrl},
+            </if>
         </trim>
     </insert>
     <update id="update">
@@ -89,6 +95,9 @@
                 <if test=" productId!=null and productId!=''">
                     product_id=#{productId},
                 </if>
+                <if test=" coverImgUrl!=null and coverImgUrl!=''">
+                    cover_img_url=#{coverImgUrl},
+                </if>
             </set>
         where id=#{id}
     </update>

+ 5 - 0
fhKeeper/formulahousekeeper/articleBackend/src/api/article.js

@@ -40,4 +40,9 @@ export const articleAddService=(articleData)=>{
 // 删除文章
 export const articleDeleteService=(params)=>{
     return request.get('/article/deleteById', {params:params})
+}
+
+// 上传文件
+export const uploadFileService=(params)=>{
+    return request.post('/common/uploadFile', params)
 }

+ 26 - 10
fhKeeper/formulahousekeeper/articleBackend/src/views/article/ArticleManage.vue

@@ -38,7 +38,7 @@ const quilleditorKey = ref(1)
 //分页条数据模型
 const pageNum = ref(1)//当前页
 const total = ref(20)//总条数
-const pageSize = ref(10)//每页条数
+const pageSize = ref(3)//每页条数
 
 //当每页条数发生了变化,调用此函数
 const onSizeChange = (size) => {
@@ -51,7 +51,7 @@ const onCurrentChange = (num) => {
     articleList();
 }
 //回显文章标签
-import {articleCategoryListService, articleListService,articleAddService, articleDeleteService} from '@/api/article.js'
+import {articleCategoryListService, articleListService,articleAddService, articleDeleteService,uploadFileService} from '@/api/article.js'
 const articleCategoryList=async()=>{
     let result = await articleCategoryListService();
     categorys.value=result.data;
@@ -181,9 +181,9 @@ const addArticle=async(clickState)=>{
     for (const key in formVla) {
         if(key == 'coverImg') {
             let file = fileList.value[0].raw
-            if(!isFile(file)) {
-                file = base64ToFile(file, 'image.png')
-            }
+            // if(!isFile(file)) {
+            //     file = base64ToFile(file, 'image.png')
+            // }
             formData.append('coverImage', file)
         } else {
             formData.append(key, formVla[key])
@@ -203,6 +203,19 @@ const isFile = (obj) => {
     return obj instanceof File;
 }
 
+// 图片上传
+const fileUploadArticle = async (row) => {
+    const file = row.file
+    const formData = new FormData()
+    formData.append('multipartFile', file)
+    const res = await uploadFileService(formData)
+    console.log(res, '<===== 上传后的文件')
+    fileList.value = [{
+        name: '图片',
+        url: res.data,
+        raw: res.data
+    }]
+}
 const base64ToFile = (base64String, fileName) => {
   const arr = base64String.split(',');
   const mime = arr[0].match(/:(.*?);/)[1];
@@ -232,7 +245,7 @@ const addArticleAdministration = () => {
 }
 // 修改文章
 const editArticle = (row) => {
-    const { categoryIds, content, title, profile, id, coverImg, productId } = row
+    const { categoryIds, content, title, profile, id, coverImg, coverImgUrl, productId } = row
     articleModel.value = {
         categoryId: categoryIds ? JSON.parse(categoryIds) : [],
         content,
@@ -242,11 +255,13 @@ const editArticle = (row) => {
         coverImg: '',
         productId: productId
     }
-    if(coverImg) {
+    if(coverImgUrl) {
         fileList.value = [{
             name: '图片',
-            url: `data:image/jpeg;base64, ${coverImg}`,
-            raw: `data:image/jpeg;base64, ${coverImg}`,
+            // url: `data:image/jpeg;base64, ${coverImg}`,
+            // raw: `data:image/jpeg;base64, ${coverImg}`,
+            url: `${coverImgUrl}`,
+            raw: `${coverImgUrl}`,
         }]
     } else {
         fileList.value = []
@@ -361,9 +376,10 @@ const deleteArticle = async (row) => {
                     <el-upload
                         v-model:file-list="fileList"
                         list-type="picture-card"
-                        :auto-upload="false"
+                        :auto-upload="true"
                         :limit="1"
                         :on-exceed="fileExceedsLimit"
+                        :http-request="fileUploadArticle"
                     >
                         <el-icon><Plus /></el-icon>
                     </el-upload>

+ 2 - 2
fhKeeper/formulahousekeeper/articleBackend/vite.config.js

@@ -29,8 +29,8 @@ export default defineConfig({
     proxy:{
       '/api':{
         // target:'http://localhost:8080',  // 后台服务所在的源,用这个源替换前端服务源
-        target:'http://47.101.180.183:8091',  // 后台服务所在的源,用这个源替换前端服务源
-        // target:'http://192.168.2.17:8091',  // 后台服务所在的源,用这个源替换前端服务源
+        // target:'http://47.101.180.183:8091',  // 后台服务所在的源,用这个源替换前端服务源
+        target:'http://192.168.2.17:8091',  // 后台服务所在的源,用这个源替换前端服务源
         changeOrigin:true,     // 开启修改源
         rewrite:(path)=>path.replace(/^\/api/,'')   // url路径中的 /api 将会被替换成 '' 
       }

+ 1 - 1
fhKeeper/formulahousekeeper/inva_4_tivo/knowledge.ftl

@@ -45,7 +45,7 @@
           <#list knowledgeFieldTableList as item>
             <div>
               <div class="knowledgeField-content-item" onclick="triggerButtonClick(${item.id})">
-                <div class="image"><img src="data:image;base64,${item.baseImage}" class="wh100" class="wh100"></img>
+                <div class="image"><img src="${item.coverImgUrl}" class="wh100" class="wh100"></img>
                 </div>
                 <div class="textContent">
                   <div>${ item.title }</div>

+ 2 - 2
fhKeeper/formulahousekeeper/inva_4_tivo/knowledgeDetails.ftl

@@ -90,7 +90,7 @@
             <#list latestList as item>
               <div class="latestList-item" data-item='${item.id}'>
                 <div class="latestList-item-image">
-                  <img src="data:image;base64,${item.baseImage}" class="wh100"></img>
+                  <img src="${item.coverImgUrl}" class="wh100"></img>
                 </div>
                 <div class="latestList-item-text">
                   <div class="latestList-item-text-title">${ item.title }</div>
@@ -110,7 +110,7 @@
             <#list relatedList as item>
               <div class="latestList-item" data-item='${item.id}'>
                 <div class="latestList-item-image">
-                  <img src="data:image;base64,${item.baseImage}" class="wh100"></img>
+                  <img src="${item.coverImgUrl}" class="wh100"></img>
                 </div>
                 <div class="latestList-item-text">
                   <div class="latestList-item-text-title">${ item.title }</div>

+ 4 - 0
fhKeeper/formulahousekeeper/webttkuaiban/src/main/java/com/firerock/webttkuaiban/demos/controller/ArticleTemplateController.java

@@ -3,6 +3,8 @@ package com.firerock.webttkuaiban.demos.controller;
 import com.firerock.webttkuaiban.demos.pojo.Article;
 import com.firerock.webttkuaiban.demos.service.ArticleService;
 import org.apache.tomcat.util.codec.binary.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -21,6 +23,7 @@ import java.util.List;
 @RequestMapping("articleTemplate")
 public class ArticleTemplateController {
 
+    private static final Logger log = LoggerFactory.getLogger(ArticleTemplateController.class);
     @Autowired
     ArticleService articleService;
 
@@ -65,6 +68,7 @@ public class ArticleTemplateController {
         // 定义格式化器
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
 
+        long l = System.currentTimeMillis();
         List<Article> latestList =articleService.latestList();
         if (!latestList.isEmpty()){
             for (Article article : latestList) {

+ 60 - 0
fhKeeper/formulahousekeeper/webttkuaiban/src/main/java/com/firerock/webttkuaiban/demos/controller/CommonUploadController.java

@@ -0,0 +1,60 @@
+package com.firerock.webttkuaiban.demos.controller;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.UUID;
+
+@RestController
+@RequestMapping("/common")
+public class CommonUploadController {
+
+
+    @Value(value = "${upload.path}")
+    private String path;
+
+
+    @RequestMapping(value="uploadFile")
+    public Object uploadFile(MultipartFile multipartFile) {
+
+        //然后处理文件
+        String fileName = multipartFile.getOriginalFilename();
+        String[] split = fileName.split("\\.");
+        String serverName = UUID.randomUUID().toString().replaceAll("-", "") + "."+split[split.length-1];
+
+        //检查目录
+        File dir = new File(path);
+        if (!dir.exists()) {
+            dir.mkdir();
+        }
+        File file = new File(dir, serverName);
+        InputStream inputStream = null;
+        OutputStream outputStream = null;
+        try {
+            inputStream = multipartFile.getInputStream();
+            outputStream = new FileOutputStream(file);
+            byte[] buffer = new byte[4096];
+            int temp = 0;
+            while ((temp = inputStream.read(buffer, 0, 4096)) != -1) {
+                outputStream.write(buffer, 0, temp);
+            }
+            inputStream.close();
+            outputStream.close();
+
+            return serverName;
+
+        } catch (Exception exception) {
+            exception.printStackTrace();
+        }
+
+        return null;
+    }
+
+}

+ 1 - 0
fhKeeper/formulahousekeeper/webttkuaiban/src/main/java/com/firerock/webttkuaiban/demos/pojo/Article.java

@@ -36,6 +36,7 @@ public class Article {
 
     private String baseImage;
     private String productId;
+    private String coverImgUrl;
 
     @JsonFormat(pattern = "yyyy-MM-dd")
     @DateTimeFormat(pattern = "yyyy-MM-dd")

+ 3 - 1
fhKeeper/formulahousekeeper/webttkuaiban/src/main/java/com/firerock/webttkuaiban/demos/pojo/ArticleCoverImg.java

@@ -8,5 +8,7 @@ public class ArticleCoverImg {
 
     private Integer articleId;
 
-    private byte[] coverImgData;
+//    private byte[] coverImgData;
+
+    private String coverImgData;
 }

+ 2 - 1
fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/application.properties

@@ -26,7 +26,8 @@ spring.servlet.multipart.resolve-lazily=false
 #Swagger????
 mconfig.swagger-ui-open=true
 #??????�??
-upload.path=C:/staticproject/qh_hospital/upload/
+#upload.path=C:/Users/12871/Downloads/
+upload.path=/www/staticproject/Article/upload/
 default.pwd=1
 #freemarker
 spring.freemarker.cache=false

+ 3 - 3
fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/mapper/ArticleMapper.xml

@@ -6,7 +6,7 @@
 <mapper namespace="com.firerock.webttkuaiban.demos.mapper.ArticleMapper">
 
     <select id="pageList" resultType="com.firerock.webttkuaiban.demos.pojo.Article">
-        select a.id,a.title,a.`profile` ,aci.cover_img_data coverImg
+        select a.id,a.title,a.`profile` ,a.cover_img_url
         from article a
         left join  article_cover_img aci on a.id=aci.article_id
         <where>
@@ -33,7 +33,7 @@
         order by  update_time DESC
     </select>
     <select id="latestList" resultType="com.firerock.webttkuaiban.demos.pojo.Article">
-        select a.id,a.title,a.create_time ,aci.cover_img_data coverImg
+        select a.id,a.title,a.create_time ,a.cover_img_url
         from article a
                  left join  article_cover_img aci on a.id=aci.article_id
         where a.state='已发布'
@@ -41,7 +41,7 @@
             limit 3
     </select>
     <select id="relatedList" resultType="com.firerock.webttkuaiban.demos.pojo.Article">
-        select a.id,a.title,a.create_time ,aci.cover_img_data coverImg
+        select a.id,a.title,a.create_time ,a.cover_img_url
         from article a
         left join  article_cover_img aci on a.id=aci.article_id
         <where>

+ 1 - 1
fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/static/knowledge.ftl

@@ -45,7 +45,7 @@
           <#list knowledgeFieldTableList as item>
             <div>
               <div class="knowledgeField-content-item" onclick="triggerButtonClick(${item.id})">
-                <div class="image"><img src="data:image;base64,${item.baseImage}" class="wh100" class="wh100"></img>
+                <div class="image"><img src="${item.coverImgUrl}" class="wh100" class="wh100"></img>
                 </div>
                 <div class="textContent">
                   <div>${ item.title }</div>

+ 2 - 2
fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/static/knowledgeDetails.ftl

@@ -90,7 +90,7 @@
             <#list latestList as item>
               <div class="latestList-item" data-item='${item.id}'>
                 <div class="latestList-item-image">
-                  <img src="data:image;base64,${item.baseImage}" class="wh100"></img>
+                  <img src="${item.coverImgUrl}" class="wh100"></img>
                 </div>
                 <div class="latestList-item-text">
                   <div class="latestList-item-text-title">${ item.title }</div>
@@ -110,7 +110,7 @@
             <#list relatedList as item>
               <div class="latestList-item" data-item='${item.id}'>
                 <div class="latestList-item-image">
-                  <img src="data:image;base64,${item.baseImage}" class="wh100"></img>
+                  <img src="${item.coverImgUrl}" class="wh100"></img>
                 </div>
                 <div class="latestList-item-text">
                   <div class="latestList-item-text-title">${ item.title }</div>

+ 1 - 1
fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/templates/knowledge.ftl

@@ -45,7 +45,7 @@
           <#list knowledgeFieldTableList as item>
             <div>
               <div class="knowledgeField-content-item" onclick="triggerButtonClick(${item.id})">
-                <div class="image"><img src="data:image;base64,${item.baseImage}" class="wh100" class="wh100"></img>
+                <div class="image"><img src="${item.coverImgUrl}" class="wh100" class="wh100"></img>
                 </div>
                 <div class="textContent">
                   <div>${ item.title }</div>

+ 2 - 2
fhKeeper/formulahousekeeper/webttkuaiban/src/main/resources/templates/knowledgeDetails.ftl

@@ -90,7 +90,7 @@
             <#list latestList as item>
               <div class="latestList-item" data-item='${item.id}'>
                 <div class="latestList-item-image">
-                  <img src="data:image;base64,${item.baseImage}" class="wh100"></img>
+                  <img src="${item.coverImgUrl}" class="wh100"></img>
                 </div>
                 <div class="latestList-item-text">
                   <div class="latestList-item-text-title">${ item.title }</div>
@@ -110,7 +110,7 @@
             <#list relatedList as item>
               <div class="latestList-item" data-item='${item.id}'>
                 <div class="latestList-item-image">
-                  <img src="data:image;base64,${item.baseImage}" class="wh100"></img>
+                  <img src="${item.coverImgUrl}" class="wh100"></img>
                 </div>
                 <div class="latestList-item-text">
                   <div class="latestList-item-text-title">${ item.title }</div>