Fixed actu card display
This commit is contained in:
parent
bfd2998195
commit
e2e70fd6a8
3 changed files with 16 additions and 13 deletions
14
package-lock.json
generated
14
package-lock.json
generated
|
|
@ -4,7 +4,6 @@
|
|||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "legaulois",
|
||||
"dependencies": {
|
||||
"@fancyapps/fancybox": "^3.5.7",
|
||||
"@ldc-web/cookie-notice": "^3.0.8",
|
||||
|
|
@ -40,6 +39,7 @@
|
|||
"del-cli": "^3.0.1",
|
||||
"fslightbox": "^3.3.0",
|
||||
"jquery": "^3.6.0",
|
||||
"js-base64": "^3.7.5",
|
||||
"laravel-mix": "^6.0.41",
|
||||
"laravel-mix-polyfill": "^3.0.1",
|
||||
"lodash": "^4.17.21",
|
||||
|
|
@ -6258,6 +6258,12 @@
|
|||
"resolved": "https://registry.npmjs.org/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz",
|
||||
"integrity": "sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg=="
|
||||
},
|
||||
"node_modules/js-base64": {
|
||||
"version": "3.7.5",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz",
|
||||
"integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
|
|
@ -15240,6 +15246,12 @@
|
|||
"resolved": "https://registry.npmjs.org/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz",
|
||||
"integrity": "sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg=="
|
||||
},
|
||||
"js-base64": {
|
||||
"version": "3.7.5",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz",
|
||||
"integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==",
|
||||
"dev": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
"del-cli": "^3.0.1",
|
||||
"fslightbox": "^3.3.0",
|
||||
"jquery": "^3.6.0",
|
||||
"js-base64": "^3.7.5",
|
||||
"laravel-mix": "^6.0.41",
|
||||
"laravel-mix-polyfill": "^3.0.1",
|
||||
"lodash": "^4.17.21",
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
<script>
|
||||
import VueContentPlaceholders from "vue-content-placeholders";
|
||||
import { Base64 } from 'js-base64';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -178,24 +179,13 @@ export default {
|
|||
axios
|
||||
.get(this.route("brand.news.renderActu", { ACTU: actu.id }))
|
||||
.then(response => {
|
||||
this.$set(actu, "html", this.base64decode(response.data));
|
||||
this.$set(actu, "html", Base64.decode(response.data));
|
||||
this.$set(actu, "loading", false);
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
base64decode(str) {
|
||||
let decode = atob(str).replace(
|
||||
/[\x80-\uffff]/g,
|
||||
m =>
|
||||
`%${m
|
||||
.charCodeAt(0)
|
||||
.toString(16)
|
||||
.padStart(2, "0")}`
|
||||
);
|
||||
return decodeURIComponent(decode);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue