zhujindu 6 месяцев назад
Родитель
Сommit
61602e4d1b
2 измененных файлов с 19 добавлено и 11 удалено
  1. 11 8
      src/components/share.vue
  2. 8 3
      src/views/week/dailyHistoricalDetails.vue

+ 11 - 8
src/components/share.vue

@@ -275,14 +275,14 @@ export default {
     },
     creatQrCode() {
       // let proText = 'https://suishenbang.nipponpaint.com.cn';
-      let path = '/dailyHistoricalDetails&source=share&reportId=' + this.reportId || '';
+      let path = 'http://1.npz.cn/2/' + this.reportId || '';
       var qrcode = new QRCode(this.$refs.QRcodes, {
-        text: process.env.VUE_APP_SSB_LINK + '/homeIndex?path=' + path,
+        text: path,
         colorDark: '#000000',
         colorLight: 'rgba(255,255,255,0)', // 完全透明背景
         correctLevel: QRCode.CorrectLevel.H,
-        width: 140, // 固定尺寸保证安卓一致性
-        height: 140,
+        width: 100, // 固定尺寸保证安卓一致性
+        height: 100,
         margin: 2,
         render: 'canvas',
         onRenderingEnd: () => {
@@ -550,21 +550,24 @@ export default {
 <style lang="scss">
 .share {
   .QRcodes {
-    width: 140px; /* 固定像素尺寸 */
-    height: 140px;
+    width: 104px; /* 固定像素尺寸 */
+    height: 104px;
     margin-right: 12px;
     position: relative;
     background: #ffffff;
     image-rendering: crisp-edges;
     image-rendering: -webkit-optimize-contrast; /* 安卓浏览器兼容 */
     // padding: 2px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
     .logo {
       position: absolute;
       top: 50%;
       left: 50%;
       transform: translate(-50%, -50%);
-      width: 40px;
-      height: 40px;
+      width: 20px;
+      height: 20px;
       img {
         width: 100% !important;
         height: 100% !important;

+ 8 - 3
src/views/week/dailyHistoricalDetails.vue

@@ -544,7 +544,7 @@
     <share
       v-if="setShareFlag"
       :reportTarget="reportTarget"
-      :reportId="$route.query.reportId"
+      :reportId="reportId"
       @setShareImg="setShareImg"
       :urlList="urlList"
       :reportRemarksIndex="reportRemarksIndex"></share>
@@ -682,10 +682,13 @@ export default {
       reportRemarksIndex: -1,
       shareImgFlag: false,
       urlList: [],
+      reportId: '',
       //
     };
   },
   created() {
+    this.reportId = this.$route.query.reportId ? this.$route.query.reportId.replace('?', '') : '';
+    console.log(this.reportId);
     this.powerGrade = localStorage.getItem('powerGrade');
     this.isDiy = localStorage.getItem('isDiy');
     this.getDetailById();
@@ -705,6 +708,8 @@ export default {
     },
   },
   activated() {
+    this.reportId = this.$route.query.reportId ? this.$route.query.reportId.replace('?', '') : '';
+    console.log(this.reportId);
     this.source = this.$route.query.source;
     this.num = 0;
     this.userTodayPlanNum();
@@ -840,7 +845,7 @@ export default {
       }
       var remak = {
         remarkContent: this.managerRemarkContent,
-        reportId: this.$route.query.reportId,
+        reportId: this.reportId,
       };
       insertRemark(remak).then((res) => {
         loading1.clear();
@@ -891,7 +896,7 @@ export default {
         message: '加载中...',
         forbidClick: true,
       });
-      getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
+      getDetailById({ reportId: this.reportId }).then((res) => {
         loading1.clear();
         if (res.code == 500 && this.source == 'share') {
           this.$dialog