liyongli 1 ano atrás
pai
commit
4b6e44509d

+ 8 - 3
src/utils/request.js

@@ -31,8 +31,10 @@ function ajax(longRange) {
         errorStatus({ ...data, status: this.status });
         return reject({ ...data, status: this.status });
       }
-
-      if (longRange.noJY) return resolve(data);
+      if (longRange.noJY) {
+        if (res.errCode != 0) errorStatus(data);
+        return resolve(data);
+      }
 
       if (!longRange.platfrom && data.code !== 0) {
         // 业务错误
@@ -71,7 +73,10 @@ function fetch(longRange) {
       })
       .then(res => {
         !longRange.noload && loading.close();
-        if (longRange.noJY) return resolve(res);
+        if (longRange.noJY) {
+          if (res.errCode != 0) errorStatus(res);
+          return resolve(res);
+        }
         if (!longRange.platfrom && res.code !== 0) {
           // 业务错误
           if (res.code === 40001) noLogin();

+ 25 - 5
src/view/allMedia/AIeditor/components/review.vue

@@ -18,7 +18,11 @@
   <template v-if="is_status === 'show'">
     <div class="show">
       <div class="left">
-        <el-card v-for="(item, i) in selectList()" :key="i">
+        <el-card
+          style="margin-bottom: 1em"
+          v-for="(item, i) in selectList()"
+          :key="i"
+        >
           <p
             class="list"
             style="font-size: 12px; font-weight: 400; color: #888"
@@ -46,6 +50,7 @@
         <div
           @click="() => selectList(i)"
           class="item"
+          :style="{ backgroundColor: select === i ? '#d9e6ff' : '#fff' }"
           v-for="(item, i) in err_text"
           :key="i"
         >
@@ -73,7 +78,7 @@
             "
           >
             <p v-text="item.text" style="line-height: 1.5em"></p>
-            <p v-text="geterrNum(i)" style="line-height: 1.5em"></p>
+            <p v-text="geterrNum(i) + '个'" style="line-height: 1.5em"></p>
           </div>
         </div>
       </div>
@@ -92,6 +97,8 @@ const props = defineProps({
   headTitle: String,
   html: Function,
   text: Function,
+  setHtml: Function,
+  setisupText: Function,
 });
 let li = [];
 let select = ref(0);
@@ -140,10 +147,22 @@ const selectList = i => {
   const index = !i && i !== 0 ? select.value : i;
   select.value = index;
   let l = [];
+  props.setisupText(true);
   for (let o = 0; o < li.length; o++) {
     if (index === 0) l.push(li[o]);
     else if (li[o].errorType === index) l.push(li[o]);
+
+    let html = props.html();
+    const rex = new RegExp(li[o].sourceText);
+    html.replace(
+      rex,
+      `<span style="border-bottom: 1px solid ${
+        err_text.value[li[o].errorType].color
+      }">${li[o].sourceText}</span>`
+    );
+    props.setHtml(html);
   }
+  props.setisupText(false);
   return l;
 };
 
@@ -161,7 +180,6 @@ const jiaoyue = () => {
   })
     .then(r => {
       if (r.errCode !== 0) return;
-      console.log(r);
       li = r.alerts || [];
       is_status.value = li.length ? 'show' : 'none';
     })
@@ -171,8 +189,8 @@ const jiaoyue = () => {
 };
 jiaoyue();
 defineExpose({
-    jiaoyue
-})
+  jiaoyue,
+});
 </script>
 
 <style scoped>
@@ -294,6 +312,7 @@ ul > li {
 }
 .show .right {
   display: inline-block;
+  width: 30%;
 }
 .list {
   font-size: 14px;
@@ -342,6 +361,7 @@ ul > li {
   font-size: 0;
 }
 .item {
+  padding: 7px 0 0 10px;
   margin-bottom: 1em;
 }
 </style>

+ 13 - 2
src/view/allMedia/AIeditor/index.vue

@@ -46,8 +46,9 @@
               </el-button>
               <el-button
                 type="primary"
-                style="                    border-top-left-radius;
-                  border-bottom-left-radius: 0;
+                style="            
+                    border-top-left-radius;
+                  border-bottom-left-radius: 0;                  
                   margin-left: 0;
                 "
                 @click="() => saveDagang(17)"
@@ -136,6 +137,16 @@
               @closeType="closeType"
               @setImage="setImage"
               :headTitle="titleh1"
+              :setHtml="
+                html => {
+                  editorRef.setHtml(html);
+                }
+              "
+              :setisupText="
+                bool => {
+                  isupText = bool;
+                }
+              "
               :html="() => editorRef.getHtml()"
               :text="() => editorRef.getText()"
               :is="component_list[select_right_btn_type]"