💄 修改个人中心墙纸展示方式

This commit is contained in:
ronger 2021-02-23 16:36:52 +08:00
parent ecba7403b8
commit e23ac32e5a
16 changed files with 37 additions and 19 deletions

View File

@ -70,7 +70,7 @@ $ npm generate
4. 项目目录下执行 `npm install` 4. 项目目录下执行 `npm install`
5. 执行 `npm install pm2 -g` 5. 执行 `npm install pm2 -g`
6. 执行 `pm2 list` 检查 `pm2` 是否安装好 6. 执行 `pm2 list` 检查 `pm2` 是否安装好
7. 执行 `pm2 start npm --name "nebula" -- run start --watch` 7. 执行 `pm2 start npm --name nebula -- run start`
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org). For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

View File

@ -83,14 +83,14 @@
<style scoped> <style scoped>
.el-header { .el-header {
padding-bottom: 1rem; /*padding-bottom: 1rem;*/
background: #fff; background: #fff;
border-bottom: 1px solid rgba(0, 40, 100, 0.12); border-bottom: 1px solid rgba(0, 40, 100, 0.12);
z-index: 80; z-index: 80;
} }
.el-main { .el-main {
padding: 20px 0; padding: 0;
background-attachment: fixed; background-attachment: fixed;
min-height: 87.5vh; min-height: 87.5vh;
overflow-x: hidden; overflow-x: hidden;

View File

@ -146,7 +146,7 @@ p {
.wrapper { .wrapper {
max-width: 980px; max-width: 980px;
margin: 0 auto; margin: 20px auto;
display: block; display: block;
padding-left: 1rem; padding-left: 1rem;
padding-right: 1rem; padding-right: 1rem;

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col> <el-col>
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row :gutter="8"> <el-row :gutter="8" style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-row> <el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;"> <el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item>
@ -29,7 +29,7 @@
width="180" width="180"
prop="nickname"> prop="nickname">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link rel="nofollow" type="primary" @click="onRouter('user', scope.row.nickname)" :underline="false"> <el-link type="primary" :href="getUserPath(scope.row.nickname)" :underline="false">
{{ scope.row.nickname }} {{ scope.row.nickname }}
</el-link> </el-link>
</template> </template>
@ -213,6 +213,9 @@ export default {
_ts.$set(_ts, 'idRole', 0); _ts.$set(_ts, 'idRole', 0);
} }
}) })
},
getUserPath(nickname) {
return `/user/${nickname}`
} }
}, },
mounted() { mounted() {

View File

@ -406,7 +406,7 @@ export default {
.article__wrapper { .article__wrapper {
max-width: 980px; max-width: 980px;
margin: 0 auto; margin: 20px auto;
display: block; display: block;
padding-left: 1rem; padding-left: 1rem;
padding-right: 1rem; padding-right: 1rem;

View File

@ -165,7 +165,7 @@
.article__wrapper { .article__wrapper {
max-width: 980px; max-width: 980px;
margin: 0 auto; margin: 20px auto;
display: block; display: block;
padding-left: 1rem; padding-left: 1rem;
padding-right: 1rem; padding-right: 1rem;

View File

@ -5,7 +5,7 @@
<div v-if="user.userHomeBImgURL" class="card-header" <div v-if="user.userHomeBImgURL" class="card-header"
:style="{backgroundImage:'url('+user.userHomeBImgURL+')', backgroundSize:'percentage', backgroundPosition:'50%'}"></div> :style="{backgroundImage:'url('+user.userHomeBImgURL+')', backgroundSize:'percentage', backgroundPosition:'50%'}"></div>
<div v-else class="card-header" <div v-else class="card-header"
:style="{backgroundImage:'url(https://static.rymcu.com/article/1574441651963.jpg)', backgroundSize:'cover', backgroundPosition:'50%'}"></div> :style="{backgroundImage:'url(' + backgroundImage + ')', backgroundSize:'800px auto', backgroundPosition:'50%'}"></div>
<div class="card-body text-center"> <div class="card-body text-center">
<img v-if="user.avatarUrl" class="card-profile-img-avatar" :src="user.avatarUrl"> <img v-if="user.avatarUrl" class="card-profile-img-avatar" :src="user.avatarUrl">
<img v-else class="card-profile-img" src="https://static.rymcu.com/article/1578475481946.png"> <img v-else class="card-profile-img" src="https://static.rymcu.com/article/1578475481946.png">
@ -78,6 +78,12 @@ import {mapState} from 'vuex';
import ArticleList from "~/components/archive/list"; import ArticleList from "~/components/archive/list";
import PortfolioList from "~/components/common/portfolio/list"; import PortfolioList from "~/components/common/portfolio/list";
import UserList from "~/components/common/user/list"; import UserList from "~/components/common/user/list";
import designTools from "~/static/banner/design-tools.jpg"
import asteroids from "~/static/banner/asteroids.jpg"
import isoMetropolis from "~/static/banner/isometropolis.jpg"
import naranjas from "~/static/banner/naranjas.png"
import retroFurnish from "~/static/banner/retro-furnish.png"
import science from "~/static/banner/science.png"
export default { export default {
name: "User", name: "User",
@ -145,7 +151,16 @@ export default {
data() { data() {
return { return {
activeTab: this.$route.query.tab || '0', activeTab: this.$route.query.tab || '0',
isFollow: false isFollow: false,
backgroundImage: designTools,
backgroundImages: [
designTools,
asteroids,
isoMetropolis,
naranjas,
retroFurnish,
science
]
} }
}, },
methods: { methods: {