Skip to content

Commit

Permalink
Fix database and theme
Browse files Browse the repository at this point in the history
  • Loading branch information
tangyw committed Dec 8, 2021
1 parent 2b72771 commit fca0e48
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 58 deletions.
4 changes: 2 additions & 2 deletions jvue-front/components/themes/default/HeaderMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export default {
name: "HeaderMenu",
data() {
return {
activeIndex: "/index-default",
activeIndex: "/index",
menuList: [
{
id: 1,
name: "首页",
link: "/index-default",
link: "/",
icon: "fa fa-home"
},
{
Expand Down
3 changes: 2 additions & 1 deletion jvue-front/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ module.exports = {
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
baseURL:"http://www.terwergreen.com/api"
// baseURL:"http://www.terwergreen.com/api"
baseURL: "http://localhost:8081/api"
},

/*
Expand Down
28 changes: 7 additions & 21 deletions jvue-front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<template>
<el-container>
<el-main>
<el-main class="el-container-dark">
<el-row>
<el-col :xs="0" :md="2">&nbsp;</el-col>
<el-col :xs="24" :md="20">
<el-main>
<el-main class="el-main-dark">
<el-container>
<el-main>
<el-main class="el-main-dark">
<el-container>
<el-header>
<el-header class="el-header-dark">
<HeaderTime />
</el-header>
<el-header>
<el-header class="el-header-dark">
<Header />
</el-header>
<el-main>
<Body :type="post" :post-list="postListArray" />
<el-main class="el-main-dark">
<Body type="post" :post-list="postListArray" />
</el-main>
</el-container>
</el-main>
Expand All @@ -38,26 +38,26 @@

<script>
import { getLogger } from "../util/logger";
import HeaderTime from "../components/themes/default/HeaderTime";
import Header from "../components/themes/default/Header";
import Body from "../components/themes/default/Body";
import Footer from "../components/themes/default/Footer";
import FriendLink from "../components/themes/default/FriendLink";
import HeaderTime from "../components/themes/dark/HeaderTime";
import Header from "../components/themes/dark/Header";
import Body from "../components/themes/dark/Body";
import Footer from "../components/themes/dark/Footer";
import FriendLink from "../components/themes/dark/FriendLink";
const logger = getLogger("pages/index");
export default {
name: "Index",
components: { HeaderTime, Header, Body, Footer, FriendLink },
async asyncData({ $axios }) {
const siteConfigResult = await $axios.$post("/site/config/list");
const siteConfigObj =
siteConfigResult.status === 1 ? siteConfigResult.data : {};
const postsResult = await $axios.$post("/blog/post/list", {
postType: "post",
postStatus: "publish",
pageNum: 1,
pageSize: 10
});
const siteConfigObj =
siteConfigResult.status === 1 ? siteConfigResult.data : {};
const postListArray = postsResult.status === 1 ? postsResult.data.list : [];
logger.info("fetch siteConfig and postList finish");
Expand All @@ -84,5 +84,5 @@ export default {

<style lang="scss">
@import "./common.css";
@import "./default.css";
@import "./dark.css";
</style>
32 changes: 16 additions & 16 deletions jvue-front/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<template>
<el-container>
<el-main class="el-container-dark">
<el-main>
<el-row>
<el-col :xs="0" :md="2">&nbsp;</el-col>
<el-col :xs="24" :md="20">
<el-main class="el-main-dark">
<el-main>
<el-container>
<el-main class="el-main-dark">
<el-main>
<el-container>
<el-header class="el-header-dark">
<el-header>
<HeaderTime />
</el-header>
<el-header class="el-header-dark">
<el-header>
<Header />
</el-header>
<el-main class="el-main-dark">
<Body type="post" :post-list="postListArray" />
<el-main>
<Body :type="post" :post-list="postListArray" />
</el-main>
</el-container>
</el-main>
Expand All @@ -38,26 +38,26 @@

<script>
import { getLogger } from "../util/logger";
import HeaderTime from "../components/themes/dark/HeaderTime";
import Header from "../components/themes/dark/Header";
import Body from "../components/themes/dark/Body";
import Footer from "../components/themes/dark/Footer";
import FriendLink from "../components/themes/dark/FriendLink";
import HeaderTime from "../components/themes/default/HeaderTime";
import Header from "../components/themes/default/Header";
import Body from "../components/themes/default/Body";
import Footer from "../components/themes/default/Footer";
import FriendLink from "../components/themes/default/FriendLink";
const logger = getLogger("pages/index");
export default {
name: "Index",
components: { HeaderTime, Header, Body, Footer, FriendLink },
async asyncData({ $axios }) {
const siteConfigResult = await $axios.$post("/site/config/list");
const siteConfigObj =
siteConfigResult.status === 1 ? siteConfigResult.data : {};
const postsResult = await $axios.$post("/blog/post/list", {
postType: "post",
postStatus: "publish",
pageNum: 1,
pageSize: 10
});
const siteConfigObj =
siteConfigResult.status === 1 ? siteConfigResult.data : {};
const postListArray = postsResult.status === 1 ? postsResult.data.list : [];
logger.info("fetch siteConfig and postList finish");
Expand All @@ -84,5 +84,5 @@ export default {

<style lang="scss">
@import "./common.css";
@import "./dark.css";
@import "./default.css";
</style>
4 changes: 2 additions & 2 deletions jvue-server/src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ server.port=8081
mybatis.mapper-locations=classpath:mappers/*.xml
# MySQL
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:MySQL://39.104.66.135:3306/testbugucms?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.username=test
spring.datasource.url=jdbc:MySQL://localhost:3306/testbugucms?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.username=root
spring.datasource.password=123456
# PageHelper
pagehelper.helperDialect=mysql
Expand Down

0 comments on commit fca0e48

Please sign in to comment.