guhongwei 4 år sedan
förälder
incheckning
6ece19ab34

+ 23 - 22
src/router/index.js

@@ -64,12 +64,12 @@ const routes = [
     meta: { title: '个人中心', isleftarrow: false },
     component: () => import('../views/user/index.vue'),
   },
-  //修改密码
+  // 用户-基本信息
   {
-    path: '/user/parts/changePwd',
-    name: 'changePwd',
-    meta: { title: '修改密码', isleftarrow: true },
-    component: () => import('../views/user/parts/changePwd.vue'),
+    path: '/userCenter/user/index',
+    name: 'user_index',
+    meta: { title: '基本信息', isleftarrow: true },
+    component: () => import('../views/userCenter/user/index.vue'),
   },
   // 用户-我的发布
   {
@@ -78,7 +78,7 @@ const routes = [
     meta: { title: '我的发布', isleftarrow: true },
     component: () => import('../views/userCenter/myProduct/index.vue'),
   },
-  //发布产品
+  //用户-发布产品
   {
     path: '/userCenter/myProduct/detail',
     name: 'myProduct_index',
@@ -92,7 +92,7 @@ const routes = [
     meta: { title: '事项管理', isleftarrow: true },
     component: () => import('../views/userCenter/matter/index.vue'),
   },
-  // 用户-申请
+  // 用户-交易完成
   {
     path: '/userCenter/matter/detail',
     name: 'matter_detail',
@@ -112,70 +112,71 @@ const routes = [
     meta: { title: '申请', isleftarrow: true },
     component: () => import('../views/userCenter/dock/apply.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: '/adminCenter/user/index',
     name: 'adminCenter_user_index',
     meta: { title: '用户管理', isleftarrow: true },
     component: () => import('../views/adminCenter/user/index.vue'),
   },
+  //  管理-查看用户
   {
     path: '/adminCenter/user/detail',
     name: 'adminCenter_user_detail',
     meta: { title: '审核/查看用户', isleftarrow: true },
     component: () => import('../views/adminCenter/user/detail.vue'),
   },
+  //  管理-展会管理
   {
     path: '/adminCenter/duijiehui/index',
     name: 'adminCenter_duijiehui_index',
     meta: { title: '展会管理', isleftarrow: true },
     component: () => import('../views/adminCenter/duijiehui/index.vue'),
   },
+  //  管理-展会信息管理
   {
     path: '/adminCenter/duijiehui/add',
     name: 'adminCenter_duijiehui_add',
     meta: { title: '展会信息管理', isleftarrow: true },
     component: () => import('../views/adminCenter/duijiehui/add.vue'),
   },
+  //  管理-审核管理
   {
     path: '/adminCenter/enterpriseProduct/index',
     name: 'adminCenter_enterpriseProduct',
     meta: { title: '审核管理', isleftarrow: true },
     component: () => import('../views/adminCenter/enterpriseProduct/index.vue'),
   },
+  //  管理-产品信息管理
   {
     path: '/adminCenter/enterpriseProduct/detail',
     name: 'adminCenter_enterpriseProduct',
     meta: { title: '产品信息管理', isleftarrow: true },
     component: () => import('../views/adminCenter/enterpriseProduct/detail.vue'),
   },
+  //  管理-交易审核管理
   {
     path: '/adminCenter/transaction/index',
     name: 'adminCenter_transaction',
     meta: { title: '交易审核管理', isleftarrow: true },
     component: () => import('../views/adminCenter/transaction/index.vue'),
   },
+  //  管理-交易信息管理
   {
     path: '/adminCenter/transaction/detail',
     name: 'adminCenter_transaction',
     meta: { title: '交易信息管理', isleftarrow: true },
     component: () => import('../views/adminCenter/transaction/detail.vue'),
   },
-  // 登录
+  //共用-修改密码
+  {
+    path: '/updatePwd/index',
+    name: 'updatePwd',
+    meta: { title: '修改密码', isleftarrow: true },
+    component: () => import('../views/updatePwd/index.vue'),
+  },
+  // 登录-用户+管理
   {
     path: '/login',
     name: 'login',

+ 0 - 161
src/views/onlive/roomInfo.vue

@@ -1,161 +0,0 @@
-<template>
-  <div id="roomInfo">
-    <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">
-          <van-image :src="roomInfos.filedir" class="image"></van-image>
-          <van-count-down v-if="time > 0 && endtime > 0" class="time" :time="time" format="DD 天 HH 时 mm 分 ss 秒" />
-          <el-col v-else-if="time <= 0 && endtime > 0" class="time">直播已开始</el-col>
-          <el-col v-else-if="endtime <= 0" class="time">直播已结束</el-col>
-          <van-tabs v-model="active" line-width="50px" title-active-color="#ee0a24">
-            <van-tab title="简介">
-              <van-col :span="24" class="title">{{ roomInfos.title }}</van-col>
-              <van-col :span="24" class="starttime"><van-icon name="underway-o" />开始时间: {{ roomInfos.starttime }}</van-col>
-              <van-col :span="24" class="gap"></van-col>
-
-              <van-col :span="24">
-                <van-col :span="24" class="infotop"><span></span><span>活动简介</span> </van-col>
-                <van-col class="content">{{ roomInfos.content }}</van-col>
-              </van-col>
-            </van-tab>
-          </van-tabs>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, mapMutations, createNamespacedHelpers } from 'vuex';
-import NavBar from '@/layout/common/topInfo.vue';
-import footInfo from '@/layout/common/footInfo.vue';
-var moment = require('moment');
-const { mapActions: room } = createNamespacedHelpers('room');
-export default {
-  name: 'roomInfo',
-  props: {},
-  components: {
-    NavBar,
-  },
-  data: function() {
-    return {
-      // 头部标题
-      title: '',
-      // meta为true
-      isleftarrow: '',
-      // 返回
-      navShow: true,
-      roomInfos: {},
-      time: '',
-      active: 1,
-      endtime: '',
-    };
-  },
-  created() {
-    this.seachInfo();
-  },
-  methods: {
-    ...room(['roomfetch']),
-    async seachInfo() {
-      let res = await this.roomfetch({ roomname: this.roomname });
-      if (this.$checkRes(res)) {
-        this.$set(this, `roomInfos`, res.data);
-        const starttime = moment(res.data.starttime).format('x');
-        const endtime = moment(res.data.endtime).format('x');
-        const now = moment(new Date()).format('x');
-        this.$set(this, `time`, starttime - now);
-        this.$set(this, `endtime`, endtime - now);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    roomname() {
-      return this.$route.query.roomname;
-    },
-  },
-  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;
-}
-.image {
-  width: 100%;
-  height: 220px;
-}
-.time {
-  height: 40px;
-  line-height: 40px;
-  font-size: 16px;
-  background-color: rgba(0, 0, 0, 0.6);
-  color: #ffffff;
-  text-align: center;
-  position: absolute;
-  top: 226px;
-  width: 100%;
-}
-.title {
-  font-size: 20px;
-  font-weight: bold;
-  padding: 10px;
-}
-.starttime {
-  padding: 10px;
-}
-/deep/.van-icon::before {
-  font-size: 13px;
-  margin-right: 5px;
-}
-.gap {
-  background-color: #f2f2f2;
-  height: 10px;
-}
-.infotop {
-  margin: 10px 5px;
-}
-.infotop span:first-child {
-  display: inline-block;
-  background-color: #ee0a24;
-  width: 3px;
-  height: 20px;
-  margin: 0 10px;
-}
-.infotop span:last-child {
-  font-size: 16px;
-  font-weight: bold;
-}
-.content {
-  padding: 10px;
-}
-.reserve {
-  background-color: #2c69fe;
-  position: absolute;
-  bottom: 0px;
-  height: 50px;
-  color: #ffffff;
-  text-align: center;
-  line-height: 50px;
-  font-weight: 600;
-}
-</style>

+ 25 - 10
src/views/user/parts/changePwd.vue

@@ -1,18 +1,33 @@
 <template>
-  <div id="changePwd">
+  <div id="index">
     <el-row>
       <el-col :span="24">
         <el-col :span="24" class="top">
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="pwd">
-          <van-form :model="form">
-            <van-field v-model="form.oldpasswd" type="password" name="密码" label="旧密码" placeholder="请输入旧密码" />
-            <van-field v-model="form.newpasswd" type="password" name="密码" label="新密码" placeholder="请输入新密码" />
-            <el-col :span="24" class="btn1">
-              <el-button @click="resetForm('form')">取消</el-button>
-              <el-button type="primary" @click="submitForm('form')">提交</el-button>
-            </el-col>
+          <van-form>
+            <van-field
+              v-model="form.oldpasswd"
+              type="password"
+              name="旧密码"
+              label="旧密码"
+              placeholder="旧密码"
+              :rules="[{ required: true, message: '请填写旧密码' }]"
+            />
+            <van-field
+              v-model="form.newpasswd"
+              type="password"
+              name="新密码"
+              label="新密码"
+              placeholder="新密码"
+              :rules="[{ required: true, message: '请填写新密码' }]"
+            />
+            <div style="margin: 16px;">
+              <van-button round block type="info" @click="onSubmit">
+                提交
+              </van-button>
+            </div>
           </van-form>
         </el-col>
       </el-col>
@@ -26,7 +41,7 @@ import NavBar from '@/layout/common/topInfo.vue';
 const { mapActions: password } = createNamespacedHelpers('password');
 const { mapActions: login } = createNamespacedHelpers('login');
 export default {
-  name: 'changePwd',
+  name: 'index',
   props: {},
   components: {
     NavBar,
@@ -49,7 +64,7 @@ export default {
     resetForm(formName) {
       this.form = {};
     },
-    async submitForm() {
+    async onSubmit() {
       let data = this.form;
       data.id = this.user.uid;
       let res = await this.update(data);

+ 17 - 19
src/views/user/parts/clickBtn.vue

@@ -8,26 +8,24 @@
           <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>
-          <span v-if="user.role == '0'">
-            <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
-            <van-cell is-link title="展会管理" @click="$router.push({ path: '/adminCenter/duijiehui/index' })" />
-            <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
-            <van-cell is-link title="交易审核" @click="$router.push({ path: '/adminCenter/transaction/index' })" />
-          </span>
-          <span v-else-if="user.role == '1'">
-            <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
-            <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
-          </span>
-          <span v-else-if="user.role == '3'">
-            展会负责人
-          </span>
-          <span v-else-if="user.role == '8'">
-            展会vip用户
-          </span>
+        <span v-else-if="user.role == '0'">
+          <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
+          <van-cell is-link title="展会管理" @click="$router.push({ path: '/adminCenter/duijiehui/index' })" />
+          <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
+          <van-cell is-link title="交易审核" @click="$router.push({ path: '/adminCenter/transaction/index' })" />
+        </span>
+        <span v-else-if="user.role == '1'">
+          <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
+          <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
+        </span>
+        <span v-else-if="user.role == '3'">
+          展会负责人
+        </span>
+        <span v-else-if="user.role == '8'">
+          展会vip用户
         </span>
-        <van-cell is-link title="退出登录" @click="loginOut()" />
         <van-cell is-link title="修改密码" @click="change()" />
+        <van-cell is-link title="退出登录" @click="loginOut()" />
         <!-- <span v-else>
           <span v-else-if="user.role == '3'">
             <van-cell is-link title="展会管理" @click="$router.push({ path: '/dockCenter/dockInfo/index' })" />
@@ -93,7 +91,7 @@ export default {
     },
     //修改密码
     change() {
-      this.$router.push({ path: './parts/changePwd' });
+      this.$router.push({ path: '/updatePwd/index' });
     },
   },
   computed: {

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

@@ -1,31 +0,0 @@
-<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>