ehsan vaseghi 7 달 전
부모
커밋
3e535341f4
20개의 변경된 파일117개의 추가작업 그리고 370개의 파일을 삭제
  1. +1
    -28
      src/layout.vue/site.vue
  2. +6
    -32
      src/pages/company.vue
  3. +2
    -2
      src/pages/dash/[id]/basic.vue
  4. +7
    -15
      src/pages/dash/[id]/branding.vue
  5. +2
    -2
      src/pages/dash/[id]/layout.vue
  6. +4
    -6
      src/pages/dash/[id]/pages.vue
  7. +5
    -5
      src/pages/dashboard.vue
  8. +7
    -53
      src/pages/login.vue
  9. +7
    -53
      src/pages/signup.vue
  10. +7
    -33
      src/pages/site/create/[company]/[id]/branding.vue
  11. +6
    -28
      src/pages/site/create/[company]/[id]/chooseLayout.vue
  12. +6
    -23
      src/pages/site/create/[company]/[id]/logo.vue
  13. +5
    -4
      src/pages/site/create/[company]/[id]/palette.vue
  14. +5
    -13
      src/pages/site/create/[company]/[id]/tag.vue
  15. +14
    -26
      src/pages/site/page/[id]/edit-page.vue
  16. +22
    -37
      src/pages/site/page/[id]/index.vue
  17. +2
    -1
      src/style.css
  18. +1
    -1
      src/utils/accessTocken.ts
  19. +4
    -4
      src/utils/api.ts
  20. +4
    -4
      src/utils/apiFrom.ts

+ 1
- 28
src/layout.vue/site.vue 파일 보기

@@ -9,34 +9,7 @@ export default defineComponent({
<template>
<div class="page-wrapper" id="app" data-layout="horizontal" data-navbarbg="skin6" data-sidebartype="full" data-sidebar-position="fixed" data-header-position="fixed">
<!-- Header Start -->
<header class="app-header">
<nav class="navbar navbar-expand-lg navbar-light container-fluid px-0">
<ul class="navbar-nav">
<li class="nav-item d-block d-lg-none">
<a class="nav-link sidebartoggler ms-n3" id="sidebarCollapse" href="javascript:void(0)">
<i class="ti ti-menu-2"></i>
</a>
</li>
<li class="nav-item d-none d-lg-block">
<a href="index.html" class="text-nowrap nav-link">
<img src="../public/sensofarm.svg" class="light-logo" width="180" alt="" />
</a>
</li>
</ul>
<ul class="navbar-nav quick-links d-none d-xl-flex">
<li class="nav-item dropdown-hover d-none d-xl-block">
<a class="nav-link" href="">Home</a>
</li>
<li class="nav-item dropdown-hover d-none d-xl-block">
<a class="nav-link" href="">About</a>
</li>
<li class="nav-item dropdown-hover d-none d-xl-block">
<a class="nav-link" href="">Contact</a>
</li>
</ul>
</nav>
</header>
<div class="body-wrapper overflow-hidden">
<router-view></router-view>
</div>


+ 6
- 32
src/pages/company.vue 파일 보기

@@ -17,49 +17,23 @@ async function postInfo() {
try {
loading.value = true;
info.value = "loading...";
(await post)<any>("/create_site/company/", {
(await post)<any>("/company/", {
name: name.value,
slogon: slogan.value,
})
.then((res) => {
console.log(res.data);
company_id.value = res.data.id;
site_id.value = res.data.id
if (res.data) {
try {
post<any>("/create_site/sites/", {
site_name: name.value,
company: company_id.value,
domain_name: name.value?.toString().replace(/\s/g, ''),
})
.then((res) => {
if (res.data) {
console.log(res.data);
site_id.value = res.data.id
post<any>("/create_site/pages/", {
site: site_id.value,
page_name: "Home",
content: '<h1>Home Page</h1>'
}).then((res) => {
console.log(res.data);
router.push(
router.push(
`site/create/${company_id.value}/${site_id.value}/palette`
);
});
};

})
.catch(() => {
loading.value = false;
info.value = "Failed. Try Again.";
});
} catch (error) {}
);
}
})
.catch(() => {
.catch((error) => {
loading.value = false;
window.alert(error.response.data);
info.value = "Failed. Try Again.";
});
} catch (error) {


+ 2
- 2
src/pages/dash/[id]/basic.vue 파일 보기

@@ -16,7 +16,7 @@ onMounted(() => {

async function initialize() {
try {
(await get)<any>(`/create_site/sites/${id}/`).then((res) => {
(await get)<any>(`company/${id}/`).then((res) => {
console.log(res.data)
website_title.value = res.data.site_name
});
@@ -30,7 +30,7 @@ async function initialize() {

const submit = () =>{
try {
(put)<any>(`/create_site/sites/${id}/`, { site_name:website_title.value }).then((res) => {
(put)<any>(`/company/name/${id}/`, { site_name:website_title.value }).then((res) => {
console.log('Layout updated successfully:', res.data);
});
} catch (error) {


+ 7
- 15
src/pages/dash/[id]/branding.vue 파일 보기

@@ -23,29 +23,24 @@ onMounted(() => {
async function initialize() {
loading.value = true;
try {
(await get)<any>(`/create_site/sites/${id}/`)
(await get)<any>(`company/${id}/`)
.then((res: any) => {
console.log(res.data);
site_name.value = res.data.site_name;
pallete_id.value = res.data.color_swatch;
company_id.value = res.data.company;
get<any>(`/color_swatches/`)
get<any>(`/colorswatch/`)
.then((res: any) => {
console.log(res.data);
res.data.forEach((element: any) => {
if (element.id == pallete_id.value) {
pallete.value = element;

get<any>(`/create_site/company/${company_id.value}/`)
get<any>(`/company/${id}/`)
.then((res: any) => {
site_logo.value = res.data.logo_path;

console.log(res.data);
instagramPhoto.value =
res.data.brand_photo.instagram_brand_post;
tshirt.value = res.data.brand_photo.tshirt_brand;
console.log(instagramPhoto.value);
console.log(tshirt.value);
console.log(res.data);
loading.value = false;
})
.catch((err) => {
@@ -134,8 +129,8 @@ async function initialize() {
<div class="container">
<div class="row">
<div class="col-12">
<img :src="`https://api.drawise.net${site_logo}`" alt="" width="200">
<a :href="`https://api.drawise.net${site_logo}`" download class="btn"><i class="ti ti-download fs-4 me-2"></i> Download Logo</a>
<img :src="`${site_logo}`" alt="" width="200">
<a :href="`${site_logo}`" download class="btn"><i class="ti ti-download fs-4 me-2"></i> Download Logo</a>
</div>
<div class="col-12 mt-4">
<div class="container">
@@ -206,10 +201,7 @@ async function initialize() {
:src="`https://api.drawise.net/${tshirt[2]}`"
alt=""
/>
</div>
<p class="fs-8 fw-4 mt-4 text-center">
Instagram Posts
</p>
</div>
<div class="col-12">
<div class="container">
<div class="row">


+ 2
- 2
src/pages/dash/[id]/layout.vue 파일 보기

@@ -34,7 +34,7 @@ onMounted(() => {

async function initialize() {
try {
(await get)<any>(`/create_site/sites/${id}/`).then((res) => {
(await get)<any>(`/company/${id}/`).then((res) => {
console.log(res.data);
if (res.data) {
layout.value = res.data.layout;
@@ -56,7 +56,7 @@ function updateLayout(newLayout: string) {
layout.value = newLayout; // Update layout immediately
// Send a request to update the layout in the database
try {
put<any>(`/create_site/sites/${id}/`, {
put<any>(`/company/${id}/`, {
layout: newLayout,
site_name: site_name.value,
}).then((res) => {


+ 4
- 6
src/pages/dash/[id]/pages.vue 파일 보기

@@ -16,13 +16,11 @@ onMounted(() => {
async function initialize() {
console.log("sjbvjs")
try {
(await get)<any>("/create_site/pages/", { site: id }).then((res) => {
(await get)<any>(`/SitePages/site/${id}`).then((res) => {
console.log(res.data);
res.data.forEach((element: any) => {
console.log(element.site)
if (element.site == id) {
pages.value.push(element);
}
console.log(element.site)
pages.value.push(element);
});
console.log(pages.value);
});
@@ -94,7 +92,7 @@ async function initialize() {
<div class="card-body">
<div class="row d-flex">
<div class="col-6">
<p class="fs-5 fw-bolder">{{ page.page_name }}</p>
<p class="fs-5 fw-bolder">{{page.page_title}}</p>
</div>
<div class="col-6 d-flex justify-content-end">
<RouterLink


+ 5
- 5
src/pages/dashboard.vue 파일 보기

@@ -13,12 +13,12 @@ onMounted(() => {

async function initialize() {
try {
const sitesResponse = await get<any>("/create_site/sites/");
const sitesResponse = await get<any>("company/");
const siteData = sitesResponse.data;
console.log(siteData);

// Fetch logo URLs for each site
const logoPromises = siteData.map((site: any) => getLogoPath(site.company));
const logoPromises = siteData.map((site: any) => getLogoPath(site.id));
const logoURLs = await Promise.all(logoPromises);

// Set the data for both sites and logo URLs
@@ -34,8 +34,8 @@ async function initialize() {

async function getLogoPath(compnay_id: any) {
try {
const response: any = await get(`/create_site/company/${compnay_id}`);
const logoPath = "https://api.drawise.net" + response.data.logo_path;
const response: any = await get(`/company/${compnay_id}/logo`);
const logoPath = response.data.logo_path;
console.log(logoPath);
return logoPath;
} catch (error) {
@@ -116,7 +116,7 @@ const openPage = (site: any) => {
class="d-flex align-items-center justify-content-between w-100 prof-flex"
>
<h1 class="fs-5 d-none-prof-500">
{{ site["site_name"] }}
{{ site["name"] }}
</h1>
<RouterLink
:to="`dash/${site.id}/branding`"


+ 7
- 53
src/pages/login.vue 파일 보기

@@ -11,6 +11,7 @@ const loading = ref<boolean>(false);
const login = async () => {
try {
loading.value = true;
var buttonText=text.value;
text.value = "Loading";
(await post)<any>("/auth/login/", {
email: email.value,
@@ -24,9 +25,10 @@ const login = async () => {
router.push("dashboard");
}
})
.catch(() => {
.catch((error) => {
loading.value = false;
text.value = "Failed. Try Again...";
window.alert(error.response.data);
text.value = buttonText;
});
} catch (error) {
console.error("Error making POST request:", error);
@@ -40,7 +42,7 @@ onBeforeMount(() => {
const checkLoggedRedirest = async () => {
(await get)<any>("/auth/test-token/")
.then(() => {
window.location.replace("https://app.drawise.net/dashboard");
window.location.replace("/dashboard");
});
};
</script>
@@ -143,56 +145,8 @@ const checkLoggedRedirest = async () => {
>
</div>
</div>
<div class="position-relative text-center my-4">
<p
class="mb-0 fs-4 px-3 d-inline-block bg-white text-dark z-index-5 position-relative"
>
or sign in with
</p>
<span
class="border-top w-100 position-absolute top-50 start-50 translate-middle"
></span>
</div>
<div class="row">
<div class="col-6 mb-2 mb-sm-0">
<a
class="btn btn-white text-dark border fw-normal d-flex align-items-center justify-content-center rounded-2 py-8"
href="javascript:void(0)"
role="button"
>
<img
src="../../public/google.svg"
alt=""
class="img-fluid me-2"
width="18"
height="18"
/>
<span
class="d-none d-sm-block me-1 flex-shrink-0"
></span
>Google
</a>
</div>
<div class="col-6">
<a
class="btn btn-white text-dark border fw-normal d-flex align-items-center justify-content-center rounded-2 py-8"
href="javascript:void(0)"
role="button"
>
<img
src="../../public/facebook.svg"
alt=""
class="img-fluid me-2"
width="18"
height="18"
/>
<span
class="d-none d-sm-block me-1 flex-shrink-0"
></span
>Facebook
</a>
</div>
</div>
</div>
</div>
</div>


+ 7
- 53
src/pages/signup.vue 파일 보기

@@ -12,6 +12,7 @@ const passwordConfirm = ref<any>();
const signUp = async () => {
try {
loading.value = true;
var buttonText=info.value;
info.value = "loading...";
(await post)<any>("/auth/signup/", {
email: email.value,
@@ -26,9 +27,10 @@ const signUp = async () => {
router.push("dashboard");
}
})
.catch(() => {
.catch((error) => {
loading.value = false;
info.value = "Failed. Try Again.";
window.alert(error.response.data);
info.value = buttonText;
});
} catch (error) {
console.error("Error making POST request:", error);
@@ -43,7 +45,7 @@ onBeforeMount(() => {
const checkLoggedRedirest = async () => {
(await get)<any>("/auth/test-token/")
.then(() => {
window.location.replace("https://app.drawise.net/dashboard");
window.location.replace("/dashboard");
})
};

@@ -151,56 +153,8 @@ const checkLoggedRedirest = async () => {
>Login</RouterLink
>
</div>
</div>
<div class="position-relative text-center my-4">
<p
class="mb-0 fs-4 px-3 d-inline-block bg-white text-dark z-index-5 position-relative"
>
or register with
</p>
<span
class="border-top w-100 position-absolute top-50 start-50 translate-middle"
></span>
</div>
<div class="row">
<div class="col-6 mb-2 mb-sm-0">
<a
class="btn btn-white text-dark border fw-normal d-flex align-items-center justify-content-center rounded-2 py-8"
href="javascript:void(0)"
role="button"
>
<img
src="../../public/google.svg"
alt=""
class="img-fluid me-2"
width="18"
height="18"
/>
<span
class="d-none d-sm-block me-1 flex-shrink-0"
></span
>Google
</a>
</div>
<div class="col-6">
<a
class="btn btn-white text-dark border fw-normal d-flex align-items-center justify-content-center rounded-2 py-8"
href="javascript:void(0)"
role="button"
>
<img
src="../../public/facebook.svg"
alt=""
class="img-fluid me-2"
width="18"
height="18"
/>
<span
class="d-none d-sm-block me-1 flex-shrink-0"
></span
>Facebook
</a>
</div>
</div>
<div class="row">
</div>
</div>
</div>


+ 7
- 33
src/pages/site/create/[company]/[id]/branding.vue 파일 보기

@@ -24,46 +24,20 @@ onMounted(() => {
async function initialize() {
loading.value = true;
try {
(await get)<any>(`/create_site/sites/${id}/`)
(await get)<any>(`/company/${id}/`)
.then((res) => {
console.log(res.data);
site_logo.value = res.data.logo_path;
site_name.value = res.data.site_name;
pallete_id.value = res.data.color_swatch;
get<any>(`/color_swatches/`)
get<any>(`/ColorSwatch/`)
.then((res) => {
console.log(res.data);
res.data.forEach((element: any) => {
if (element.id == pallete_id.value) {
pallete.value = element;

get<any>(`/create_site/company/${company_id}/`)
.then((res) => {
console.log(res.data);
site_logo.value = res.data.logo_path;
post<any>("/create_icon/brand_create/", {
logo_path: res.data.logo_path,
company_id: res.data.id,
})
.then((res) => {
if (res.data) {
console.log("branding",res.data);
photos.value = res.data;
console.log(photos.value)
loading.value = false;
}
})
.catch(() => {
loading.value = false;
text.value = "Failed. Try Again";
});
})
.catch(() => {
loading.value = false;
text.value = "Failed. Refresh the page";
});

// '/create_icon/brand_create/',{logo_path:res.data.logo_path,company_id: company_id.value}
pallete.value = element;
}
loading.value = false;
});
})
.catch(() => {
@@ -134,8 +108,8 @@ async function initialize() {
<div class="container">
<div class="row">
<div class="col-12">
<img :src="`https://api.drawise.net${site_logo}`" alt="" width="200">
<a :href="`https://api.drawise.net${site_logo}`" download class="btn"><i class="ti ti-download fs-4 me-2"></i> Download Logo</a>
<img :src="`${site_logo}`" alt="" width="200">
<a :href="`${site_logo}`" target="_blank" download class="btn"><i class="ti ti-download fs-4 me-2"></i> Download Logo</a>
</div>
<div class="col-12 mt-4">
<div class="container">


+ 6
- 28
src/pages/site/create/[company]/[id]/chooseLayout.vue 파일 보기

@@ -2,7 +2,7 @@
import { onMounted, ref } from "vue";
import { useRoute, useRouter } from "vue-router";
import { checkLoggedIn } from "../../../../../utils/accessTocken";
import { get, put } from "../../../../../utils/api";
import { get, put,post } from "../../../../../utils/api";
const colors = ref<any>();
const loading = ref<boolean>(false);
const text = ref<string>("Continue");
@@ -15,38 +15,15 @@ onMounted(() => {
checkLoggedIn();
initialize();
});
async function initialize() {
try {
loading.value = true;
text.value = "Getting info...";
(await get)<any>("/color_swatches/").then((res) => {
console.log(res.data);
colors.value = res.data;
loading.value = false;
text.value = "Continue";
});

(get)<any>(`/create_site/sites/${id}/`)
.then((res) => {
site_name.value = res.data.site_name
loading.value = false
})
.catch(()=>{
loading.value = false;
text.value = "Failed. Refresh the page"
});
} catch (error) {
// Handle errors here
console.error(error);
}
async function initialize() {
}


const submitLayout = async () => {
loading.value = true;
text.value = "loading";
(await put)<any>(`/create_site/sites/${id}/`, {
site_name: site_name.value,
(await post)<any>(`/SitePages/Layout`, {
CompanyId:id,
layout: selectedLayout.value,
})
.then((res) => {
@@ -55,7 +32,8 @@ const submitLayout = async () => {
loading.value = false;
}
})
.catch(() => {
.catch((error) => {
window.alert(error.response.data);
loading.value = false;
text.value = "Failed. Try Again";
});


+ 6
- 23
src/pages/site/create/[company]/[id]/logo.vue 파일 보기

@@ -13,31 +13,12 @@ const company_name = ref<string>();
const company_slogan = ref<string>();
const selected = ref<boolean>(false);
onMounted(() => {
logos.value = JSON.parse(localStorage.getItem("logos") as string).icons;
logos.value = JSON.parse(localStorage.getItem("logos") as string);
console.log(logos.value);
initialize();
});

async function initialize() {
loading.value = true;
try {
(await get)<any>(`/create_site/company/${company_id}/`)
.then((res) => {
console.log(res.data)
// company_id.value = res.company_id
company_name.value = res.data.name
company_slogan.value = res.data.slogon
loading.value = false
})
.catch(()=>{
loading.value = false;
text.value = "Failed. Refresh the page"
})
;
} catch (error) {
// Handle errors here
console.error(error);
}
}

function watchSelection(url: any) {
@@ -50,7 +31,7 @@ function watchSelection(url: any) {
const submitLogo = async () => {
loading.value = true;
text.value = "loading";
(await put)<any>(`/create_site/company/${company_id}/`, { name:company_name.value,slogon:company_slogan.value,logo_path:logo.value})
(await put)<any>(`/company/SelectLogo/`, { id:company_id,logoPath:logo.value})
.then((res) => {
if (res.data) {
console.log(res.data)
@@ -58,7 +39,8 @@ const submitLogo = async () => {
loading.value = false;
}
})
.catch(() => {
.catch((error) => {
window.alert(error.response.data);
loading.value = false;
text.value = "Failed. Try Again";
});
@@ -130,7 +112,7 @@ const submitLogo = async () => {
:for="'logo-' + index"
>
<img
:src="`https://api.drawise.net${logo}`"
:src="`${logo}`"
alt=""
style="max-width: 100px"
/>
@@ -141,6 +123,7 @@ const submitLogo = async () => {
@click="submitLogo"
:disabled="loading || !selected"
class="btn btn-success w-100 py-8 mb-4 rounded-2"
style="position:fixed;left:0;bottom:1vh;"
>
{{ text }}
<i class="ti ti-chevron-right fs-4 me-2"></i>


+ 5
- 4
src/pages/site/create/[company]/[id]/palette.vue 파일 보기

@@ -20,14 +20,14 @@ async function initialize() {
try {
loading.value = true;
text.value = "Getting info...";
(await get)<any>("/color_swatches/").then((res) => {
(await get)<any>("/ColorSwatch/").then((res) => {
console.log(res.data);
colors.value = res.data;
loading.value = false;
text.value = "Continue";
});

(get)<any>(`/create_site/sites/${id}/`)
(get)<any>(`/company/${id}/`)
.then((res) => {
site_name.value = res.data.site_name
loading.value = false
@@ -49,7 +49,7 @@ const watchSelection = (id: any) => {
const submitPalette = async () => {
loading.value = true;
text.value = "loading";
(await put)<any>(`/create_site/sites/${id}/`, {
(await put)<any>(`/company/${id}/color`, {
site_name: site_name.value,
color_swatch: selected.value,
})
@@ -60,8 +60,9 @@ const submitPalette = async () => {
loading.value = false;
}
})
.catch(() => {
.catch((error) => {
loading.value = false;
window.alert(error.response.data);
text.value = "Failed. Try Again";
});
console.log("alert");


+ 5
- 13
src/pages/site/create/[company]/[id]/tag.vue 파일 보기

@@ -23,7 +23,7 @@ onMounted(() => {
async function initialize() {
loading.value = true;
try {
(await get)<any>("/tag/")
(await get)<any>("/tag/string")
.then((res) => {
console.log(res.data);
tags.value = res.data;
@@ -32,16 +32,7 @@ async function initialize() {
.catch(() => {
loading.value = false;
text.value = "Server is crowded. Please try again";
});
get<any>(`/create_site/sites/${id}/`)
.then((res) => {
site_name.value = res.data.site_name;
loading.value = false;
})
.catch(() => {
loading.value = false;
text.value = "Failed. Refresh the page";
});
});
} catch (error) {
// Handle errors here
console.error(error);
@@ -88,9 +79,10 @@ async function submitTags() {
try {
loading.value = true;
text.value = "loading";
(await post)<any>("/create_icon/create_icon/", {
(await post)<any>("/company/createLogo/", {
id:''+id,
text: site_name.value,
tags: selected.value,
tags: selected.value,
})
.then((res) => {
if (res.data) {


+ 14
- 26
src/pages/site/page/[id]/edit-page.vue 파일 보기

@@ -5,7 +5,7 @@ import { ref, onMounted, computed } from "vue";
import { useRoute, useRouter } from "vue-router";
import { checkLoggedIn } from "./../../../../utils/accessTocken";
import { get, put, post, remove } from "./../../../../utils/apiFrom";
import { post as postAPI } from "./../../../../utils/api";
import { post as postAPI,put as putAPI } from "./../../../../utils/api";
import axios from "axios";
const saving = ref<boolean>(false);
const savingText = ref<string>("Save");
@@ -28,11 +28,11 @@ onMounted(() => {

async function initialize() {
try {
(await get)<any>(`/create_site/pages/${id}/`).then((res) => {
(await get)<any>(`/SitePages/ForEdit/${id}/`).then((res) => {
console.log(res.data);
if (res.data) {
site_id.value = res.data.site;
quill.value.setHTML(res.data.content);
site_id.value = res.data.site_id;
quill.value.setHTML(res.data.page_content);
page_name.value = res.data.page_name;
console.log(site_id.value);
images.value = res.data.image;
@@ -49,7 +49,7 @@ async function editPage() {
try {
saving.value = true;
savingText.value = "Saving...";
(await put)<any>(`/create_site/pages/${id}/`, {
(await putAPI)<any>(`/SitePages/${id}/`, {
site: site_id.value,
page_name: page_name.value,
content: quill.value.getHTML(),
@@ -72,20 +72,9 @@ const imgGen = ref<string>("Generate");
const sendPicogen = () => {
loadingImage.value = true;
imgGen.value = "Generating...";
post<any>(`/create_site/picogen/`, { prompt: picogenProp.value })
postAPI<any>(`/SitePages/picogen/`, { request: picogenProp.value,pageId:id })
.then((res) => {
console.log(res.data[0]);
imgGen.value = "Generate";
postAPI<any>(`/create_site/picogen/`, { url: res.data[0] , page_id: route.params.id})
.then((res) => {
console.log(res.data)
loadingImage.value = false;
router.go(0)
})
.catch(() => {
loadingImage.value = false;
imgGen.value = "Failed, Try Again";
});
window.location.reload();
})
.catch(() => {
loadingImage.value = false;
@@ -125,13 +114,12 @@ const sendPostRequest = async () => {
quill.value.setHTML("<p>Generating ... </p>");
loadingText.value = true;
try {
await axios
.post("https://avindev.com/bot/public/drawise", {
text: text.value + " in HTML Format only <body>",
postAPI<any>(`/SitePages/gpt`, {
request: text.value,
})
.then((res: any) => {
console.log(res.data.text);
quill.value.setHTML(res.data.text);
console.log(res.data);
quill.value.setHTML(res.data);
loadingText.value = false;
})
.catch(() => {
@@ -152,7 +140,7 @@ const selectedImageIds = computed(() => {
});

const deleteImage = async (id: any) => {
(await remove)<any>(`/create_site/images/${id}`)
(await remove)<any>(`/SitePages/image/${id}`)
.then((res: any) => {
console.log(res.data);
router.go(0);
@@ -301,12 +289,12 @@ const deleteImage = async (id: any) => {
/>
<span class="checkbox-tile">
<img
:src="`https://api.drawise.net${image.image}`"
:src="`${image}`"
alt=""
style="max-width: 150px"
/>
<button
@click="deleteImage(image.id)"
@click="deleteImage(id)"
class="btn btn-outline-danger btn-sm p-1 m-1"
>
<i class="ti ti-trash fs-4"></i>


+ 22
- 37
src/pages/site/page/[id]/index.vue 파일 보기

@@ -43,15 +43,15 @@ async function initialize() {
layout.value = "left";

try {
(await get)<any>(`/create_site/pages/${id}`).then((res) => {
(await get)<any>(`/SitePages/${id}`).then((res) => {
console.log(res.data);
if (res.data) {
page_title.value = res.data.page_name;
page_content.value = res.data.content;
site_id.value = res.data.site;
page_title.value = res.data.page_title;
page_content.value = res.data.page_content;
site_id.value = res.data.site_id;
images.value = res.data.image;
getPages();
console.log(page_content.value);
console.log("page content:"+page_content.value);
getLayout();
}
});
@@ -62,7 +62,7 @@ async function initialize() {
}
async function getPages() {
try {
(await get)<any>("/create_site/pages/", { site: id }).then((res) => {
(await get)<any>(`/SitePages/site/${site_id.value}`).then((res) => {
console.log(res.data);
pages.value = res.data;
});
@@ -72,30 +72,15 @@ async function getPages() {
}
}
async function getLayout() {
(await get)<any>(`/create_site/sites/${site_id.value}`).then((res) => {
(await get)<any>(`/company/${site_id.value}`).then((res) => {
console.log(res.data);
if (res.data) {
layout.value = res.data.layout;
site_logo.value = res.data.logo_path;
site_name.value = res.data.site_name;
pallete_id.value = res.data.color_swatch;
get<any>(`/create_site/company/${res.data.company}`).then((res) => {
console.log(res.data);
if (res.data) {
site_logo.value = res.data.logo_path;
get<any>(`/color_swatches/`).then((res) => {
res.data.forEach((element: any) => {
if (element.id == pallete_id.value) {
loading.value = false;
pallete.value = element;
console.log(pallete.value);
}
});
});
}
});

console.log(page_content.value);
loading.value = false;
console.log("page content:"+page_content.value);
}
});
}
@@ -121,7 +106,7 @@ const unescapedPageContent = computed(() => {
<nav class="navbar navbar-expand-lg fixed-top navbar-fixed-top">
<a class="navbar-brand scroll" href="index-celebrity.html#home">
<img
:src="`https://api.drawise.net${site_logo}`"
:src="`${site_logo}`"
width="80"
alt="logo"
/>
@@ -134,7 +119,7 @@ const unescapedPageContent = computed(() => {
:to="`./${site_name}/${page.id}`"
class="nav-link font scroll"
>
{{ page.page_name }}
{{ page.page_title }}
</RouterLink>
</li>
</ul>
@@ -148,7 +133,7 @@ const unescapedPageContent = computed(() => {
<div class="inner-wrapper">
<div class="sidemenu-image">
<a class="scroll" href="index-celebrity.html#home">
<img :src="`https://api.drawise.net${site_logo}`" alt="image"
<img :src="`${site_logo}`" alt="image"
/></a>
</div>
<span class="btn-close" id="btn_sideNavClose"><i></i><i></i></span>
@@ -231,7 +216,7 @@ const unescapedPageContent = computed(() => {
<section
class="banner-section"
id="home"
:style="`background-image:url(https://api.drawise.net${images[0].image}) ;`"
:style="`background-image:url(${images[0]}) ;`"
>
<div class="container">
<div class="rectangle wow slideInDown" data-wow-delay="1500ms">
@@ -302,7 +287,7 @@ const unescapedPageContent = computed(() => {

<div class="col-lg-6 col-md-12 col-sm-12 img-section">
<img
:src="`https://api.drawise.net${images[1].image}`"
:src="`${images[1]}`"
alt="img"
/>
</div>
@@ -369,7 +354,7 @@ const unescapedPageContent = computed(() => {
<div class="container radius nav-box-shadow">
<a class="logo link" href="javascript:void(0)">
<img
:src="`https://api.drawise.net${site_logo}`"
:src="`${site_logo}`"
width="50"
alt="logo"
title="Logo"
@@ -398,7 +383,7 @@ const unescapedPageContent = computed(() => {
<div
id="particles-js"
class="particle2 parallax-setting bg-img-1 bg-img-setting not-full"
:style="`background-image:linear-gradient(60deg, rgba(220, 207, 53, 0.76) 0%, rgba(220, 53, 69, 0.67) 70%), url(https://api.drawise.net${images[0].image}) ;`"
:style="`background-image:linear-gradient(60deg, rgba(220, 207, 53, 0.76) 0%, rgba(220, 53, 69, 0.67) 70%), url(${images[0]}) ;`"
>
<div class="bg-overlay bg-gradient"></div>
<div class="not-fullscreen">
@@ -406,7 +391,7 @@ const unescapedPageContent = computed(() => {
<div class="personal-box">
<div class="myphoto">
<img
:src="`https://api.drawise.net${images[1].image}`"
:src="`${images[1]}`"
alt="image"
/>
</div>
@@ -429,7 +414,7 @@ const unescapedPageContent = computed(() => {
<div class="hover-effect">
<img
alt="about"
:src="`https://api.drawise.net${images[2].image}`"
:src="`${images[2]}`"
class="about-img w-100"
/>
</div>
@@ -510,13 +495,13 @@ const unescapedPageContent = computed(() => {
<a href="index-cycling.html#home" title="Logo" class="logo scroll">
<!--Logo Default-->
<img
:src="`https://api.drawise.net${site_logo}`"
:src="`${site_logo}`"
alt="logo"
width="60"
class="m-0 logo-img"
/>
<img
:src="`https://api.drawise.net${site_logo}`"
:src="`${site_logo}`"
alt="logo"
class="m-0 logo-dark"
/>
@@ -610,7 +595,7 @@ const unescapedPageContent = computed(() => {
<!-- Header end -->

<!-- banner start -->
<section class="banner-see bg-banner" id="banner" :style="`background-image:url(https://api.drawise.net${images[1].image});`">
<section class="banner-see bg-banner" id="banner" :style="`background-image:url(${images[1]});`">
<div class="container">
<div class="row height">
<div class="col-lg-6 d-flex align-items-center">
@@ -629,7 +614,7 @@ const unescapedPageContent = computed(() => {
<div class="row">
<div class=" col-sm-12 col-md-12 col-lg-6 img-sec wow fadeInLeft" data-wow-duration="1s" data-wow-delay=".5s">
<div class="about_img margin_aboutimg">
<img :src="`https://api.drawise.net${images[0].image}`" alt="about">
<img :src="`${images[0]}`" alt="about">
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">


+ 2
- 1
src/style.css 파일 보기

@@ -47063,7 +47063,8 @@ html[dir=rtl] .welcome-bg-img {
.app-header .container-sm,
.app-header .container-xl,
.app-header .container-xxl {
padding: 0 20px
padding: 0 20px;
display:none;
}

.navbar-nav .dropdown-menu {


+ 1
- 1
src/utils/accessTocken.ts 파일 보기

@@ -44,7 +44,7 @@ async function checkLoggedIn () {
.then((res)=>{
console.log(res.data)
}).catch(()=>{
// window.location.replace("https://app.drawise.net/signup");
// window.location.replace("https://api.drawise.net/signup");
});
} catch (error) {


+ 4
- 4
src/utils/api.ts 파일 보기

@@ -19,7 +19,7 @@ export async function get<T>(
): Promise<AxiosResponse<T>> {
const config: AxiosRequestConfig = {
headers: {
Authorization: getAccessToken() ? `token ${getAccessToken()}` : undefined,
Authorization: getAccessToken() ? `Bearer ${getAccessToken()}` : undefined,
},
params: params,
};
@@ -31,7 +31,7 @@ export async function get<T>(
export async function post<T>(url: string, data: any): Promise<AxiosResponse<T>> {
const config: AxiosRequestConfig = {
headers: {
Authorization: getAccessToken() ? `token ${getAccessToken()}` : undefined,
Authorization: getAccessToken() ? `Bearer ${getAccessToken()}` : undefined,
},
};

@@ -42,7 +42,7 @@ export async function post<T>(url: string, data: any): Promise<AxiosResponse<T>>
export async function put<T>(url: string, data: any): Promise<AxiosResponse<T>> {
const config: AxiosRequestConfig = {
headers: {
Authorization: getAccessToken() ? `token ${getAccessToken()}` : undefined,
Authorization: getAccessToken() ? `Bearer ${getAccessToken()}` : undefined,
},
};

@@ -52,7 +52,7 @@ export async function put<T>(url: string, data: any): Promise<AxiosResponse<T>>
export async function remove<T>(url: string): Promise<AxiosResponse<T>> {
const config: AxiosRequestConfig = {
headers: {
Authorization: getAccessToken() ? `token ${getAccessToken()}` : undefined,
Authorization: getAccessToken() ? `Bearer ${getAccessToken()}` : undefined,
},
};



+ 4
- 4
src/utils/apiFrom.ts 파일 보기

@@ -19,7 +19,7 @@ export async function get<T>(
): Promise<AxiosResponse<T>> {
const config: AxiosRequestConfig = {
headers: {
Authorization: getAccessToken() ? `token ${getAccessToken()}` : undefined,
Authorization: getAccessToken() ? `Bearer ${getAccessToken()}` : undefined,
},
params: params,
};
@@ -31,7 +31,7 @@ export async function get<T>(
export async function post<T>(url: string, data: any): Promise<AxiosResponse<T>> {
const config: AxiosRequestConfig = {
headers: {
Authorization: getAccessToken() ? `token ${getAccessToken()}` : undefined,
Authorization: getAccessToken() ? `Bearer ${getAccessToken()}` : undefined,
},
};

@@ -42,7 +42,7 @@ export async function post<T>(url: string, data: any): Promise<AxiosResponse<T>>
export async function put<T>(url: string, data: any): Promise<AxiosResponse<T>> {
const config: AxiosRequestConfig = {
headers: {
Authorization: getAccessToken() ? `token ${getAccessToken()}` : undefined,
Authorization: getAccessToken() ? `Bearer ${getAccessToken()}` : undefined,
},
};

@@ -53,7 +53,7 @@ export async function put<T>(url: string, data: any): Promise<AxiosResponse<T>>
export async function remove<T>(url: string): Promise<AxiosResponse<T>> {
const config: AxiosRequestConfig = {
headers: {
Authorization: getAccessToken() ? `token ${getAccessToken()}` : undefined,
Authorization: getAccessToken() ? `Bearer ${getAccessToken()}` : undefined,
},
};



불러오는 중...
취소
저장