Bläddra i källkod

更新个人中心

guhongwei 4 år sedan
förälder
incheckning
3e1a9a987d

+ 0 - 61
src/layout/user/userMess.vue

@@ -1,61 +0,0 @@
-<template>
-  <div id="userMess">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="4" class="left">
-          <el-image :src="userMessInfo.pic"></el-image>
-        </el-col>
-        <el-col :span="20" class="right">
-          <p>{{ userMessInfo.name }}</p>
-          <p>用户身份:{{ userMessInfo.type }}</p>
-          <p>手机号{{ userMessInfo.phone }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'userMess',
-  props: {
-    userMessInfo: null,
-  },
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  padding: 15px;
-  .left {
-    border: 1px solid #ccc;
-    border-radius: 90px;
-    .el-image {
-      border-radius: 90px;
-    }
-  }
-  .right {
-    padding: 0 15px 5px 15px;
-    p:first-child {
-      font-size: 18px;
-      font-weight: bold;
-    }
-  }
-}
-</style>

+ 0 - 84
src/views/user copy/index.vue

@@ -1,84 +0,0 @@
-<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">
-            <userMess :userMessInfo="userMessInfo"></userMess>
-          </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 NavBar from '@/layout/common/topInfo.vue';
-import footInfo from '@/layout/common/footInfo.vue';
-import userMess from '@/layout/user/userMess.vue';
-import clickBtn from './parts/clickBtn.vue';
-export default {
-  name: 'index',
-  props: {},
-  components: {
-    NavBar, //头部
-    footInfo, //底部菜单
-    userMess, // 头部信息
-    clickBtn, //功能按钮
-  },
-  data: () => ({
-    // 头部标题
-    title: '',
-    // meta为true
-    isleftarrow: '',
-    // 返回
-    navShow: true,
-    // 用户信息
-    userMessInfo: {
-      pic: require('@/assets/logo.png'),
-      name: '顾红伟',
-      type: '个人',
-      phone: '17319450324',
-    },
-  }),
-  created() {},
-  computed: {},
-  methods: {},
-  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 {
-  padding: 0 0 50px 0;
-  min-height: 300px;
-}
-.foot {
-  position: absolute;
-  bottom: 0;
-}
-</style>

+ 0 - 42
src/views/user copy/parts/clickBtn.vue

@@ -1,42 +0,0 @@
-<template>
-  <div id="clickBtn">
-    <el-row>
-      <el-col :span="24">
-        <el-col :span="24" class="native">
-          <van-cell is-link @click="$router.push({ path: '/user/personal' })">个人信息</van-cell>
-          <!-- <van-cell is-link @click="$router.push({ path: '/user/teaLeave' })">请假&退出管理</van-cell> -->
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
-export default {
-  name: 'clickBtn',
-  props: {},
-  components: {},
-  data: () => ({}),
-  created() {},
-  computed: {
-    ...mapState(['user']),
-  },
-  methods: {},
-};
-</script>
-
-<style lang="less" scoped>
-.native {
-  height: 50px;
-  background-color: #fff;
-  margin: 0 0 5px 0;
-}
-/deep/.van-cell {
-  line-height: 30px;
-}
-/deep/.van-cell__right-icon {
-  height: 30px;
-  line-height: 30px;
-}
-</style>

+ 0 - 69
src/views/user copy/personal.vue

@@ -1,69 +0,0 @@
-<template>
-  <div id="personal">
-    <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">
-          <person></person>
-        </el-col>
-        <el-col :span="24" class="foot">
-          <footInfo></footInfo>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import NavBar from '@/layout/common/topInfo.vue';
-import footInfo from '@/layout/common/footInfo.vue';
-import person from '@/layout/user/person.vue';
-export default {
-  name: 'personal',
-  props: {},
-  components: {
-    NavBar,
-    footInfo,
-    person, //个人信息维护
-  },
-  data: () => ({
-    // 头部标题
-    title: '',
-    // meta为true
-    isleftarrow: '',
-    // 返回
-    navShow: true,
-  }),
-  created() {},
-  computed: {},
-  methods: {},
-  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;
-}
-.foot {
-  position: absolute;
-  bottom: 0;
-}
-</style>

+ 48 - 14
src/views/userCenter/user/index.vue

@@ -1,30 +1,64 @@
 <template>
   <div id="index">
-    <p>个人中心</p>
+    <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">
+          <person></person>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
-import { mapState, createNamespacedHelpers } from 'vuex';
+import NavBar from '@/layout/common/topInfo.vue';
+import person from '@/layout/user/person.vue';
 export default {
   name: 'index',
   props: {},
-  components: {},
-  data: function() {
-    return {};
+  components: {
+    NavBar,
+    person, //个人信息维护
   },
+  data: () => ({
+    // 头部标题
+    title: '',
+    // meta为true
+    isleftarrow: '',
+    // 返回
+    navShow: true,
+  }),
   created() {},
+  computed: {},
   methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
   },
 };
 </script>
 
-<style lang="less" scoped></style>
+<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;
+}
+.foot {
+  position: absolute;
+  bottom: 0;
+}
+</style>