guhongwei 4 年之前
父節點
當前提交
69cbd698d6

+ 6 - 6
src/router/index.js

@@ -101,12 +101,12 @@ const routes = [
     component: () => import('../views/userCenter/user/index.vue'),
   },
   // // 个人中心
-  // {
-  //   path: '/user/index',
-  //   name: 'user_index',
-  //   meta: { title: '个人中心', isleftarrow: true },
-  //   component: () => import('../views/user/index.vue'),
-  // },
+  {
+    path: '/user/index',
+    name: 'user_index',
+    meta: { title: '个人中心', isleftarrow: true },
+    component: () => import('../views/user/index.vue'),
+  },
   ,
 ];
 

+ 10 - 3
src/views/home/index.vue

@@ -6,7 +6,10 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <clickBtn></clickBtn>
+          主页面
+        </el-col>
+        <el-col :span="24" class="foot">
+          <footInfo></footInfo>
         </el-col>
       </el-col>
     </el-row>
@@ -16,13 +19,13 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 import NavBar from '@/layout/common/topInfo.vue';
-import clickBtn from './parts/clickBtn.vue';
+import footInfo from '@/layout/common/footInfo.vue';
 export default {
   name: 'index',
   props: {},
   components: {
     NavBar,
-    clickBtn,
+    footInfo,
   },
   data: function() {
     return {
@@ -65,4 +68,8 @@ export default {
 .main {
   min-height: 570px;
 }
+.foot {
+  position: absolute;
+  bottom: 0;
+}
 </style>

+ 0 - 101
src/views/home/parts/clickBtn.vue

@@ -1,101 +0,0 @@
-<template>
-  <div id="clickBtn">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="11" class="btn" @click.native="$router.push({ path: '/live/index' })">
-          <p><i class="el-icon-camera"></i></p>
-          <el-button round size="mini">直播大厅</el-button>
-        </el-col>
-        <el-col :span="11" class="btn" @click.native="$router.push({ path: '/market/index' })">
-          <p><i class="el-icon-coin"></i></p>
-          <el-button round size="mini">科技超市</el-button>
-        </el-col>
-        <el-col
-          :span="11"
-          class="btn"
-          v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6' || this.user.role == '7'"
-          @click.native="$router.push({ path: '/userCenter/myProduct/index' })"
-        >
-          <p><i class="el-icon-pie-chart"></i></p>
-
-          <el-button round size="mini">我的发布</el-button>
-        </el-col>
-        <el-col
-          :span="11"
-          class="btn"
-          v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6' || this.user.role == '7'"
-          @click.native="$router.push({ path: '/userCenter/matter/index' })"
-        >
-          <p><i class="el-icon-notebook-1"></i></p>
-          <el-button round size="mini">事项管理</el-button>
-        </el-col>
-        <el-col
-          :span="11"
-          class="btn"
-          @click.native="$router.push({ path: '/userCenter/dock/index' })"
-          v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6' || this.user.role == '7'"
-        >
-          <p><i class="el-icon-video-camera"></i></p>
-          <el-button round size="mini">展会管理</el-button>
-        </el-col>
-        <el-col
-          :span="11"
-          class="btn"
-          @click.native="$router.push({ path: '/userCenter/user/index' })"
-          v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6' || this.user.role == '7'"
-        >
-          <p><i class="el-icon-user"></i></p>
-          <el-button round size="mini">个人中心</el-button>
-        </el-col>
-        <span v-else-if="this.user.role == '1' || this.user.role == '4'">
-          超级管理员,合作机构管理员,业务管理员
-        </span>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'clickBtn',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      user: {
-        role: '2',
-      },
-      menuList: [],
-    };
-  },
-  created() {},
-  methods: {},
-  computed: {
-    // ...mapState(['user']),
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  margin: 15px 0 0 0;
-  .btn {
-    box-shadow: 0 0 5px #ccc;
-    margin: 0 10px 10px 10px;
-    text-align: center;
-    border-radius: 10px;
-    padding: 10px;
-    background: #fff;
-    p {
-      padding: 0 0 10px 0;
-      i {
-        font-size: 30px;
-      }
-    }
-  }
-  .btn:nth-child(2n) {
-    margin: 0;
-  }
-}
-</style>

+ 0 - 4
src/views/market/detail.vue

@@ -8,9 +8,6 @@
         <el-col :span="24" class="main">
           <release></release>
         </el-col>
-        <el-col :span="24" class="foot">
-          <footInfo></footInfo>
-        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -26,7 +23,6 @@ export default {
   props: {},
   components: {
     NavBar,
-    footInfo,
     release, //产品发布
   },
   data: () => ({

+ 5 - 0
src/views/market/index.vue

@@ -42,6 +42,9 @@
             <van-button type="primary" @click="$router.push({ path: '/market/detail' })">发布产品</van-button>
           </el-col>
         </el-col>
+        <el-col :span="24" class="foot">
+          <footInfo></footInfo>
+        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -50,6 +53,7 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 import NavBar from '@/layout/common/topInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
 import technologyList from './parts/technologyList.vue';
 import productList from './parts/productList.vue';
 import serviceList from './parts/serviceList.vue';
@@ -59,6 +63,7 @@ export default {
   props: {},
   components: {
     NavBar,
+    footInfo,
     technologyList, //技术供求
     productList, //产品供求
     serviceList, //服务供求

+ 100 - 0
src/views/user/index.vue

@@ -0,0 +1,100 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
+        </el-col>
+        <el-col :span="24" class="main">
+          <el-col :span="24" class="one">
+            <el-image :src="imgUrl"></el-image>
+            <p>{{ user.name }}</p>
+          </el-col>
+          <el-col :span="24" class="two">
+            <clickBtn></clickBtn>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="foot">
+          <footInfo></footInfo>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+import NavBar from '@/layout/common/topInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
+import clickBtn from './parts/clickBtn.vue';
+
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    NavBar,
+    footInfo,
+    clickBtn,
+  },
+  data: function() {
+    return {
+      // 头部标题
+      title: '',
+      // meta为true
+      isleftarrow: '',
+      // 返回
+      navShow: true,
+      imgUrl: require('@/assets/test.jpg'),
+      user: {
+        name: '测试名称',
+      },
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    // ...mapState(['user']),
+  },
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.style {
+  width: 100%;
+  min-height: 667px;
+  position: relative;
+  background-color: #f9fafc;
+}
+.top {
+  height: 46px;
+  overflow: hidden;
+  position: relative;
+  z-index: 999;
+}
+.main {
+  min-height: 570px;
+  .one {
+    text-align: center;
+    background-color: #fff;
+    padding: 15px 0;
+    margin: 0 0 15px 0;
+    .el-image {
+      width: 80px;
+      height: 80px;
+      border-radius: 90px;
+    }
+    p {
+      font-size: 18px;
+      padding: 15px 0;
+    }
+  }
+}
+.foot {
+  position: absolute;
+  bottom: 0;
+}
+</style>

+ 46 - 0
src/views/user/parts/clickBtn.vue

@@ -0,0 +1,46 @@
+<template>
+  <div id="clickBtn">
+    <el-row>
+      <el-col :span="24" class="style">
+        <span v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6' || this.user.role == '7'">
+          <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' })" />
+        </span>
+        <span v-else>
+          <van-cell is-link title="个人信息" />
+        </span>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'clickBtn',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      user: {
+        role: '2',
+      },
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>