Sfoglia il codice sorgente

Merge branch 'feature_20250721_日报分享' into release

# Conflicts:
#	src/views/week/dailyDetails.vue
#	src/views/week/dailyHistoricalDetails.vue
zhujindu 3 mesi fa
parent
commit
b265fca0f3

+ 28 - 10
src/components/share.vue

@@ -78,14 +78,14 @@
         <template v-if="photosData && photosData.length">
           <div class="text">今日拜访照片</div>
           <div class="content-photos">
-            <template v-for="item in photosData">
+            <div class="imgBox" v-for="item in photosData">
               <img
                 :src="'data:image/jpg;base64,' + item"
                 crossorigin="anonymous"
                 referrerpolicy="no-referrer"
                 alt=""
                 style="display: block" />
-            </template>
+            </div>
             <!-- <template v-for="item in urlList">
             <img
               :src="item + '&' + new Date().getTime()"
@@ -446,19 +446,37 @@ export default {
       display: flex;
       flex-wrap: wrap;
       //   justify-content: space-between;
-
-      img {
-        // width: 47.5%;
-        // height: 42vw;
-        width: 30%;
-        height: vw(188);
+      .imgBox {
+        width: 47.5%;
         margin-bottom: 15px;
         margin-right: 5%;
-        background-color: rgba(255, 255, 255, 0.1);
-        &:nth-child(3n) {
+        background-color: rgb(0, 0, 0);
+        height: 200px;
+        display: flex;
+        align-items: center;
+        border-radius: 10px;
+        overflow: hidden;
+        &:nth-child(2n) {
           margin-right: 0;
         }
       }
+      img {
+        // width: 100%;
+        // height: 42vw;
+        // width: 30%;
+        // height: vw(188);
+        // margin-bottom: 15px;
+        // margin-right: 5%;
+        // background-color: rgba(255, 255, 255, 0.1);
+        // &:nth-child(2n) {
+        //   margin-right: 0;
+        // }
+        width: 100%;
+        // height: 100%;
+        background-color: rgba(255, 255, 255, 0.1);
+        max-height: 200px;
+        // object-fit: contain;
+      }
     }
   }
   .comment {

+ 2 - 0
src/main.js

@@ -18,6 +18,7 @@ import {
   verifyStoreType,
   validatePhone,
   formatChineseDate,
+  shareVedioLinks,
 } from '@/utils/index';
 import { toastLoading } from '@/utils/commonVant';
 import '@vant/touch-emulator';
@@ -64,6 +65,7 @@ Vue.prototype.Micrometer = Micrometer;
 Vue.prototype.verifyStoreType = verifyStoreType;
 Vue.prototype.validatePhone = validatePhone;
 Vue.prototype.formatChineseDate = formatChineseDate;
+Vue.prototype.shareVedioLinks = shareVedioLinks;
 Vue.prototype.Toast = Toast;
 Vue.prototype.notify = Notify;
 var clipboard = new ClipboardJS('.btn');

+ 6 - 0
src/utils/index.js

@@ -316,3 +316,9 @@ export function validatePhone(telephone) {
     }
   });
 }
+
+// 分享视频链接
+export function shareVedioLinks() {
+  window.location.href =
+    'https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww5444eb205d75e730&redirect_uri=https%3A%2F%2Fknowledgewiki.nipponpaint.com.cn%2Fapi%2Fauth%2Fwx%2FshareOuth%3Fguid%3Dd4ac9b85658570389cfebe70e4505071%26shareId%3DSHARE21482&response_type=code&scope=snsapi_base&state=ZyKPSJuKA6-ZikabG6WSBqgGRsjsYK8j6P5I2bVdqOs&agentid=1000291#wechat_redirect';
+}

+ 40 - 2
src/views/week/dailyDetails.vue

@@ -10,6 +10,10 @@
               @click="clickShareFlag(-1)"
               v-if="reportTarget && source != 'share' && reportTarget.reportPostType == 'fx'">
               <van-icon name="share" />
+              <div class="vedioLinks" @click.stop="shareVedioLinks">
+                <span>一键分享日报,</span>
+                <span class="linkSpan">点击查看操作视频</span><van-icon name="play" />
+              </div>
             </div>
           </template>
         </van-nav-bar>
@@ -562,6 +566,7 @@
             v-model="checkedPlan"
             style="margin-left: 10px"></van-checkbox>
         </p>
+        <p style="margin-top: 0">请点击勾选想要分享的今日拜访照片</p>
         <div class="shareVisitImg">
           <template v-for="(itemImg, indexImg) in reportTarget.photoSummary">
             <div>
@@ -686,7 +691,7 @@ export default {
       sourceType: '',
       checkedPlan: true, //今日总结&明日规划
       visitIMG1Flag: false,
-      //
+      shareVisible: true,
     };
   },
   created() {
@@ -885,9 +890,42 @@ export default {
     display: flex;
     align-items: center;
     justify-content: center;
-    .van-icon {
+    position: relative;
+    .van-icon-share {
       color: #fff;
     }
+    .vedioLinks {
+      max-width: vw(205);
+      position: absolute;
+      bottom: -13px;
+      background: #dae7f6;
+      padding: 2px 7px;
+      /* word-break: keep-all; */
+      white-space: nowrap;
+      /* text-overflow: ellipsis; */
+      right: 0;
+      border-radius: 5px;
+      font-size: 10px;
+      right: 28px;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: start;
+      z-index: 999999;
+      span {
+        line-height: 17px;
+      }
+      .linkSpan {
+        text-decoration: underline;
+      }
+      .van-icon-play {
+        position: absolute;
+        top: 12px;
+        /* transform: rotate(270deg); */
+        right: -8px;
+        color: #dae7f6;
+      }
+    }
   }
 }
 .container {

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

@@ -17,6 +17,10 @@
                 reportTarget.status != -1
               ">
               <van-icon name="share" />
+              <div class="vedioLinks" @click.stop="shareVedioLinks">
+                <span>一键分享日报,</span>
+                <span class="linkSpan">点击查看操作视频</span><van-icon name="play" />
+              </div>
             </div>
           </template>
         </van-nav-bar>
@@ -610,6 +614,7 @@
             v-model="checkedPlan"
             style="margin-left: 10px"></van-checkbox>
         </p>
+        <p style="margin-top: 0">请点击勾选想要分享的今日拜访照片</p>
         <div class="shareVisitImg">
           <template v-for="(itemImg, indexImg) in reportTarget.photoSummary">
             <div>
@@ -1099,9 +1104,42 @@ export default {
     display: flex;
     align-items: center;
     justify-content: center;
-    .van-icon {
+    position: relative;
+    .van-icon-share {
       color: #fff;
     }
+    .vedioLinks {
+      max-width: vw(205);
+      position: absolute;
+      bottom: -13px;
+      background: #dae7f6;
+      padding: 2px 7px;
+      /* word-break: keep-all; */
+      white-space: nowrap;
+      /* text-overflow: ellipsis; */
+      right: 0;
+      border-radius: 5px;
+      font-size: 10px;
+      right: 28px;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: start;
+      z-index: 999999;
+      span {
+        line-height: 17px;
+      }
+      .linkSpan {
+        text-decoration: underline;
+      }
+      .van-icon-play {
+        position: absolute;
+        top: 12px;
+        /* transform: rotate(270deg); */
+        right: -8px;
+        color: #dae7f6;
+      }
+    }
   }
 }
 .container {