ymy 1 tahun lalu
induk
melakukan
d022b90771

+ 7 - 0
src/api/base/adPutIn.js

@@ -7,4 +7,11 @@ export function list(query) {
     method: 'post',
     data: query
   })
+}
+
+export function totalHandle() {
+  return request({
+    url: '/plan/statistics/start',
+    method: 'get'
+  })
 }

+ 9 - 1
src/views/base/adManage/components/goodsImg.vue

@@ -16,7 +16,15 @@
   })
 
   const setValue = data => {
-    value.value = data
+    if(data){
+      try{
+        let v= JSON.parse(data);
+        value.value = v[0]
+      }catch(e){
+        value.value = data
+      }
+    }
+    
   }
 
   defineExpose({

+ 1 - 1
src/views/base/adManage/index.vue

@@ -197,7 +197,7 @@
           //   prop:'onState'
           // }],
           [{
-            label:'商品图片',
+            label:'广告图片',
             colspan:3,
             prop:'goodsLogo',
             showComp:true,

+ 10 - 3
src/views/base/adPutIn/index.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="page-box">
-    <moduleView :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+    <moduleView :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="statisticsHandle" @resert="queryList" @search="queryList" />
   </div>
 </template>
 
 <script setup>
   import { computed,getCurrentInstance,ref  } from "vue";
   const { proxy } = getCurrentInstance();
-  import {list} from '@/api/base/adPutIn'
+  import {list,totalHandle} from '@/api/base/adPutIn'
 
 
   const config = ref({
@@ -159,8 +159,15 @@
       load.value = false;
     })
   }
+  const statisticsHandle= () => {
+    totalHandle().then(()=>{
+      getList()
+    }).catch(()=>{
+      getList()
+    })
+  }
   nextTick(()=>{
-    getList()
+    statisticsHandle()
   })
 </script>
 

+ 24 - 1
src/views/base/equipment/components/tableImg.vue

@@ -18,8 +18,31 @@
     parentValue:{}
   })
 
+  // const pathImg=() => {
+  //   let n = props.propValue;
+  //   if(n){
+  //     try{
+  //       let d = JSON.parse(n);
+  //       if(d[0]){
+  //         n = d[0]
+  //       }
+  //     }catch(e){
+  //       console.log('图片转换失败')
+  //     }
+  //   }
+  //   return n;
+  // }
+
   if(props.propValue){
-    pathImg.value = props.propValue
+    // pathImg.value = props.propValue
+    try{
+      let d = JSON.parse(props.propValue);
+      if(d[0]){
+        pathImg.value = d[0]
+      }
+    }catch(e){
+      console.log('图片转换失败')
+    }
   }
 </script>
 

+ 7 - 1
src/views/base/productManage/components/tableImg.vue

@@ -22,7 +22,13 @@
 
   pathUrl.value = import.meta.env.VITE_APP_UPLOAD_URL
   if(props.propValue){
-    pathImg.value = props.propValue
+    try{
+      let v= JSON.parse(props.propValue);
+      pathImg.value = v[0];
+    }catch(e){
+      console.error('图片转换错误')
+    }
+    // pathImg.value = props.propValue
   }
 </script>