From 1991cf2c57284c5364bc6e293834e8efc5e7f3c2 Mon Sep 17 00:00:00 2001 From: jiasheng224 Date: Tue, 9 Apr 2024 17:42:10 +0800 Subject: [PATCH 1/3] fix qr api issue --- config/qr.php | 6 ++++++ .../vue/components/orders/elements/OrderComponent.vue | 3 ++- .../orders/sections/OrderProfileSectionComponent.vue | 3 ++- .../orders/sections/OrderProfileV2SectionComponent.vue | 3 ++- resources/views/pdfs/qr.blade.php | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 config/qr.php diff --git a/config/qr.php b/config/qr.php new file mode 100644 index 00000000..6d30622c --- /dev/null +++ b/config/qr.php @@ -0,0 +1,6 @@ + env('CHART_GOOGLE_API_QR', 'https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl='), + 'qr_api_alternative' => env('QR_API_ALTERNATIVE', 'https://qrcode.tec-it.com/API/QRCode?data='), +]; diff --git a/resources/assets/vue/components/orders/elements/OrderComponent.vue b/resources/assets/vue/components/orders/elements/OrderComponent.vue index a744f38a..62ced6fd 100644 --- a/resources/assets/vue/components/orders/elements/OrderComponent.vue +++ b/resources/assets/vue/components/orders/elements/OrderComponent.vue @@ -7,7 +7,8 @@
- + +
diff --git a/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue b/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue index 25417616..9e668186 100644 --- a/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue +++ b/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue @@ -12,7 +12,8 @@
- + +
diff --git a/resources/assets/vue/components/orders/sections/OrderProfileV2SectionComponent.vue b/resources/assets/vue/components/orders/sections/OrderProfileV2SectionComponent.vue index 4546a99b..69b98663 100644 --- a/resources/assets/vue/components/orders/sections/OrderProfileV2SectionComponent.vue +++ b/resources/assets/vue/components/orders/sections/OrderProfileV2SectionComponent.vue @@ -12,7 +12,8 @@
- + +
diff --git a/resources/views/pdfs/qr.blade.php b/resources/views/pdfs/qr.blade.php index 8a7ff9b2..c85b6e8d 100644 --- a/resources/views/pdfs/qr.blade.php +++ b/resources/views/pdfs/qr.blade.php @@ -16,7 +16,7 @@ - id.'}') }}" style="width: 230px; height: 230px;" /> + From 6369282b388071875096acb042048981e313600a Mon Sep 17 00:00:00 2001 From: edmondlang Date: Wed, 10 Apr 2024 18:22:11 +0800 Subject: [PATCH 2/3] update qr code config --- config/qr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/qr.php b/config/qr.php index 6d30622c..e730980f 100644 --- a/config/qr.php +++ b/config/qr.php @@ -1,6 +1,6 @@ env('CHART_GOOGLE_API_QR', 'https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl='), - 'qr_api_alternative' => env('QR_API_ALTERNATIVE', 'https://qrcode.tec-it.com/API/QRCode?data='), + 'chart_google_api' => 'https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=', + 'qr_api_alternative' => 'https://qrcode.tec-it.com/API/QRCode?data=', ]; From 924f4f2ace40aaf2a3cbb0a5c004ba0eeb96416e Mon Sep 17 00:00:00 2001 From: edmondlang Date: Wed, 10 Apr 2024 22:27:09 +0800 Subject: [PATCH 3/3] fix qr api issue --- config/qr.php | 6 ++++-- resources/assets/vue/app.js | 3 +++ .../vue/components/orders/elements/OrderComponent.vue | 2 +- .../orders/sections/OrderProfileSectionComponent.vue | 2 +- .../orders/sections/OrderProfileV2SectionComponent.vue | 2 +- resources/views/pdfs/qr.blade.php | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/config/qr.php b/config/qr.php index e730980f..ec1c801f 100644 --- a/config/qr.php +++ b/config/qr.php @@ -1,6 +1,8 @@ 'https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=', - 'qr_api_alternative' => 'https://qrcode.tec-it.com/API/QRCode?data=', + // please update resources/assets/vue/app.js if value is changed + + // 'qr_code_img_url' => 'https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=', // not working + 'qr_code_img_url' => 'https://qrcode.tec-it.com/API/QRCode?data=', ]; diff --git a/resources/assets/vue/app.js b/resources/assets/vue/app.js index b81feb10..42b0ddb0 100644 --- a/resources/assets/vue/app.js +++ b/resources/assets/vue/app.js @@ -24,6 +24,9 @@ import closable from './general/directives/closable'; import Avatar from 'vue-avatar'; +// define global variable +Vue.prototype.$qr_code_img_url = 'https://qrcode.tec-it.com/API/QRCode?data='; + /** Application Injections */ Vue.use(vuelidate); Vue.use(VueTheMask); diff --git a/resources/assets/vue/components/orders/elements/OrderComponent.vue b/resources/assets/vue/components/orders/elements/OrderComponent.vue index 62ced6fd..59cbfcbf 100644 --- a/resources/assets/vue/components/orders/elements/OrderComponent.vue +++ b/resources/assets/vue/components/orders/elements/OrderComponent.vue @@ -8,7 +8,7 @@
- +
diff --git a/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue b/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue index 9e668186..65c4d3be 100644 --- a/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue +++ b/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue @@ -13,7 +13,7 @@
- +
diff --git a/resources/assets/vue/components/orders/sections/OrderProfileV2SectionComponent.vue b/resources/assets/vue/components/orders/sections/OrderProfileV2SectionComponent.vue index 69b98663..1856fea5 100644 --- a/resources/assets/vue/components/orders/sections/OrderProfileV2SectionComponent.vue +++ b/resources/assets/vue/components/orders/sections/OrderProfileV2SectionComponent.vue @@ -13,7 +13,7 @@
- +
diff --git a/resources/views/pdfs/qr.blade.php b/resources/views/pdfs/qr.blade.php index c85b6e8d..0ff0a267 100644 --- a/resources/views/pdfs/qr.blade.php +++ b/resources/views/pdfs/qr.blade.php @@ -16,7 +16,7 @@ - +