From bd35f55aad470bf961f8af5dafe3b9984bc85772 Mon Sep 17 00:00:00 2001
From: gengchunlei <1807398631@qq.com>
Date: Fri, 23 May 2025 14:46:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A5=9A=E9=9B=84=E5=B0=8F=E7=A8=8B=E5=BA=8F?=
 =?UTF-8?q?=20=E9=9A=90=E8=97=8F=E5=9C=B0=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 public/index.html                             |  2 +-
 src/views/choiceContraceptives.vue            |  4 ++-
 src/views/component/analyzeQRCode.vue         | 30 ++++++++++++-------
 .../manualDistribution/manualDistribution.vue |  4 ++-
 .../medicalCollection/manualCollection.vue    |  4 ++-
 src/views/medicalCollection/manualSuccess.vue |  3 ++
 src/views/myMap.vue                           |  9 ++++--
 src/views/receiveSuccess.vue                  |  4 ++-
 src/views/returnVisit.vue                     |  3 ++
 src/views/siteDetails.vue                     |  2 ++
 10 files changed, 47 insertions(+), 18 deletions(-)

diff --git a/public/index.html b/public/index.html
index 9cbce5d..d47c54c 100644
--- a/public/index.html
+++ b/public/index.html
@@ -31,7 +31,7 @@
 <script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_1280549113'%3E%3C/span%3E%3Cscript src='https://v1.cnzz.com/z_stat.php%3Fid%3D1280549113%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script>
 </body>
 <script>
-    /*var vConsole =new VConsole();
+   /* var vConsole =new VConsole();
       console.log('Hello world');*/
 </script>
 </html>
diff --git a/src/views/choiceContraceptives.vue b/src/views/choiceContraceptives.vue
index 60362ba..6de7255 100644
--- a/src/views/choiceContraceptives.vue
+++ b/src/views/choiceContraceptives.vue
@@ -68,7 +68,7 @@
 
 <script>
     import {addMedicalRecord, getStockInfo} from "../utils/api";
-    import {callMobile} from "../utils/common";
+    import {callMobile, showNav} from "../utils/common";
     import { Toast } from 'mint-ui';
     import {receiveWay} from "../utils/dictionaries";
     import { Indicator } from 'mint-ui';
@@ -92,7 +92,9 @@
             }
         },
       created() {
+        if (!this.showNav()) {
           document.title = '选择药具'
+        }
       },
       methods:{
             getStockListInfo(callBack) {
diff --git a/src/views/component/analyzeQRCode.vue b/src/views/component/analyzeQRCode.vue
index 9fe2d5b..2fb6a43 100644
--- a/src/views/component/analyzeQRCode.vue
+++ b/src/views/component/analyzeQRCode.vue
@@ -1,16 +1,17 @@
 <template>
   <div>
-    <van-popup v-model="show" position="right" :style="{ height: '100%',width: '100%' }" >
+    <van-popup v-model="show" position="right" :style="{ height: '100%',width: '100%' }">
+      <div class="all">
       <video style="display: none" ref="video"></video>
-      <canvas style="width: 100vw; margin-top: 13vw" id="canvas"></canvas>
+      <canvas style="width: 90vw; margin-top: 20vh;height: 40vh" id="canvas"></canvas>
       <canvas style="display: none" id="2d"></canvas>
+      </div>
     </van-popup>
   </div>
 </template>
 
 <script>
-import "@/utils/jsQR.js";
-import {jsQR} from "../../utils/jsQR"; // 添加关闭摄像头的函数
+import jsQR from "../../utils/jsQR";
 
 export default {
   name: 'analyzeQRCode',
@@ -37,20 +38,18 @@ export default {
       //   this.streams.getTracks().forEach((track) => track.stop());
       // }
       // video.srcObject = null;
-
+      let that = this
       var video = document.createElement("video");
       var canvasElement = document.getElementById("canvas");
       var canvas = canvasElement.getContext("2d");
       console.log(navigator.mediaDevices);
-
       // 尝试打开手机上安装后置摄像头
       navigator.mediaDevices
           .getUserMedia({
             video: {facingMode: "environment"},
           })
-          .then(function (stream) {
-            debugger
-            this.streams.value = stream;
+          .then((stream) => {
+            this.streams = stream;
             video.srcObject = stream;
             // 阻止IOS视频全屏
             video.setAttribute("playsinline", true);
@@ -85,6 +84,8 @@ export default {
           if (code) {
             console.log(code.data);
             alert(code.data);
+            //输出解析后的二维码
+            this.$emit("getQRCode", code.data)
           }
         }
         requestAnimationFrame(tick);
@@ -94,4 +95,13 @@ export default {
 }
 
 
-</script>
\ No newline at end of file
+</script>
+
+<style lang="less" scoped>
+ .all {
+   background: black;
+   height: 100vh;
+   display: flex;
+   justify-content: space-around;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/manualDistribution/manualDistribution.vue b/src/views/manualDistribution/manualDistribution.vue
index 89b8604..982655a 100644
--- a/src/views/manualDistribution/manualDistribution.vue
+++ b/src/views/manualDistribution/manualDistribution.vue
@@ -46,7 +46,7 @@
 <script>
 
     import {Toast} from 'mint-ui'
-    import {getQueryVariable, idCardV, validateIdCard} from "../../utils/common";
+    import {getQueryVariable, idCardV, showNav, validateIdCard} from "../../utils/common";
     import {getCheckShortMessage, getShortMessage, getUserInfoByIdCard} from "../../utils/api";
     import NoData from "../component/noData";
     export default {
@@ -70,7 +70,9 @@
             }
         },
         created() {
+          if (!this.showNav()) {
             document.title = '人工发放'
+          }
             this.urltext()
             let initPeople = JSON.parse(window.localStorage.getItem('initPeople'))
             if (initPeople) {
diff --git a/src/views/medicalCollection/manualCollection.vue b/src/views/medicalCollection/manualCollection.vue
index a6290ba..b107d81 100644
--- a/src/views/medicalCollection/manualCollection.vue
+++ b/src/views/medicalCollection/manualCollection.vue
@@ -139,7 +139,7 @@
     import NoData from '../component/noData';
     import { Toast,Indicator } from 'mint-ui';
     import {receiveWay} from "../../utils/dictionaries";
-    import {idCardValidator} from '../../utils/common'
+    import {idCardValidator, showNav} from '../../utils/common'
 
     export default {
         components: {NoData},
@@ -186,7 +186,9 @@
             })
         },
         created() {
+          if (!this.showNav()) {
             document.title = '人工网点申领'
+          }
             this.routerDetail = this.$route.query
             if (this.routerDetail.resource == 1) {
                 this.showForm = true
diff --git a/src/views/medicalCollection/manualSuccess.vue b/src/views/medicalCollection/manualSuccess.vue
index 157b6c5..f04fc2c 100644
--- a/src/views/medicalCollection/manualSuccess.vue
+++ b/src/views/medicalCollection/manualSuccess.vue
@@ -53,6 +53,7 @@
     import {getUserCollectRecordByNo} from "../../utils/api";
     import NoData from '../component/noData';
     import { Toast,Indicator } from 'mint-ui';
+    import {showNav} from "../../utils/common";
 
     export default {
         components: {NoData},
@@ -72,7 +73,9 @@
             }
         },
         created() {
+          if (!this.showNav()) {
             document.title = '申领结果'
+          }
             this.routerDetail = this.$route.query
             this.getRecordInfo()
         },
diff --git a/src/views/myMap.vue b/src/views/myMap.vue
index a1cdd39..1bf7398 100644
--- a/src/views/myMap.vue
+++ b/src/views/myMap.vue
@@ -29,7 +29,7 @@
                 <label>返回首页</label>
             </div>
         </div>
-<!--      <analyze-q-r-code :show="showPop" v-if="showPop"></analyze-q-r-code>-->
+      <analyze-q-r-code :show="showPop" v-if="showPop"></analyze-q-r-code>
     </div>
 </template>
 
@@ -41,14 +41,14 @@
     import presonImg from '../assets/img/preson.png';
     import sharpImg from '../assets/img/sharp.png';
     import {getNetworkInfo} from '../utils/api';
-    import {callMobile, getQueryVariable} from "../utils/common";
+    import {callMobile, getQueryVariable, showNav} from "../utils/common";
     import {Toast} from 'mint-ui';
     import {GPS} from "../utils/mapCalculation";
     import AnalyzeQRCode from "./component/analyzeQRCode";
 
     export default {
         name: "myMap",
-      // components: {AnalyzeQRCode},
+      components: {AnalyzeQRCode},
       inject: ['showNav'],
         data() {
             return {
@@ -62,7 +62,9 @@
             }
         },
         created() {
+          if (!this.showNav()) {
             document.title = '药具领取'
+          }
             this.urltext()
         },
         mounted() {
@@ -105,6 +107,7 @@
                 // })
                // this.subscanQRCallBack(111)
 
+              //微信环境下 打开js扫码 (暂时关闭)
               // if (isWeiXin()){
               //   this.showPop = true
               // } else {
diff --git a/src/views/receiveSuccess.vue b/src/views/receiveSuccess.vue
index 7736887..8a2e650 100644
--- a/src/views/receiveSuccess.vue
+++ b/src/views/receiveSuccess.vue
@@ -18,7 +18,7 @@
 </template>
 
 <script>
-    import {callMobile} from "../utils/common";
+import {callMobile, showNav} from "../utils/common";
 
     export default {
         name: "receiveSuccess",
@@ -27,7 +27,9 @@
           return {}
         },
       created() {
+        if (!this.showNav()) {
           document.title = '领取成功'
+        }
       },
       methods:{
             goBack() {
diff --git a/src/views/returnVisit.vue b/src/views/returnVisit.vue
index 13d81f4..b5f5645 100644
--- a/src/views/returnVisit.vue
+++ b/src/views/returnVisit.vue
@@ -53,6 +53,7 @@
     import {addVisitRecord} from "../utils/api";
     import { Toast } from 'mint-ui';
     import { Indicator } from 'mint-ui';
+    import {showNav} from "../utils/common";
 
     export default {
         name: "returnVisit",
@@ -81,7 +82,9 @@
             }
         },
       created() {
+        if (!this.showNav()) {
           document.title = '填写随访'
+        }
       },
       methods:{
             changeAgree() {
diff --git a/src/views/siteDetails.vue b/src/views/siteDetails.vue
index f658ee9..61874c3 100644
--- a/src/views/siteDetails.vue
+++ b/src/views/siteDetails.vue
@@ -117,7 +117,9 @@
             })
         },
         created() {
+          if (!this.showNav()) {
             document.title = '网点详情'
+          }
             /*发请求通过this.$route.query.id*/
             this.siteDetail = JSON.parse(this.$route.query.info)
             this.relationId = this.siteDetail.id
-- 
2.18.0