From 96b7cb11ecfc9ac7f1f5faab0f4fa3a14eb6f2a3 Mon Sep 17 00:00:00 2001 From: Wayne Date: Sat, 15 Jul 2023 14:05:41 +0800 Subject: [PATCH] login page --- .env.dev | 2 + .env.development | 2 + .env.h888 | 2 + .env.production | 2 + .env.slash | 2 + category.html | 19 ++ .../goods/category/components/EditForm.vue | 146 ++++++++++++++ src/pages/goods/category/index.vue | 178 ++++++++++++++++++ src/pages/goods/category/main.js | 7 + src/pages/goods/main.js | 8 +- src/pages/login/index.vue | 8 +- src/pages/setting/shopConfig/index.vue | 1 - 12 files changed, 367 insertions(+), 10 deletions(-) create mode 100644 category.html create mode 100644 src/pages/goods/category/components/EditForm.vue create mode 100644 src/pages/goods/category/index.vue create mode 100644 src/pages/goods/category/main.js diff --git a/.env.dev b/.env.dev index b480e3a..95f598c 100644 --- a/.env.dev +++ b/.env.dev @@ -1,5 +1,7 @@ VITE_APP_BASE_URL = 'http://localhost:8080/' +VITE_APP_BACKEND_URL = 'http://localhost:8080/adm/' + VITE_APP_IMG_URL = 'http://localhost:8080/' VITE_APP_API_URL = 'http://localhost:8080/adminapi/v1' diff --git a/.env.development b/.env.development index b480e3a..95f598c 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,7 @@ VITE_APP_BASE_URL = 'http://localhost:8080/' +VITE_APP_BACKEND_URL = 'http://localhost:8080/adm/' + VITE_APP_IMG_URL = 'http://localhost:8080/' VITE_APP_API_URL = 'http://localhost:8080/adminapi/v1' diff --git a/.env.h888 b/.env.h888 index 64acd0e..a1c77fb 100644 --- a/.env.h888 +++ b/.env.h888 @@ -1,5 +1,7 @@ VITE_APP_BASE_URL = 'https://shop.h888.fun/' +VITE_APP_BACKEND_URL = 'https://shop.h888.fun/adm/' + VITE_APP_IMG_URL = 'https://shop.h888.fun/' VITE_APP_API_URL = 'https://shop.h888.fun/adminapi/v1' diff --git a/.env.production b/.env.production index 79b4ff0..58402bf 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,7 @@ VITE_APP_BASE_URL = 'https://shop.slash1000.com/' +VITE_APP_BACKEND_URL = 'https://shop.slash1000.com/adm/' + VITE_APP_IMG_URL = 'https://shop.slash1000.com/' VITE_APP_API_URL = 'https://shop.slash1000.com/adminapi/v1' diff --git a/.env.slash b/.env.slash index 79b4ff0..58402bf 100644 --- a/.env.slash +++ b/.env.slash @@ -1,5 +1,7 @@ VITE_APP_BASE_URL = 'https://shop.slash1000.com/' +VITE_APP_BACKEND_URL = 'https://shop.slash1000.com/adm/' + VITE_APP_IMG_URL = 'https://shop.slash1000.com/' VITE_APP_API_URL = 'https://shop.slash1000.com/adminapi/v1' diff --git a/category.html b/category.html new file mode 100644 index 0000000..4c26a75 --- /dev/null +++ b/category.html @@ -0,0 +1,19 @@ + + + + + + {$lang.cp_home}{if $ur_here} - {$ur_here}{/if} + + + + + + +
+ + + diff --git a/src/pages/goods/category/components/EditForm.vue b/src/pages/goods/category/components/EditForm.vue new file mode 100644 index 0000000..8b414bc --- /dev/null +++ b/src/pages/goods/category/components/EditForm.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/pages/goods/category/index.vue b/src/pages/goods/category/index.vue new file mode 100644 index 0000000..9bfa699 --- /dev/null +++ b/src/pages/goods/category/index.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/pages/goods/category/main.js b/src/pages/goods/category/main.js new file mode 100644 index 0000000..4969afc --- /dev/null +++ b/src/pages/goods/category/main.js @@ -0,0 +1,7 @@ +import { createApp } from 'vue' +import App from './index.vue' + +import '@/assets/css/normalize.less' +import '@/assets/css/common.less' + +createApp(App).mount('#app') diff --git a/src/pages/goods/main.js b/src/pages/goods/main.js index 9d9b199..3049017 100644 --- a/src/pages/goods/main.js +++ b/src/pages/goods/main.js @@ -1,13 +1,11 @@ import { createApp } from 'vue' import App from './App.vue' -import router from './router/index.js' - -import CKEditor from '@ckeditor/ckeditor5-vue' +// import router from './router/index.js' import '@/assets/css/normalize.less' import '@/assets/css/common.less' const app = createApp(App) -app.use(CKEditor) -app.use(router) + +// app.use(router) app.mount('#app') diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index ceed650..74e6b3b 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -55,7 +55,7 @@ import { ref, reactive, nextTick } from "vue"; import axios from "axios"; import Cookies from "js-cookie"; -const captchaImgUrl = ref(import.meta.env.VITE_APP_BASE_URL + "admin/index.php?act=captcha&" + Math.random()); +const captchaImgUrl = ref(import.meta.env.VITE_APP_BACKEND_URL + "index.php?act=captcha&" + Math.random()); // const inputCaptcha = () => { // form.value.captcha = form.value.captcha.toUpperCase(); @@ -70,7 +70,7 @@ const form = ref({ }); const handleClickCaptcha = () => { - captchaImgUrl.value = import.meta.env.VITE_APP_BASE_URL + 'admin/index.php?act=captcha&'+Math.random() + captchaImgUrl.value = import.meta.env.VITE_APP_BACKEND_URL + 'index.php?act=captcha&'+Math.random() } const onSubmit = async () => { @@ -86,9 +86,9 @@ const onSubmit = async () => { } try{ - let { data: res} = await axios.post(import.meta.env.VITE_APP_BASE_URL + "admin/privilege.php?act=signin", form.value); + let { data: res} = await axios.post(import.meta.env.VITE_APP_BACKEND_URL + "privilege.php?act=signin", form.value); if (res.code !== 200) { - captchaImgUrl.value = import.meta.env.VITE_APP_BASE_URL + 'admin/index.php?act=captcha&'+Math.random() + captchaImgUrl.value = import.meta.env.VITE_APP_BACKEND_URL + 'index.php?act=captcha&'+Math.random() return ElMessage.error(res.data.msg); } diff --git a/src/pages/setting/shopConfig/index.vue b/src/pages/setting/shopConfig/index.vue index 8e6c000..256c2aa 100644 --- a/src/pages/setting/shopConfig/index.vue +++ b/src/pages/setting/shopConfig/index.vue @@ -89,7 +89,6 @@ const handleClick = () => { // console.log(tab, event) } - //圖片上傳 const actionUrl = ref(import.meta.env.VITE_APP_BASE_URL+'/adminapi/v1/shop/uploadLogo')