Explorar o código

feat(KIP-16814): C端 | 临时停车H5 | pdf功能在线开关补充

john hai 1 ano
pai
achega
65c7296541

+ 11 - 1
src/pages/parkingFeeV2/mixins/parkingReceipt/parkingInvoiceImage.js

@@ -3,7 +3,7 @@ const app = {};
 import downloadBtnIcon from '@/pages/parkingFee/static/images/download.png';
 import { mapState } from 'vuex';
 import uni from '@/utils/uniHooks';
-import { invoicesAgainSandEmail, invoiceEmails } from '@/api/parking';
+import { invoicesAgainSandEmail, invoiceEmails, getConfValueOfKey } from '@/api/parking';
 
 export default {
   data() {
@@ -16,6 +16,7 @@ export default {
       order: {},
       res: {},
       preUrl: '',
+      isShowPdfDowload: false
     };
   },
   created() {
@@ -27,6 +28,7 @@ export default {
       this.order = {}
     }
     console.log('order::::', this.order)
+    this.isShowPdfDowloadInit();
   },
   mounted() {
     // setTimeout(() => {
@@ -105,6 +107,14 @@ export default {
           url: `/pages/package-parkingFee/file?invoiceUrl=${encodeURIComponent(this.order.invoiceUrls[0])}`,
         })
       }
+    },
+    async isShowPdfDowloadInit() {
+      try {
+        const res = await getConfValueOfKey('TParkingInvoiceDowloadPadBtn')
+        this.isShowPdfDowload = res.switch;
+      } catch (err) {
+        console.log('TParkingInvoiceDowloadPadBtn error:: ', err);
+      }
     }
   },
 };

+ 1 - 1
src/pages/parkingFeeV2/parkingReceipt/parkingInvoiceImage.vue

@@ -26,7 +26,7 @@
         再次推送
       </div>
       <div
-        v-if="order && order.invoiceUrls && order.invoiceUrls.length"
+        v-if="order && order.invoiceUrls && order.invoiceUrls.length && isShowPdfDowload"
         :class="{
           btn: true,
           'push-again-btn': true,