lipengtao преди 6 години
родител
ревизия
4222140f88

+ 8 - 13
src/layout/TheHeader.vue

12
          <div v-if="account">
12
          <div v-if="account">
13
            <!-- <router-link class="marLeft" to='/loginPlat' tag="a">通知(99+)</router-link>
13
            <!-- <router-link class="marLeft" to='/loginPlat' tag="a">通知(99+)</router-link>
14
            <router-link class="marLeft" to='/loginPlat' tag="a">消息(99+)</router-link> -->
14
            <router-link class="marLeft" to='/loginPlat' tag="a">消息(99+)</router-link> -->
15
            <el-dropdown @command="handleCommand">
15
            <el-dropdown>
16
              <span class="el-dropdown-link">
16
              <span class="el-dropdown-link">
17
                {{account}}<i class="el-icon-arrow-down el-icon--right"></i>
17
                {{account}}<i class="el-icon-arrow-down el-icon--right"></i>
18
              </span>
18
              </span>
19
              <el-dropdown-menu slot="dropdown">
19
              <el-dropdown-menu slot="dropdown">
20
                <el-dropdown-item command="/modifyData">修改资料</el-dropdown-item>
21
                <el-dropdown-item command="/myDemand">我的需求</el-dropdown-item>
22
                <el-dropdown-item command="/companyInformation">我的企业</el-dropdown-item>
23
                <el-dropdown-item command="a">首都创新券</el-dropdown-item>
24
                <el-dropdown-item command="/modifyPassword">账户设置</el-dropdown-item>
20
                <a href="center.html#/modifyData" target="_blank"><el-dropdown-item>修改资料</el-dropdown-item></a>
21
                <a href="center.html#/myDemand"><el-dropdown-item>我的需求</el-dropdown-item></a>
22
                <a href="center.html#/companyInformation"><el-dropdown-item>我的企业</el-dropdown-item></a>
23
                <a href="center.html#/modifyData"><el-dropdown-item>首都创新券</el-dropdown-item></a>
24
                <a href="center.html#/modifyPassword"><el-dropdown-item>账户设置</el-dropdown-item></a>
25
                <el-dropdown-item divided>退出登录</el-dropdown-item>
25
                <el-dropdown-item divided>退出登录</el-dropdown-item>
26
              </el-dropdown-menu>
26
              </el-dropdown-menu>
27
            </el-dropdown>
27
            </el-dropdown>
46
</template>
46
</template>
47
47
48
<script>
48
<script>
49
  import util from '@/libs/util';
49
  import { ekexiuUrl } from '@/libs/util';
50
  import Cookies from 'js-cookie';
50
  import Cookies from 'js-cookie';
51
  import { mapGetters } from 'vuex'
51
  import { mapGetters } from 'vuex'
52
52
92
          }
92
          }
93
        ],
93
        ],
94
        currentPath: 'home',
94
        currentPath: 'home',
95
        kexiuLink: util.ekexiuUrl,
95
        kexiuLink: ekexiuUrl,
96
        plat: '',
96
        plat: '',
97
        plf_user: ''
97
        plf_user: ''
98
      };
98
      };
108
      document.title = this.plat.title;
108
      document.title = this.plat.title;
109
      Cookies.set('platId', process.env.PLAT_ID);
109
      Cookies.set('platId', process.env.PLAT_ID);
110
      Cookies.set('platSource', this.plat.source);
110
      Cookies.set('platSource', this.plat.source);
111
    },
112
    methods: {
113
      handleCommand(command) {
114
        this.$router.push(command)
115
      }
116
    }
111
    }
117
  };
112
  };
118
</script>
113
</script>

+ 2 - 0
src/libs/util.js

268
        subs[0] = str;
268
        subs[0] = str;
269
    }
269
    }
270
    return subs;
270
    return subs;
271
  } else {
272
    return [];
271
  }
273
  }
272
};
274
};
273
util.arrToStr = function (arr) {
275
util.arrToStr = function (arr) {

+ 2 - 0
src/pages/center/center.js

4
import router from './router';
4
import router from './router';
5
import store from '@/store/index';
5
import store from '@/store/index';
6
import './permission';
6
import './permission';
7
import CityPick from '@/components/global-component/citypick/CityPick'
7
8
8
import Cookies from 'js-cookie';
9
import Cookies from 'js-cookie';
10
Vue.component('CityPick', CityPick);
9
11
10
/* eslint-disable no-new */
12
/* eslint-disable no-new */
11
new Vue({
13
new Vue({

+ 73 - 69
src/pages/center/views/common/index.vue

1
<template>
1
<template>
2
  <div class="main-content">
2
  <div class="main-content">
3
    <div class="boxLeft">
3
    <div class="boxLeft">
4
        <div class="headPhoto">
5
          <div class="userInfo">
6
            <img :src="headPhoto" alt="">
7
            <p>专家姓名</p>
8
          </div>
4
      <div class="headPhoto">
5
        <div class="userInfo">
6
          <img :src="headPhoto" alt="">
7
          <p>专家姓名</p>
9
        </div>
8
        </div>
10
         <el-menu
11
      default-active="modifyData"
12
      router
13
      class="el-menu-vertical-demo"
14
      @select="handleSelect"
15
      @open="handleOpen"
16
      @close="handleClose">
17
       <el-menu-item index="modifyData">
18
        <i class="el-icon-menu"></i>
19
        <span slot="title">修改资料</span>
20
      </el-menu-item>
21
      <el-submenu index="demand">
22
        <template slot="title">
23
          <i class="el-icon-location"></i>
24
          <span>我的需求</span>
25
        </template>
26
         <el-menu-item index="myDemand">我的需求</el-menu-item>
27
        <el-menu-item index="modifyDemand">修改需求</el-menu-item>
28
        <el-menu-item index="examineDemand">查看需求</el-menu-item>
29
      </el-submenu>
30
      <el-submenu index="2" v-if="bindCompany">
31
        <template slot="title">
32
          <i class="el-icon-location"></i>
33
          <span>我的企业</span>
34
        </template>
35
        <el-menu-item index="companyInformation">企业信息</el-menu-item>
36
        <el-menu-item index="companyProduct">企业产品</el-menu-item>
37
         <el-menu-item index="publishProduct">发布产品</el-menu-item>
38
      </el-submenu>
39
      <el-menu-item index="attentionCollect">
40
        <i class="el-icon-menu"></i>
41
        <span slot="title">关注收藏</span>
42
      </el-menu-item>
43
      <el-menu-item index="modifyPassword">
44
        <i class="el-icon-setting"></i>
45
        <span slot="title">账户设置</span>
46
      </el-menu-item>
47
    </el-menu>
9
      </div>
10
      <el-menu default-active="modifyData" router class="el-menu-vertical-demo" @select="handleSelect" @open="handleOpen"
11
        @close="handleClose">
12
        <el-menu-item index="modifyData">
13
          <i class="el-icon-menu"></i>
14
          <span slot="title">修改资料</span>
15
        </el-menu-item>
16
        <el-submenu index="demand">
17
          <template slot="title">
18
            <i class="el-icon-location"></i>
19
            <span>我的需求</span>
20
          </template>
21
          <el-menu-item index="myDemand">我的需求</el-menu-item>
22
          <el-menu-item index="modifyDemand">修改需求</el-menu-item>
23
          <el-menu-item index="examineDemand">查看需求</el-menu-item>
24
        </el-submenu>
25
        <el-submenu index="2" v-if="bindCompany">
26
          <template slot="title">
27
            <i class="el-icon-location"></i>
28
            <span>我的企业</span>
29
          </template>
30
          <el-menu-item index="companyInformation">企业信息</el-menu-item>
31
          <el-menu-item index="companyProduct">企业产品</el-menu-item>
32
          <el-menu-item index="publishProduct">发布产品</el-menu-item>
33
        </el-submenu>
34
        <el-menu-item index="attentionCollect">
35
          <i class="el-icon-menu"></i>
36
          <span slot="title">关注收藏</span>
37
        </el-menu-item>
38
        <el-menu-item index="modifyPassword">
39
          <i class="el-icon-setting"></i>
40
          <span slot="title">账户设置</span>
41
        </el-menu-item>
42
      </el-menu>
48
    </div>
43
    </div>
49
    <div class="boxRight">
44
    <div class="boxRight">
50
      <transition name="fade" mode="out-in">
45
      <transition name="fade" mode="out-in">
84
  };
79
  };
85
</script>
80
</script>
86
81
87
<style lang="stylus" rel="stylesheet/stylus" scoped>
88
  .boxRight
89
    float: left
90
    width: 900px
91
    margin-left: 15px
92
    box-sizing: border-box
93
  .boxLeft
94
    float: left
95
    overflow: hidden
96
    width: 200px
97
    .headPhoto
98
      height: 146px
99
      margin-bottom: 10px
100
      border: 1px solid #ebebeb
101
      display: flex
102
      justify-content: center
103
      align-items: center
104
      .userInfo
105
        text-align: center
106
        color: #606266
107
        p
108
          margin-top: 10px
109
        img
110
          width: 80px
111
          height: 80px
112
          border-radius: 50%
82
<style lang="scss" rel="stylesheet/scss" scoped>
83
  .main-content {
84
    margin-top: 20px;
85
    .boxRight {
86
      float: left;
87
      width: 900px;
88
      margin-left: 15px;
89
      box-sizing: border-box;
90
    }
91
    .boxLeft {
92
      float: left;
93
      overflow: hidden;
94
      width: 200px;
95
      .headPhoto {
96
        height: 146px;
97
        margin-bottom: 10px;
98
        border: 1px solid #ebebeb;
99
        display: flex;
100
        justify-content: center;
101
        align-items: center;
102
        .userInfo {
103
          text-align: center;
104
          color: #606266;
105
          p {
106
            margin-top: 10px;
107
          }
108
          img {
109
            width: 80px;
110
            height: 80px;
111
            border-radius: 50%;
112
          }
113
        }
114
      }
115
    }
116
  }
113
</style>
117
</style>

+ 4 - 3
src/pages/center/views/layout/index.vue

6
        <el-menu class="navbar" mode="horizontal">
6
        <el-menu class="navbar" mode="horizontal">
7
          <div class="tag-breadcrumb">当前位置:</div><breadcrumb></breadcrumb>
7
          <div class="tag-breadcrumb">当前位置:</div><breadcrumb></breadcrumb>
8
        </el-menu>
8
        </el-menu>
9
        <AppMain></AppMain>
9
        <com></com>
10
      </div>
10
      </div>
11
    </div>
11
    </div>
12
    <TheFooter></TheFooter>
12
    <TheFooter></TheFooter>
14
</template>
14
</template>
15
15
16
<script>
16
<script>
17
  import { TheHeader, TheFooter, AppMain } from '@/layout';
17
  import { TheHeader, TheFooter } from '@/layout';
18
  import com from '../common/index';
18
  import Breadcrumb from '@/components/Breadcrumb';
19
  import Breadcrumb from '@/components/Breadcrumb';
19
20
20
  export default {
21
  export default {
22
    components: {
23
    components: {
23
      TheHeader,
24
      TheHeader,
24
      TheFooter,
25
      TheFooter,
25
      AppMain,
26
      com,
26
      Breadcrumb
27
      Breadcrumb
27
    }
28
    }
28
  };
29
  };

+ 1 - 1
src/pages/center/views/modifyPassword.vue

126
    }
126
    }
127
    a {
127
    a {
128
      position: absolute;
128
      position: absolute;
129
      top: 60px;
129
      top: 114px;
130
      right: 140px;
130
      right: 140px;
131
      color: $mainColor;
131
      color: $mainColor;
132
    }
132
    }

+ 1 - 1
src/pages/index/router/index.js

24
    path: '/',
24
    path: '/',
25
    component: Layout,
25
    component: Layout,
26
    children: [{
26
    children: [{
27
      path: '/',
27
      path: '/home',
28
      name: 'home',
28
      name: 'home',
29
      component: (resolve) => require(['../views/Dashboard/index.vue'], resolve),
29
      component: (resolve) => require(['../views/Dashboard/index.vue'], resolve),
30
      meta: { title: '首页' }
30
      meta: { title: '首页' }

+ 1 - 1
src/pages/index/views/logforms/enteringRegister.vue

132
                this.$store.commit('SET_HEADPHOTO', res.data.head);
132
                this.$store.commit('SET_HEADPHOTO', res.data.head);
133
                this.$store.commit('SET_BINDCOMPANY', res.data.bindCompany);
133
                this.$store.commit('SET_BINDCOMPANY', res.data.bindCompany);
134
                Cookies.set('userid', res.data.id);
134
                Cookies.set('userid', res.data.id);
135
                this.$router.push({path: '/home'});
135
                this.$router.push({name: 'home'});
136
              } else {
136
              } else {
137
                const errorCode = {
137
                const errorCode = {
138
                  '-60001': '验证码已过期,请重新获取',
138
                  '-60001': '验证码已过期,请重新获取',

+ 1 - 1
src/pages/index/views/logforms/loginPlat.vue

95
                  this.$store.commit('SET_HEADPHOTO', res.data.head);
95
                  this.$store.commit('SET_HEADPHOTO', res.data.head);
96
                  this.$store.commit('SET_BINDCOMPANY', res.data.bindCompany);
96
                  this.$store.commit('SET_BINDCOMPANY', res.data.bindCompany);
97
                  Cookies.set('userid', res.data.id);
97
                  Cookies.set('userid', res.data.id);
98
                  this.$router.push({path: '/home'});
98
                  this.$router.push({name: 'home'});
99
                  this.logining = true;
99
                  this.logining = true;
100
                }
100
                }
101
              } else {
101
              } else {

+ 1 - 1
src/pages/index/views/logforms/register.vue

128
                this.$store.commit('SET_USERID', res.data.id);
128
                this.$store.commit('SET_USERID', res.data.id);
129
                this.$store.commit('SET_HEADPHOTO', '');
129
                this.$store.commit('SET_HEADPHOTO', '');
130
                Cookies.set('userid', res.data.id)
130
                Cookies.set('userid', res.data.id)
131
                this.$router.push({path: '/home'});
131
                this.$router.push({name: 'home'});
132
              } else {
132
              } else {
133
                const errorCode = {
133
                const errorCode = {
134
                  '-60001': '验证码已过期,请重新获取',
134
                  '-60001': '验证码已过期,请重新获取',