Explorar el Código

Merge branch 'master' of http://git.cc-lotus.info/service-platform/mobile-official

guhongwei hace 4 años
padre
commit
8cc0e4533f

+ 35 - 0
src/router/index.js

@@ -58,6 +58,41 @@ const routes = [
     meta: { title: '个人中心', isleftarrow: false },
     component: () => import('../views/user/index.vue'),
   },
+  // 用户-我的发布
+  {
+    path: '/userCenter/myProduct/index',
+    name: 'myProduct_index',
+    meta: { title: '我的发布', isleftarrow: true },
+    component: () => import('../views/userCenter/myProduct/index.vue'),
+  },
+  // 用户-事项管理
+  {
+    path: '/userCenter/matter/index',
+    name: 'matter_index',
+    meta: { title: '事项管理', isleftarrow: true },
+    component: () => import('../views/userCenter/matter/index.vue'),
+  },
+  // 用户-展会管理
+  {
+    path: '/userCenter/dock/index',
+    name: 'dock_index',
+    meta: { title: '展会管理', isleftarrow: true },
+    component: () => import('../views/userCenter/dock/index.vue'),
+  },
+  // 用户-基本信息
+  {
+    path: '/userCenter/user/index',
+    name: 'user_index',
+    meta: { title: '个人中心', isleftarrow: true },
+    component: () => import('../views/userCenter/user/index.vue'),
+  },
+  // 用户-退出登录
+  {
+    path: '/userCenter/out/index',
+    name: 'user_index',
+    meta: { title: '个人中心', isleftarrow: true },
+    component: () => import('../views/userCenter/out/index.vue'),
+  },
   // 登录
   {
     path: '/login',

+ 21 - 3
src/views/user/index.vue

@@ -8,11 +8,13 @@
         <el-col :span="24" class="main">
           <el-col :span="24" class="info">
             <el-col :span="8" class="img">
-              哈哈
-              <!-- <el-image :src="imgUrl" style="width:100%; height:100%"></el-image> -->
+              <el-image :src="imgUrl"></el-image>
             </el-col>
             <el-col :span="16" class="name">{{ user.name }}</el-col>
           </el-col>
+          <el-col :span="24" class="btn">
+            <clickBtn></clickBtn>
+          </el-col>
         </el-col>
         <el-col :span="24" class="foot">
           <footInfo></footInfo>
@@ -26,12 +28,14 @@
 import NavBar from '@/layout/common/topInfo.vue';
 import footInfo from '@/layout/common/footInfo.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+import clickBtn from './parts/clickBtn.vue';
 export default {
   name: 'index',
   props: {},
   components: {
     NavBar,
     footInfo,
+    clickBtn,
   },
   data: function() {
     return {
@@ -74,7 +78,21 @@ export default {
   min-height: 570px;
   .info {
     height: 100px;
-    background-color: red;
+    padding: 10px;
+    .img {
+      text-align: center;
+      .el-image {
+        width: 75%;
+        height: 80px;
+        border-radius: 50%;
+        text-align: center;
+      }
+    }
+    .name {
+      font-size: 18px;
+      font-weight: bolder;
+      margin-top: 20px;
+    }
   }
 }
 .foot {

+ 2 - 1
src/views/user/parts/clickBtn.vue

@@ -3,10 +3,11 @@
     <el-row>
       <el-col :span="24" class="style">
         <span v-if="user.role == '4' || user.role == '5' || user.role == '6'">
-          <van-cell is-link title="个人信息" @click="$router.push({ path: '/userCenter/user/index' })" />
+          <van-cell is-link title="基本信息" @click="$router.push({ path: '/userCenter/user/index' })" />
           <van-cell is-link title="我的发布" @click="$router.push({ path: '/userCenter/myProduct/index' })" />
           <van-cell is-link title="事项管理" @click="$router.push({ path: '/userCenter/matter/index' })" />
           <van-cell is-link title="展会管理" @click="$router.push({ path: '/userCenter/dock/index' })" />
+          <van-cell is-link title="退出登录" @click="$router.push({ path: '/userCenter/out/index' })" />
         </span>
         <!-- <span v-else>
           <span v-if="user.role == '0'">

+ 31 - 0
src/views/userCenter/out/index.vue

@@ -0,0 +1,31 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        <p>index</p>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+};
+</script>
+
+<style lang="less" scoped></style>