laosan2382995021@163.com 3 rokov pred
rodič
commit
8059f60f91
100 zmenil súbory, kde vykonal 836 pridanie a 242 odobranie
  1. BIN
      bugs/PC端巧鱼谷歌测试.docx
  2. BIN
      bugs/pc陪玩-王垚 1.doc
  3. BIN
      bugs/pc陪玩-王垚.doc
  4. BIN
      bugs/pc陪玩bug-钱丽.docx
  5. BIN
      bugs/周-陪玩.zip
  6. BIN
      bugs/周-陪玩/11.jpg
  7. BIN
      bugs/周-陪玩/12.png
  8. BIN
      bugs/周-陪玩/13.jpg
  9. BIN
      bugs/周-陪玩/2.jpg
  10. BIN
      bugs/周-陪玩/3.png
  11. BIN
      bugs/周-陪玩/5.jpg
  12. BIN
      bugs/周-陪玩/9.png
  13. BIN
      bugs/巧鱼问题反馈.docx
  14. BIN
      bugs/陪玩 bug 许犇.docx
  15. BIN
      bugs/陪玩测试-吕.docx
  16. 2 2
      public/index.html
  17. 2 6
      src/App.vue
  18. 10 0
      src/components/empty-item/data/icon.ts
  19. BIN
      src/components/empty-item/images/empty.png
  20. 6 1
      src/components/empty-item/props.ts
  21. 20 4
      src/components/empty-item/src/main.vue
  22. 10 1
      src/components/empty-item/style.scss
  23. 6 1
      src/components/flat-list/props.ts
  24. 2 4
      src/components/flat-list/src/main.vue
  25. 2 2
      src/components/flat-list/style.scss
  26. 1 2
      src/components/svg-animate/src/main.vue
  27. 25 7
      src/config/config.ts
  28. 2 1
      src/config/plugs/index.ts
  29. 64 0
      src/config/plugs/socket.ts
  30. 3 0
      src/layout/layout-animate-microphone/index.ts
  31. 8 0
      src/layout/layout-animate-microphone/props.ts
  32. 35 0
      src/layout/layout-animate-microphone/src/main.vue
  33. 32 0
      src/layout/layout-animate-microphone/style.scss
  34. 2 1
      src/layout/layout-avatar/src/main.vue
  35. 6 3
      src/layout/layout-chat/mixins/handle.ts
  36. 5 4
      src/layout/layout-chat/src/main.vue
  37. 2 0
      src/layout/layout-chat/style.scss
  38. 3 2
      src/layout/layout-entry/data/about.ts
  39. 1 2
      src/layout/layout-order-item/mixins/handle.ts
  40. 1 2
      src/layout/layout-order-receive-item/mixins/handle.ts
  41. 1 1
      src/layout/layout-play/src/main.vue
  42. 1 1
      src/layout/layout-status/const/status.ts
  43. 6 2
      src/layout/layout-status/src/main.vue
  44. 1 1
      src/layout/layout-user-status/src/main.vue
  45. 16 0
      src/mixins/order/data/socket.ts
  46. 29 2
      src/mixins/order/index.ts
  47. 20 7
      src/mixins/order/update.ts
  48. 5 5
      src/mixins/pay/index.ts
  49. 2 2
      src/mixins/pay/mixins/alipay.ts
  50. 2 2
      src/mixins/pay/mixins/weChat.ts
  51. 1 5
      src/pages/talking/components/room-info/mixins/handle.ts
  52. 2 1
      src/pages/talking/components/room-wheat/mixins/follow.ts
  53. 2 1
      src/pages/talking/components/room-wheat/mixins/index.ts
  54. 21 0
      src/pages/talking/components/room-wheat/mixins/volume.ts
  55. 13 4
      src/pages/talking/components/room-wheat/src/main.vue
  56. 1 0
      src/pages/talking/components/room-wheat/style.scss
  57. 0 6
      src/pages/talking/mixins/agora.ts
  58. 24 5
      src/pages/talking/mixins/handle.ts
  59. 17 11
      src/pages/talking/mixins/micro.ts
  60. 11 4
      src/pages/talking/mixins/socket.ts
  61. 1 0
      src/popup/popup-chat/components/chat-content/components/chat-emoji/style.scss
  62. 1 1
      src/popup/popup-chat/components/chat-content/mixins/follow.ts
  63. 38 17
      src/popup/popup-chat/components/chat-content/mixins/handle.ts
  64. 5 3
      src/popup/popup-chat/components/chat-content/mixins/scroll.ts
  65. 12 9
      src/popup/popup-chat/components/chat-content/mixins/userInfo.ts
  66. 5 4
      src/popup/popup-chat/components/chat-content/src/main.vue
  67. 12 3
      src/popup/popup-comment/mixins/handle.ts
  68. 7 1
      src/popup/popup-confirm/props.ts
  69. 2 2
      src/popup/popup-confirm/src/main.vue
  70. 1 0
      src/popup/popup-detail/components/game/components/comment-list/src/main.vue
  71. 1 0
      src/popup/popup-detail/components/game/components/gift-wall/src/main.vue
  72. 1 1
      src/popup/popup-detail/components/game/src/main.vue
  73. 0 1
      src/popup/popup-export/global.ts
  74. 9 0
      src/popup/popup-export/src/main.vue
  75. 10 0
      src/popup/popup-login/components/login/props.ts
  76. 13 4
      src/popup/popup-login/components/login/src/main.vue
  77. 2 1
      src/popup/popup-login/components/register/mixins/index.ts
  78. 10 0
      src/popup/popup-login/components/register/props.ts
  79. 6 5
      src/popup/popup-login/components/register/src/main.vue
  80. 22 0
      src/popup/popup-login/data/control.ts
  81. 3 1
      src/popup/popup-login/mixins/handle.ts
  82. 2 1
      src/popup/popup-login/src/main.vue
  83. 4 1
      src/popup/popup-message/const/type.ts
  84. 5 0
      src/popup/popup-message/data/type.ts
  85. 20 10
      src/popup/popup-order/mixins/handle.ts
  86. 6 6
      src/popup/popup-order/src/main.vue
  87. 2 2
      src/popup/popup-recharge/mixins/handle.ts
  88. 3 3
      src/popup/popup-user/mixins/follow.ts
  89. 1 1
      src/popup/popup-user/mixins/handle.ts
  90. 82 18
      src/store/modules/chat.ts
  91. 37 33
      src/store/modules/user.ts
  92. 4 1
      src/types/config.d.ts
  93. 16 1
      src/utils/agora/agora.ts
  94. 3 1
      src/utils/agora/const.ts
  95. 9 1
      src/utils/control/order/const/order.ts
  96. 16 1
      src/utils/control/order/data/updateConfig.ts
  97. 15 1
      src/utils/control/order/index.ts
  98. 2 0
      src/utils/control/personal-detail/index.ts
  99. 2 2
      src/utils/request/config.ts
  100. 21 1
      src/utils/request/instructions/plugins/control.ts

BIN
bugs/PC端巧鱼谷歌测试.docx


BIN
bugs/pc陪玩-王垚 1.doc


BIN
bugs/pc陪玩-王垚.doc


BIN
bugs/pc陪玩bug-钱丽.docx


BIN
bugs/周-陪玩.zip


BIN
bugs/周-陪玩/11.jpg


BIN
bugs/周-陪玩/12.png


BIN
bugs/周-陪玩/13.jpg


BIN
bugs/周-陪玩/2.jpg


BIN
bugs/周-陪玩/3.png


BIN
bugs/周-陪玩/5.jpg


BIN
bugs/周-陪玩/9.png


BIN
bugs/巧鱼问题反馈.docx


BIN
bugs/陪玩 bug 许犇.docx


BIN
bugs/陪玩测试-吕.docx


+ 2 - 2
public/index.html

@@ -5,10 +5,10 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <link rel="stylesheet" type="text/css" href="./font/font.css" />
-    <title>巧鱼</title>
       <!-- 压缩版 -->
       <script src="https://cdn.ronghub.com/RongEmoji-2.2.7.min.js"></script>
+    <link rel="stylesheet" type="text/css" href="./font/font.css" />
+    <title>巧鱼</title>
 
       <script>
           var inputContent = {

+ 2 - 6
src/App.vue

@@ -13,8 +13,7 @@
 <script>
 import {layoutEntry} from '$layout';
 import config from '$config/config';
-import user from "$config/user";
-import socket from '$utils/socket/index';
+import plugs from '$config/plugs';
 export default {
 
   components:{
@@ -22,10 +21,7 @@ export default {
   },
 
   created() {
-    config.register(this);
-    if (user.isLogin()) {
-      socket.install(user.user)
-    }
+    config.register(this,plugs);
   }
 
 }

+ 10 - 0
src/components/empty-item/data/icon.ts

@@ -0,0 +1,10 @@
+export default {
+
+    // 消息
+    'message':{
+        icon: require('../images/empty.png'),
+        ratio:0.11,
+        size:180
+    }
+
+}

BIN
src/components/empty-item/images/empty.png


+ 6 - 1
src/components/empty-item/props.ts

@@ -1,5 +1,10 @@
 export default {
 
+    icon:{
+      type:String,
+      default:''
+    },
+
     size:{
         type: Number,
         default: 80
@@ -22,4 +27,4 @@ export default {
         default:'暂无数据'
     }
 
-}
+}

+ 20 - 4
src/components/empty-item/src/main.vue

@@ -1,7 +1,9 @@
 <template>
-  <section class="screen center">
+  <section class="screen center" :class="['empty-item-'+icon]">
+    <img v-if="config" :src="config.icon" :style="{height:svgSize,width:svgSize}" />
     <svg
          :style="{height:svgSize,width:svgSize}"
+         v-else
          viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7927" width="200" height="200"><path d="M544 0C281.6 0 64 217.6 64 480S281.6 960 544 960 1024 742.4 1024 480 806.4 0 544 0z m0 896C313.6 896 128 710.4 128 480S313.6 64 544 64 960 249.6 960 480 774.4 896 544 896z m-128-512h-128c-19.2 0-32-12.8-32-32s12.8-32 32-32h128c19.2 0 32 12.8 32 32s-12.8 32-32 32z m416-32c0 19.2-12.8 32-32 32h-128c-19.2 0-32-12.8-32-32s12.8-32 32-32h128c19.2 0 32 12.8 32 32z m-128 384c0 19.2-12.8 32-32 32s-32-12.8-32-32c0-51.2-44.8-96-96-96S448 684.8 448 736c0 19.2-12.8 32-32 32s-32-12.8-32-32C384 646.4 454.4 576 544 576s160 70.4 160 160z" :fill="color" p-id="7928"></path></svg>
     <div class="empty-title"
       :style="{fontSize:fontSize,color:color}"
@@ -12,15 +14,29 @@
 <script>
 import props from '../props';
 import unit from '$utils/unit/unit';
+import iconData from '../data/icon';
 export default {
   name: "empty-item",
 
   computed:{
     svgSize(){
-      return unit.unitRem(this.size);
+      if (this.config) {
+        return unit.unitRem(this.config.size || this.size);
+      } else {
+        return unit.unitRem(this.size);
+      }
+
     },
     fontSize(){
-      return unit.unitRem(this.size * this.ratio);
+
+      if (this.config) {
+        return unit.unitRem((this.config.size || this.size) * (this.config.ratio || this.ratio));
+      } else {
+        return unit.unitRem(this.size * this.ratio);
+      }
+    },
+    config(){
+      return iconData[this.icon];
     }
   },
 
@@ -28,4 +44,4 @@ export default {
 }
 </script>
 
-<style scoped lang="scss" src="../style.scss"></style>
+<style scoped lang="scss" src="../style.scss"></style>

+ 10 - 1
src/components/empty-item/style.scss

@@ -3,4 +3,13 @@
   text-align: center;
   margin-top: 10px;
 }
-/* 空视图 */
+/* 空视图 */
+
+/* message */
+.empty-item-message{
+  margin-top: -30px;
+}
+.empty-item-message .empty-title{
+  margin-top: 0;
+}
+/* message */

+ 6 - 1
src/components/flat-list/props.ts

@@ -36,6 +36,11 @@ export default {
       default:undefined
     },
 
+    emptyColor:{
+      type:String,
+     default:'rgba(255,255,255,0.5)'
+    },
+
     // 距离底部多远触发
     lowerThreshold:{
         type:Number,
@@ -54,4 +59,4 @@ export default {
         default:'暂无数据'
     }
 
-}
+}

+ 2 - 4
src/components/flat-list/src/main.vue

@@ -1,8 +1,6 @@
 <template>
-
   <!-- 最外层模块 -->
   <section class="screen">
-
     <aside
       class="screen center"
       :style="{paddingBottom:occupancySize}"
@@ -14,7 +12,7 @@
         </path>
       </svg>
 
-      <empty-item v-else-if="status === constStatus.none" :empty-text="emptyText"></empty-item>
+      <empty-item v-else-if="status === constStatus.none" :color="emptyColor" :empty-text="emptyText"></empty-item>
 
     </aside>
     <slot v-else-if="!start" name="page">
@@ -71,4 +69,4 @@ export default {
 }
 </script>
 
-<style scoped lang="scss" src="../style.scss"></style>
+<style scoped lang="scss" src="../style.scss"></style>

+ 2 - 2
src/components/flat-list/style.scss

@@ -7,7 +7,7 @@
   flex-shrink: 0;
 }
 .flat-list-loading path,.flat-list-footer-loading path{
-  fill: $main;
+  fill: $main !important;
 }
 /* 加载中 */
 
@@ -32,4 +32,4 @@
   line-height: 24px;
   color: #fe2d46;
 }
-/* 底部模块 */
+/* 底部模块 */

+ 1 - 2
src/components/svg-animate/src/main.vue

@@ -84,7 +84,7 @@ export default {
           useSrc = useSrc[0];
         }
 
-        useSrc = 'http://localhost:8080/svga/'+this.play_src.split('/').pop();
+        // useSrc = 'http://localhost:8080/svga/'+this.play_src.split('/').pop();
 
         this.parser.load(useSrc || this.play_src, (videoItem)=>{
           this.player.loops = count;  // 设置循环播放次数是1
@@ -94,7 +94,6 @@ export default {
             this.player.setContentMode(this.mode);
           }
 
-
           this.player.startAnimation();
 
         },()=>{

+ 25 - 7
src/config/config.ts

@@ -1,29 +1,47 @@
+
 export default <Config>{
 
     baseApiURL:'/api',
 
-    baseURL:'http://newqiaoyu.lanmaonet.com/',
+    baseURL:'https://newqiaoyu.lanmaonet.com/',
     // baseURL:'http://newqiaoyu.com/',
 
     app:undefined,
 
     useRoutesName:[],
 
+    globalRTMIM: undefined,
+
     emoji:[],
 
-    register(vm){
-        vm.$store.dispatch('initializationUserPromise');
+    plugs:[],
+
+    plugRegister(){
+        // 注册
+        // @ts-ignore
+        this.plugs.map((item)=> item.register && item.register(this));
+    },
+
+    plugInstall(plugs){
+
+        this.plugs = plugs;
+        // 注册
+        // @ts-ignore
+        this.plugs.map((item)=> item.install && item.install(this));
+    },
+
+    register(vm,plugs){
+        vm.$store.dispatch('initializationUserPromise').then(()=>this.plugRegister()).catch(()=>this.plugRegister());
         vm.$store.dispatch('initializationPayPromise');
+
         // @ts-ignore
         window.RongIMLib.RongIMEmoji.init();
         // @ts-ignore
         this.emoji = RongIMLib.RongIMEmoji.list;
         this.app = vm;
 
-        // 安装插件
-        import('./plugs').then((plugs)=>{
-            plugs.default && plugs.default.map((item)=> item.install && item.install());
-        });
+        this.plugInstall(plugs);
+
     }
 
 }

+ 2 - 1
src/config/plugs/index.ts

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

+ 64 - 0
src/config/plugs/socket.ts

@@ -0,0 +1,64 @@
+import user from "$config/user";
+import socket from "$utils/socket";
+import config from "$config/config";
+import store from '@/store/index';
+import AgoraRTMIM,{AgoraRTMessage} from "$utils/socket/agoraRTM/agoraRTMIM";
+import popup from "$utils/tool/popup";
+
+export default {
+
+    install(){
+        if (user.isLogin()) {
+            if (!config.globalRTMIM ) {
+                config.globalRTMIM = new AgoraRTMIM();
+            }
+
+        }
+    },
+
+    register(config){
+
+        if (user.isLogin()) {
+            // 链接用户socket
+            socket.install(user.user).then().catch(function () {
+                // 重试一次重新连接
+                return socket.install(user.user);
+            });
+
+            if (!config.globalRTMIM) {
+                config.globalRTMIM = new AgoraRTMIM();
+            }
+
+
+            // 装载全服消息
+            config.globalRTMIM.install('global_channel');
+
+            // 装载监听登录消息
+            config.globalRTMIM.on(AgoraRTMessage.loginOut,function (data) {
+                store.dispatch('updateUserMoneyPromise',false).then(()=>{
+                    popup.$loginOut('',false);
+                }).catch(()=>{
+                    popup.$loginOut('',false);
+                });
+
+            });
+        }
+    },
+
+    uninstall(){
+        // 卸载 socket
+        socket.uninstall();
+
+        // 卸载全局监听流
+        config.globalRTMIM && config.globalRTMIM.destroy();
+
+        config.globalRTMIM = undefined;
+
+        // 销毁登录
+        AgoraRTMIM.destroy();
+
+        // 清楚消息
+        store.commit('clearSession');
+    }
+
+}

+ 3 - 0
src/layout/layout-animate-microphone/index.ts

@@ -0,0 +1,3 @@
+import main from './src/main.vue';
+
+export default main;

+ 8 - 0
src/layout/layout-animate-microphone/props.ts

@@ -0,0 +1,8 @@
+export default {
+
+    volume:{
+        type:Number,
+        default: 0
+    }
+
+}

+ 35 - 0
src/layout/layout-animate-microphone/src/main.vue

@@ -0,0 +1,35 @@
+<template>
+  <div v-show="useVolume>0" class="absolute layout-microphone-container center">
+    <div class="overflow relative layout-microphone-volume">
+      <div class="absolute"
+           :style="{height:useVolume+'%'}"
+      ></div>
+    </div>
+    <svg t="1627614047725" class="layout-animate-microphone" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2727" width="200" height="200">
+<!--      <path d="M489.73913 667.826087h44.52174c97.947826 0 178.086957-80.13913 178.086956-178.086957V178.086957c0-97.947826-80.13913-178.086957-178.086956-178.086957h-44.52174c-97.947826 0-178.086957 80.13913-178.086956 178.086957v311.652173c0 97.947826 80.13913 178.086957 178.086956 178.086957zM400.695652 178.086957c0-48.973913 40.069565-89.043478 89.043478-89.043479h44.52174c48.973913 0 89.043478 40.069565 89.043478 89.043479v311.652173c0 48.973913-40.069565 89.043478-89.043478 89.043479h-44.52174c-48.973913 0-89.043478-40.069565-89.043478-89.043479V178.086957z" fill="#50BC93" p-id="2728"></path>-->
+      <path d="M868.173913 512c0-24.486957-20.034783-44.521739-44.521739-44.521739s-44.521739 20.034783-44.521739 44.521739c0 122.434783-120.208696 222.608696-267.130435 222.608696S244.869565 634.434783 244.869565 512c0-24.486957-20.034783-44.521739-44.521739-44.521739s-44.521739 20.034783-44.521739 44.521739c0 158.052174 135.791304 289.391304 311.652174 309.426087V934.956522H289.391304c-24.486957 0-44.521739 20.034783-44.521739 44.521739s20.034783 44.521739 44.521739 44.521739h445.217392c24.486957 0 44.521739-20.034783 44.521739-44.521739s-20.034783-44.521739-44.521739-44.521739h-178.086957v-113.530435c175.86087-20.034783 311.652174-151.373913 311.652174-309.426087z" fill="#50BC93" p-id="2729"></path></svg>
+<!--    -->
+  </div>
+</template>
+
+<script>
+import props from '../props';
+export default {
+  name: "layout-animate-microphone",
+  props,
+  computed:{
+    useVolume(){
+      if (this.volume > 2) {
+
+        let volume = this.volume * 2;
+        volume =  volume<20 ? 20 : volume;
+        return volume > 90 ? 90 :volume;
+      } else {
+        return 0;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss" src="../style.scss"></style>

+ 32 - 0
src/layout/layout-animate-microphone/style.scss

@@ -0,0 +1,32 @@
+.layout-microphone-container{
+  bottom:-10px;
+  right: -10px;
+  @include square(30px);
+  background-color: #FF6969;
+  border-radius: 50%;
+}
+
+.layout-animate-microphone{
+  @include square(15px);
+  margin-top: 1px;
+}
+
+$microphone: #fff;
+.layout-animate-microphone path {
+  fill: $microphone;
+}
+
+.layout-microphone-volume{
+  width: 6px;
+  height: 11px;
+  border-radius: 10px;
+  flex-shrink: 0;
+  background-color: $microphone;
+  margin-bottom: -10px;
+}
+.layout-microphone-volume div{
+  background-color: #00D5AF;
+  transition: .3s;
+  bottom: 0;
+  width: 100%;
+}

+ 2 - 1
src/layout/layout-avatar/src/main.vue

@@ -6,6 +6,7 @@
         <v-image :src="dressSrc" mode="scaleToFill" backgroundColor="transparent" class="screen"></v-image>
       </div>
     </v-image>
+    <slot></slot>
   </div>
 </template>
 
@@ -25,4 +26,4 @@ export default {
 }
 </script>
 
-<style scoped lang="scss" src="../style.scss"></style>
+<style scoped lang="scss" src="../style.scss"></style>

+ 6 - 3
src/layout/layout-chat/mixins/handle.ts

@@ -1,5 +1,6 @@
 
 import MessageType from "$utils/socket/const/messageType";
+import html from "$utils/tool/html";
 
 export default <LibMixins>{
 
@@ -20,13 +21,15 @@ export default <LibMixins>{
         },
 
         message(){
-            if (this.item.message) {
-                let message = this.item.message;
+            let message = this.item.content || this.item.message;
+            if (message) {
 
+                message = html.encodeHTML(message);
                 // @ts-ignore
-                return window.RongIMLib.RongIMEmoji.symbolToEmoji(message.replace(/[\n\r]/g,function () {
+                return  window.RongIMLib.RongIMEmoji.symbolToEmoji(message.replace(/[\n\r]/g,function () {
                     return '<br />';
                 }));
+
             } else {
                 return  '';
             }

+ 5 - 4
src/layout/layout-chat/src/main.vue

@@ -1,10 +1,10 @@
 <template>
-  <section class="layout-chat row"
+  <section class="layout-chat row overflow"
     :class="{
       'layout-chat-reverse':reverse
     }"
   >
-    <v-image class="layout-chat-avatar" :src="user.head_pic" radius="50%"></v-image>
+    <v-image class="layout-chat-avatar" backgroundColor="transparent" :src="user.head_pic" radius="50%"></v-image>
     <aside class="flex-1 layout-chat-content relative rowACenter">
       <div v-if="item.type === MessageType.gift && item.gift" class="layout-chat-message relative row aCenter">
         <span>赠送</span>
@@ -13,7 +13,8 @@
         <span>{{item.number}}</span>
         <v-image mode="center" :src="item.gift.base_image" backgroundColor="transparent" class="layout-chat-gift"></v-image>
       </div>
-      <div v-else class="layout-chat-message relative" v-html="message"></div>
+      <div v-else-if="item.type === MessageType.text" class="layout-chat-message relative" v-html="message"></div>
+      <div class="layout-chat-message relative" v-else>{{MessageType.noSupper}}</div>
     </aside>
   </section>
 </template>
@@ -36,4 +37,4 @@ export default {
 }
 </script>
 
-<style scoped lang="scss" src="../style.scss"></style>
+<style scoped lang="scss" src="../style.scss"></style>

+ 2 - 0
src/layout/layout-chat/style.scss

@@ -7,6 +7,7 @@
 /* 用户头像 */
 .layout-chat-avatar{
   @include square(40px);
+  flex-shrink: 0;
 }
 /* 用户头像 */
 
@@ -15,6 +16,7 @@
   margin-left: 6px;
   min-height: 40px;
   padding-left: 10px;
+  max-width: 600px;
 }
 .layout-chat-message{
   padding: 7px 10px;

+ 3 - 2
src/layout/layout-entry/data/about.ts

@@ -1,15 +1,16 @@
 import {LocationTrigger} from "$mixins/trigger/class";
+import url from "$utils/tool/url";
 
 export default {
 
     data:<LibDataArray>[
         {
             label:'关于我们',
-            trigger: new LocationTrigger('https://www.baidu.com')
+            trigger: new LocationTrigger(url.addBaseURL('index.php/index/index/page_show?id=2'))
         },
         {
             label:'用户协议',
-            trigger: new LocationTrigger('https://www.baidu.com')
+            trigger: new LocationTrigger(url.addBaseURL('index.php/index/index/page_show?id=6'))
         }
     ],
 

+ 1 - 2
src/layout/layout-order-item/mixins/handle.ts

@@ -28,8 +28,7 @@ export default <LibMixins>{
                            },
                            token:true,
                            message:true,
-                           failMessage:true,
-                           loading:'确认中'
+                           failMessage:true
                        }).then((data)=>{
                            resolve(false);
                            if (data.isSuccess) {

+ 1 - 2
src/layout/layout-order-receive-item/mixins/handle.ts

@@ -28,8 +28,7 @@ export default <LibMixins>{
                            },
                            token:true,
                            message:true,
-                           failMessage:true,
-                           loading:'接单中'
+                           failMessage:true
                        }).then((data)=>{
                            resolve(false);
                            if (data.isSuccess) {

+ 1 - 1
src/layout/layout-play/src/main.vue

@@ -65,7 +65,7 @@
         </div>
         <div class="rowACenter play-game-container">
           <div class="play-game flex-1"><div class="line-1">{{item.game_name}}</div></div>
-          <span class="play-price-group"><span>{{price}}</span>/局</span>
+          <span class="play-price-group"><span>{{price}}</span>/局</span>
         </div>
       </aside>
     </div>

+ 1 - 1
src/layout/layout-status/const/status.ts

@@ -1,7 +1,7 @@
 enum PlayStatus {
 
     // 在线
-    onLine1=1,
+    onLine=1,
 
     // 离线
     offLine=0,

+ 6 - 2
src/layout/layout-status/src/main.vue

@@ -8,7 +8,7 @@
       <div class="status-onLine-icon"></div>
       <div>在线</div>
     </div>
-    <div v-else-if="status === PlayStatus.offLine"
+    <div v-else
          class="status-offLine rowACenter"
     >离线</div>
   </section>
@@ -29,8 +29,12 @@ export default {
     }
   },
 
+  created() {
+    console.log(this.PlayStatus);
+  },
+
   props
 }
 </script>
 
-<style scoped lang="scss" src="../style.scss"></style>
+<style scoped lang="scss" src="../style.scss"></style>

+ 1 - 1
src/layout/layout-user-status/src/main.vue

@@ -5,7 +5,7 @@
       <span>语聊中</span>
       <icon type="more" class="user-status-more"></icon>
     </div>
-    <div v-else-if="item.is_business" class="row aCenter">
+    <div v-else-if="item.is_business===1" class="row aCenter">
       <i class="user-icon"></i>
       <span>在线</span>
     </div>

+ 16 - 0
src/mixins/order/data/socket.ts

@@ -0,0 +1,16 @@
+import {OrderPayUseStatus,OrderPayStatus, OrderStatus} from "$utils/control/order/const/order";
+import {AgoraRTMessage} from "$utils/socket/agoraRTM/agoraRTMIM";
+
+export default {
+
+    [OrderStatus.placeOrder]:{
+      watch: AgoraRTMessage.order,
+      key:'player_uid'
+    },
+
+    [OrderStatus.receivingOrder]:{
+        watch: AgoraRTMessage.playOrder,
+        key:'uid'
+    }
+
+}

+ 29 - 2
src/mixins/order/index.ts

@@ -3,11 +3,24 @@ import {OrderUpdateOperation} from "$utils/control/order/const/operation";
 
 import orderControl from '$utils/control/order';
 
+import socketConfig from './data/socket';
+import config from "$config/config";
+
 export default {
 
     provide(){
       return {
-          updateOrderStatus:(item:Record<string, any>,status:OrderPayStatus)=> this.updateOrderStatus(item,status),
+          updateOrderStatus:(item:Record<string, any>,status:OrderPayStatus)=> {
+
+              if (this.config && this.config.watch) {
+                  orderControl.sendOrder(status,{
+                      order: item,
+                      uid: item[this.config.key]
+                  },this.config.watch);
+              }
+
+              return this.updateOrderStatus(item,status);
+          },
       }
     },
 
@@ -40,6 +53,20 @@ export default {
         // 执行配置
         this.updateConfig = orderControl.getUpdateConfig(this.orderStatus);
 
+        this.config = socketConfig[this.orderStatus] || {};
+
+        if (this.config.watch && config.globalRTMIM) {
+
+            config.globalRTMIM.on(this.config.watch,({data})=> this.updateOrderStatus(data.order,data.status));
+
+        }
+
+    },
+
+    beforeUnmount() {
+        if (this.config.watch && config.globalRTMIM) {
+            config.globalRTMIM.off(this.config.watch);
+        }
     }
 
-}
+}

+ 20 - 7
src/mixins/order/update.ts

@@ -18,22 +18,35 @@ export default <LibMixins>{
             if (data.type === OrderUpdateOperation.delete) {
                 return this.$refs[this.flatListRefName] && this.$refs[this.flatListRefName].flat_delete(data.id);
             } else if (data.type === OrderUpdateOperation.update) {
-                return this.$refs[this.flatListRefName] && this.$refs[this.flatListRefName].flat_update(data.id,this.setUpdateOrderStatus(data.item,data.status));
+                return this.$refs[this.flatListRefName] && this.$refs[this.flatListRefName].flat_update(data.id,this.setUpdateOrderStatus(data.item,data.status,data.id));
             } else if (data.type === OrderUpdateOperation.add) {
-                return this.$refs[this.flatListRefName] && this.$refs[this.flatListRefName].flat_unshift(data.id,this.setUpdateOrderStatus(data.item,data.status));
+                return this.$refs[this.flatListRefName] && this.$refs[this.flatListRefName].flat_unshift(data.id,this.setUpdateOrderStatus(data.item,data.status,data.id));
             }else if (data.type === OrderUpdateOperation.reload) {
                 return this.$refs[this.flatListRefName] && this.$refs[this.flatListRefName].reload(FlatListReload.start);
             }
         },
 
-        setUpdateOrderStatus(item,status:OrderPayStatus){
-            item = JSON.parse(JSON.stringify(item));
-            item.buttonGroup = orderControl.getButtonGroup(status,this.orderStatus);
-            item.statusName = orderControl.getStatusName(status,this.orderStatus);
+        setUpdateOrderStatus(item,status:OrderPayStatus,id){
+
+            try {
+                let resultItem = this.$refs[this.flatListRefName].flat_get_data(id);
+                if (resultItem) {
+                    item = JSON.parse(JSON.stringify(resultItem));
+                    item.buttonGroup = orderControl.getButtonGroup(status,this.orderStatus);
+                    item.statusName = orderControl.getStatusName(status,this.orderStatus);
+                }
+            } catch (e) {
+
+            }
+
 
             return item;
         }
 
+    },
+
+    created() {
+
     }
 
-}
+}

+ 5 - 5
src/mixins/pay/index.ts

@@ -24,11 +24,11 @@ export default <LibMixins>{
             }
         },
         payTotal(){
-            if (this.payOrder[this.payCheck] === 'balance' && this.$store.state.pay && this.$store.state.pay.payRatio) {
-                return  this.total * this.$store.state.pay.payRatio;
-            } else {
+            // if (this.payOrder[this.payCheck] === 'balance' && this.$store.state.pay && this.$store.state.pay.payRatio) {
+            //     return  this.total * this.$store.state.pay.payRatio;
+            // } else {
                 return this.total;
-            }
+            // }
         },
         payTotalFormat(){
             if (this.payOrder[this.payCheck] === 'balance' && this.$store.state.pay && this.$store.state.pay.payRatio) {
@@ -98,4 +98,4 @@ export default <LibMixins>{
 
     mixins
 
-}
+}

+ 2 - 2
src/mixins/pay/mixins/alipay.ts

@@ -65,7 +65,7 @@ export default {
                         this.$store.dispatch('updateUserMoneyPromise');
                         return this.paySuccessCallback && this.paySuccessCallback();
                     } else {
-                        popup.$toast('支付未成功');
+                        popup.$toast('支付未完成或支付暂时未到账');
                     }
                 }
 
@@ -76,4 +76,4 @@ export default {
 
     }
 
-}
+}

+ 2 - 2
src/mixins/pay/mixins/weChat.ts

@@ -103,8 +103,8 @@ export default {
 
         // 设置支付成功
         payWeChatSuccess(){
-            this.destroyWeChatPayPool();
             this.closePayWeChatPopup();
+            this.destroyWeChatPayPool();
             this.nowPayStatus = true;
             popup.closeConfirm();
             popup.$toast('支付成功');
@@ -126,4 +126,4 @@ export default {
         }
     }
 
-}
+}

+ 1 - 5
src/pages/talking/components/room-info/mixins/handle.ts

@@ -40,11 +40,7 @@ export default <LibMixins>{
                 if (this.info.room_background_id !== undefined) {
                     if(this.collect !== collect){
                         this.collect = collect;
-                        if (this._collect === undefined) {
-                            this._collect = collect;
-                        }
-
-                        return this.triggerCollect();
+                        update && this.triggerCollect();
                     }
                 }
             }

+ 2 - 1
src/pages/talking/components/room-wheat/mixins/follow.ts

@@ -42,7 +42,8 @@ export default {
                         },
                         token:true,
                         cache:{
-                            type: InstructionsCacheType.memory
+                            type: InstructionsCacheType.memory,
+                            id:'get_room_user_info_'+this.now_use_host_id
                         }
                     }).then((data)=>{
                         data = data.data || {};

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

@@ -1,3 +1,4 @@
 import user from '$mixins/user';
 import follow from './follow';
-export default [user,follow];
+import volume from './volume';
+export default [user,follow,volume];

+ 21 - 0
src/pages/talking/components/room-wheat/mixins/volume.ts

@@ -0,0 +1,21 @@
+import {AgoraEvent} from "$utils/agora/const";
+
+export default {
+
+    inject:['getUseAgora'],
+
+    data(){
+        return {
+            volumeObject:{}
+        }
+    },
+
+    created() {
+        this.useAgora = this.getUseAgora();
+
+        this.useAgora.on(AgoraEvent.volume,(data)=>{
+            this.volumeObject = data;
+        });
+    }
+
+}

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

@@ -20,7 +20,11 @@
                          :dress-src="hostUser.mc_user_info.avatar_base_image"
                          :dress-play-src="hostUser.mc_user_info.avatar_play_image"
                          radius="50%"
-          ></layout-avatar>
+          >
+            <layout-animate-micro-phone
+                :volume="volumeObject[hostUser.mc_user_info.uid] && volumeObject[hostUser.mc_user_info.uid].volume || 0"
+            ></layout-animate-micro-phone>
+          </layout-avatar>
           <div class="flex-1 room-wheat-first-content">
             <div class="rowACenter">
               <div>{{hostUser.mc_user_info.nick_name}}</div>
@@ -74,7 +78,11 @@
                 :dress-src="microUsers[index].mc_user_info.avatar_base_image"
                 :dress-play-src="microUsers[index].mc_user_info.avatar_play_image"
                 backgroundColor="transparent" class="screen cursor-pointer"
-                radius="50%" :src="microUsers[index].mc_user_info.head_pic"></layout-avatar>
+                radius="50%" :src="microUsers[index].mc_user_info.head_pic">
+              <layout-animate-micro-phone
+                :volume="volumeObject[microUsers[index].mc_user_info.uid] && volumeObject[microUsers[index].mc_user_info.uid].volume || 0"
+              ></layout-animate-micro-phone>
+            </layout-avatar>
           </div>
           <div class="room-position-title line-1">{{item}} {{microUsers[index].mc_user_info.nick_name}}</div>
           <div class="room-wheat-love rowACenter">
@@ -101,6 +109,7 @@ import microControl from '../data/micro-control';
 import mixins from '../mixins';
 import props from '../props';
 import popup from "$utils/tool/popup";
+import layoutAnimateMicroPhone from '$layout/layout-animate-microphone';
 import layoutAvatar from '$layout/layout-avatar';
 import {
   WheatUseStatus
@@ -109,7 +118,8 @@ export default {
   name: "room-wheat",
   components:{
     vImage,
-    layoutAvatar
+    layoutAvatar,
+    layoutAnimateMicroPhone
   },
   mixins,
   props,
@@ -160,7 +170,6 @@ export default {
         });
       }
 
-
     },
 
     pressHostWheat(){

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

@@ -7,6 +7,7 @@
 /* 容器 */
 
 /* 首麦 */
+
 .room-wheat-first{
   margin: 10px auto;
   width: auto;

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

@@ -20,12 +20,8 @@ export default <LibMixins>{
         // 订阅本频道
         this.useAgora = new Agora(this.$params.rid.toString(),user.uid() || null);
 
-
         this.agoraRTMIM = new AgoraRTMIM();
 
-        // 订阅全局频道
-        this.globalRTMIM = new AgoraRTMIM();
-
         // 监听设置状态
         this.useAgora.on(AgoraEvent.status,(item)=>{
             this.agoraStatus = item;
@@ -38,8 +34,6 @@ export default <LibMixins>{
         this.useAgora && this.useAgora.destroy();
         // 释放聊天
         this.agoraRTMIM && this.agoraRTMIM.destroy();
-        // 释放全服订阅
-        this.globalRTMIM && this.globalRTMIM.destroy();
     }
 
 }

+ 24 - 5
src/pages/talking/mixins/handle.ts

@@ -95,15 +95,11 @@ export default <LibMixins>{
 
         setRoomInfo(data,resolve,reject){
             this.roomInfo = data;
-
-            console.log(data);
             if (!this.setRoomInfoStatus && this.agoraRTMIM.status !== AgoraRTMIMStatus.join) {
                 this.setRoomInfoStatus = true;
                 // 安装 socket
                 this.agoraRTMIM.install(this.$params.rid.toString()).then(()=>{
                     this.sendSystem(data.room_welcome);
-                    // 装载全服消息
-                    this.globalRTMIM.install('global_channel');
                     resolve();
                 }).catch(reject);
             }
@@ -215,6 +211,26 @@ export default <LibMixins>{
             // // 获取用户入场特效
             // this.getUserAdmission();
         },
+
+        // 退出房间
+        outHome(){
+            this.$request({
+                url:'room/quit_room',
+                data:{
+                  rid: this.$params.rid
+                },
+                token:true
+            });
+            // 是否存在麦位上
+            if (this.inWheat) {
+                // 退出麦位
+                this.exitMicro(user.uid());
+                // 禁止此更新
+                clearTimeout(this.cacheMicroTime);
+                // 向大家发布信息
+                this.updateMicroCacheAwait();
+            }
+        }
     },
 
     mounted(){
@@ -224,8 +240,11 @@ export default <LibMixins>{
     created(){
         // new WebIM().install(this.$store.state.user.user);
         this.roomInfo = this.$params || {};
+    },
 
-
+    beforeUnmount() {
+        // 执行退出房间
+        this.outHome();
     }
 
 

+ 17 - 11
src/pages/talking/mixins/micro.ts

@@ -102,22 +102,24 @@ export default <LibMixins>{
 
             clearTimeout(this.cacheMicroTime);
             this.cacheMicroTime = setTimeout(()=>{
-                let cacheSign =cache.getSign('get_room_micro_info-'+this.$params.rid);
-
-                let cacheData = cache.getCache(cacheSign);
+                this.updateMicroCacheAwait(message);
+            },10);
 
-                // 更新缓存
-                if (cacheData && cacheData.data.data) {
-                    cacheData.data.data.data = this.microInfo;
-                    cache.updateCache(cacheSign,cacheData.data);
-                }
+        },
 
-                // 执行公布麦位消息
-                message && this.sendWheatInfo();
+        updateMicroCacheAwait(message:boolean=true){
+            let cacheSign =cache.getSign('get_room_micro_info-'+this.$params.rid);
 
-            },10);
+            let cacheData = cache.getCache(cacheSign);
 
+            // 更新缓存
+            if (cacheData && cacheData.data.data) {
+                cacheData.data.data.data = this.microInfo;
+                cache.updateCache(cacheSign,cacheData.data);
+            }
 
+            // 执行公布麦位消息
+            message && this.sendWheatInfo();
         },
 
         // 查看当前麦位是否空缺
@@ -255,6 +257,10 @@ export default <LibMixins>{
 
     created(){
         this.micro_info = {};
+    },
+
+    beforeUnmount() {
+        clearTimeout(this.cacheMicroTime);
     }
 
 }

+ 11 - 4
src/pages/talking/mixins/socket.ts

@@ -1,4 +1,5 @@
 import { AgoraRTMessage } from '$utils/socket/agoraRTM/agoraRTMIM';
+import config from "$config/config";
 export default {
 
     provide(){
@@ -82,9 +83,12 @@ export default {
         // 全服播报
         sendBroadCast(data){
 
-            let resultData = this.globalRTMIM.addGlobal(data,this.roomInfo);
+            if (config.globalRTMIM) {
+                let resultData = config.globalRTMIM.addGlobal(data,this.roomInfo);
+
+                return config.globalRTMIM.send(resultData,AgoraRTMessage.gift);
+            }
 
-            return this.globalRTMIM.send(resultData,AgoraRTMessage.gift);
         },
 
         // 向大家公布麦位信息
@@ -153,13 +157,16 @@ export default {
         });
 
         // 全服礼物播报
-        this.globalRTMIM.on(AgoraRTMessage.gift,({data})=>{
-            console.log(data,this.roomInfo);
+        config.globalRTMIM && config.globalRTMIM.on(AgoraRTMessage.gift,({data})=>{
             if (data.roomInfo && data.roomInfo.id !== this.roomInfo.rid) {
                 this.sendGiveBroadCastGift(data);
             }
         })
 
+    },
+
+    beforeUnmount() {
+        config.globalRTMIM && config.globalRTMIM.off(AgoraRTMessage.gift);
     }
 
 }

+ 1 - 0
src/popup/popup-chat/components/chat-content/components/chat-emoji/style.scss

@@ -7,6 +7,7 @@
   border-radius: 10px;
   bottom: 135px;
   left: 20px;
+  color: #666;
 }
 .chat-emoji-item{
   width: 40px;

+ 1 - 1
src/popup/popup-chat/components/chat-content/mixins/follow.ts

@@ -15,7 +15,7 @@ export default {
     methods:{
 
         setFollow(user){
-            this.control.follow = !!user.is_follow;
+            this.control.follow = user.is_follow === 2;
             this._followStatus = this.control.follow;
         },
 

+ 38 - 17
src/popup/popup-chat/components/chat-content/mixins/handle.ts

@@ -8,6 +8,8 @@ import user from '$config/user';
 import {NoticeType} from "$utils/socket/const";
 import giveGift from "$utils/control/giveGift";
 import personalDetail, {OpenType} from '$utils/control/personal-detail';
+import html from "$utils/tool/html";
+import {nextTick} from "vue";
 
 export default <LibMixins>{
 
@@ -20,7 +22,8 @@ export default <LibMixins>{
             message:'',
             messageData:[],
             loadingStatus:true,
-            opacity:0
+            opacity:0,
+            inputMessage:false
         }
     },
 
@@ -35,12 +38,12 @@ export default <LibMixins>{
           handler(){
             if (this.uid && this._uid !== this.uid) {
 
-
-
                 socket.off('chat-content',NoticeType.message,{
                     userId: (this._uid || '').toString()
                 });
 
+                this.message = '';
+
                 this._uid = this.uid;
 
                 this.userInfo = {};
@@ -93,8 +96,12 @@ export default <LibMixins>{
         watchMessage(item){
             // 清楚未读消息
             this.socketUser && this.socketUser.read();
-            this.messageData.push(this.getMessageItem(item));
-            return this.sendMessageScroll();
+            if (!item.isStatusMessage) {
+                this.messageData.push(this.getMessageItem(item));
+                return this.sendMessageScroll();
+            } else {
+            }
+
         },
 
         fetch() {
@@ -122,7 +129,7 @@ export default <LibMixins>{
 
         // 获取历史消息
         getMessages(obj){
-
+            clearTimeout(this.setOpacityTime);
             this.socketUser.getMessages({
                 timestamp: this.lastTime,
                 count:obj.data.pageSize
@@ -130,19 +137,23 @@ export default <LibMixins>{
                 if (obj.data.unique === this.requestUnique) {
                     data.list = data.list || [];
 
-                    // 最后的时间
-                    this.lastTime = data.list[data.list.length - 1] &&  data.list[data.list.length - 1].receivedTime;
+                    try {
+                        // 最后的时间
+                        this.lastTime = data.list[data.list.length - 1] &&  data.list[data.list.length - 1].receivedTime;
 
-                    data.list = data.list.map((item)=>{
-                        return this.getMessageItem(item);
-                    });
 
-                    this.messageData.unshift(...data.list);
+                        data.list = data.list.map((item)=>{
+                            return this.getMessageItem(item);
+                        });
 
+                        this.messageData.unshift(...data.list);
+                    } catch (e) {
+                        console.log(e);
+                    }
                     this.scrollToEnd(true);
-                }
-
 
+                    obj.success();
+                }
             }).catch(()=>{
                 obj.fail();
                 this.opacity = 1;
@@ -152,9 +163,17 @@ export default <LibMixins>{
         // 设置消息
         getMessageItem(item){
 
+            item = JSON.parse(JSON.stringify(item));
+
             let uid = item.senderUserId == user.uid() ? user.uid() : this.nowUserInfo.uid;
             let toUserId = item.senderUserId == user.uid() ? this.nowUserInfo.uid : user.uid();
 
+            if (!item.content.userInfo && item.content.user) {
+                item.content.userInfo = {};
+                item.content.userInfo[item.content.user.id] = item.content.user;
+            }
+
+
             return {
                 ...item.content,
                 type:item.messageType,
@@ -190,15 +209,17 @@ export default <LibMixins>{
 
             if (this.message && verification.trigger[VerificationType.empty](this.message)) {
 
+                let message = html.encodeHTML(this.message);
+
                 this.messageData.push({
-                    message:this.message,
+                    message:message,
                     type:MessageType.text,
                     uid:user.uid(),
                     toUserId: this.nowUserInfo.uid
                 });
 
                 this.sendMessageScroll();
-                this.sendText(this.message);
+                this.sendText(message);
 
                 this.message = '';
 
@@ -212,7 +233,7 @@ export default <LibMixins>{
                 this.socketUser.send({
                     messageType: MessageType.text, // 'RC:TxtMsg'
                     content:socket.addUser({
-                        message:message,
+                        content:message,
                     },this.nowUserInfo)
                 });
             }

+ 5 - 3
src/popup/popup-chat/components/chat-content/mixins/scroll.ts

@@ -13,12 +13,14 @@ export default <LibMixins>{
 
         },
 
-        scrollToEnd(setOpacity:boolean=false){
+        scrollToEnd(){
+            clearTimeout(this.setOpacityTime);
             nextTick(()=>{
+
                 this.$refs.scroll.scrollToEnd();
 
-                if (setOpacity && this.opactiy !== 1) {
-                    setTimeout(()=>{
+                if (this.opactiy !== 1) {
+                    this.setOpacityTime = setTimeout(()=>{
                         this.opacity = 1;
                     },16);
                 }

+ 12 - 9
src/popup/popup-chat/components/chat-content/mixins/userInfo.ts

@@ -64,7 +64,7 @@ export default {
                             if (gameList) {
                                 gameList = gameList.data.palyer_game_list || [];
                                 let unshiftData = undefined;
-                                gameList.map((item,index)=>{
+                                gameList.map((item)=>{
                                     if (this.pid && item.pid === this.pid) {
                                         unshiftData = item;
                                     }
@@ -78,16 +78,19 @@ export default {
                                 user.pid = this.pid || pid;
                                 user.is_player = !!user.pid;
 
-                                // 游戏列表
-                                let gameCate = this.$store.state.cate.gameCate || [];
-                                gameCate = gameCate[0] && gameCate[0].children || [];
-
-                                for (let i=0,count=gameCate.length;i<count;i++){
-                                    if (gameCate[i] && gameCate[i].game_name === user.gameItem.game_name) {
-                                        user.gameItem.gameInfo = gameCate[i];
-                                        break;
+                                if(unshiftData) {
+                                    // 游戏列表
+                                    let gameCate = this.$store.state.cate.gameCate || [];
+                                    gameCate = gameCate[0] && gameCate[0].children || [];
+                                    for (let i=0,count=gameCate.length;i<count;i++){
+                                        if (gameCate[i] && gameCate[i].game_name === user.gameItem.game_name) {
+                                            user.gameItem.gameInfo = gameCate[i];
+                                            break;
+                                        }
                                     }
                                 }
+
+
                             }
 
                             if (data.data[0]) {

+ 5 - 4
src/popup/popup-chat/components/chat-content/src/main.vue

@@ -1,9 +1,10 @@
 <template>
   <section class="screen relative" @click="hiddenModal">
-    <section class="screen flex">
+    <section class="screen flex" v-if="uid">
       <header class="chat-content-header rowACenter">
         <div class="flex-1 rowACenter">
           <layout-naming :nickName="nowUserInfo.nick_name" :naming="nowUserInfo.guanming"></layout-naming>
+          <span v-show="inputMessage">(输入中)</span>
           <layout-user-status
               class="chat-content-status cursor-pointer"
               v-if="nowUserInfo.is_player && nowUserInfo.stay_roominfo"
@@ -28,9 +29,9 @@
             <v-image v-if="nowUserInfo.gameItem.gameInfo && nowUserInfo.gameItem.gameInfo.game_ico" :src="nowUserInfo.gameItem.gameInfo.game_ico" class="chat-game-icon" backgroundColor="transparent" mode="center" />
             <div class="chat-game-name">{{nowUserInfo.gameItem.game_name}}</div>
             <div class="rowACenter chat-game-price-group">
-              <div class="chat-game-em">¥</div>
+<!--              <div class="chat-game-em">¥</div>-->
               <div class="chat-game-price">{{nowUserInfo.gameItem.price}}</div>
-              <div>/小时</div>
+              <div>/小时</div>
             </div>
             <div class="flex-1"></div>
             <stepper v-model:value="number" type="chat"></stepper>
@@ -84,7 +85,7 @@
           </article>
         </aside>
         <aside class="chat-content-user aCenter">
-          <v-image class="chat-content-avatar" :src="nowUserInfo.head_pic" radius="50%"></v-image>
+          <v-image class="chat-content-avatar" :key="nowUserInfo.head_pic" :src="nowUserInfo.head_pic" radius="50%"></v-image>
           <div class="chat-user-name">{{nowUserInfo.nick_name}}</div>
           <div class="chat-user-message">{{nowUserInfo.autograph}}</div>
           <section

+ 12 - 3
src/popup/popup-comment/mixins/handle.ts

@@ -11,7 +11,7 @@ export default <LibMixins>{
 
     methods:{
 
-        submit(callback){
+        submit(obj){
             return verification.verificationPromise(this.inputData,true).then((data)=>{
                 data.oid = this.oid;
                 data.uid = this.uid;
@@ -20,8 +20,17 @@ export default <LibMixins>{
                 this.$request({
                     url:'player/evaluate_order',
                     data,
-                    token:true
-                });
+                    token:true,
+                    message:true
+                }).then((data)=>{
+
+                    if (data.isSuccess) {
+                        return this.close();
+                    } else {
+                        return obj.none();
+                    }
+
+                }).catch(obj.fail);
             });
         }
 

+ 7 - 1
src/popup/popup-confirm/props.ts

@@ -16,6 +16,12 @@ export default {
         type:String
     },
 
+    // 是否显示取消按钮
+    cancelButtonStatus:{
+      type: Boolean,
+        default:true
+    },
+
     // 成功的按钮
     successAsyncText:{
         type:String
@@ -27,4 +33,4 @@ export default {
     },
 
 
-}
+}

+ 2 - 2
src/popup/popup-confirm/src/main.vue

@@ -10,7 +10,7 @@
       <article class="confirm-title">{{title}}</article>
 
       <section class="rowCenter">
-        <v-button v-if="!buttonAsync" @click="triggerCancel" class="confirm-button cancel-button">{{cancelText||'取消'}}</v-button>
+        <v-button v-if="!buttonAsync && cancelButtonStatus" @click="triggerCancel" class="confirm-button cancel-button">{{cancelText||'取消'}}</v-button>
         <v-button @submit-verify="triggerConfirm" :success-text="successAsyncText" @submit="triggerWaiting" class="confirm-button" :class="{'confirm-button-screen':buttonAsync}">{{confirmText||'确定'}}</v-button>
       </section>
     </div>
@@ -38,4 +38,4 @@ export default {
 }
 </script>
 
-<style scoped lang="scss" src="../style.scss"></style>
+<style scoped lang="scss" src="../style.scss"></style>

+ 1 - 0
src/popup/popup-detail/components/game/components/comment-list/src/main.vue

@@ -2,6 +2,7 @@
   <section :style="{height:height+'px'}" class="overflow">
     <flat-list
       @fetch="fetch"
+      emptyColor="#666"
     >
       <template v-slot:item="{item}">
         <aside class="comment-item rowACenter">

+ 1 - 0
src/popup/popup-detail/components/game/components/gift-wall/src/main.vue

@@ -4,6 +4,7 @@
         @fetch="fetch"
         :paging="false"
         emptyText="暂未收到礼物"
+        emptyColor="#666"
     >
       <template v-slot:page>
         <section class="screen">

+ 1 - 1
src/popup/popup-detail/components/game/src/main.vue

@@ -42,7 +42,7 @@
                         <span v-else-if="playStatus !== PlayStatus.playBefore">{{item.sound_duration}}s</span>
                       </div>
                     </div>
-                    <div class="game-price-group">¥<span>{{item.price * number}}</span>/局</div>
+                    <div class="game-price-group"><span>{{item.price * number}}</span>/局</div>
                   </section>
                   <section class="rowACenter game-option">
                     <aside

+ 0 - 1
src/popup/popup-export/global.ts

@@ -24,7 +24,6 @@ export default {
                     app.config.globalProperties[key] = popup[key];
                 }
             }
-
             // popup.$popup.open(PopupExportComponent.image,{
             //     src:'https://www.antdv.com/components/rate-cn/',
             //     webview:true

+ 9 - 0
src/popup/popup-export/src/main.vue

@@ -57,6 +57,15 @@ export default <LibMixins>{
       if (this.components[name]) {
         delete this.components[name];
       }
+    },
+
+    // 关闭所有
+    closeAll() {
+      for (let key in this.components) {
+        if (this.components.hasOwnProperty(key)) {
+          this.close(key);
+        }
+      }
     }
   },
   components

+ 10 - 0
src/popup/popup-login/components/login/props.ts

@@ -0,0 +1,10 @@
+export default {
+
+    control:{
+        type:Array,
+        default:function () {
+            return [];
+        }
+    }
+
+}

+ 13 - 4
src/popup/popup-login/components/login/src/main.vue

@@ -39,7 +39,7 @@
       >同意协议并登录</v-button>
 
       <!--  协议  -->
-      <div class="login-agreement">已阅读并同意以下协议<span>《用户协议》</span>和<span>《隐私政策》</span></div>
+      <div class="login-agreement">已阅读并同意以下协议<span v-for="(item,index) in control" @click="trigger(item,index)"><span style="color: #999">{{index===0?'':'和'}}</span>《{{item.label}}》</span></div>
 
     </article>
 
@@ -56,14 +56,21 @@ import inputData from '../data/input';
 
 import verification from '$utils/verification';
 
+import props from '../props';
+
 import { InstructionsMessageType } from '$utils/request';
 
 import user from '$config/user';
 import popup from "$utils/tool/popup";
-import socket from "$utils/socket";
+import socket from "$config/plugs/socket";
+
+import trigger from '$mixins/trigger';
+import config from "$config/config";
 
 export default {
   name: "login",
+
+  mixins:[trigger],
   data(){
     return {
       inputData:inputData()
@@ -86,7 +93,8 @@ export default {
         if (data.isSuccess) {
 
           user.user = data.data;
-          socket.install(user.user);
+          socket.register(config,true);
+
           this.$request.getUserInfo().then((resultData)=>{
              this.$store.commit('setUserInfo',Object.assign({},data.data,resultData));
 
@@ -119,7 +127,8 @@ export default {
   components:{
     icon,
     vButton
-  }
+  },
+  props
 }
 </script>
 

+ 2 - 1
src/popup/popup-login/components/register/mixins/index.ts

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

+ 10 - 0
src/popup/popup-login/components/register/props.ts

@@ -0,0 +1,10 @@
+export default {
+
+    control:{
+        type:Array,
+        default:function () {
+            return [];
+        }
+    }
+
+}

+ 6 - 5
src/popup/popup-login/components/register/src/main.vue

@@ -49,7 +49,7 @@
       >同意协议并注册</v-button>
 
       <!--  协议  -->
-      <div class="login-agreement">已阅读并同意以下协议<span>《用户协议》</span>和<span>《隐私政策》</span></div>
+      <div class="login-agreement">已阅读并同意以下协议<span v-for="(item,index) in control" @click="trigger(item,index)"><span style="color: #999">{{index===0?'':'和'}}</span>《{{item.label}}》</span></div>
 
     </article>
 
@@ -65,13 +65,13 @@ import {
 import inputData from '../data/input';
 import mixins from '../mixins';
 import verification from "$utils/verification";
-import {InstructionsMessageType} from "$utils/request";
+import props from '../props';
 
 export default {
   name: "register",
   data(){
     return {
-      inputData: inputData()
+      inputData: inputData(),
     }
   },
 
@@ -114,8 +114,9 @@ export default {
     icon,
     vButton
   },
-  mixins
+  mixins,
+  props
 }
 </script>
 
-<style scoped lang="scss" src="../style.scss"></style>
+<style scoped lang="scss" src="../style.scss"></style>

+ 22 - 0
src/popup/popup-login/data/control.ts

@@ -0,0 +1,22 @@
+import {FunctionTrigger} from "$mixins/trigger/class";
+import popup, {PopupExportComponent} from "$utils/tool/popup";
+import {ExportType} from "$popup/popup-message/const/type";
+
+export default [
+    {
+        label:'用户协议',
+        trigger: new FunctionTrigger(function () {
+            return popup.$open(PopupExportComponent.message,{
+                type:ExportType.user
+            });
+        })
+    },
+    {
+        label: '隐私政策',
+        trigger: new FunctionTrigger(function () {
+            return popup.$open(PopupExportComponent.message,{
+                type:ExportType.privacy
+            });
+        })
+    }
+]

+ 3 - 1
src/popup/popup-login/mixins/handle.ts

@@ -1,3 +1,4 @@
+import controlData from '../data/control';
 export default <LibMixins>{
 
     data(){
@@ -6,6 +7,7 @@ export default <LibMixins>{
             useModal:'',
             animate:false,
             drawModal:{},
+            controlData,
             useModals:['login','register'],
         }
     },
@@ -62,4 +64,4 @@ export default <LibMixins>{
 
     }
 
-}
+}

+ 2 - 1
src/popup/popup-login/src/main.vue

@@ -20,6 +20,7 @@
                 v-show="useModal===item"
                 :ref="'$'+item"
                 :key="item"
+                :control="controlData"
                 @close="close"
             ></component>
           </template>
@@ -59,4 +60,4 @@ export default {
 }
 </script>
 
-<style scoped lang="scss" src="../style.scss"></style>
+<style scoped lang="scss" src="../style.scss"></style>

+ 4 - 1
src/popup/popup-message/const/type.ts

@@ -3,6 +3,9 @@ enum ExportType {
     // 隐私政策
     privacy,
 
+    // 用户协议
+    user,
+
     // 充值服务协议
     recharge,
 
@@ -28,4 +31,4 @@ enum ExportType {
 
 export {
     ExportType
-}
+}

+ 5 - 0
src/popup/popup-message/data/type.ts

@@ -7,6 +7,11 @@ export default {
         id:35
     },
 
+    [ExportType.user]:{
+        label:'用户协议',
+        id:6
+    },
+
     [ExportType.recharge]:{
         label:'充值服务协议',
         id:38

+ 20 - 10
src/popup/popup-order/mixins/handle.ts

@@ -3,6 +3,9 @@ import Status from "$mixins/status/const/status";
 import socket from "$utils/socket";
 import {MessageType} from "$utils/socket/const";
 
+import order from "$utils/control/order";
+import {OrderPayStatus} from "$utils/control/order/const/order";
+
 export default <LibMixins>{
 
     data(){
@@ -80,18 +83,25 @@ export default <LibMixins>{
                     // 调用接口更新 防止出现意外
                     this.$store.dispatch('updateUserMoneyPromise');
 
-                    // 执行发送消息
-                    socket.send(this.option.user.uid,{
-                        messageType:MessageType.order,
-                        content:{
-                            message:'下单了-'+this.item.label,
-                            order:{
-                                item:this.item,
-                                buy_num: this.item.number
-                            }
-                        }
+                    // 触发下单提醒
+                    order.sendOrder(OrderPayStatus.placeOrder,{
+                        uid:this.option.user.uid,
+                        buy_num: this.item.number,
+                        item:this.item
                     });
 
+                    // 执行发送消息
+                    // socket.send(this.option.user.uid,{
+                    //     messageType:MessageType.order,
+                    //     content:{
+                    //         message:'下单了-'+this.item.label,
+                    //         order:{
+                    //             item:this.item,
+                    //             buy_num: this.item.number
+                    //         }
+                    //     }
+                    // });
+
                     return this.close();
                 }
             });

+ 6 - 6
src/popup/popup-order/src/main.vue

@@ -41,8 +41,9 @@
                 >{{item.label}}</a-select-option>
               </a-select>
             </aside>
-            <aside class="center order-table-price">¥{{item.price}}/局</aside>
-            <aside class="center order-table-all-price">¥{{total}}</aside>
+            <aside class="center order-table-price">{{item.price}}币/局</aside>
+<!--            ¥{{total}}-->
+            <aside class="center order-table-all-price">{{payTotalFormat}}</aside>
             <aside class="center">
               <stepper v-model:value="item.number" type="order"></stepper>
             </aside>
@@ -71,9 +72,8 @@
           <aside class="rowACenter order-pay-item order-pay-item-margin">
             <div class="order-pay-label">实付款:</div>
             <section class="flex-1 order-pay-price">
-              <div class="line-1">¥{{total}}</div>
-
-<!--              <div class="line-1">{{payTotalFormat}}</div>-->
+<!--              <div class="line-1">{{total}}</div>-->
+              <div class="line-1">{{payTotalFormat}}</div>
             </section>
           </aside>
         </section>
@@ -119,4 +119,4 @@ export default {
 
 <style scoped lang="scss" src="../style.scss"></style>
 
-<style lang="scss" src="../global.scss"></style>
+<style lang="scss" src="../global.scss"></style>

+ 2 - 2
src/popup/popup-recharge/mixins/handle.ts

@@ -8,7 +8,7 @@ export default <LibMixins>{
     data(){
       return {
           inputPayItem:{
-              integral:'其他额',
+              integral:'其他额',
               crid:0,
               format:false,
               input:true,
@@ -105,4 +105,4 @@ export default <LibMixins>{
         clearInterval(this.pattern);
     }
 
-}
+}

+ 3 - 3
src/popup/popup-user/mixins/follow.ts

@@ -33,16 +33,16 @@ export default {
             });
 
             // 设置是否关注
-            return this.triggerFollow();
+            return this.triggerFollow(this.vItem.uid);
         },
 
-        triggerFollow(){
+        triggerFollow(uid){
             if(this.control.follow !== this._followStatus) {
                 this._followStatus = this.control.follow;
                 return this.$request({
                     url:this._followStatus ? 'user/follow_user' : '/user/unfollow_user',
                     data:{
-                        follow_uid: this.uid
+                        follow_uid: uid
                     },
                     token:true
                 });

+ 1 - 1
src/popup/popup-user/mixins/handle.ts

@@ -87,7 +87,7 @@ export default <LibMixins>{
 
         fetchUseParams(){
 
-            if (JSON.stringify(this.params) !== JSON.stringify(this.vParams)) {
+            if (JSON.stringify(this.params) !== JSON.stringify(this.vParams) && this.params.uid) {
                 this.vParams = this.params;
                 this.unique  = +new Date()+'-'+Math.ceil(Math.random() * 10000);
                 let unique = this.unique;

+ 82 - 18
src/store/modules/chat.ts

@@ -1,8 +1,10 @@
 import {Module} from "vuex";
 import socket from "$utils/socket";
+import {MessageType} from "$utils/socket/const";
 
 let storageData: Array<Record<string, any>> = [];
 let storageDataArray = [];
+let storageQueue = undefined;
 
 export default <Module<any,any>>{
 
@@ -17,6 +19,7 @@ export default <Module<any,any>>{
 
         // 获取会话列表
         setSessionList(state,data = []){
+
             state.chatSessionStatus = true;
             let newData = [];
             let chatUserObject = [];
@@ -31,17 +34,51 @@ export default <Module<any,any>>{
                 }
 
                 if (item.latestMessage && item.latestMessage.content) {
+
+                    if (item.latestMessage.content.user) {
+                        let useUser = item.latestMessage.content.user;
+
+                        if (item.targetId == useUser.id) {
+                            item.latestMessage.content.user = {
+                                uid:useUser.id,
+                                nick_name:useUser.name,
+                                head_pic:useUser.portrait,
+                                ...useUser
+                            }
+                        } else  {
+                            item.latestMessage.content.user = {
+                                uid:item.targetId,
+                                nick_name:item.targetId,
+                                head_pic:''
+                            }
+                        }
+
+                    }
+
+                    let content = item.latestMessage.content.content || item.latestMessage.content.message;
+                    if (MessageType._entries.indexOf(item.latestMessage.messageType) < 0) {
+                        content = MessageType.noSupper;
+                    }
+
                     resultItem = {
                         ...resultItem,
-                        message:item.latestMessage.content.message,
-                        ...((item.latestMessage.content.userInfo || {})[item.targetId] || {})
+                        message:content,
+                        ...(item.latestMessage.content.userInfo ? ((item.latestMessage.content.userInfo || {})[item.targetId] || {}) : item.latestMessage.content.user)
                     }
+
                 }
 
                 // @ts-ignore
                 if (resultItem.uid) {
                     chatCount +=resultItem.count;
-                    chatUserObject[newData.push(resultItem) -1] = resultItem.uid;
+                    resultItem.uid = parseInt(resultItem.uid);
+
+                    let index = chatUserObject.indexOf(resultItem.uid);
+                    if (index < 0) {
+                        index = newData.push(resultItem) -1;
+                        chatUserObject[index] = resultItem.uid;
+                    }
+
                 }
             });
 
@@ -83,6 +120,8 @@ export default <Module<any,any>>{
                 state.chatUserList = [];
                 state.chatUserObject = [];
                 state.chatCount = 0;
+                storageData = [];
+                storageDataArray = [];
             }
         }
 
@@ -121,22 +160,47 @@ export default <Module<any,any>>{
                         object:state.chatUserObject
                     });
                 } else {
-                    socket.getConversationList({
-                        count:200,
-                        // @ts-ignore
-                        startTime:+new Date(),
-                        order:0
-                    }).then((data)=>{
-                        storageData = JSON.parse(JSON.stringify(data));
-                        storageDataArray = storageData.map((item)=>{
-                            return parseInt(item.targetId);
-                        });
-                        commit('setSessionList',data||[]);
-                        resolve({
-                            data:state.chatUserList,
-                            object:state.chatUserObject
+
+                    if (storageQueue === undefined) {
+                        storageQueue = [];
+                        socket.getConversationList({
+                            count:200,
+                            // @ts-ignore
+                            startTime:+new Date(),
+                            order:0
+                        }).then((data)=>{
+
+                            storageData = JSON.parse(JSON.stringify(data));
+                            storageDataArray = storageData.map((item)=>{
+                                return parseInt(item.targetId);
+                            });
+                            commit('setSessionList',data||[]);
+
+                            resolve({
+                                data:state.chatUserList,
+                                object:state.chatUserObject
+                            });
+
+                            storageQueue.map((item)=>{
+                                item.resolve({
+                                    data:state.chatUserList,
+                                    object:state.chatUserObject
+                                });
+                            })
+
+                            storageQueue = undefined;
+                        }).catch(()=>{
+                            storageQueue.map((item)=>{
+                                item.reject();
+                            })
+                            storageQueue = undefined;
                         });
-                    }).catch(reject);
+                    }
+                    storageQueue.push({
+                        resolve,
+                        reject
+                    });
+
                 }
 
             });

+ 37 - 33
src/store/modules/user.ts

@@ -11,8 +11,8 @@ import $utils from '$utils/tool/utils';
 import $request from '$utils/request';
 
 import money from '$utils/tool/money';
-import request from "$utils/request";
-import socket from "$utils/socket";
+
+import socketPlugs from '$config/plugs/socket';
 
 export default <Module<any,any>>{
 
@@ -122,9 +122,6 @@ export default <Module<any,any>>{
             userConfig.user = null;
             userConfig.stringify = null;
             state.user = {};
-
-            socket.uninstall();
-
             return storage.removeItem(userConfig.storageKey);
 
         }
@@ -136,30 +133,32 @@ export default <Module<any,any>>{
         outLogin({ commit }){
             // 清除用户信息
             commit('outLogin');
-            // 清除消息
-            commit('clearSession');
+
+            socketPlugs.uninstall();
 
         },
 
         initializationUserPromise({commit}){
-
-            commit('initializationUser');
-
-            if (userConfig.user) {
-                return $request.getUserInfo().then((data:Record<string, any>)=>{
-                   commit('setUserInfo',{
-                      ...userConfig.user,
-                      ...data
-                   });
-                })
-            }
-
+            return new Promise(function (resolve, reject){
+                commit('initializationUser');
+                if (userConfig.user) {
+                    return $request.getUserInfo().then((data:Record<string, any>)=>{
+                        commit('setUserInfo',{
+                            ...userConfig.user,
+                            ...data
+                        });
+                        resolve(data);
+                    }).catch(reject);
+                } else {
+                    reject();
+                }
+            });
         },
 
         updateUserLevelPromise({commit}){
             if (userConfig.user) {
 
-                return request({
+                return $request({
                     url:'user/get_user_level_info',
                     token:true
                 }).then((data:Record<string, any>)=>{
@@ -183,19 +182,24 @@ export default <Module<any,any>>{
             }
         },
 
-        updateUserMoneyPromise({commit}){
-            if (userConfig.user) {
-                return request({
-                    url:'user/get_user_money',
-                    token:true
-                }).then((data:Record<string, any>)=>{
-                    commit('setUserInfo',{
-                        ...userConfig.user,
-                        ...data.data
-                    });
-                })
-            }
-
+        updateUserMoneyPromise({commit},login:boolean=true){
+            return new Promise(function (resolve, reject) {
+                if (userConfig.user) {
+                    return $request({
+                        url:'user/get_user_money',
+                        token:true,
+                        login
+                    }).then((data:Record<string, any>)=>{
+                        commit('setUserInfo',{
+                            ...userConfig.user,
+                            ...data.data
+                        });
+                        resolve(data);
+                    }).catch(reject);
+                } else {
+                    reject();
+                }
+            })
         }
 
     }

+ 4 - 1
src/types/config.d.ts

@@ -15,6 +15,9 @@ type ConfigMode  = {
 
 interface Config {
 
+    // 全局
+    globalRTMIM:any,
+
     // 安装
     install?:Function,
 
@@ -22,7 +25,7 @@ interface Config {
     app:any | undefined,
 
     // 注册函数
-    register: (vm:any)=>void,
+    register: (vm:any,plugs:Array<Record<string, any>>)=>void,
 
     // 模式
     configMode?: ConfigMode,

+ 16 - 1
src/utils/agora/agora.ts

@@ -20,11 +20,21 @@ export default class Agora extends Notice{
 
     private remoteAudioTrack:IRemoteAudioTrack;
 
+    volumeIndicator(evt){
+        let useTarget = {};
+        evt && evt.forEach(function(volume, index){
+            useTarget[volume.uid] = {
+                volume: volume.level
+            }
+        });
+        this.triggerListener(AgoraEvent.volume,useTarget);
+    }
     // 创建客户端语音对象
     constructor(channel:string,uid:string | null) {
         super();
 
         this.userPublishedWatch = this.userPublishedWatch.bind(this);
+        this.volumeIndicator = this.volumeIndicator.bind(this);
 
         this.client = AgoraRTC.createClient({ mode: "rtc", codec: "vp8" });
 
@@ -35,7 +45,10 @@ export default class Agora extends Notice{
             this.addUserPublished();
             // 触发初始化成功
             this.triggerListener(AgoraEvent.initialization);
-        }).catch(()=>{
+            this.client.enableAudioVolumeIndicator();
+            // 监听
+            this.client.on("volume-indicator", this.volumeIndicator);
+        }).catch((e)=>{
             // 设置成功加入频道失败
             this.setStatus(AgoraStatus.joinFail);
             // 触发初始化失败
@@ -45,6 +58,7 @@ export default class Agora extends Notice{
     }
 
     async userPublishedWatch(user, mediaType){
+
         // 开始订阅远端用户。
         await this.client.subscribe(user, mediaType);
         // 表示本次订阅的是音频。
@@ -140,6 +154,7 @@ export default class Agora extends Notice{
         this.client.leave();
         // 解除绑定事件
         this.client.off("user-published",this.userPublishedWatch);
+        this.client.off("volume-indicator", this.volumeIndicator);
         // 移除
         this.client = null;
     }

+ 3 - 1
src/utils/agora/const.ts

@@ -34,7 +34,9 @@ enum AgoraEvent {
     // 初始化成功
     initialization,
     // 初始化失败
-    fail
+    fail,
+    // 订阅说话声音
+    volume
 }
 
 export {

+ 9 - 1
src/utils/control/order/const/order.ts

@@ -13,6 +13,10 @@ enum OrderPayUseStatus {
     completed='completed'
 }
 
+enum OrderSendStatus {
+
+}
+
 enum OrderPayUseStatusNumber {
 
     // 全部订单
@@ -30,6 +34,9 @@ enum OrderPayUseStatusNumber {
 
 enum OrderPayStatus {
 
+    // 下单
+    placeOrder=0,
+
     // 待接单
     orders=1,
 
@@ -87,9 +94,10 @@ enum OrderButton {
 }
 
 export {
+    OrderSendStatus,
     OrderPayStatus,
     OrderStatus,
     OrderButton,
     OrderPayUseStatus,
     OrderPayUseStatusNumber
-}
+}

+ 16 - 1
src/utils/control/order/data/updateConfig.ts

@@ -4,9 +4,15 @@ import {OrderUpdateOperation} from "$utils/control/order/const/operation";
 export default {
 
     [OrderStatus.placeOrder] : {
+        [OrderPayStatus.have]: {
+            [OrderPayUseStatus.all]: OrderUpdateOperation.update,
+            [OrderPayUseStatus.orders]: OrderUpdateOperation.delete,
+            [OrderPayUseStatus.have]: OrderUpdateOperation.add
+        },
         [OrderPayStatus.completed]: {
             [OrderPayUseStatus.all]: OrderUpdateOperation.update,
             [OrderPayUseStatus.orders]: OrderUpdateOperation.delete,
+            [OrderPayUseStatus.have]: OrderUpdateOperation.delete,
             [OrderPayUseStatus.completed]: OrderUpdateOperation.add
         },
         [OrderPayStatus.cancel]: {
@@ -16,11 +22,20 @@ export default {
     },
 
     [OrderStatus.receivingOrder] : {
+        // 用户下单的更新操作
+        [OrderPayStatus.placeOrder]:{
+            [OrderPayUseStatus.all]: OrderUpdateOperation.reload,
+            [OrderPayStatus.orders]: OrderUpdateOperation.reload
+        },
         [OrderPayStatus.have]: {
             [OrderPayUseStatus.all]: OrderUpdateOperation.update,
             [OrderPayUseStatus.orders]: OrderUpdateOperation.delete,
             [OrderPayUseStatus.have]: OrderUpdateOperation.add
         },
+        [OrderPayStatus.cancel]: {
+            [OrderPayUseStatus.all]: OrderUpdateOperation.update,
+            [OrderPayUseStatus.orders]: OrderUpdateOperation.delete
+        },
         [OrderPayStatus.completed]: {
             [OrderPayUseStatus.all]: OrderUpdateOperation.update,
             [OrderPayUseStatus.have]: OrderUpdateOperation.delete,
@@ -28,4 +43,4 @@ export default {
         }
     },
 
-}
+}

+ 15 - 1
src/utils/control/order/index.ts

@@ -5,6 +5,8 @@ import buttonGroup from './data/button-group';
 import titleData from './data/title';
 
 import updateConfig from "./data/updateConfig";
+import {AgoraRTMessage} from "$utils/socket/agoraRTM/const/channel";
+import config from "$config/config";
 
 export default {
 
@@ -21,7 +23,19 @@ export default {
     // 获取更新配置
     getUpdateConfig(type:OrderStatus = OrderStatus.placeOrder) {
         return updateConfig[type];
+    },
+
+    // 向该用户同步订单信息
+    sendOrder(status:OrderPayStatus,option:Record<string, any>,type:AgoraRTMessage = AgoraRTMessage.playOrder){
+        if (config.globalRTMIM) {
+            config.globalRTMIM.sendUser({
+                status,
+                option,
+                order:option.order || {}
+            },type, option.uid);
+        }
+
     }
 
 
-}
+}

+ 2 - 0
src/utils/control/personal-detail/index.ts

@@ -56,6 +56,8 @@ export default {
             let cacheItem = cacheData.data.data.data;
             let is_follow = data.status ? 1 : 0;
             let use_follow = is_follow ? 2 : 1;
+
+            console.log(id,cacheItem,use_follow);
             if (cacheItem.is_follow !== use_follow) {
                 if (cacheItem.fans_num !== undefined) {
                     cacheItem.fans_num = cacheItem.fans_num + (is_follow ? 1 : -1);

+ 2 - 2
src/utils/request/config.ts

@@ -5,8 +5,8 @@ import constName from './const';
 export default <LibRequestConfig>{
 
     [constName.mode.default] :{
-        // baseURL:config.baseURL + config.baseApiURL,
-        baseURL: config.baseApiURL,
+        baseURL:config.baseURL + config.baseApiURL,
+        // baseURL: config.baseApiURL,
 
         method:'POST',
 

+ 21 - 1
src/utils/request/instructions/plugins/control.ts

@@ -8,12 +8,15 @@ import InConfig from './config';
 
 import popup from '$utils/tool/popup';
 
+import store from '@/store/index';
+
 import {
     InstructionsWhere,
     InstructionsTypes,
     LibRequestStatus,
     InstructionsMessageType
 } from '../../const/request';
+import user from "$config/user";
 
 export default instructions.pushConfig({
 
@@ -110,6 +113,23 @@ export default instructions.pushConfig({
       }
     },
 
+    loginCallback:{
+      where: InstructionsWhere.custom,
+      whereTrigger:function ({responseData}) {
+          return responseData.data && responseData.data.code === 301;
+      },
+      trigger({responseData,requestData}){
+
+          if(requestData.login !== false && user.isLogin()) {
+              popup.$loginOut(responseData.data.msg || '登录失效');
+          } else {
+              store.dispatch('outLogin');
+          }
+
+      },
+      zIndex:6
+    },
+
     successAgent:{
         trigger(data){
             return data.resolve(data.responseData.data);
@@ -135,4 +155,4 @@ export default instructions.pushConfig({
         zIndex:-10
     }
 
-},{triggerType:InstructionsTypes.end})
+},{triggerType:InstructionsTypes.end})

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov