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",
});