Browse Source

no message

laosan2382995021@163.com 4 years ago
parent
commit
54c8096b68

+ 4 - 1
src/pages/talking/components/room-footer/mixins/index.ts

@@ -1,3 +1,6 @@
+// 声音
 import voice from "./voice";
+// 麦
+import wheat from './wheat';
 
-export default [voice];
+export default [voice,wheat];

+ 35 - 0
src/pages/talking/components/room-footer/mixins/wheat.ts

@@ -0,0 +1,35 @@
+import {AgoraStatus} from "$utils/agora/const";
+
+export default {
+
+    data(){
+        return {
+            AgoraStatus:AgoraStatus,
+            loadingAgora:true
+        }
+    },
+
+    watch:{
+        agoraStatus(){
+            if (this.agoraStatus === AgoraStatus.published) {
+                this.loadingAgora = false;
+            }
+        }
+    },
+
+    methods:{
+
+        toggleWheat(){
+            if (this.loadingAgora) return;
+
+            if (this.agoraStatus === AgoraStatus.listener) {
+                this.useAgora.joinPublished();
+            } else if (this.agoraStatus === AgoraStatus.published) {
+                this.useAgora.unPublish();
+            }
+
+        }
+
+    }
+
+}

+ 13 - 0
src/pages/talking/components/room-footer/props.ts

@@ -0,0 +1,13 @@
+export default {
+
+    inWheat:{
+        type:Boolean,
+        default:false
+    },
+
+    agoraStatus:{
+        type:[Number,String],
+        default:0
+    }
+
+}

+ 10 - 1
src/pages/talking/components/room-footer/src/main.vue

@@ -6,6 +6,13 @@
       </div>
       <img @click="toggleVoice()" :src="voiceMute?voiceIcon.disabled:voiceIcon.default" class="cursor-pointer room-footer-voice-icon" />
     </div>
+    <div v-if="inWheat" class="room-footer-wheat relative center"
+      :class="{'cursor-pointer':!loadingAgora}"
+         @click="toggleWheat"
+    >
+      <div v-if="!loadingAgora && AgoraStatus.listener === agoraStatus" class="absolute room-footer-wheat-disabled"></div>
+      <svg t="1625625418358" class="screen" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4731" width="200" height="200"><path d="M512 691.2c99.84 0 179.2-79.36 179.2-179.2V256c0-99.84-79.36-179.2-179.2-179.2s-179.2 79.36-179.2 179.2v256c0 99.84 79.36 179.2 179.2 179.2z m-128-435.2c0-71.68 56.32-128 128-128s128 56.32 128 128v256c0 71.68-56.32 128-128 128s-128-56.32-128-128V256z m409.6 307.2h-51.2c-23.04 102.4-120.32 179.2-230.4 179.2s-207.36-76.8-230.4-179.2H230.4c23.04 122.88 130.56 217.6 256 230.4v51.2h-25.6c-15.36 0-25.6 10.24-25.6 25.6s10.24 25.6 25.6 25.6h102.4c15.36 0 25.6-10.24 25.6-25.6s-10.24-25.6-25.6-25.6h-25.6v-51.2c125.44-12.8 232.96-107.52 256-230.4z" p-id="4732" fill="#ffffff"></path></svg>
+    </div>
   </footer>
 </template>
 
@@ -14,12 +21,14 @@ import {
   Slider
 } from 'ant-design-vue';
 import mixins from '../mixins';
+import props from '../props';
 export default {
   name: "room-footer",
   components:{
     [Slider.name]:Slider
   },
-  mixins
+  mixins,
+  props
 }
 </script>
 

+ 19 - 1
src/pages/talking/components/room-footer/style.scss

@@ -43,4 +43,22 @@
 .room-footer-slider::v-deep .ant-slider-handle:focus{
   box-shadow: 0 0 0 0.05rem rgb(170 155 212 / 20%)
 }
-/* 声音 */
+/* 声音 */
+
+/* 麦 */
+.room-footer-wheat{
+  @include square(22px);
+}
+.room-footer-wheat svg{
+  margin-left: 10px;
+}
+.room-footer-wheat-disabled{
+  top: 0;
+  height: 1px;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: #fff;
+  transform: rotate(60deg) translateY(50%) translateX(50%);
+}
+/* 麦 */

+ 13 - 0
src/pages/talking/components/room-info/components/room-audience/data/type.ts

@@ -0,0 +1,13 @@
+export default {
+
+    // 观众
+    'audience':{
+       
+    },
+
+    // 排麦
+    'rowWheat':{
+
+    }
+
+}

+ 30 - 2
src/pages/talking/components/room-info/components/room-audience/mixins/handle.ts

@@ -1,11 +1,20 @@
 export default <LibMixins>{
 
-    inject:['getRoomInfo','openUserInfo'],
+    inject:['getRoomInfo','openUserInfo','allowForWheat'],
 
     methods:{
 
         fetch(obj){
+            return this.getWheatList(obj);
+            if (this.type === 'audience') {
+                return this.getAudienceList(obj);
+            } else {
 
+            }
+        },
+
+        // 获取在线用户列表
+        getAudienceList(obj){
             return this.$request({
                 url:'room/get_room_alluser_list',
                 data:{
@@ -22,9 +31,28 @@ export default <LibMixins>{
                 return obj.success(data);
 
             }).catch(obj.fail);
+        },
 
-        }
+        // 获取排麦列表
+        getWheatList(obj){
+            return this.$request({
+                url:'room/get_room_mc_queue_list',
+                data:{
+                    rid: this.roomInfo.rid
+                },
+                page:obj.data,
+                token:true
+            }).then((data)=>{
+                return obj.success(data.data || []);
+            }).catch(obj.fail);
+        },
 
+        // 拉人上麦
+        triggerAllowForWheat(user){
+            if (user.uid) {
+                this.allowForWheat(user);
+            }
+        }
     },
 
     created() {

+ 13 - 0
src/pages/talking/components/room-info/components/room-audience/props.ts

@@ -0,0 +1,13 @@
+export default {
+
+    type:{
+        type:String,
+        default:'audience'
+    },
+
+    admin:{
+        type:Boolean,
+        default: false
+    }
+
+}

+ 3 - 0
src/pages/talking/components/room-info/components/room-audience/src/main.vue

@@ -18,6 +18,7 @@
               <layout-sex :type="item.sex"></layout-sex>
             </section>
           </section>
+          <div v-if="admin" @click="triggerAllowForWheat(item)" class="center room-audience-wheat cursor-pointer">上麦</div>
         </aside>
       </template>
     </flat-list>
@@ -33,6 +34,7 @@ import {
 } from "$components";
 import layoutSex from '$layout/layout-sex';
 import mixins from '../mixins';
+import props from '../props';
 export default {
   name: "room-audience",
   components: {
@@ -41,6 +43,7 @@ export default {
     FlatList,
     layoutSex
   },
+  props,
   mixins
 }
 </script>

+ 9 - 0
src/pages/talking/components/room-info/components/room-audience/style.scss

@@ -29,3 +29,12 @@
   font-size: 16px;
   line-height: 20px;
 }
+
+.room-audience-wheat{
+  font-size: 12px;
+  line-height: 14px;
+  width: 60px;
+  background: $main-linear;
+  height: 26px;
+  border-radius: 13px;
+}

+ 4 - 2
src/pages/talking/components/room-info/data/tab.ts

@@ -2,10 +2,12 @@ export default [
     {
         label:'现场观众',
         slot:'0',
-        key:'visitor_num'
+        key:'visitor_num',
+        type:'audience'
     },
     {
         label: '排麦',
-        slot:'1'
+        slot:'1',
+        type:'rowWheat'
     }
 ]

+ 2 - 0
src/pages/talking/components/room-info/src/main.vue

@@ -72,6 +72,8 @@
           >
             <room-audience
                 :key="'room-audience-'+index"
+                :type="item.type"
+                :admin="admin"
             ></room-audience>
           </template>
         </tab>

+ 27 - 5
src/pages/talking/components/room-ranking/components/room-ranking-list/mixins/handle.ts

@@ -1,3 +1,5 @@
+import {InstructionsCacheType} from "$utils/request";
+
 export default <LibMixins>{
 
     inject:['getRoomInfo','openUserInfo'],
@@ -5,6 +7,7 @@ export default <LibMixins>{
     data(){
       return {
           loadingObject:{},
+          firstLoadingObject:{},
           userRankObject:{},
           time:1
       }
@@ -15,13 +18,18 @@ export default <LibMixins>{
             return this.userRankObject[this.time] || [];
         },
         loadingStatus(){
-            return this.loadingObject[this.time] || false
+            return this.firstLoadingObject[this.time] || false
         }
     },
 
     methods:{
-        fetch(){
+        fetch(updated:boolean=true){
             let time = this.time;
+
+            if (this.firstLoadingObject[time] === undefined) {
+                this.firstLoadingObject[time] = true;
+            }
+
             return this.$request({
                 url:'room/get_room_rank',
                 data:{
@@ -29,12 +37,26 @@ export default <LibMixins>{
                     time:time,
                     type:this.type
                 },
-                next:({status})=> this.loadingObject[this.time] =status,
+                next:({status})=> {
+                    this.loadingObject[time] =status;
+                    if (this.firstLoadingObject[time]) {
+                        this.firstLoadingObject[time] = false;
+                    }
+                },
+                cache:{
+                    type:InstructionsCacheType.storage,
+                    updated
+                },
                 token:true,
             }).then((data)=>{
                 if (data.isSuccess) {
                     data.data = data.data || {};
                     this.userRankObject[time] = data.data.list;
+
+                    if (data.isCache) {
+                        return this.fetch(true);
+                    }
+
                 }
             });
         },
@@ -42,14 +64,14 @@ export default <LibMixins>{
         switchType(){
             this.time = this.time === 1 ? 3 : 1;
             if (this.userRankObject[this.time] === undefined && !this.loadingObject[this.time]) {
-                return this.fetch();
+                return this.fetch(false);
             }
         }
     },
 
     mounted() {
         this.roomInfo = this.getRoomInfo();
-        this.fetch();
+        this.fetch(false);
     }
 
 }

+ 20 - 18
src/pages/talking/components/room-wheat/data/micro-control.ts

@@ -1,24 +1,26 @@
 import {
     WheatUseStatus
 } from '../../../const/wheat';
-export default [
-    {
-        label:'上麦',
-        trigger:'applyForWheat'
-    },
-    {
-        label: '抱人上麦'
-    },
-    {
-        labels:{
-            [WheatUseStatus.lock]:'解麦',
-            [WheatUseStatus.normal]:'锁麦'
+export default  {
+    [WheatUseStatus.lock]:[
+        {
+            label:'解麦',
+            trigger:'trigger'
+        }
+    ],
+
+    [WheatUseStatus.normal]:[
+        {
+            label:'上麦',
+            trigger:'applyForWheat'
         },
-        trigger: {
-            [WheatUseStatus.lock]:'lockForWheat',
-            [WheatUseStatus.normal]:'lockForWheat'
+        {
+            label: '抱人上麦'
         },
-        key:'mc_status'
+        {
+            label: '锁麦',
+            trigger: 'lockForWheat'
+        }
+    ]
 
-    }
-]
+}

+ 13 - 17
src/pages/talking/components/room-wheat/src/main.vue

@@ -100,7 +100,7 @@ export default {
     }
   },
 
-  inject:['openUserInfo','applyForWheat','lockForWheat'],
+  inject:['openUserInfo','applyForWheat','lockForWheat','unLockForWheat'],
 
   computed:{
 
@@ -125,25 +125,21 @@ export default {
 
       let useItem = this.microUsers[index];
 
-      microControl.map((item)=>{
-        if (item.key) {
-          item.label = item.labels[useItem[item.key]];
-        }
-      });
+      if (useItem.mc_status === WheatUseStatus.lock) {
+        return this.unLockForWheat(index);
+      } else {
+        let useMicroControl = microControl[useItem.mc_status];
 
-      popup.$select({
-        data:microControl,
-        confirm:(item)=>{
-
-          let trigger = item.trigger;
-          if (item.key) {
-            let value = useItem[item.key];
-            trigger = item.trigger[value];
+        popup.$select({
+          data:useMicroControl,
+          confirm:(item)=>{
+            let trigger = item.trigger;
+            this[trigger] && this[trigger](index);
           }
+        });
+      }
+
 
-          this[trigger] && this[trigger](index);
-        }
-      });
     },
 
     pressHostWheat(){

+ 17 - 2
src/pages/talking/mixins/agora.ts

@@ -1,12 +1,27 @@
-import Agora from "$utils/agora/agora";
+import Agora, {
+    AgoraEvent,
+    AgoraStatus
+} from "$utils/agora/agora";
 
 import user from '$config/user';
 
 export default <LibMixins>{
 
+    data(){
+      return {
+          agoraStatus: AgoraStatus.none
+      }
+    },
+
     created(){
 
-        // this.useAgora = new Agora(this.$params.rid.toString(),user.uid() || null);
+        this.useAgora = new Agora(this.$params.rid.toString(),user.uid() || null);
+
+        // 监听设置状态
+        this.useAgora.on(AgoraEvent.status,(item)=>{
+            this.agoraStatus = item;
+        });
+
     },
 
     beforeUnmount(){

+ 26 - 7
src/pages/talking/mixins/handle.ts

@@ -1,5 +1,6 @@
 import {InstructionsCacheType, InstructionsMessageType} from "$utils/request";
 import user from "$config/user";
+import {RowWheat} from "@/pages/talking/const";
 
 export default <LibMixins>{
 
@@ -31,6 +32,11 @@ export default <LibMixins>{
       // 当前人是否为主持
       isHostMicro(){
           return !!(this.microInfo.host_info && this.microInfo.host_info.mc_user_info && this.microInfo.host_info.mc_user_info.uid === user.uid());
+      },
+      // 自己是否在麦上
+      inWheat(){
+          console.log(this.wheat_status);
+          return this.wheat_status === RowWheat.wheat;
       }
     },
 
@@ -68,16 +74,23 @@ export default <LibMixins>{
         },
 
         // 获取用户排麦状态
-        getUserRowWheat(){
+        getUserRowWheat(updated:boolean=true){
             return this.$request({
                 url:'room/get_user_mc_queue_status',
                 data:{
                     rid: this.$params.rid
                 },
+                cache:{
+                    type: InstructionsCacheType.storage,
+                    updated
+                },
                 token:true
             }).then((data)=>{
-                if (data.isSuccess) {
-                    this.setMicroStatus(data.data.in_mc_queue);
+                if (data.isSuccess && data.data.in_mc_queue === 1) {
+                    this.setMicroStatus(RowWheat.queuing);
+                }
+                if (data.isCache) {
+                    this.getUserRowWheat();
                 }
             });
         },
@@ -99,7 +112,7 @@ export default <LibMixins>{
         },
 
         // 获取麦位详情
-        getRoomMicroInfo(){
+        getRoomMicroInfo(updated:boolean=true){
 
             return this.$request({
                 url:'room/get_room_micro_info',
@@ -109,16 +122,22 @@ export default <LibMixins>{
                 token:true,
                 failMessage:true,
                 cache:{
-                    type: InstructionsCacheType.storage
+                    type: InstructionsCacheType.storage,
+                    updated,
+                    id:'get_room_micro_info-'+this.$params.rid
                 },
                 message:InstructionsMessageType.other
             }).then((data)=>{
                 this.microInfo = data.data;
                 this.installMicroInfo();
+                if (data.isCache) {
+                    this.getRoomMicroInfo(true);
+                }
                 // 设置当前排麦状态
                 if (this.hasMicroInfo()) {
                     this.downMicro();
                 }
+
             })
         },
 
@@ -127,9 +146,9 @@ export default <LibMixins>{
             // 请求房间信息
             this.fetchRoomInfo();
             // 请求麦位信息
-            this.getRoomMicroInfo();
+            this.getRoomMicroInfo(false);
             // 获取用户排麦信息
-            this.getUserRowWheat();
+            this.getUserRowWheat(false);
             // 获取用户入场特效
             this.getUserAdmission();
         },

+ 34 - 5
src/pages/talking/mixins/micro.ts

@@ -1,5 +1,7 @@
 import user from '$config/user';
 import {RowWheat} from "@/pages/talking/const";
+import {WheatUseStatus} from "@/pages/talking/const/wheat";
+import {cache} from "$utils/request/cache";
 
 export default <LibMixins>{
 
@@ -18,14 +20,29 @@ export default <LibMixins>{
                 }
             });
 
-
             this.micro_info = resultData;
+
+            this.updateMicroCache();
+        },
+
+        // 更新麦位缓存
+        updateMicroCache(){
+            let cacheSign =cache.getSign('get_room_micro_info-'+this.$params.rid);
+
+            let cacheData = cache.getCache(cacheSign);
+
+            // 更新缓存
+            if (cacheData && cacheData.data.data) {
+                cacheData.data.data.data = this.microInfo;
+                cache.updateCache(cacheSign,cacheData.data);
+            }
         },
 
         // 查看当前麦位是否空缺
-        getMicroInfo(index:number) {
+        getMicroEmptyStatus(index:number) {
             let mcList = this.microInfo.mc_list || [];
-            return mcList[index];
+
+            return mcList[index] && !(mcList[index].mc_user_info && mcList[index].mc_user_info.uid);
         },
 
         // 查看用户是否出现在麦位信息中
@@ -35,6 +52,16 @@ export default <LibMixins>{
             }
         },
 
+        // 设置麦位的麦位状态
+        setMicroMcStatus(index,status:WheatUseStatus=WheatUseStatus.normal){
+            if (typeof index === 'number' && this.microInfo.mc_list) {
+                if (this.microInfo.mc_list[index] && this.microInfo.mc_list[index].mc_status !== status) {
+                    this.microInfo.mc_list[index].mc_status = status;
+                    this.updateMicroCache();
+                }
+            }
+        },
+
         // 获取空缺麦位的位置
         getMicroIndex(uid =undefined){
             let mcList = this.microInfo.mc_list || [];
@@ -64,7 +91,7 @@ export default <LibMixins>{
                 // 如果存在于其他麦位直接退出
                 this.exitMicro(user.uid);
 
-                this.microInfo.mc_list[index].mc_status = 3;
+                this.setMicroMcStatus(index,WheatUseStatus.normal);
                 this.microInfo.mc_list[index].mc_user_info = user;
 
                 // 更新麦位信息
@@ -81,6 +108,8 @@ export default <LibMixins>{
                 this.exitMicro(user.uid);
                 this.microInfo.host_info.mc_status = 3;
                 this.microInfo.host_info.mc_user_info = user;
+
+                this.setMicroStatus(RowWheat.wheat);
                 // 更新麦位信息
                 this.installMicroInfo();
             }
@@ -120,7 +149,7 @@ export default <LibMixins>{
             if (uid) {
                 let item = this.micro_info[uid];
                 if (item) {
-                    item.mc_status = 2;
+                    item.mc_status = WheatUseStatus.normal;
                     item.mc_user_info = {};
                     // 更新麦位信息
                     this.installMicroInfo();

+ 110 - 5
src/pages/talking/mixins/wheat.ts

@@ -5,6 +5,7 @@ import user from '$config/user';
 
 import {RowWheat} from '../const';
 import {InstructionsMessageType} from "$utils/request";
+import {WheatUseStatus} from "@/pages/talking/const/wheat";
 
 export default <LibMixins>{
 
@@ -17,13 +18,24 @@ export default <LibMixins>{
 
     provide(){
         return {
+            // 打开用户信息
             openUserInfo:(event,userInfo)=> this.openUserInfo(event,userInfo),
+            // 申请上麦
             applyForWheat:(index:number|undefined,host:boolean=false)=> this.applyForWheat(index,host),
+            // 下麦
             exitForWheat:()=> this.exitForWheat(),
+            // 取消排麦
             cancelForWheat:()=> this.cancelForWheat(),
+            // 获取房间信息
             getRoomInfo: ()=> this.roomInfo,
+            // 获取通话对象
             getUseAgora:()=> this.useAgora || {},
-            lockForWheat:(index)=>this.lockForWheat(index)
+            // 锁定麦位
+            lockForWheat:(index)=>this.lockForWheat(index),
+            // 解锁麦位
+            unLockForWheat:(index)=>this.unLockForWheat(index),
+            // 抱人上麦
+            allowForWheat:(user,index=undefined)=> this.allowForWheat(user,index)
         }
     },
 
@@ -41,6 +53,62 @@ export default <LibMixins>{
 
         },
 
+        // 允许某人上麦
+        allowForWheat(user,index=undefined){
+
+            return  new Promise<void>((resolve, reject)=>{
+
+                if (this.allowForWheatStatus) return  reject();
+
+                index = typeof index === 'number' ? index : this.getMicroIndex();
+
+                if (index !== null ) {
+                    return  popup.$confirm({
+                        title:'是否操作'+user.nick_name+'上麦?',
+                        successAsyncText:'操作成功',
+                        confirm:()=>{
+                            return new Promise( (c_resolve, c_reject) =>{
+                                this.$request({
+                                    url:'room/room_owner_up_micro',
+                                    data:{
+                                        micro_id:index,
+                                        uid:user.uid,
+                                        rid: this.$params.rid
+                                    },
+                                    token:true,
+                                    failMessage:true,
+                                    next:({status})=> this.allowForWheatStatus = status,
+                                    message: InstructionsMessageType.other
+                                }).then((data)=>{
+                                    if (data.isSuccess) {
+                                        this.updateMicro(index,user);
+                                        resolve(data);
+                                        c_resolve(true);
+                                    } else {
+                                        reject();
+                                        return c_resolve(false);
+                                    }
+
+                                }).catch(()=>{
+                                    c_reject();
+                                    reject();
+                                });
+                            })
+                        },
+                        cancel:function () {
+                            return reject();
+                        }
+                    });
+
+                } else {
+                    popup.$toast('暂无可用麦位');
+                    return  reject();
+                }
+            });
+
+
+        },
+
         // 申请上麦
         applyForWheat(index:number|undefined,host:boolean=false){
 
@@ -51,7 +119,7 @@ export default <LibMixins>{
                 if (this.isAdmin) {
                     return popup.$confirm({
                         title: host ? '是否上主持位?' : this.wheat_status === RowWheat.none ? '是否上麦?' :'是否切换麦位?',
-                        successAsyncText:'上麦成功',
+                        successAsyncText:this.wheat_status === RowWheat.none ? '上麦成功' : '切换成功',
                         confirm:()=>{
 
                             index = typeof index === 'number' ? index : this.getMicroIndex();
@@ -149,10 +217,10 @@ export default <LibMixins>{
                                     message: InstructionsMessageType.other
                                 }).then((data)=>{
                                     if (data.isSuccess) {
+                                        resolve(true);
                                         this.upMicro({
                                             uid:user.uid()
                                         });
-                                        resolve(true);
                                     } else {
                                         resolve(false);
                                     }
@@ -200,7 +268,8 @@ export default <LibMixins>{
 
             if (this.lockForWheatStatus) return;
 
-            if (index) {
+            // 麦位上不允许有人
+            if (index !== undefined && this.getMicroEmptyStatus(index)) {
                 popup.$confirm({
                     title: '是否锁麦?',
                     successAsyncText: '锁麦成功',
@@ -218,7 +287,43 @@ export default <LibMixins>{
                                 message: InstructionsMessageType.other
                             }).then((data)=>{
                                 if (data.isSuccess) {
+                                    this.setMicroMcStatus(index,WheatUseStatus.lock);
+                                    resolve(true);
+                                } else {
+                                    resolve(false);
+                                }
+                            }).catch(reject);
+                        });
+                    }
+                });
+            }
+
 
+        },
+
+        // 解锁
+        unLockForWheat(index:number=0) {
+            if (this.unlockForWheatStatus) return;
+            // 同样麦位不允许有人
+            if (index !== undefined && this.getMicroEmptyStatus(index)) {
+                popup.$confirm({
+                    title: '是否开放麦位?',
+                    successAsyncText: '解锁成功',
+                    confirm:()=>{
+                        return new Promise((resolve, reject)=>{
+                            return this.$request({
+                                url:'room/unlock_room_micro',
+                                data:{
+                                    rid: this.$params.rid,
+                                    micro_id:index
+                                },
+                                token:true,
+                                failMessage:true,
+                                next:({status})=> this.unlockForWheatStatus = status,
+                                message: InstructionsMessageType.other
+                            }).then((data)=>{
+                                if (data.isSuccess) {
+                                    this.setMicroMcStatus(index,WheatUseStatus.normal);
                                     resolve(true);
                                 } else {
                                     resolve(false);
@@ -228,9 +333,9 @@ export default <LibMixins>{
                     }
                 });
             }
+        },
 
 
-        }
 
     }
 

+ 4 - 1
src/pages/talking/src/main.vue

@@ -19,7 +19,10 @@
           </section>
           <room-ranking></room-ranking>
         </section>
-        <room-footer></room-footer>
+        <room-footer
+            :inWheat="inWheat"
+            :agoraStatus="agoraStatus"
+        ></room-footer>
       </section>
     </section>
   </section>

+ 3 - 2
src/popup/popup-login/components/login/src/main.vue

@@ -59,6 +59,7 @@ import verification from '$utils/verification';
 import { InstructionsMessageType } from '$utils/request';
 
 import user from '$config/user';
+import popup from "$utils/tool/popup";
 
 export default {
   name: "login",
@@ -78,15 +79,15 @@ export default {
       return this.$request({
         url:'login/user_login',
         data:obj.data,
-        message: true
+        message: InstructionsMessageType.other
       }).then((data)=>{
 
         if (data.isSuccess) {
 
           user.user = data.data;
-
           this.$request.getUserInfo().then((resultData)=>{
              this.$store.commit('setUserInfo',Object.assign({},data.data,resultData));
+             popup.$toast(data.msg);
              return this.$emit('close');
           }).catch(obj.fail);
         } else {

+ 2 - 0
src/utils/agora/agora.ts

@@ -6,6 +6,8 @@ import Notice from '$utils/class/notice';
 
 import {AgoraStatus,AgoraEvent} from './const';
 
+export {AgoraStatus,AgoraEvent};
+
 export default class Agora extends Notice{
 
     // 设置当前客户端

+ 1 - 0
src/utils/request/cache/cache.ts

@@ -107,6 +107,7 @@ export default  class Cache {
 
 	updateCache(sign:string,data:any){
 
+		data = JSON.parse(JSON.stringify(data));
 		let resultCache = this.getCache(sign);
 		if (resultCache && resultCache.data !== data) {
 			resultCache.data = data;