guhongwei 4 tahun lalu
induk
melakukan
dc34b4278a
4 mengubah file dengan 10 tambahan dan 1228 penghapusan
  1. 8 2
      src/components/parts/chat.vue
  2. 0 6
      src/router/index.js
  3. 0 1218
      src/views/direct.vue
  4. 2 2
      src/views/market/index.vue

+ 8 - 2
src/components/parts/chat.vue

@@ -10,7 +10,7 @@
         <ul>
           <li v-for="(i, index) in list" :key="index">
             <p>
-              <span>[{{ i.send_time | getTime }}]</span><span style="font-weight: bold;">{{ i.sender_name }}:</span>
+              <span>[{{ i.send_time | getTime }}]</span><span style="font-weight: bold;" :class="i.role == '8' ? 'nameColor' : ''">{{ i.sender_name }}:</span>
               <span> {{ i.content }}</span>
             </p>
           </li>
@@ -66,7 +66,10 @@ export default {
       }
       if (this.text != '') {
         let object = { sender_name: this.user.name, content: this.text };
-        if (this.user.uid) object.sender_id = this.user.uid;
+        if (this.user.uid) {
+          object.sender_id = this.user.uid;
+          object.role = this.user.role;
+        }
         //TODO接口
         let res = await this.create(object);
         this.$checkRes(res, null, res.errmsg || '发言失败');
@@ -227,4 +230,7 @@ export default {
   margin: 20px 0 0 0;
   border-radius: 5px;
 }
+.nameColor {
+  color: red;
+}
 </style>

+ 0 - 6
src/router/index.js

@@ -240,12 +240,6 @@ const live = [
     name: 'enterprisefabu',
     component: () => import('../views/enterprise/enterprisefabu.vue'),
   },
-  {
-    path: '/direct',
-    name: 'live_direct',
-    meta: { title: '直播大厅', subSite: true },
-    component: () => import('../views/direct.vue'),
-  },
   {
     path: '/hall/direct',
     name: 'live_direct',

File diff ditekan karena terlalu besar
+ 0 - 1218
src/views/direct.vue


+ 2 - 2
src/views/market/index.vue

@@ -215,7 +215,7 @@ export default {
     ...product(['newquery']),
     ...expertsuser({ expertQuery: 'query' }),
     async search() {
-      let res = await this.newquery({ skip: 0, limit: 6, totaltype: '0', status: '1' });
+      let res = await this.newquery({ skip: 0, limit: 5, totaltype: '0', status: '1' });
       if (this.$checkRes(res)) this.$set(this, `tecList`, res.data);
       res = await this.newquery({ skip: 0, limit: 4, totaltype: '1', status: '1' });
       if (this.$checkRes(res)) this.$set(this, `productList`, res.data);
@@ -392,7 +392,7 @@ export default {
 }
 .tecList {
   padding: 0 15px;
-  margin: 10px 0 10px 0;
+  margin: 15px 0;
 }
 .tecList p span:first-child {
   display: inline-block;