Skip to content

Commit

Permalink
重构server端,并完善用户登录注册相关功能
Browse files Browse the repository at this point in the history
  • Loading branch information
huangwei9527 committed Nov 10, 2020
1 parent 0ea8fe0 commit 73644e8
Show file tree
Hide file tree
Showing 208 changed files with 3,646 additions and 17,318 deletions.
28 changes: 4 additions & 24 deletions client/App.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<template>
<div id="app" :class="{hideHeader: $route.meta.hideHeader}">
<div class="page-header-wrapper" v-show="!$route.meta.hideHeader">
<page-header></page-header>
</div>
<router-view class="sub-page"/>
<div id="app">
<router-view/>
</div>
</template>
<script>
import PageHeader from '@/components/page-header'
export default {
components: {
[PageHeader.name]: PageHeader
},
}
</script>
<style lang="scss">
Expand All @@ -26,21 +20,7 @@ html,body{
color: #2c3e50;
position: relative;
height: 100%;
padding-top: 48px;
.page-header-wrapper{
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 100;
}
&.hideHeader{
padding-top: 0;
}
}
.sub-page{
position: relative;
height: 100%;
overflow: hidden;
}
</style>
12 changes: 12 additions & 0 deletions client/api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* API 统一管理
* */

// 用户相关
export * from './modules/user'
// 页面相关
export * from './modules/page'
// 图片库相关
export * from './modules/image'
// 解析psd
export * from './modules/psd'
9 changes: 9 additions & 0 deletions client/api/modules/image.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* image 图片库
**/
import $axios from "@/service/httpServer";

// 获取我的图片列表
export const getMyImages = p => $axios.get('/quark/imageLib/myImages', p);
// 上传图片
export const uploadImage = p => $axios.post('/quark/imageLib/upload', p)
43 changes: 43 additions & 0 deletions client/api/modules/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
页面相关api
**/
import $axios from "@/service/httpServer";
// 获取我的页面列表
export const getMyPages = p => $axios.get('/quark/page/getMyPages', p);
// 获取我的页面详情
export const getPageDetail = p => $axios.get('/quark/page/detail', p);
// 新增页面
export const createPage = p => $axios.post('/quark/page/create', p);
// 更新页面
export const updatePage = p => $axios.post('/quark/page/update', p);
// 删除页面
export const deletePage = p => $axios.post('/quark/page/delete', p);
// 复制页面
export const copyPage = p => $axios.post('/quark/page/copy', p);
// 设置为模板
export const setTemplatePage = p => $axios.post('/quark/page/setTemplate', p);
// 发布页面
export const publishPage = p => $axios.post('/quark/page/setPublish', p);

/**
* ========================================================================
* */
// 获取我的模板
export const getMyTemplates = p => $axios.get('/quark/page/getMyTemplates', p);


/**
* ========================================================================
* */
// 获取模板市场模板
export const getPublishTemplates = p => $axios.get('/quark/page/getPublishTemplates', p);

/**
* ========================================================================
* */
// 获取协作人列表
export const getCooperationUserListByPageId = p => $axios.get('/quark/page/getCooperationList', p)
// 按userIds添加协作人
export const addCooperation = p => $axios.post('/quark/page/addCooperation', p)
// 删除协作人
export const delCooperation = p => $axios.post('/quark/page/delCooperation', p)
7 changes: 7 additions & 0 deletions client/api/modules/psd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* psd
**/
import $axios from "@/service/httpServer";

// 上传psd解析
export const psdPpload = p => $axios.post('/quark/psd/upload', p)
20 changes: 20 additions & 0 deletions client/api/modules/user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
用户相关api
**/
import $axios from "@/service/httpServer";
// 登录
export const login = p => $axios.post('/quark/auth/login', p);
// 注册
export const register = p => $axios.post('/quark/auth/register', p);
// 获取用户信息
export const getUserInfo = () => $axios.get('/quark/user/info');
// 修改用户昵称
export const updateNickName = p => $axios.post('/quark/user/update/name', p);
// 修改密码
export const updateUserPass = p => $axios.post('/quark/user/update/pass', p);
// 修改头像
export const updateUserAvatar = p => $axios.post('/quark/user/update/avatar', p);
// 关键字搜索用户列表
export const getUserListByKeywords = p => $axios.get('/quark/user/getUserList', p);


Binary file added client/common/images/headerImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed client/common/images/quark--pagecover-image.jpg
Binary file not shown.
Binary file added client/common/images/quark--pagecover-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 41 additions & 3 deletions client/common/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ img {
.success {
color: $success;
}

.bg-white{
background-color: white;
}
.bg-gray {
background: $gray;
}
Expand Down Expand Up @@ -557,9 +559,9 @@ img {

.page-search-wrapper {
min-height: 48px;
padding: 0 $content-both-sides-padding;
padding: 4px $content-both-sides-padding;
line-height: 48px;
background: white;

&::after {
content: ".";
display: block;
Expand Down Expand Up @@ -640,3 +642,39 @@ img {
overflow-x: auto;
}


/** 页面结构样式 */
.page-content {
padding: $content-both-sides-padding;
}
.layout-container{
padding-left: 16px;
padding-right: 16px;
margin-left: auto;
margin-right: auto;
height: 100%;
}


.scroll-wrapper{
::-webkit-scrollbar-track-piece{
background-color:#fff;
-webkit-border-radius:3px
}
::-webkit-scrollbar{
width:12px;height:10px
}
::-webkit-scrollbar-thumb{
height:30px;
background-color:#999;
-webkit-border-radius:7px;
outline:2px solid #fff;
outline-offset:-2px;
border:2px solid #fff
}
::-webkit-scrollbar-thumb:hover{
height:30px;
background-color:#9f9f9f;
-webkit-border-radius:8px
}
}
2 changes: 2 additions & 0 deletions client/common/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ $success : #3DBD37;
$gray : #7F8593;
$error : #ea5361;
$color-gradient : linear-gradient(to right, #5ac66a 0%, #3caa7d 80%, #3AA27F 100%); // 渐变
$color-gradient-hover : linear-gradient(to right, #5ac66a 0%, #3caa7d 80%, #3AA27F 100%); // 渐变
$color-gradient : linear-gradient(to right, #5ac66a 0%, #3caa7d 80%, #3AA27F 100%); // 渐变
// $page-bg-color : #F0F2F5;
$page-bg-color : #f9f9f9;

Expand Down
24 changes: 24 additions & 0 deletions client/components/add-cooperationer/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Vue from 'vue';
import Index from './index.vue';
let ComponentConstructor = Vue.extend(Index);
let instance;

/**
* 管理协作人
* @param documentId 文档id
* @constructor
*/
let Component = function(pageId, callback) {
instance = new ComponentConstructor({
data: {
pageId: pageId
}
});
instance.$mount();
instance.callback = callback;
document.body.appendChild(instance.$el);
instance.visible = true;
return instance;
}

export default Component;
Loading

0 comments on commit 73644e8

Please sign in to comment.