wuhongyu 4 anni fa
parent
commit
3aeab12558

+ 3 - 3
src/layout/login/loginMain.vue

@@ -7,9 +7,9 @@
           <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tabs v-model="activeName" @tab-click="handleClick">
             <el-tab-pane label="登录" name="first">
             <el-tab-pane label="登录" name="first">
               <el-col :span="24">
               <el-col :span="24">
-                <el-form ref="form" :model="form" label-width="80px">
-                  <el-form-item label="手机号">
-                    <el-input v-model="form.phone" placeholder="请输入手机号" :minlength="11" :maxlength="11"></el-input>
+                <el-form ref="form" :model="form" label-width="90px">
+                  <el-form-item label="用户/手机号">
+                    <el-input v-model="form.phone" placeholder="请输入用户/手机号" :minlength="11" :maxlength="11"></el-input>
                   </el-form-item>
                   </el-form-item>
                   <el-form-item label="登录密码">
                   <el-form-item label="登录密码">
                     <el-input v-model="form.passwd" placeholder="请输入登录密码" show-password></el-input>
                     <el-input v-model="form.passwd" placeholder="请输入登录密码" show-password></el-input>

+ 17 - 1
src/views/hall/direct.vue

@@ -9,7 +9,17 @@
                   <el-col else> -->
                   <el-col else> -->
             <el-col :span="24" class="title">
             <el-col :span="24" class="title">
               <!-- 吉林省计算中心对接直播大厅 -->
               <!-- 吉林省计算中心对接直播大厅 -->
-              {{ title }}
+              <el-col :span="16"> {{ title }} </el-col>
+              <el-col :span="8" class="userper" v-if="this.user.uid">
+                <span style="padding:0 10px 0 0 "> {{ user.name }}</span
+                ><span
+                  v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6'"
+                  @click="$router.push({ path: '/userCenter/index', query: { num: 1 } })"
+                  >个人中心</span
+                ><span v-if="this.user.role == '4' || this.user.role == '8'" @click="$router.push({ path: '/vipCenter/index', query: { num: 1 } })"
+                  >个人中心</span
+                ></el-col
+              >
             </el-col>
             </el-col>
             <el-col :span="24" class="zhuban">
             <el-col :span="24" class="zhuban">
               <span>主办方:</span>
               <span>主办方:</span>
@@ -826,6 +836,12 @@ export default {
   font-size: 45px;
   font-size: 45px;
   top: 65px;
   top: 65px;
 }
 }
+
+.userper {
+  font-size: 16px;
+  text-align: left;
+  width: 200px;
+}
 .livetop .zhuban {
 .livetop .zhuban {
   text-align: center;
   text-align: center;
   color: #fff;
   color: #fff;

+ 33 - 16
src/views/hallList/parts/list.vue

@@ -49,23 +49,40 @@ export default {
     },
     },
     // 跳转
     // 跳转
     async linkBtn(id) {
     async linkBtn(id) {
-      let res = await this.livefetch(id);
-      let sheng = '';
-      let shi = '';
-      let parent = res.data.province;
-      let places = res.data.place;
-      let reslte = await this.palcequery({ level: 1, parent });
-      let resltes = await this.palcequery({ level: 2, parent });
-      var arr = reslte.data.filter(item => item.code === parent);
-      var cre = resltes.data.filter(item => item.code === places);
-      for (const val of arr) {
-        sheng = val.name;
-      }
-      for (const val of cre) {
-        shi = val.name;
+      // console.log(this.user.uid);
+
+      if (this.user.uid) {
+        if (
+          this.user.role == '2' ||
+          this.user.role == '3' ||
+          this.user.role == '4' ||
+          this.user.role == '6' ||
+          this.user.role == '7' ||
+          this.user.role == '8'
+        ) {
+          let res = await this.livefetch(id);
+          let sheng = '';
+          let shi = '';
+          let parent = res.data.province;
+          let places = res.data.place;
+          let reslte = await this.palcequery({ level: 1, parent });
+          let resltes = await this.palcequery({ level: 2, parent });
+          var arr = reslte.data.filter(item => item.code === parent);
+          var cre = resltes.data.filter(item => item.code === places);
+          for (const val of arr) {
+            sheng = val.name;
+          }
+          for (const val of cre) {
+            shi = val.name;
+          }
+          let newTitle = sheng + shi + res.data.title;
+          window.location.href = encodeURI(`${this.liveIndex}?id=${id}&title=${newTitle}`);
+        } else {
+          this.$router.push({ path: '/newlogin' });
+        }
+      } else {
+        this.$router.push({ path: '/newlogin' });
       }
       }
-      let newTitle = sheng + shi + res.data.title;
-      window.location.href = encodeURI(`${this.liveIndex}?id=${id}&title=${newTitle}`);
     },
     },
     canIn(data) {
     canIn(data) {
       let nowTime = new Date().getTime();
       let nowTime = new Date().getTime();