resolve baseurl problem

This commit is contained in:
Eric 2021-05-10 14:49:52 +03:00
parent f82b9d8ea5
commit 1837aa5cc6
6 changed files with 33 additions and 35 deletions

View file

@ -234,15 +234,13 @@ module.exports = {
},
copyToClipBoard(text) {
const getUrl = window.location;
let baseUrl =
getUrl.protocol +
"//" +
getUrl.host +
"/" +
getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
// let baseUrl = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
// if (baseUrl.endsWith("/")) {
// baseUrl = baseUrl.slice(0, -1);
// }
let baseUrl = getUrl.protocol + "//" + getUrl.host
navigator.clipboard.writeText(`${baseUrl}${text}`).then(
function () {

View file

@ -171,11 +171,11 @@
<script>
const getUrl = window.location;
let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
// let baseUrl = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
// if (baseUrl.endsWith("/")) {
// baseUrl = baseUrl.slice(0, -1);
// }
let baseUrl = getUrl.protocol + "//" + getUrl.host
module.exports = {
data() {
return {

View file

@ -131,11 +131,11 @@
<script>
const getUrl = window.location;
let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
// let baseUrl = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
// if (baseUrl.endsWith("/")) {
// baseUrl = baseUrl.slice(0, -1);
// }
let baseUrl = getUrl.protocol + "//" + getUrl.host
module.exports = {
data() {
return {

View file

@ -83,7 +83,7 @@
<img
alt="image"
class="category-picture"
v-bind:src="sondage.choices[0].img"
src="assets/img/sondage.png"
/>
</div>
<div>
@ -104,11 +104,11 @@
<script>
const getUrl = window.location;
let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
// let baseUrl = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
// if (baseUrl.endsWith("/")) {
// baseUrl = baseUrl.slice(0, -1);
// }
let baseUrl = getUrl.protocol + "//" + getUrl.host
module.exports = {
data() {
return {

View file

@ -212,11 +212,11 @@
</style>
<script>
const getUrl = window.location;
let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
// let baseUrl = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
// if (baseUrl.endsWith("/")) {
// baseUrl = baseUrl.slice(0, -1);
// }
let baseUrl = getUrl.protocol + "//" + getUrl.host
module.exports = {
data() {
return {

View file

@ -313,11 +313,11 @@
<script>
const getUrl = window.location;
let baseUrl =
getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
if (baseUrl.endsWith("/")) {
baseUrl = baseUrl.slice(0, -1);
}
// let baseUrl = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split("/")[1];
// if (baseUrl.endsWith("/")) {
// baseUrl = baseUrl.slice(0, -1);
// }
let baseUrl = getUrl.protocol + "//" + getUrl.host
Vue.component("modal", {
template: "#modal-template",
});