zhujindu преди 7 месеца
родител
ревизия
9533742d7b
променени са 2 файла, в които са добавени 12 реда и са изтрити 10 реда
  1. 12 9
      src/components/share.vue
  2. 0 1
      src/views/week/dailyHistoricalDetails.vue

+ 12 - 9
src/components/share.vue

@@ -70,14 +70,12 @@
         <div class="text">今日拜访照片</div>
         <div class="content-photos">
           <template v-for="item in photosData">
-            <template v-for="item1 in item.photos" v-if="item1.base64Url">
-              <img
-                :src="'data:image/jpg;base64,' + item1.base64Url"
-                crossorigin="anonymous"
-                referrerpolicy="no-referrer"
-                alt=""
-                style="display: block" />
-            </template>
+            <img
+              :src="'data:image/jpg;base64,' + item"
+              crossorigin="anonymous"
+              referrerpolicy="no-referrer"
+              alt=""
+              style="display: block" />
           </template>
           <!-- <template v-for="item in photosData">
             <img
@@ -168,11 +166,16 @@ export default {
     this.creatQrCode();
     if (this.urlList.length) {
       imgToBase64({ urlList: this.urlList }).then((res) => {
-        if (res.data) {
+        if (res.data && res.code == 200) {
           this.photosData = res.data;
           this.$nextTick(async () => {
             await this.htmlToCanvas();
           });
+        } else {
+          this.$toast(res.msg);
+          this.$nextTick(async () => {
+            await this.htmlToCanvas();
+          });
         }
       });
     } else {

+ 0 - 1
src/views/week/dailyHistoricalDetails.vue

@@ -720,7 +720,6 @@ export default {
     confirmShare() {
       this.shareImgFlag = false;
       this.urlList = [];
-      debugger;
       this.reportTarget.photos.forEach((item) => {
         item.photos.forEach((val) => {
           if (val.checked) this.urlList.push(val.fileUrl);