_id.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. exports.ids = [73];
  2. exports.modules = {
  3. /***/ 242:
  4. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5. "use strict";
  6. /* WEBPACK VAR INJECTION */(function(URL) {/* harmony default export */ __webpack_exports__["a"] = ({
  7. layout: "blank_layout",
  8. data() {
  9. return {
  10. mediaUrl: "",
  11. fileExtension: "",
  12. loading: true,
  13. type: null
  14. };
  15. },
  16. computed: {
  17. isImageType() {
  18. return this.type === 1 || this.type === 8 || this.isType(["jpg", "jpeg", "png", "gif", "bmp", "webp"]);
  19. },
  20. isVideoType() {
  21. return this.type === 5 || this.isType(["mp4", "webm", "ogg"]);
  22. },
  23. isAudioType() {
  24. return this.isType(["mp3", "wav", "ogg"]);
  25. },
  26. isPdfType() {
  27. return this.isType(["pdf"]);
  28. },
  29. isOtherType() {
  30. return !this.isImageType && !this.isVideoType && !this.isAudioType && !this.isPdfType;
  31. }
  32. },
  33. created() {
  34. this.$axios.get(`/uk-api/data/detail/${+this.$route.params.id}`).then(response => {
  35. const {
  36. media_url,
  37. type
  38. } = response.result;
  39. this.mediaUrl = media_url;
  40. this.type = type;
  41. const url = new URL(this.mediaUrl);
  42. this.fileExtension = url.pathname.split(".").pop().toLowerCase();
  43. this.loading = false;
  44. }).catch(error => {
  45. console.error("Fail:", error);
  46. this.loading = false;
  47. });
  48. },
  49. methods: {
  50. isType(types) {
  51. return types.includes(this.fileExtension);
  52. }
  53. }
  54. });
  55. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(58)["URL"]))
  56. /***/ }),
  57. /***/ 273:
  58. /***/ (function(module, exports) {
  59. // Exports
  60. module.exports = {
  61. };
  62. /***/ }),
  63. /***/ 333:
  64. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65. "use strict";
  66. __webpack_require__.r(__webpack_exports__);
  67. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_id_0d6475ee_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(273);
  68. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_id_0d6475ee_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_id_0d6475ee_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  69. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_id_0d6475ee_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_id_0d6475ee_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  70. /***/ }),
  71. /***/ 383:
  72. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  73. "use strict";
  74. // ESM COMPAT FLAG
  75. __webpack_require__.r(__webpack_exports__);
  76. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/qrcode/_id.vue?vue&type=template&id=0d6475ee&scoped=true
  77. var render = function render() {
  78. var _vm = this,
  79. _c = _vm._self._c;
  80. return _c('div', [_vm._ssrNode(_vm.loading ? "<div class=\"page\" data-v-0d6475ee><p data-v-0d6475ee>Loading...</p></div>" : "<section class=\"page\" data-v-0d6475ee>" + (_vm.isImageType ? "<img" + _vm._ssrAttr("src", _vm.mediaUrl) + " alt=\"media\" class=\"media-item\" data-v-0d6475ee>" : "<!---->") + " " + (_vm.isVideoType ? "<video controls=\"controls\"" + _vm._ssrAttr("src", _vm.mediaUrl) + " class=\"media-item\" data-v-0d6475ee>\n Your browser does not support the video tag.\n </video>" : "<!---->") + " " + (_vm.isAudioType ? "<audio controls=\"controls\"" + _vm._ssrAttr("src", _vm.mediaUrl) + " class=\"media-item\" data-v-0d6475ee>\n Your browser does not support the audio element.\n </audio>" : "<!---->") + " " + (_vm.isPdfType ? "<iframe" + _vm._ssrAttr("src", _vm.mediaUrl) + " type=\"application/pdf\" width=\"100%\" height=\"100%\" class=\"media-item\" data-v-0d6475ee><p data-v-0d6475ee>The PDF cannot be displayed, please <a" + _vm._ssrAttr("href", _vm.mediaUrl) + " target=\"_blank\" data-v-0d6475ee>click here</a> to download.</p></iframe>" : "<!---->") + " " + (_vm.isOtherType ? "<div class=\"media-item\" data-v-0d6475ee><a" + _vm._ssrAttr("href", _vm.mediaUrl) + " target=\"_blank\" data-v-0d6475ee>" + _vm._ssrEscape(_vm._s(_vm.mediaUrl ? 'Download File' : 'No File')) + "</a></div>" : "<!---->") + "</section>")]);
  81. };
  82. var staticRenderFns = [];
  83. // CONCATENATED MODULE: ./pages/qrcode/_id.vue?vue&type=template&id=0d6475ee&scoped=true
  84. // EXTERNAL MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/qrcode/_id.vue?vue&type=script&lang=js
  85. var _idvue_type_script_lang_js = __webpack_require__(242);
  86. // CONCATENATED MODULE: ./pages/qrcode/_id.vue?vue&type=script&lang=js
  87. /* harmony default export */ var qrcode_idvue_type_script_lang_js = (_idvue_type_script_lang_js["a" /* default */]);
  88. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  89. var componentNormalizer = __webpack_require__(2);
  90. // CONCATENATED MODULE: ./pages/qrcode/_id.vue
  91. function injectStyles (context) {
  92. var style0 = __webpack_require__(333)
  93. if (style0.__inject__) style0.__inject__(context)
  94. }
  95. /* normalize component */
  96. var component = Object(componentNormalizer["a" /* default */])(
  97. qrcode_idvue_type_script_lang_js,
  98. render,
  99. staticRenderFns,
  100. false,
  101. injectStyles,
  102. "0d6475ee",
  103. "06a80a7f"
  104. )
  105. /* harmony default export */ var _id = __webpack_exports__["default"] = (component.exports);
  106. /***/ })
  107. };;
  108. //# sourceMappingURL=_id.js.map