浏览代码

no message

laosan2382995021@163.com 4 年之前
父节点
当前提交
a6e0fa509f
共有 47 个文件被更改,包括 620 次插入163 次删除
  1. 二进制
      public/svga/3d42cfa7eb57424aaed6e0025dfe86a2.svga
  2. 二进制
      public/svga/6686117dd3a75fa783b49c26c8429e91.svga
  3. 1 1
      src/assets/scss/variable/color.scss
  4. 1 1
      src/components/v-image/mixins/src.ts
  5. 1 1
      src/pages/talking/components/room-admission/style.scss
  6. 二进制
      src/pages/talking/components/room-footer/images/disabled-voice.png
  7. 二进制
      src/pages/talking/components/room-footer/images/voice.png
  8. 3 0
      src/pages/talking/components/room-footer/mixins/index.ts
  9. 59 0
      src/pages/talking/components/room-footer/mixins/voice.ts
  10. 16 3
      src/pages/talking/components/room-footer/src/main.vue
  11. 42 1
      src/pages/talking/components/room-footer/style.scss
  12. 22 3
      src/pages/talking/components/room-info/components/room-audience/mixins/handle.ts
  13. 9 9
      src/pages/talking/components/room-info/components/room-audience/src/main.vue
  14. 4 29
      src/pages/talking/components/room-info/components/room-audience/style.scss
  15. 2 1
      src/pages/talking/components/room-info/mixins/index.ts
  16. 36 0
      src/pages/talking/components/room-info/mixins/userList.ts
  17. 55 0
      src/pages/talking/components/room-ranking/components/room-ranking-list/mixins/handle.ts
  18. 3 0
      src/pages/talking/components/room-ranking/components/room-ranking-list/mixins/index.ts
  19. 5 0
      src/pages/talking/components/room-ranking/components/room-ranking-list/props.ts
  20. 25 15
      src/pages/talking/components/room-ranking/components/room-ranking-list/src/main.vue
  21. 4 2
      src/pages/talking/components/room-ranking/data/tab.ts
  22. 1 0
      src/pages/talking/components/room-ranking/src/main.vue
  23. 13 1
      src/pages/talking/components/room-wheat/data/micro-control.ts
  24. 31 6
      src/pages/talking/components/room-wheat/src/main.vue
  25. 14 3
      src/pages/talking/const/wheat.ts
  26. 13 9
      src/pages/talking/mixins/handle.ts
  27. 8 2
      src/pages/talking/mixins/index.ts
  28. 6 0
      src/pages/talking/mixins/micro.ts
  29. 67 17
      src/pages/talking/mixins/wheat.ts
  30. 2 0
      src/pages/talking/src/main.vue
  31. 11 1
      src/popup/popup-detail/components/gift-banner/mixins/handle.ts
  32. 8 8
      src/popup/popup-personal/components/my-gift/data/data.ts
  33. 1 1
      src/popup/popup-personal/props.ts
  34. 10 0
      src/popup/popup-ranking/components/ranking-list/props.ts
  35. 55 29
      src/popup/popup-ranking/components/ranking-list/src/main.vue
  36. 3 0
      src/popup/popup-ranking/components/ranking-list/style.scss
  37. 6 3
      src/popup/popup-ranking/components/ranking-tab/data/tab.ts
  38. 5 0
      src/popup/popup-ranking/components/ranking-tab/props.ts
  39. 2 0
      src/popup/popup-ranking/components/ranking-tab/src/main.vue
  40. 9 6
      src/popup/popup-ranking/data/tab.ts
  41. 1 0
      src/popup/popup-ranking/src/main.vue
  42. 15 4
      src/popup/popup-user/mixins/handle.ts
  43. 20 5
      src/utils/agora/agora.ts
  44. 2 1
      src/views/view-menu/mixins/index.ts
  45. 24 0
      src/views/view-menu/mixins/ranking.ts
  46. 1 0
      src/views/view-menu/src/main.vue
  47. 4 1
      src/views/view-talking-header/data/control.ts

二进制
public/svga/3d42cfa7eb57424aaed6e0025dfe86a2.svga


二进制
public/svga/6686117dd3a75fa783b49c26c8429e91.svga


+ 1 - 1
src/assets/scss/variable/color.scss

@@ -1,5 +1,5 @@
 /* 主题色 */
-$main: #AA9BD4;
+$main: #aa9bd4;
 
 $main-text:#788DFF;
 

+ 1 - 1
src/components/v-image/mixins/src.ts

@@ -33,7 +33,7 @@ export default <LibMixins>{
 
         setImageSrc(src:string,async:boolean=true){
 
-            if (!src) return;
+            // if (!src) return;
 
             if (src.indexOf('data:') === 0) {
                 if (src.indexOf('data:video') === 0) {

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

@@ -5,7 +5,7 @@ $room-size:350px;
   z-index: 99;
   right: 350px;
   bottom: 250px;
-  //pointer-events: none;
+  pointer-events: none;
 }
 .room-admission-svg{
   @include square($room-size);

二进制
src/pages/talking/components/room-footer/images/disabled-voice.png


二进制
src/pages/talking/components/room-footer/images/voice.png


+ 3 - 0
src/pages/talking/components/room-footer/mixins/index.ts

@@ -0,0 +1,3 @@
+import voice from "./voice";
+
+export default [voice];

+ 59 - 0
src/pages/talking/components/room-footer/mixins/voice.ts

@@ -0,0 +1,59 @@
+export default <LibMixins>{
+
+    inject:['getUseAgora'],
+
+    data(){
+        return {
+            voiceValue:100,
+            voiceMute:false,
+            voiceIcon:{
+                default:require('../images/voice.png'),
+                disabled:require('../images/disabled-voice.png')
+            }
+        }
+    },
+
+    methods:{
+
+        voiceChange(value){
+            this.useAgora.setVolume(value);
+            if (value <= 0) {
+                return this.toggleVoice(true,false);
+            } else {
+                return this.toggleVoice(false,false);
+            }
+        },
+
+        toggleVoice(value,set=true){
+
+            if (value === undefined) {
+                value = !this.voiceMute;
+            }
+
+            if (this.voiceMute !== value) {
+                this.voiceMute = value;
+
+                if (set) {
+                    if (value) {
+                        this.useAgora.setVolume(0);
+                    } else {
+                        this.useAgora.setVolume(this.voiceValue);
+                    }
+                }
+
+            }
+
+
+
+        }
+
+    },
+
+    mounted(){
+        this.useAgora = this.getUseAgora();
+        this.voiceValue = this.useAgora.volume;
+    }
+
+
+
+}

+ 16 - 3
src/pages/talking/components/room-footer/src/main.vue

@@ -1,12 +1,25 @@
 <template>
-  <footer class="room-footer">
-
+  <footer class="room-footer row aCenter">
+    <div class="room-footer-voice relative center">
+      <div class="absolute room-footer-slider aCenter">
+        <a-slider vertical v-model:value="voiceValue" @change="voiceChange" :max="100" :min="0" :step="1"   />
+      </div>
+      <img @click="toggleVoice()" :src="voiceMute?voiceIcon.disabled:voiceIcon.default" class="cursor-pointer room-footer-voice-icon" />
+    </div>
   </footer>
 </template>
 
 <script>
+import {
+  Slider
+} from 'ant-design-vue';
+import mixins from '../mixins';
 export default {
-  name: "room-footer"
+  name: "room-footer",
+  components:{
+    [Slider.name]:Slider
+  },
+  mixins
 }
 </script>
 

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

@@ -2,4 +2,45 @@
   height: 40px;
   background-color: rgba(0,0,0,0.2);
   margin: 10px -10px 0;
-}
+  padding: 0 10px;
+}
+
+/* 声音 */
+.room-footer-voice{
+  width: 30px;
+  height: 100%;
+}
+.room-footer-voice-icon{
+  @include square(20px);
+}
+.room-footer-slider::v-deep .ant-slider-vertical{
+  margin: 0;
+}
+.room-footer-slider{
+  left: 0;
+  right: 0;
+  width: 30px;
+  bottom: 40px;
+  height: 200px;
+  z-index: 999;
+  background-color: #fff;
+  border-radius: 25px;
+  padding: 15px 0 10px;
+  visibility: hidden;
+  opacity: 0;
+  transition: .3s;
+}
+.room-footer-voice:hover .room-footer-slider{
+  visibility: initial;
+  opacity: 1;
+}
+.room-footer-slider::v-deep .ant-slider-track{
+  background-color: $main;
+}
+.room-footer-slider::v-deep .ant-slider-handle{
+  border-color: $main !important;
+}
+.room-footer-slider::v-deep .ant-slider-handle:focus{
+  box-shadow: 0 0 0 0.05rem rgb(170 155 212 / 20%)
+}
+/* 声音 */

+ 22 - 3
src/pages/talking/components/room-info/components/room-audience/mixins/handle.ts

@@ -1,15 +1,34 @@
 export default <LibMixins>{
 
+    inject:['getRoomInfo','openUserInfo'],
+
     methods:{
 
         fetch(obj){
 
-            setTimeout(()=>{
-                obj.success([{},{},{},{},{},{},{},{}]);
-            });
+            return this.$request({
+                url:'room/get_room_alluser_list',
+                data:{
+                    rid: this.roomInfo.rid
+                },
+                page:obj.data,
+                token:true
+            }).then((data)=>{
+
+                data = data.data || {};
+
+                data = [...data.micro_user_list,...data.unmicro_user_list];
+
+                return obj.success(data);
+
+            }).catch(obj.fail);
 
         }
 
+    },
+
+    created() {
+        this.roomInfo = this.getRoomInfo();
     }
 
 }

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

@@ -5,19 +5,17 @@
       :security-size="10"
     >
       <template v-slot:item="{item,index}">
-        <aside class="room-audience-item rowACenter">
-          <v-image src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202005%2F20%2F20200520024521_zkkfs.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1626509828&t=81e25fe8173beb185db59bae74085b10" radius="50%"
-                   class="room-audience-avatar"
+        <aside class="room-audience-item rowACenter" >
+          <v-image :src="item.head_pic" radius="50%"
+                   class="room-audience-avatar cursor-pointer"
                    :border-width="2"
                    borderColor="#fff"
+                   @click.stop="openUserInfo($event,item)"
           ></v-image>
           <section class="flex-1 room-audience-content">
-            <div class="line-1">昵称昵称</div>
+            <div class="line-1 room-audience-username">{{item.nick_name}}</div>
             <section class="row">
-              <div class="room-audience-sex rowCenter">
-                <icon type="girl" class="room-audience-sex-icon"></icon>
-                <span>18</span>
-              </div>
+              <layout-sex :type="item.sex"></layout-sex>
             </section>
           </section>
         </aside>
@@ -33,13 +31,15 @@ import {
   icon,
   FlatList
 } from "$components";
+import layoutSex from '$layout/layout-sex';
 import mixins from '../mixins';
 export default {
   name: "room-audience",
   components: {
     vImage,
     icon,
-    FlatList
+    FlatList,
+    layoutSex
   },
   mixins
 }

+ 4 - 29
src/pages/talking/components/room-info/components/room-audience/style.scss

@@ -9,6 +9,7 @@
 .room-audience-item{
   height: 54px;
   margin-top: 20px;
+  width: 100%;
 }
 
 .room-audience-avatar-wrap{
@@ -19,38 +20,12 @@
 .room-audience-avatar{
   @include square(54px);
 }
-
+.room-audience-username{
+  margin-bottom: 8px;
+}
 
 .room-audience-content{
   margin-left: 10px;
   font-size: 16px;
   line-height: 20px;
 }
-
-.room-audience-sex{
-  margin-top: 8px;
-  height: 16px;
-  min-width: 36px;
-  width: auto;
-  border-radius: 8px;
-  background-color: #FE75CC;
-  font-size: 12px;
-  line-height: 16px;
-  padding: 0 5px;
-}
-
-.room-audience-sex-icon{
-  font-weight: bold;
-  font-size: 12px;
-  transform: scale(0.8);
-  margin-left: -2px;
-  margin-right: 2px;
-}
-
-.room-audience-sex span{
-  white-space: nowrap;
-}
-
-.room-audience-boy {
-  background-color: #5497F2;
-}

+ 2 - 1
src/pages/talking/components/room-info/mixins/index.ts

@@ -1,3 +1,4 @@
 import handle from './handle';
+import userList from './userList';
 
-export default [handle];
+export default [handle,userList];

+ 36 - 0
src/pages/talking/components/room-info/mixins/userList.ts

@@ -0,0 +1,36 @@
+export default {
+
+    // data(){
+    //   return {
+    //       userList:{
+    //
+    //       }
+    //   }
+    // },
+    //
+    // inject:['getRoomInfo'],
+    //
+    // methods:{
+    //
+    //     fetchUserList(){
+    //         return this.$request({
+    //             url:'room/get_room_user_list',
+    //             data:{
+    //                 rid: this.roomInfo.rid
+    //             },
+    //             page:obj,
+    //             token:true
+    //         }).then((data)=>{
+    //
+    //             console.log(data);
+    //         }).catch(obj.fail);
+    //     }
+    //
+    // },
+    //
+    // created(){
+    //     this.roomInfo = this.getRoomInfo();
+    //     this.fetchUserList();
+    // }
+
+}

+ 55 - 0
src/pages/talking/components/room-ranking/components/room-ranking-list/mixins/handle.ts

@@ -0,0 +1,55 @@
+export default <LibMixins>{
+
+    inject:['getRoomInfo','openUserInfo'],
+
+    data(){
+      return {
+          loadingObject:{},
+          userRankObject:{},
+          time:1
+      }
+    },
+
+    computed:{
+        userRank(){
+            return this.userRankObject[this.time] || [];
+        },
+        loadingStatus(){
+            return this.loadingObject[this.time] || false
+        }
+    },
+
+    methods:{
+        fetch(){
+            let time = this.time;
+            return this.$request({
+                url:'room/get_room_rank',
+                data:{
+                    rid:this.roomInfo.rid,
+                    time:time,
+                    type:this.type
+                },
+                next:({status})=> this.loadingObject[this.time] =status,
+                token:true,
+            }).then((data)=>{
+                if (data.isSuccess) {
+                    data.data = data.data || {};
+                    this.userRankObject[time] = data.data.list;
+                }
+            });
+        },
+
+        switchType(){
+            this.time = this.time === 1 ? 3 : 1;
+            if (this.userRankObject[this.time] === undefined && !this.loadingObject[this.time]) {
+                return this.fetch();
+            }
+        }
+    },
+
+    mounted() {
+        this.roomInfo = this.getRoomInfo();
+        this.fetch();
+    }
+
+}

+ 3 - 0
src/pages/talking/components/room-ranking/components/room-ranking-list/mixins/index.ts

@@ -0,0 +1,3 @@
+import handle from './handle';
+
+export default [handle];

+ 5 - 0
src/pages/talking/components/room-ranking/components/room-ranking-list/props.ts

@@ -3,6 +3,11 @@ export default {
     value:{
         type:Boolean,
         default: false
+    },
+
+    type:{
+        type:String,
+        default:'1'
     }
 
 }

+ 25 - 15
src/pages/talking/components/room-ranking/components/room-ranking-list/src/main.vue

@@ -2,8 +2,8 @@
   <section class="room-published-container">
 
     <header class="room-published flex">
-      <div class="rowACenter cursor-pointer">
-        <span>查看总榜</span>
+      <div @click="switchType" class="rowACenter cursor-pointer">
+        <span>{{ time === 1 ?'查看总榜':'查看日榜' }}</span>
         <icon type="more" class="room-published-more"></icon>
       </div>
     </header>
@@ -19,7 +19,9 @@
                  radius="50%"
                  :border-width="2"
                  :border-color="item.color"
-                 src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcdn.duitang.com%2Fuploads%2Fitem%2F201410%2F05%2F20141005142547_yBHec.thumb.700_0.jpeg&refer=http%3A%2F%2Fcdn.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1626579719&t=3a5cc6b134c676fd411508ad15d49ae7"
+                 :class="{'cursor-pointer': loadingStatus?false:userRank[index]}"
+                 @click.stop="openUserInfo($event,userRank[index])"
+                 :src="loadingStatus ? '' : userRank[index] && userRank[index].head_pic"
         >
           <img :src="item.icon" class="absolute user-ranking-crown" />
         </v-image>
@@ -27,8 +29,8 @@
           <img :src="item.trophyIcon" class="screen" />
           <div class="absolute user-ranking-trophy-number center">{{item.label}}</div>
         </div>
-        <div class="line-1 user-ranking-title">大脑袋</div>
-        <div class="line-1 user-ranking-number">16.3W</div>
+        <div class="line-1 user-ranking-title">{{loadingStatus ?'':userRank[index] ? userRank[index].nick_name:'虚位以待'}}</div>
+        <div class="line-1 user-ranking-number">{{loadingStatus ?'':userRank[index] && userRank[index].contribution_value || 0}}</div>
       </aside>
     </section>
 
@@ -38,17 +40,22 @@
         'height': (value ? defaultAllHeight : 0) +'px'
       }"
     >
-      <aside
-        v-for="(item,index) in defaultNumber"
-        :key="'user-ranking-item-'+index"
-        class="rowACenter user-ranking-default"
+      <template
+          v-for="(item,index) in defaultNumber"
       >
-        <div class="ranking-default-number">{{3+item}}</div>
-        <div class="flex-1">
-          <div class="line-1">用户的昵称</div>
-        </div>
-        <div>2.1W</div>
-      </aside>
+        <aside
+            :key="'user-ranking-item-'+index"
+            class="rowACenter user-ranking-default"
+            v-if="userRank[2+item]"
+        >
+          <div class="ranking-default-number">{{3+item}}</div>
+          <div class="flex-1">
+            <div class="line-1">{{ userRank[2+item].nick_name }}</div>
+          </div>
+          <div>{{ userRank[2+item].contribution_value }}</div>
+        </aside>
+      </template>
+
     </section>
 
     <!-- 展示或者不展示 -->
@@ -69,6 +76,7 @@ import {
   icon
 } from '$components';
 import orderData from '../data/order';
+import mixins from '../mixins';
 import {
   vImage
 } from "$components";
@@ -102,6 +110,8 @@ export default {
 
   },
 
+  mixins,
+
   props
 
 }

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

@@ -1,10 +1,12 @@
 export default [
     {
         label:'财富榜',
-        slot:'0'
+        slot:'0',
+        type:'1'
     },
     {
         label:'魅力榜',
-        slot:'1'
+        slot:'1',
+        type:'2'
     }
 ]

+ 1 - 0
src/pages/talking/components/room-ranking/src/main.vue

@@ -35,6 +35,7 @@
       >
         <room-ranking-list
           :key="'room-ranking-list-'+index"
+          :type="item.type"
           v-model:value="rankingShowStatus"
         ></room-ranking-list>
       </template>

+ 13 - 1
src/pages/talking/components/room-wheat/data/micro-control.ts

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

+ 31 - 6
src/pages/talking/components/room-wheat/src/main.vue

@@ -4,14 +4,15 @@
     <aside class="center">
       <header class="room-wheat-first">
         <aside v-if="!hostUser.mc_user_info || !hostUser.mc_user_info.uid" class="room-wheat-no-host rowACenter">
-          <div class="room-position-sofa overflow center"
+          <div class="room-position-sofa overflow center cursor-pointer"
+               @click="admin&&pressHostWheat()"
           >
             <svg t="1623981259638" class="room-sofa-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6372" width="200" height="200"><path :fill="sofaConfig[item] && sofaConfig[item].color || 'rgba(255,255,255,0.2)'" d="M175.88 393.07c0-0.59 0.01-1.17 0.03-1.72C182.12 178.26 411.3 124 513.33 124s331.22 54.26 337.42 267.35c0.02 0.73 0.03 1.51 0.02 2.33-0.13 11.23-7.91 20.7-18.11 22.05-18.72 2.48-34.46 8.54-47.09 18.18-15.08 11.51-33.14 34.08-33.55 76.27-0.22 23.2-4.51 38.45-12.74 45.32-18.7 15.61-68.93 0.5-113.55-11.54-67.59-18.24-146.95-22.82-224.17 0-44.37 13.11-94.85 27.14-113.55 11.54-8.23-6.87-12.52-22.12-12.74-45.32-0.41-42.19-18.47-64.76-33.55-76.27-12.75-9.73-28.67-15.82-47.61-18.25-10.41-1.34-18.27-11.13-18.23-22.59zM903.16 483c-4.88-7.36-12.3-12.25-20.52-13.61-0.04-0.01-0.07-0.01-0.11-0.02-31.77-5.23-56.49-2.59-69.6 7.44-5.51 4.21-12.86 12.31-13.07 33.91-0.39 40.71-10.71 68.95-31.54 86.34-15.29 12.76-33.91 17.54-54.73 17.54-29.91 0-64.45-9.47-99.96-20.05-58.65-17.47-126.58-18.86-199.95 0-60.77 15.62-117.44 33.61-154.69 2.51-20.83-17.39-31.15-45.63-31.54-86.34-0.21-21.62-7.57-29.72-13.09-33.93-13.23-10.1-38.21-12.69-70.33-7.3l-0.16 0.03c-8.22 1.39-15.64 6.31-20.5 13.69-21.39 32.48-24.21 95.17-6.29 180.66 17.01 81.15 33.33 117.93 40.95 138.49 6.49 17.51 14.05 46.95 46.47 46.95h49.59v25.81c0 13.81 11.19 25 25 25s25-11.19 25-25v-25.81h413.36v25.81c0 13.81 11.19 25 25 25s25-11.19 25-25v-25.81h54.72c41.92 0 39.98-29.44 46.47-46.95 7.62-20.56 23.94-57.34 40.95-138.49 17.96-85.67 15.09-148.45-6.43-180.87z" p-id="6373"></path></svg>
           </div>
           <div class="room-wheat-label center">主持</div>
         </aside>
         <aside v-else class="rowACenter room-wheat-host-user">
-          <v-image backgroundColor="transparent" :src="hostUser.mc_user_info.head_pic" class="room-wheat-first-avatar" radius="50%"></v-image>
+          <v-image @click.stop="openUserInfo($event,hostUser.mc_user_info)" backgroundColor="transparent" :src="hostUser.mc_user_info.head_pic" class="room-wheat-first-avatar cursor-pointer" radius="50%"></v-image>
           <div class="flex-1 room-wheat-first-content">
             <div class="rowACenter">
               <div>{{hostUser.mc_user_info.nick_name}}</div>
@@ -46,7 +47,7 @@
                  'cursor-pointer':admin
                }"
           >
-            <svg t="1624530336830" v-if="microUsers[index] && microUsers[index].mc_status===1" class="room-sofa-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2663" width="200" height="200"><path :fill="sofaConfig[item] && sofaConfig[item].color || 'rgba(255,255,255,0.2)'" d="M713.04314 394.841279l-33.486639 0 0-67.070491c0-93.874947-73.742441-167.623528-167.620458-167.623528-93.777733 0-167.572362 73.748581-167.572362 167.623528l0 67.070491-33.533711 0c-36.82466 0-67.019326 30.147594-67.019326 66.965091l0 335.251148c0 36.817497 30.194666 66.965091 67.019326 66.965091l402.212146 0c36.922897 0 67.069468-30.147594 67.069468-66.965091L780.111584 461.806369C780.113631 424.989896 749.966037 394.841279 713.04314 394.841279M511.937067 696.500388c-36.820567 0-67.019326-30.194666-67.019326-67.067421 0-36.875825 30.198759-67.070491 67.019326-67.070491 36.920851 0 67.070491 30.194666 67.070491 67.070491C579.007558 666.306746 548.857917 696.500388 511.937067 696.500388M615.877243 394.841279l-207.830211 0 0-67.070491c0-57.006285 46.933892-103.892081 103.889011-103.892081 57.053357 0 103.9412 46.885797 103.9412 103.892081L615.877243 394.841279z" p-id="2664"></path></svg>
+            <svg t="1624530336830" v-if="microUsers[index] && microUsers[index].mc_status===WheatUseStatus.lock" class="room-sofa-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2663" width="200" height="200"><path :fill="sofaConfig[item] && sofaConfig[item].color || 'rgba(255,255,255,0.2)'" d="M713.04314 394.841279l-33.486639 0 0-67.070491c0-93.874947-73.742441-167.623528-167.620458-167.623528-93.777733 0-167.572362 73.748581-167.572362 167.623528l0 67.070491-33.533711 0c-36.82466 0-67.019326 30.147594-67.019326 66.965091l0 335.251148c0 36.817497 30.194666 66.965091 67.019326 66.965091l402.212146 0c36.922897 0 67.069468-30.147594 67.069468-66.965091L780.111584 461.806369C780.113631 424.989896 749.966037 394.841279 713.04314 394.841279M511.937067 696.500388c-36.820567 0-67.019326-30.194666-67.019326-67.067421 0-36.875825 30.198759-67.070491 67.019326-67.070491 36.920851 0 67.070491 30.194666 67.070491 67.070491C579.007558 666.306746 548.857917 696.500388 511.937067 696.500388M615.877243 394.841279l-207.830211 0 0-67.070491c0-57.006285 46.933892-103.892081 103.889011-103.892081 57.053357 0 103.9412 46.885797 103.9412 103.892081L615.877243 394.841279z" p-id="2664"></path></svg>
             <svg t="1623981259638" v-else class="room-sofa-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6372" width="200" height="200"><path :fill="sofaConfig[item] && sofaConfig[item].color || 'rgba(255,255,255,0.2)'" d="M175.88 393.07c0-0.59 0.01-1.17 0.03-1.72C182.12 178.26 411.3 124 513.33 124s331.22 54.26 337.42 267.35c0.02 0.73 0.03 1.51 0.02 2.33-0.13 11.23-7.91 20.7-18.11 22.05-18.72 2.48-34.46 8.54-47.09 18.18-15.08 11.51-33.14 34.08-33.55 76.27-0.22 23.2-4.51 38.45-12.74 45.32-18.7 15.61-68.93 0.5-113.55-11.54-67.59-18.24-146.95-22.82-224.17 0-44.37 13.11-94.85 27.14-113.55 11.54-8.23-6.87-12.52-22.12-12.74-45.32-0.41-42.19-18.47-64.76-33.55-76.27-12.75-9.73-28.67-15.82-47.61-18.25-10.41-1.34-18.27-11.13-18.23-22.59zM903.16 483c-4.88-7.36-12.3-12.25-20.52-13.61-0.04-0.01-0.07-0.01-0.11-0.02-31.77-5.23-56.49-2.59-69.6 7.44-5.51 4.21-12.86 12.31-13.07 33.91-0.39 40.71-10.71 68.95-31.54 86.34-15.29 12.76-33.91 17.54-54.73 17.54-29.91 0-64.45-9.47-99.96-20.05-58.65-17.47-126.58-18.86-199.95 0-60.77 15.62-117.44 33.61-154.69 2.51-20.83-17.39-31.15-45.63-31.54-86.34-0.21-21.62-7.57-29.72-13.09-33.93-13.23-10.1-38.21-12.69-70.33-7.3l-0.16 0.03c-8.22 1.39-15.64 6.31-20.5 13.69-21.39 32.48-24.21 95.17-6.29 180.66 17.01 81.15 33.33 117.93 40.95 138.49 6.49 17.51 14.05 46.95 46.47 46.95h49.59v25.81c0 13.81 11.19 25 25 25s25-11.19 25-25v-25.81h413.36v25.81c0 13.81 11.19 25 25 25s25-11.19 25-25v-25.81h54.72c41.92 0 39.98-29.44 46.47-46.95 7.62-20.56 23.94-57.34 40.95-138.49 17.96-85.67 15.09-148.45-6.43-180.87z" p-id="6373"></path></svg>
           </div>
           <div class="room-position-title line-1">{{sofaConfig[item] && sofaConfig[item].title || item+' 号麦'}}</div>
@@ -81,6 +82,9 @@ import microControl from '../data/micro-control';
 import mixins from '../mixins';
 import props from '../props';
 import popup from "$utils/tool/popup";
+import {
+  WheatUseStatus
+} from '../../../const/wheat';
 export default {
   name: "room-wheat",
   components:{
@@ -91,11 +95,12 @@ export default {
 
   data(){
     return {
-      sofaConfig
+      sofaConfig,
+      WheatUseStatus
     }
   },
 
-  inject:['openUserInfo','applyForWheat'],
+  inject:['openUserInfo','applyForWheat','lockForWheat'],
 
   computed:{
 
@@ -117,12 +122,32 @@ export default {
   methods:{
 
     pressForWheat(index){
+
+      let useItem = this.microUsers[index];
+
+      microControl.map((item)=>{
+        if (item.key) {
+          item.label = item.labels[useItem[item.key]];
+        }
+      });
+
       popup.$select({
         data:microControl,
         confirm:(item)=>{
-          this[item.trigger] && this[item.trigger](index);
+
+          let trigger = item.trigger;
+          if (item.key) {
+            let value = useItem[item.key];
+            trigger = item.trigger[value];
+          }
+
+          this[trigger] && this[trigger](index);
         }
       });
+    },
+
+    pressHostWheat(){
+      this.applyForWheat && this.applyForWheat(undefined,true);
     }
 
   }

+ 14 - 3
src/pages/talking/const/wheat.ts

@@ -1,13 +1,24 @@
 enum RowWheat {
 
     // 待加入
-    none,
+    none=2,
 
     // 排麦中
-    queuing,
+    queuing=1,
 
     // 已上麦
-    wheat
+    wheat=3
+}
+
+enum WheatUseStatus {
+    // 锁麦
+    lock=1,
+    // 正常
+    normal=2
+}
+
+export {
+    WheatUseStatus
 }
 
 export default RowWheat

+ 13 - 9
src/pages/talking/mixins/handle.ts

@@ -1,10 +1,6 @@
 import {InstructionsCacheType, InstructionsMessageType} from "$utils/request";
 import user from "$config/user";
 
-import cate from '$config/cate';
-
-import * as SVGA from 'svgaplayerweb';
-
 export default <LibMixins>{
 
 
@@ -18,10 +14,15 @@ export default <LibMixins>{
     },
 
     computed:{
+      // 用户是否为房主
+      isHomeowners(){
+          let uid = user.uid();
+          return this.roomInfo.room_owner_uid === uid;
+      },
       // 用户目前是否为 管理员
       isAdmin(){
           let uid = user.uid();
-          return (this.roomInfo.room_admin_uid || '').indexOf(user.uid()) >= 0 && uid;
+          return (this.roomInfo.room_admin_uid || '').indexOf(uid) >= 0 && uid || this.isHomeowners;
       },
       // 主持麦位是否有人
       hostMicroIsHave(){
@@ -47,7 +48,7 @@ export default <LibMixins>{
                     },
                     token:true,
                     cache:{
-                        type: InstructionsCacheType.memory
+                        type: InstructionsCacheType.storage
                     },
                     failMessage:true,
                     message:InstructionsMessageType.other
@@ -75,7 +76,9 @@ export default <LibMixins>{
                 },
                 token:true
             }).then((data)=>{
-                console.log(data);
+                if (data.isSuccess) {
+                    this.setMicroStatus(data.data.in_mc_queue);
+                }
             });
         },
 
@@ -87,7 +90,7 @@ export default <LibMixins>{
                   rid: this.$params.rid
               },
               cache:{
-                  type: InstructionsCacheType.memory
+                  type: InstructionsCacheType.storage
               },
               token:true
           }).then((data)=>{
@@ -97,16 +100,17 @@ export default <LibMixins>{
 
         // 获取麦位详情
         getRoomMicroInfo(){
+
             return this.$request({
                 url:'room/get_room_micro_info',
                 data:{
                     rid: this.$params.rid
                 },
                 token:true,
+                failMessage:true,
                 cache:{
                     type: InstructionsCacheType.storage
                 },
-                failMessage:true,
                 message:InstructionsMessageType.other
             }).then((data)=>{
                 this.microInfo = data.data;

+ 8 - 2
src/pages/talking/mixins/index.ts

@@ -1,8 +1,14 @@
+// 获取页面参数
 import params from '$mixins/params';
+// 页面数据加载
 import handle from './handle';
-import control from './control';
+// 麦位处理
+import wheat from './wheat';
+// 多人聊天
 import agora from "./agora";
+// 麦位设置
 import micro from './micro';
+// 基础功能
 import utils from './utils';
 
-export default [params,handle,control,agora,micro,utils];
+export default [params,handle,wheat,agora,micro,utils];

+ 6 - 0
src/pages/talking/mixins/micro.ts

@@ -22,6 +22,12 @@ export default <LibMixins>{
             this.micro_info = resultData;
         },
 
+        // 查看当前麦位是否空缺
+        getMicroInfo(index:number) {
+            let mcList = this.microInfo.mc_list || [];
+            return mcList[index];
+        },
+
         // 查看用户是否出现在麦位信息中
         hasMicroInfo(){
             if (user.isLogin()) {

+ 67 - 17
src/pages/talking/mixins/control.ts → src/pages/talking/mixins/wheat.ts

@@ -18,9 +18,12 @@ export default <LibMixins>{
     provide(){
         return {
             openUserInfo:(event,userInfo)=> this.openUserInfo(event,userInfo),
-            applyForWheat:(index:number|undefined)=> this.applyForWheat(index),
+            applyForWheat:(index:number|undefined,host:boolean=false)=> this.applyForWheat(index,host),
             exitForWheat:()=> this.exitForWheat(),
-            cancelForWheat:()=> this.cancelForWheat()
+            cancelForWheat:()=> this.cancelForWheat(),
+            getRoomInfo: ()=> this.roomInfo,
+            getUseAgora:()=> this.useAgora || {},
+            lockForWheat:(index)=>this.lockForWheat(index)
         }
     },
 
@@ -28,15 +31,18 @@ export default <LibMixins>{
 
         // 打开用户信息
         openUserInfo(event,userInfo){
-            popup.$popup.open(PopupExportComponent.user,{
-                el:event,
-                value:true,
-                item:userInfo
-            });
+            if (userInfo && userInfo.uid) {
+                popup.$popup.open(PopupExportComponent.user,{
+                    el:event,
+                    value:true,
+                    item:userInfo
+                });
+            }
+
         },
 
         // 申请上麦
-        applyForWheat(index:number|undefined){
+        applyForWheat(index:number|undefined,host:boolean=false){
 
             if (this.wheat_status === RowWheat.queuing) {
                 return  popup.$toast('正在排麦中');
@@ -44,7 +50,7 @@ export default <LibMixins>{
                 // 如果为管理员触发
                 if (this.isAdmin) {
                     return popup.$confirm({
-                        title: this.wheat_status === RowWheat.none ? '是否上麦?' :'是否切换麦位?',
+                        title: host ? '是否上主持位?' : this.wheat_status === RowWheat.none ? '是否上麦?' :'是否切换麦位?',
                         successAsyncText:'上麦成功',
                         confirm:()=>{
 
@@ -53,7 +59,7 @@ export default <LibMixins>{
                             if (index != null) {
                                 return new Promise<boolean>( (resolve, reject)=> {
                                     return this.$request({
-                                        url:'room/user_up_micro',
+                                        url:host ? 'room/host_up_micro' : 'room/user_up_micro',
                                         data:{
                                             rid: this.$params.rid,
                                             micro_id:typeof index === 'number'?index:''
@@ -64,11 +70,18 @@ export default <LibMixins>{
                                         message: InstructionsMessageType.other
                                     }).then((data)=>{
                                         if (data.isSuccess) {
-                                            this.downMicro({
-                                                index,
-                                                user:user.user
-                                            });
-                                            return resolve(true);
+                                            resolve(true);
+
+                                            if (host) {
+                                                this.updateHostMicro(user.user);
+                                            } else {
+                                                this.downMicro({
+                                                    index,
+                                                    user:user.user
+                                                });
+                                            }
+
+
                                         } else {
                                             resolve(false);
                                         }
@@ -100,7 +113,7 @@ export default <LibMixins>{
                                         if (data.isSuccess) {
                                             // 设置状态为排麦中
                                             this.setMicroStatus(RowWheat.queuing);
-                                            return resolve(true);
+                                            resolve(true);
                                         } else {
                                             resolve(false);
                                         }
@@ -171,7 +184,42 @@ export default <LibMixins>{
                             }).then((data)=>{
                                 if (data.isSuccess) {
                                     this.setMicroStatus(RowWheat.none);
-                                    return resolve(true);
+                                    resolve(true);
+                                } else {
+                                    resolve(false);
+                                }
+                            }).catch(reject);
+                        });
+                    }
+                });
+            }
+        },
+
+        // 是否锁麦
+        lockForWheat(index:number=0){
+
+            if (this.lockForWheatStatus) return;
+
+            if (index) {
+                popup.$confirm({
+                    title: '是否锁麦?',
+                    successAsyncText: '锁麦成功',
+                    confirm:()=>{
+                        return new Promise((resolve, reject)=>{
+                            return this.$request({
+                                url:'room/lock_room_micro',
+                                data:{
+                                    rid: this.$params.rid,
+                                    micro_id:index
+                                },
+                                token:true,
+                                failMessage:true,
+                                next:({status})=> this.lockForWheatStatus = status,
+                                message: InstructionsMessageType.other
+                            }).then((data)=>{
+                                if (data.isSuccess) {
+
+                                    resolve(true);
                                 } else {
                                     resolve(false);
                                 }
@@ -180,6 +228,8 @@ export default <LibMixins>{
                     }
                 });
             }
+
+
         }
 
     }

+ 2 - 0
src/pages/talking/src/main.vue

@@ -6,11 +6,13 @@
     <section class="flex-1 container" :style="{background:'url('+roomInfo.room_background_image+') 0 0'}">
       <section class="flex talking-content screen">
         <section class="row flex-1 talking-content-container">
+
           <room-info :info="roomInfo" :admin="isAdmin" :status="wheat_status"></room-info>
           <section class="talking-center flex">
             <room-wheat
               :info="roomInfo"
               :microInfo="microInfo"
+              :admin="isAdmin"
             ></room-wheat>
             <div class="flex-1"></div>
             <room-gift></room-gift>

+ 11 - 1
src/popup/popup-detail/components/gift-banner/mixins/handle.ts

@@ -61,7 +61,17 @@ export default <LibMixins>{
                     popup.$confirm({
                         title:'是否赠送'+value+'个'+(item.gift_name)+'?',
                         confirm:()=>{
-                            console.log('赠送');
+
+                            this.$request({
+                                url:'gift/send_gift',
+                                token:true,
+                                data:{
+                                    pack:2,
+                                    num: value,
+                                    gid:item.gid
+                                }
+                            })
+
                         }
                     });
 

+ 8 - 8
src/popup/popup-personal/components/my-gift/data/data.ts

@@ -6,12 +6,12 @@ export default [
         label:'财富值',
         style:'pink'
     },
-    {
-        label:'下单等级',
-        style:'yellow'
-    },
-    {
-        label:'获得礼物数量',
-        style:'blue'
-    }
+    // {
+    //     label:'下单等级',
+    //     style:'yellow'
+    // },
+    // {
+    //     label:'获得礼物数量',
+    //     style:'blue'
+    // }
 ] as LibDataArray

+ 1 - 1
src/popup/popup-personal/props.ts

@@ -8,7 +8,7 @@ export default {
     // 默认选中的
     page:{
         type: String,
-        default:'myDressUp'
+        default:'myGift'
     }
 
 }

+ 10 - 0
src/popup/popup-ranking/components/ranking-list/props.ts

@@ -1,3 +1,13 @@
 export default {
 
+    type:{
+        type:String,
+        default:'1'
+    },
+
+    time:{
+        type:String,
+        default:'1'
+    }
+
 }

+ 55 - 29
src/popup/popup-ranking/components/ranking-list/src/main.vue

@@ -1,39 +1,44 @@
 <template>
   <section class="screen ranking-list-container">
 
-    <template
-        v-for="(item,index) in 6"
-        :key="'ranking-item-'+item"
+    <flat-list
+      @fetch="fetch"
+      :paging="false"
     >
-      <aside class="ranking-list-item rowACenter"
+      <template v-slot:item="{item,index}">
+        <section class="ranking-list-width">
+          <aside class="ranking-list-item rowACenter"
+                 :class="{
+                'ranking-item-front': rankingData[index]
+              }"
+                 :key="'ranking-item-'+index"
+          >
+            <div class="ranking-list-number-wrap">
+              <img v-if="rankingData[index]" :src="rankingData[index].icon" class="ranking-list-number-icon" />
+              <div v-else class="ranking-list-number center">{{index + 1}}</div>
+            </div>
 
-             :class="{
-        'ranking-item-front': rankingData[index]
-      }"
-      >
-        <div class="ranking-list-number-wrap">
-          <img v-if="rankingData[index]" :src="rankingData[index].icon" class="ranking-list-number-icon" />
-          <div v-else class="ranking-list-number center">{{item}}</div>
-        </div>
+            <layout-avatar class="ranking-list-avatar" :dressPlaySrc="item.avatar_play_image" :src="item.head_pic" radius="50%"></layout-avatar>
 
-        <v-image class="ranking-list-avatar" radius="50%"></v-image>
+            <div class="flex-1 ranking-list-content">
+              <header class="rowACenter">
+                <div class="ranking-list-username line-1">{{item.nick_name}}</div>
+                <layout-sex :type="item.sex"></layout-sex>
+              </header>
+              <div class="ranking-list-id">ID:{{ item.uid }}</div>
+            </div>
 
-        <div class="flex-1 ranking-list-content">
-          <header class="rowACenter">
-            <div class="ranking-list-username line-1">甜甜的密码</div>
-            <layout-sex></layout-sex>
-          </header>
-          <div class="ranking-list-id">ID:10087</div>
-        </div>
+            <article class="center">
+              <div class="ranking-list-value">{{item.rank_value}}</div>
+              <div class="ranking-list-introduce">财富值</div>
+            </article>
+          </aside>
+          <div v-if="rankingData[index] && rankingData[index].line" class="ranking-item-line"></div>
+        </section>
+      </template>
 
-        <article class="center">
-          <div class="ranking-list-value">25.8w</div>
-          <div class="ranking-list-introduce">财富值</div>
-        </article>
+    </flat-list>
 
-      </aside>
-      <div v-if="rankingData[index] && rankingData[index].line" class="ranking-item-line"></div>
-    </template>
 
 
   </section>
@@ -41,11 +46,13 @@
 
 <script>
 import {
-  vImage
+  vImage,
+  FlatList
 } from '$components';
 import props from '../props';
 import rankingData from '../data/ranking';
 import layoutSex from '$layout/layout-sex';
+import layoutAvatar from '$layout/layout-avatar';
 export default {
   name: "ranking-tab",
   data(){
@@ -53,10 +60,29 @@ export default {
       rankingData
     }
   },
+
+  methods:{
+    fetch(obj){
+      return this.$request({
+        url:'room/get_user_rank',
+        data:{
+          time: this.time,
+          type: this.type
+        },
+        token:true
+      }).then((data)=>{
+        data.data = data.data || {};
+        return obj.success(data.data.list || []);
+      }).catch(obj.fail);
+    }
+  },
+
   props,
   components:{
     vImage,
-    layoutSex
+    layoutSex,
+    FlatList,
+    layoutAvatar
   }
 }
 </script>

+ 3 - 0
src/popup/popup-ranking/components/ranking-list/style.scss

@@ -37,6 +37,9 @@
 /* 头像 */
 
 /* 内容信息部分 */
+.ranking-list-width{
+  width: 100%;
+}
 .ranking-list-content,.ranking-list-value{
   font-size: 14px;
   line-height: 18px;

+ 6 - 3
src/popup/popup-ranking/components/ranking-tab/data/tab.ts

@@ -1,14 +1,17 @@
 export default [
     {
         label:'日榜',
-        slot:'0'
+        slot:'0',
+        time:'1'
     },
     {
         label: '周榜',
-        slot:'1'
+        slot:'1',
+        time:'2'
     },
     {
         label: '总榜',
-        slot:'2'
+        slot:'2',
+        time:'3'
     }
 ]

+ 5 - 0
src/popup/popup-ranking/components/ranking-tab/props.ts

@@ -1,3 +1,8 @@
 export default {
 
+    type:{
+        type:String,
+        default:'1'
+    }
+
 }

+ 2 - 0
src/popup/popup-ranking/components/ranking-tab/src/main.vue

@@ -29,6 +29,8 @@
     >
       <ranking-list
         :key="'use-ranking-tab-'+index"
+        :type="type"
+        :time="item.time"
       ></ranking-list>
     </template>
   </tab>

+ 9 - 6
src/popup/popup-ranking/data/tab.ts

@@ -1,14 +1,17 @@
 export default [
     {
         label:'财富榜',
-        slot:'0'
+        slot:'0',
+        type:'1'
     },
     {
         label: '魅力榜',
-        slot:'1'
+        slot:'1',
+        type:'2'
     },
-    {
-        label: '等级榜',
-        slot:'2'
-    }
+    // {
+    //     label: '等级榜',
+    //     slot:'2',
+    //     type:'3'
+    // }
 ]

+ 1 - 0
src/popup/popup-ranking/src/main.vue

@@ -47,6 +47,7 @@
           >
             <ranking-tab
               :key="'tanking-tab-'+index"
+              :type="item.type"
             ></ranking-tab>
           </template>
 

+ 15 - 4
src/popup/popup-user/mixins/handle.ts

@@ -10,8 +10,8 @@ export default <LibMixins>{
         return {
             vValue:false,
             vItem:{},
-            width: unit.unitPx(120),
-            height:unit.unitPx(110),
+            width: unit.unitPx(300),
+            height:unit.unitPx(300),
             vX:0,
             vY:0,
             diff:10
@@ -99,8 +99,19 @@ export default <LibMixins>{
 
             if (el && this.value) {
 
-                this.setTargetValue(el.clientX - el.layerX,'vX');
-                this.setTargetValue(el.clientY - el.layerY,'vY');
+                let offsetWidth = (el.target && el.target.offsetWidth || 0);
+                let x = el.clientX - el.offsetX + offsetWidth;
+                let y = el.clientY - el.offsetY;
+                if (y + this.height >= window.innerHeight) {
+                    y = window.innerHeight - this.height;
+                }
+
+                if (x + this.width >= window.innerWidth) {
+                    x -=  this.width + offsetWidth;
+                }
+
+                this.setTargetValue(x,'vX');
+                this.setTargetValue(y,'vY');
 
             }
             

+ 20 - 5
src/utils/agora/agora.ts

@@ -1,4 +1,4 @@
-import AgoraRTC, {IAgoraRTCClient} from "agora-rtc-sdk-ng"
+import AgoraRTC, {IAgoraRTCClient, IMicrophoneAudioTrack, IRemoteAudioTrack} from "agora-rtc-sdk-ng"
 
 import config from './config';
 
@@ -11,6 +11,13 @@ export default class Agora extends Notice{
     // 设置当前客户端
     private client:IAgoraRTCClient= undefined;
 
+    // 默认收集的声音
+    public volume:number = 100;
+
+    private microphoneTrack:IMicrophoneAudioTrack;
+
+    private remoteAudioTrack:IRemoteAudioTrack;
+
     // 创建客户端语音对象
     constructor(channel:string,uid:string | null) {
         super();
@@ -41,9 +48,9 @@ export default class Agora extends Notice{
         // 表示本次订阅的是音频。
         if (mediaType === "audio") {
             // 订阅完成后,从 `user` 中获取远端音频轨道对象。
-            const remoteAudioTrack = user.audioTrack;
+            this.remoteAudioTrack = user.audioTrack;
             // 播放音频因为不会有画面,不需要提供 DOM 元素的信息。
-            remoteAudioTrack.play();
+            this.remoteAudioTrack.play();
         }
     }
 
@@ -64,11 +71,11 @@ export default class Agora extends Notice{
                 // 设置当前状态为加入订阅中
                 this.setStatus(AgoraStatus.joinPublished);
 
-                const microphoneTrack = await AgoraRTC.createMicrophoneAudioTrack();
+                this.microphoneTrack = await AgoraRTC.createMicrophoneAudioTrack();
                 // 移除所有监听
                 this.client.unpublish();
                 // 发布订阅
-                this.client.publish([microphoneTrack]).then(()=>{
+                this.client.publish([this.microphoneTrack]).then(()=>{
                     this.setStatus(AgoraStatus.published);
                     resolve();
                 }).catch(()=>{
@@ -92,6 +99,14 @@ export default class Agora extends Notice{
         }
     }
 
+    // 设置远端采集
+    setVolume(value){
+       if (this.volume !== value) {
+           this.volume = value;
+           this.remoteAudioTrack && this.remoteAudioTrack.setVolume(value);
+       }
+    }
+
     // 设置当前所处于的状态
     public status:AgoraStatus = AgoraStatus.none;
     // 设置当前状态

+ 2 - 1
src/views/view-menu/mixins/index.ts

@@ -1,3 +1,4 @@
 import trigger from '$mixins/trigger';
+import ranking from './ranking';
 
-export default [trigger];
+export default [trigger,ranking];

+ 24 - 0
src/views/view-menu/mixins/ranking.ts

@@ -0,0 +1,24 @@
+export default {
+
+    data(){
+        return {
+            rankingUseData:[]
+        }
+    },
+
+    methods:{
+        fetchRanking(){
+            return this.$request({
+                url:'room/get_user_rank_top'
+            }).then((data)=>{
+                data.data = data.data || {};
+                this.rankingUseData = data.data.user_charm_rank_list || [];
+            })
+        }
+    },
+
+    created() {
+        this.fetchRanking();
+    }
+
+}

+ 1 - 0
src/views/view-menu/src/main.vue

@@ -24,6 +24,7 @@
             :border-width="2"
             :border-color="item.color"
             backgroundColor="#fff"
+            :src="rankingUseData[index] && rankingUseData[index].head_pic"
         ></v-image>
         <img src="@/assets/images/ranking-1.png" v-if="index===0" class="absolute view-ranking-crown" />
       </div>

+ 4 - 1
src/views/view-talking-header/data/control.ts

@@ -1,12 +1,15 @@
 import {FunctionTrigger,DownTrigger,LocationTrigger} from '$mixins/trigger/class/index';
 
-import popup from "$utils/tool/popup";
+import popup, {PopupExportComponent} from "$utils/tool/popup";
 
 export default <LibDataArray>[
     {
         label:'排行榜',
         icon:require('../images/ranking.png'),
         defaultIcon: require('../images/ranking-default.png'),
+        trigger: new FunctionTrigger(function (){
+            return popup.$open(PopupExportComponent.ranking);
+        })
     },
     {
         label:'找陪玩',