Przeglądaj źródła

feat:更改其他地方的麦克风

jinx 3 lat temu
rodzic
commit
6b3a8ed40d

+ 1 - 1
app.json

@@ -59,7 +59,7 @@
   "window": {
     "backgroundTextStyle": "dark",
     "navigationBarBackgroundColor": "#fff",
-    "navigationBarTitleText": "指房宝(杭州)科技有限公司",
+    "navigationBarTitleText": "指房宝(杭州)科技有限公司",
     "navigationBarTextStyle": "black",
     "enablePullDownRefresh": true
   },

+ 28 - 17
component/voice/voice.js

@@ -5,7 +5,7 @@ Component({
    * 组件的属性列表
    */
   properties: {
-
+   
   },
 
   /**
@@ -22,6 +22,7 @@ Component({
 
 
   attached() {
+ 
     this.callback = (user={}) => {
       console.warn('---user---', user,'---user---')
       if (user.action === 'stopCall' && this.hasEnter) {
@@ -39,6 +40,7 @@ Component({
         if (user.noMute) {
           this.unpublishLocalAudio()
         } else {
+          
           this.publishLocalAudio()
         // }
       }
@@ -52,13 +54,18 @@ Component({
     getApp().addVoicePropsListener(this.callback)
   },
   detached() {
+     
     console.log('detached')
     getApp().removeVoicePropsListener(this.callback)
     // this.trtcRoomContext.exitRoom()
     this.hasEnter = false
   },
   pageLifetimes: {
+    
     show() {
+      // wx.showToast({
+      //   title: 'show',
+      // })
       this.setData({show: true})
       // this.trtcRoomContext = this.selectComponent('#trtcroom')
       // if (getApp().globalData.audioUser) {
@@ -69,6 +76,7 @@ Component({
       // }
     },
     hide() {
+  
       clearTimeout(this.time)
       this.setData({show: false})
     },
@@ -78,6 +86,7 @@ Component({
    */
   methods: {
     enterAudioRoom(user, noEnter) {
+     
       // if (this.hasEnter) {
       //   return
       // }
@@ -105,7 +114,7 @@ Component({
           this.trtcRoomContext.on(EVENT.LOCAL_JOIN, (event) => {
             // 进房成功后发布本地音频流和视频流 
             console.error('进入房间')
-           
+        
             this.successEnter = true
             if(user.role=='leader'){
               if (user.noMute) {
@@ -142,28 +151,30 @@ Component({
             this.hasEnter = false
           })
           let timer = null
-          timer = setInterval(() => {
-            if (!this.successEnter) {
-              this.trtcRoomContext.enterRoom({
-                roomID: getApp().globalData.roomId
-              }).then(() => {
-                console.log('成功进入房间')
-              }).catch((res) => {
-                console.error('room joinRoom 进房失败:', res)
-                this.hasEnter = false
-              })
-            } else {
-              clearInterval(timer)
-              timer = null
-            }
-          }, 3000);
+          // timer = setInterval(() => {
+          //   if (!this.successEnter) {
+          //     this.trtcRoomContext.enterRoom({
+          //       roomID: getApp().globalData.roomId
+          //     }).then(() => {
+          //       console.log('成功进入房间')
+          //     }).catch((res) => {
+          //       console.error('room joinRoom 进房失败:', res)
+          //       this.hasEnter = false
+          //     })
+          //   } else {
+          //     clearInterval(timer)
+          //     timer = null
+          //   }
+          // }, 3000);
         }
       })
     },
     unpublishLocalAudio () {
+    
       this.trtcRoomContext && this.trtcRoomContext.unpublishLocalAudio()
     },
     publishLocalAudio () {
+     
       this.trtcRoomContext && this.trtcRoomContext.publishLocalAudio()
     }
   }

+ 6 - 6
config.js

@@ -15,12 +15,12 @@ const dev = {
 const mal = {
   env: 'pro',
   socketHost: 'wss://shop.4dkankan.com',
-  requestHost: 'https://plaza-cszfb.4dkankan.com', // 测试环境
-  viewChildHost: 'https://cszfb.4dkankan.com', //测试环境
-  viewHost: 'https://cszfb.4dkankan.com'//测试环境
-  // requestHost: 'https://plaza.4dkankan.com',
-  // viewChildHost: 'https://zfb.4dkankan.com',
-  // viewHost: 'https://zfb.4dkankan.com'
+  // requestHost: 'https://plaza-cszfb.4dkankan.com', // 测试环境
+  // viewChildHost: 'https://cszfb.4dkankan.com', //测试环境
+  // viewHost: 'https://cszfb.4dkankan.com'//测试环境
+  requestHost: 'https://plaza.4dkankan.com',
+  viewChildHost: 'https://zfb.4dkankan.com',
+  viewHost: 'https://zfb.4dkankan.com'
 }
 
 

+ 2 - 2
pages/auth/btnAuth/btnAuth.wxml

@@ -8,11 +8,11 @@
   </view>
   <view class='login_text'>
     <image src='{{login_logo}}'></image>
-    <view>指房宝(杭州)科技有限公司</view>
+    <view>指房宝(杭州)科技有限公司</view>
     <view>宅家中,云逛街,轻松买</view>
   </view>
   <view class="quanxian">
-    <view>指房宝(杭州)科技有限公司小程序申请获得以下权限</view>
+    <view>指房宝(杭州)科技有限公司小程序申请获得以下权限</view>
     <view>· 获得您的公开信息(昵称、头像等)</view>
   </view>
   <button  wx:if="{{canIUse}}" class='btn_login' open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button>

+ 1 - 1
pages/sence/sence.wxml

@@ -1,5 +1,5 @@
 <view>
-  <lip-sync />
+  <!-- <lip-sync /> -->
   <auth bindlogin="reloadData" />
   <view class="storeContent">
     <view class="storeSearch">

+ 1 - 1
pages/shareRoom/shareRoom.wxml

@@ -1,7 +1,7 @@
 <view class="container" style="background-image: url({{shared_img}})">
   <auth bindlogin="onShow" />
 	
-  <lip-sync />
+  <!-- <lip-sync /> -->
   <view class="mask"></view>
   <view class="shared-layout" >
     <view class="shared-content">

+ 1 - 1
pages/shared/shared.wxml

@@ -1,7 +1,7 @@
 <view class="container" style="background-image: url({{shared_img}})">
   <auth bindlogin="onShow" />
 	
-  <lip-sync />
+  <!-- <lip-sync /> -->
   <view class="mask"></view>
   <view class="shared-layout" >
     <view class="shared-content">

+ 1 - 1
pages/ucenter/index/index.wxml

@@ -1,7 +1,7 @@
 <view class="container">
   <auth bindlogin="onShow" />
 	
-  <lip-sync />
+  <!-- <lip-sync /> -->
   <view class="userinfo">
     <image src="../../../static/images/ucenterbg.png" class="user-bg"></image>
     <view class="u-avatar"  bindtap="tapByIdx" data-url="/pages/user/user">

+ 6 - 4
socket.js

@@ -530,9 +530,10 @@ export default {
       if (!user) {
         return
       }
-      if (data.roomsPerson.length <= 1) {
-        return
-      }
+      //屏蔽有人进来才开麦克风
+      // if (data.roomsPerson.length <= 1) {
+      //   return
+      // }
       user.noMute = getApp().globalData.voiceProps.noMute
       getApp().setVoiceProps({
         ...user,
@@ -657,6 +658,7 @@ export default {
   },
 
   async mic() {
+    
     let noMute = getApp().globalData.voiceProps.noMute
 
 
@@ -750,7 +752,7 @@ export default {
   share() {
     console.log('**********')
     // console.log(!!this.data.mamy)
-    const companyName = `指房宝(杭州)科技有限公司`
+    const companyName = `指房宝(杭州)科技有限公司`
     const vrLink = `/pages/webview/index`
     const img_url = this.data.newPicUrl || 'http://video.cgaii.com/new4dage/images/images/home_2_a.jpg'
     const shareImg = img_url

+ 1 - 1
webview/shop-container/index.html

@@ -3,7 +3,7 @@
 <head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  <title>指房宝(杭州)科技有限公司</title>
+  <title>指房宝(杭州)科技有限公司</title>
   <link rel="stylesheet" href="./css/style.css?v=3">
 </head>
 <body>