Skip to content

Commit

Permalink
modify commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wdlhao committed Oct 31, 2018
1 parent 8f2339b commit a9e5287
Show file tree
Hide file tree
Showing 13 changed files with 154 additions and 177 deletions.
2 changes: 1 addition & 1 deletion server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ router.get('/api/user/login',(req,res) => {

mutils.getIpInfo(url,ip,function(err, msg) {
console.log(msg);
if(msg.data && msg.data != ''){
if(msg && msg.data && msg.data != ''){
const data = msg.data;
address = data.country+' '+data.region+' '+data.city;
area = data.area;
Expand Down
Binary file added src/assets/img/zhi001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions src/layout/headNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<el-row style="margin:0 10px;">
<el-col :span="6" class='logo-container'>
<img src="../assets/img/logo.png" class='logo' alt="">
<span class='title'>xxx金融后台管理系统</span>
<span class='title'>小爱金融后台管理系统</span>
</el-col>
<div class="userinfo">
<img src="../assets/img/avatar.png" class='avatar' alt="">
Expand All @@ -20,7 +20,7 @@
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command='info'>修改信息</el-dropdown-item>
<el-dropdown-item command='pass' v-if=''>修改密码</el-dropdown-item>
<el-dropdown-item command='pass'>修改密码</el-dropdown-item>
<el-dropdown-item command='logout'>退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
Expand Down Expand Up @@ -132,13 +132,12 @@
height: 60px;
min-width:600px;
padding: 5px;
background: #324057;
background: url('../assets/img/zhi001.png');
position: fixed;
top: 0px;
left: 0px;
z-index: 100;
color: #FFF;
border-bottom: 1px solid #1F2D3D;
.logout {
vertical-align: middle;
cursor: pointer;
Expand Down
203 changes: 109 additions & 94 deletions src/layout/leftMenu.vue
Original file line number Diff line number Diff line change
@@ -1,111 +1,126 @@
<template>
<el-row class="menu_page">
<el-col>
<el-menu
mode="vertical"
theme="dark"
class="el-menu-vertical-demo"
:default-active="$route.path"
:collapse="$store.state.menu.isCollapse"
background-color="#324057"
text-color="#fff"
active-text-color="#42b983">
<template v-for="(item,index) in $store.state.menu.items"
v-if='item.hidden !== true'>
<el-submenu v-if="item.children && !item.noDropdown && item.children.length > 0" :index="item.path">
<template slot="title">
<el-row class="menu_page">
<el-col>
<el-menu
mode="vertical"
theme="dark"
class="el-menu-vertical-demo"
:default-active="$route.path"
:collapse="isCollapse"
background-color="#324057"
text-color="#fff"
active-text-color="#ff6428">
<template v-for="(item,index) in lefeMenuList">
<!--表示 有二级菜单 -->
<el-submenu v-if="item.children && item.children.length > 0 && !item.noDropdown" :index="item.path" :key="index">
<template slot="title">
<i :class="'fa fa-margin '+item.icon"></i>
<span slot="title">{{item.name}}</span>
</template>
<router-link v-for="(citem,cindex) in item.children" :to="citem.path" :key="cindex">
<el-menu-item
:index='citem.path'>
<span slot="title">{{citem.name}}</span>
</el-menu-item>
</router-link>
</el-submenu>

<!--表示 有一级菜单 noDropdown:true-->
<router-link :to="item.path" :key="index">
<el-submenu class="dropItem"
v-if="item.children && item.children.length > 0 && item.noDropdown"
:index="item.path"
>
<template slot="title" >
<i :class="'fa fa-margin '+item.icon"></i>
<span slot="title">{{item.name}}</span>
<span class="23">{{item.name}}</span>
</template>
<router-link v-for="(citem,cindex) in item.children" :to="citem.path" :key="citem.path">

<!-- <router-link :to="item.path">
<el-menu-item
:index='citem.path'>
<span slot="title">{{citem.name}}</span>
:index='item.children[0].path'
:class="{'hiddenDropdown':!isDropname}" >
<span slot="title">{{item.children[0].name}}</span>
</el-menu-item>
</router-link>
</router-link> -->
</el-submenu>

<router-link :to="item.path">
<el-submenu class="dropItem" v-if="item.children && item.noDropdown && item.children.length > 0" :index="item.path">
<template slot="title" >
<i :class="'fa fa-margin '+item.icon" @mouseover="showDropdown"></i>
<span :class="{'hiddenDropname':$store.state.menu.isDropname}" slot="title">{{item.name}}</span>
</template>

<router-link :to="item.path">
<el-menu-item
:index='item.children[0].path'
:class="{'hiddenDropdown':!$store.state.menu.isDropname}" >
<span slot="title">{{item.children[0].name}}</span>
</el-menu-item>
</router-link>
</el-submenu>
</router-link>
</template>
</el-menu>
</el-col>
</el-row>
</router-link>
</template>
</el-menu>
</el-col>
</el-row>
</template>

<script>
import * as mUtils from '@/utils/mUtils'
import * as mUtils from "@/utils/mUtils";
export default {
name:'left-Menu',
data(){
return {
isDropdown:false,
}
},
methods:{
showDropdown(){ // ??
//(this.$store.state.menu.isCollapse == true)?this.isDropdown = true: this.isDropdown = false
// this.isDropdown = true,显示子菜单;false,隐藏子菜单。
// isCollapse = false,展开菜单; true,收缩菜单。
// this.$store.dispatch('dropName');
// alert(this.$store.state.menu.isCollapse); // true
this.isDropdown = this.$store.state.menu.isCollapse;
},
}
export default {
name: "left-Menu",
data() {
return {
isDropdown: false
};
},
computed:{
lefeMenuList(){
return this.$store.state.menu.items;
},
isDropname(){ // false
return this.$store.state.menu.isDropname;
},
isCollapse(){
return this.$store.state.menu.isCollapse;
}
},
created(){
console.log(this.$store.state.menu.items);
},
methods: {
showDropdown() {
this.isDropdown = this.$store.state.menu.isCollapse;
}
}
};
</script>


<style lang="less" scoped>
.menu_page{
position: fixed;
top:71px;
left:0;
min-height: 100%;
background-color: #324057;
z-index: 99;
}
.fa-margin{
margin-right:5px;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 180px;
min-height: 400px;
}
.el-menu-vertical-demo{
width:35px;
}
.el-submenu .el-menu-item{
min-width:180px;
}
.el-menu{
.el-menu-item{
padding-left:40px !important;
}
}
.hiddenDropdown,
.hiddenDropname{
display:none;
}
.menu_page {
position: fixed;
top: 70px;
left: 0;
min-height: 100%;
background-color: #324057;
z-index: 99;
}
.fa-margin {
margin-right: 5px;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 180px;
min-height: 400px;
}
.el-menu-vertical-demo {
width: 35px;
}
.el-submenu .el-menu-item {
min-width: 180px;
}
.el-menu {
.el-menu-item {
padding-left: 40px !important;
}
}
.hiddenDropdown,
.hiddenDropname {
display: none;
}
.router-link-active {
li {
.el-submenu__title{
color: #ff6428 !important;
}
}
}
</style>
6 changes: 2 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import store from './store/'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import * as mUtils from 'utils/mUtils'
Vue.use(ElementUI, { size: 'mini'});

Vue.config.productionTip = false;

Vue.use(ElementUI);

import 'register/';
/**
* 如果用户刷新页面,导致存入vuex中的菜单数据清空,需要从缓存获取;
Expand Down Expand Up @@ -54,7 +52,7 @@ router.beforeEach((route, redirect, next) => {
new Vue({
el: '#app',
router,
store,
store,
template: '<App/>',
components: { App }
})
8 changes: 4 additions & 4 deletions src/page/fundList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
</el-form-item>

<el-form-item>
<el-button type="primary" size ="small" icon="search" @click='onScreeoutMoney("search_data")'>筛选</el-button>
<el-button type="primary" size ="mini" icon="search" @click='onScreeoutMoney("search_data")'>筛选</el-button>
</el-form-item>

<el-form-item class="btnRight">
<el-button type="primary" size ="small" icon="view" @click='onAddMoney()'>添加</el-button>
<el-button type="primary" size ="mini" icon="view" @click='onAddMoney()'>添加</el-button>
</el-form-item>

</el-form>
Expand Down Expand Up @@ -120,13 +120,13 @@
<el-button
type="warning"
icon='edit'
size="small"
size="mini"
@click='onEditMoney(scope.row)'
>编辑</el-button>
<el-button
type="danger"
icon='delete'
size="small"
size="mini"
@click='onDeleteMoney(scope.row,scope.$index)'
>删除</el-button>
</template>
Expand Down
18 changes: 9 additions & 9 deletions src/page/infoModify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<p class="title"><i class="fa fa-edit"></i>修改信息</p>
<el-form class="form" :model="infoForm" :rules="infoRules" ref="infoForm" label-width="80px">
<el-form-item label="姓名">
<el-input v-model="infoForm.username" size="small" disabled placeholder="请输入姓名"></el-input>
<el-input v-model="infoForm.username" size="mini" disabled placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="昵称" prop="nickname">
<el-input v-model="infoForm.nickname" size="small" placeholder="请输入昵称"></el-input>
<el-input v-model="infoForm.nickname" size="mini" placeholder="请输入昵称"></el-input>
</el-form-item>
<el-form-item label="投资年限" prop="touziyear">
<el-select v-model="infoForm.touziyear" size="small" placeholder="请选择投资年限" >
<el-select v-model="infoForm.touziyear" size="mini" placeholder="请选择投资年限" >
<el-option label="1年" value="1"></el-option>
<el-option label="2年" value="2"></el-option>
<el-option label="3年" value="3"></el-option>
Expand All @@ -26,10 +26,10 @@
</el-select>
</el-form-item>
<el-form-item label="绑定邮箱" prop="email">
<el-input v-model="infoForm.email" size="small" placeholder="请输入绑定邮箱"></el-input>
<el-input v-model="infoForm.email" size="mini" placeholder="请输入绑定邮箱"></el-input>
</el-form-item>
<el-form-item label="绑定手机" prop="telphone">
<el-input v-model="infoForm.telphone" size="small" placeholder="请输入绑定手机"></el-input>
<el-input v-model="infoForm.telphone" size="mini" placeholder="请输入绑定手机"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('infoForm')">提交</el-button>
Expand All @@ -45,13 +45,13 @@
<p class="title"><i class="fa fa-edit"></i>修改密码</p>
<el-form class="form" :model="pwdForm" :rules="pwdRules" ref="pwdForm" label-width="100px">
<el-form-item label="原密码" prop="password">
<el-input type="password" v-model="pwdForm.password" auto-complete="off" size="small" placeholder="请输入原密码"></el-input>
<el-input type="password" v-model="pwdForm.password" auto-complete="off" size="mini" placeholder="请输入原密码"></el-input>
</el-form-item>
<el-form-item label="新密码" prop="newpassword">
<el-input type="password" v-model="pwdForm.newpassword" auto-complete="off" size="small" placeholder="请输入新密码"></el-input>
<el-input type="password" v-model="pwdForm.newpassword" auto-complete="off" size="mini" placeholder="请输入新密码"></el-input>
</el-form-item>
<el-form-item label="确认新密码" prop="surepassword">
<el-input type="password" v-model="pwdForm.surepassword" auto-complete="off" size="small" placeholder="请输入确认新密码"></el-input>
<el-input type="password" v-model="pwdForm.surepassword" auto-complete="off" size="mini" placeholder="请输入确认新密码"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('pwdForm')">提交</el-button>
Expand All @@ -68,7 +68,7 @@
<p class="title"><i class="fa fa-edit"></i>手机服务</p>
<el-form class="form" :model="phoneForm" :rules="phoneRules" ref="phoneForm" label-width="110px">
<el-form-item label="当前绑定手机" prop="phone">
<el-input v-model="phoneForm.phone" size="small" placeholder=""></el-input>
<el-input v-model="phoneForm.phone" size="mini" placeholder=""></el-input>
</el-form-item>
<el-form-item label="基础短信服务" prop="baseType">
<el-checkbox-group v-model="phoneForm.baseType" class="phoneGroup">
Expand Down
4 changes: 2 additions & 2 deletions src/page/infoShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
:on-error="handError"
:before-upload="beforeAvatarUpload"
:file-list="fileList">
<el-button type="success" size="small">上传<i class="el-icon-upload el-icon--right"></i></el-button>
<el-button type="success" size="mini">上传<i class="el-icon-upload el-icon--right"></i></el-button>
</el-upload> -->
<el-button type="success" size="small">上传<i class="el-icon-upload el-icon--right"></i></el-button>
<el-button type="success" size="mini">上传<i class="el-icon-upload el-icon--right"></i></el-button>
</div>
</div>
</el-col>
Expand Down
Loading

0 comments on commit a9e5287

Please sign in to comment.