ssfg 5 yıl önce
ebeveyn
işleme
8f2a9a63bd
100 değiştirilmiş dosya ile 571 ekleme ve 5187 silme
  1. 0 68
      components/image-upload/image-upload.js
  2. 0 4
      components/image-upload/image-upload.json
  3. 0 11
      components/image-upload/image-upload.wxml
  4. 0 1
      components/image-upload/image-upload.wxss
  5. 0 145
      components/my-video/scroll-video.js
  6. 0 6
      components/my-video/scroll-video.json
  7. 0 36
      components/my-video/scroll-video.wxml
  8. 0 35
      components/my-video/scroll-video.wxss
  9. 0 29
      components/my-video/video-button-bar.js
  10. 0 4
      components/my-video/video-button-bar.json
  11. 0 16
      components/my-video/video-button-bar.wxml
  12. 0 19
      components/my-video/video-button-bar.wxss
  13. 0 48
      components/region-picker/region-picker.js
  14. 0 4
      components/region-picker/region-picker.json
  15. 0 24
      components/region-picker/region-picker.wxml
  16. 0 1
      components/region-picker/region-picker.wxss
  17. 0 53
      components/text-input/text-input.js
  18. 0 4
      components/text-input/text-input.json
  19. 0 7
      components/text-input/text-input.wxml
  20. 0 1
      components/text-input/text-input.wxss
  21. 0 57
      components/text-picker/text-picker.js
  22. 0 4
      components/text-picker/text-picker.json
  23. 0 17
      components/text-picker/text-picker.wxml
  24. 0 1
      components/text-picker/text-picker.wxss
  25. 0 50
      components/text-time/text-time.js
  26. 0 4
      components/text-time/text-time.json
  27. 0 24
      components/text-time/text-time.wxml
  28. 0 1
      components/text-time/text-time.wxss
  29. 0 85
      components/trtc-room/common/constants.js
  30. 0 346
      components/trtc-room/controller/user-controller.js
  31. 0 14
      components/trtc-room/libs/mta_analysis.js
  32. 0 1
      components/trtc-room/libs/tim-wx.js
  33. 0 33
      components/trtc-room/model/pusher.js
  34. 0 38
      components/trtc-room/model/stream.js
  35. 0 17
      components/trtc-room/model/user.js
  36. BIN
      components/trtc-room/static/audio-active.png
  37. BIN
      components/trtc-room/static/audio-false.png
  38. BIN
      components/trtc-room/static/audio-true.png
  39. BIN
      components/trtc-room/static/back.png
  40. BIN
      components/trtc-room/static/beauty-false.png
  41. BIN
      components/trtc-room/static/beauty-true.png
  42. BIN
      components/trtc-room/static/beauty.png
  43. BIN
      components/trtc-room/static/camera-false.png
  44. BIN
      components/trtc-room/static/camera-true.png
  45. BIN
      components/trtc-room/static/camera.png
  46. BIN
      components/trtc-room/static/close-white-big.png
  47. BIN
      components/trtc-room/static/close-white.png
  48. BIN
      components/trtc-room/static/display-pause-false.png
  49. BIN
      components/trtc-room/static/display-pause-true.png
  50. BIN
      components/trtc-room/static/display-pause-white.png
  51. BIN
      components/trtc-room/static/display-play-false.png
  52. BIN
      components/trtc-room/static/display-play-true.png
  53. BIN
      components/trtc-room/static/display-play-white.png
  54. BIN
      components/trtc-room/static/fullscreen-white.png
  55. BIN
      components/trtc-room/static/fullscreen.png
  56. BIN
      components/trtc-room/static/hangup-red.png
  57. BIN
      components/trtc-room/static/hangup.png
  58. BIN
      components/trtc-room/static/im-disable.png
  59. BIN
      components/trtc-room/static/im-white.png
  60. BIN
      components/trtc-room/static/im.png
  61. BIN
      components/trtc-room/static/list-white.png
  62. BIN
      components/trtc-room/static/list.png
  63. BIN
      components/trtc-room/static/loading.png
  64. BIN
      components/trtc-room/static/micro-open.png
  65. BIN
      components/trtc-room/static/more-disable.png
  66. BIN
      components/trtc-room/static/more-enable.png
  67. BIN
      components/trtc-room/static/more-white.png
  68. BIN
      components/trtc-room/static/music-white.png
  69. BIN
      components/trtc-room/static/mute-camera-gray.png
  70. BIN
      components/trtc-room/static/mute-camera-white.png
  71. BIN
      components/trtc-room/static/mute-mic-gray.png
  72. BIN
      components/trtc-room/static/mute-mic-white.png
  73. BIN
      components/trtc-room/static/phone.png
  74. BIN
      components/trtc-room/static/setting-white.png
  75. BIN
      components/trtc-room/static/setting.png
  76. BIN
      components/trtc-room/static/slide-up.png
  77. BIN
      components/trtc-room/static/speaker-false.png
  78. BIN
      components/trtc-room/static/speaker-true.png
  79. BIN
      components/trtc-room/static/speaker-white.png
  80. BIN
      components/trtc-room/static/switch.png
  81. 0 104
      components/trtc-room/template/1v1/1v1.wxml
  82. 0 112
      components/trtc-room/template/1v1/1v1.wxss
  83. 0 75
      components/trtc-room/template/custom/custom.wxml
  84. 0 11
      components/trtc-room/template/custom/custom.wxss
  85. 0 261
      components/trtc-room/template/grid/grid.wxml
  86. 0 563
      components/trtc-room/template/grid/grid.wxss
  87. 0 2407
      components/trtc-room/trtc-room.js
  88. 0 4
      components/trtc-room/trtc-room.json
  89. 0 70
      components/trtc-room/trtc-room.wxml
  90. 0 228
      components/trtc-room/trtc-room.wxss
  91. 0 21
      components/trtc-room/utils/compare-version.js
  92. 0 50
      components/trtc-room/utils/environment.js
  93. 0 62
      components/trtc-room/utils/event.js
  94. 98 0
      pages/historyClass/historyClass.js
  95. 3 0
      pages/historyClass/historyClass.json
  96. 41 0
      pages/historyClass/historyClass.wxml
  97. 362 0
      pages/historyClass/historyClass.wxss
  98. 65 10
      pages/index/index.js
  99. 2 1
      pages/index/index.wxml
  100. 0 0
      pages/myInteractions/myInteractions.js

+ 0 - 68
components/image-upload/image-upload.js

@@ -1,68 +0,0 @@
-// components/image-upload/image-upload.js
-import util from '../../utils/util.js';
-Component({
-  /**
-   * 组件的属性列表
-   */
-  options: {
-    addGlobalClass: true,
-  },
-  properties: {
-    label: {
-      type: String,
-      value: '',
-    },
-    formid: {
-      type: String,
-      value: '',
-    },
-    forminfo: {
-      type: Object,
-      value: {}
-    }
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-     wx_back_image:'',
-     inputType:'upload',
-     input_text:'', //获取到上传成功以后的输入地址
-  },
-  behaviors: ['wx://component-export'],
-  export() {
-    return { 
-      input_text: this.data.input_text,
-      force: this.properties.forminfo.force,
-      role:this.properties.forminfo.role
-      }
-  },
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    uploadImage:function(){
-       wx.chooseImage({
-         count: 1,
-         sizeType: ['original','compressed'],
-         sourceType: ['album', 'camera'],
-         success: (res)=>{
-           console.log(res);
-           const { tempFilePaths} =res;
-           console.log('wx image path::::',tempFilePaths[0]);
-           this.setData({
-             wx_back_image: tempFilePaths[0]
-           });
-           util.wx_upload_image(tempFilePaths[0]).then((resp)=>{
-               console.log(resp);
-               this.setData({
-                 inputType: 'uploaded',
-                 input_text: resp,
-               });
-           });
-         },
-       })
-    },
-  }
-})

+ 0 - 4
components/image-upload/image-upload.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 11
components/image-upload/image-upload.wxml

@@ -1,11 +0,0 @@
-<!--components/image-upload/image-upload.wxml-->
-<view class='reports-form-box form-inner'>
-          <view class='reports-form-input input-all-width'>
-            <view class='form-inputname'>{{forminfo.label}}<text wx:if="{{forminfo.force}}" class="force_text">*</text></view>
-            <block wx:if="{{inputType==='upload'}}"><button bindtap='uploadImage' class='form-inputtext form-upload'></button></block>
-            <block wx:if="{{inputType==='uploaded'}}">
-               <input  bindtap='uploadImage' value='{{input_text}}' class='form-inputtext'></input>
-            </block>
-
-          </view>
-</view>

+ 0 - 1
components/image-upload/image-upload.wxss

@@ -1 +0,0 @@
-/* components/image-upload/image-upload.wxss */

+ 0 - 145
components/my-video/scroll-video.js

@@ -1,145 +0,0 @@
-// components/scroll-video.js
-Component({
-  options: {
-    multipleSlots: true // 在组件定义时的选项中启用多slot支持
-  },
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    //父组件传入的视频列表
-    videoList:{
-      type: Array,
-      value: [],
-      observer: function(newVal, oldVal){
-        this.setData({
-          videoSize: newVal.length
-        });
-      }
-    },
-    //视频或者直播适配页面方式
-    fitType:{
-      type: String,
-      value: 'contain',
-    },
-    //滑动距离的设置 超过该距离回出现页面下滑或者上滑的情况
-    thresholdValue:{
-      type: Number,
-      value: 100,
-      observer: function (newVal, oldVal) {
-        console.log(newVal,oldVal);
-      }
-    },
-    //播放器类型
-    playerType:{
-      type: String,
-      value: 'video',
-      observer: function (newVal, oldVal) {
-      }
-    }
-    
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    startY: 0,//开始y点
-    screenHeight:0,//获取当前屏幕高度
-    screenWidth:0,
-    scrollAnimate:0,
-    videoidx:0,//保存切换下标
-    videoSize:0,//视频列表的长度
-  },
-  ready:function(){
-   this.animation = wx.createAnimation({
-     duration:600,
-     timingFunction:'linear',
-   });
-    let that = this;
-    wx.getSystemInfo({
-      success: function (res) {
-        that.setData({
-          screenHeight: res.windowHeight,
-          screenWidth: res.windowWidth
-        })
-      }
-    })
-    console.log(this.properties.videoList.length);
-    this.setData({
-      videoSize:this.properties.videoList.length
-    });
-  },
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    buttonhandle:function(e){
-      const { buttontype, buttonname, itemid } = e.detail;
-      this.triggerEvent('menuTap', { buttontype, buttonname, itemid });
-    },
-    onTouchStart: function (e) {
-      const {pageY } = e.changedTouches[0]; //记录手指位置
-      this.setData({
-        startY: pageY
-      });
-    },
-    onTouchEnd: function (e) {
-      let { videoidx } = e.currentTarget.dataset;
-      videoidx = parseInt(videoidx)
-      console.log(videoidx);
-      let thresholdValue = this.properties.thresholdValue;
-      const {startY } = this.data;
-      let movey = e.changedTouches[0].pageY;
-      let changeY = movey - startY;
-      if (changeY > 0) {
-        if (changeY >= thresholdValue) {
-          if (videoidx===0){
-            this.triggerEvent('swipeToStart', {
-              oldindex: 0,
-              newindex: videoidx,
-              playerType: this.properties.playerType
-            });
-            return false;
-          }
-          let top_height = -((videoidx - 1) * this.data.screenHeight);
-          console.log('手指向下滑动,往上切换视频');
-          this.triggerEvent('swipeDown',{
-            oldindex: videoidx,
-            newindex: videoidx-1,
-            playerType: this.properties.playerType
-          });
-          this.animation.translateY(top_height).step();
-          this.setData({
-            scrollAnimate: this.animation.export(),
-            videoidx: videoidx,
-          });
-        }
-      }else{
-        let abschangeY = Math.abs(changeY);
-        if (abschangeY >= thresholdValue) {
-          if (videoidx+1 === this.data.videoSize) {
-            this.triggerEvent('swipeToEnd', { 
-              oldindex: videoidx + 1,
-              newindex:videoidx,
-              playerType: this.properties.playerType
-              });
-            return false;
-          }
-          let btm_height = -((videoidx + 1) * this.data.screenHeight);
-          this.triggerEvent('swipeUpper', {
-            oldindex: videoidx,
-            newindex: videoidx +1,
-            playerType: this.properties.playerType
-          });
-          this.animation.translateY(btm_height).step();
-          console.log('向上滑动,往下切换视频');
-          this.setData({
-            scrollAnimate:this.animation.export(),
-            videoidx: videoidx,
-          });
-        }
-      }
-    },
-  }
-})

+ 0 - 6
components/my-video/scroll-video.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "video-button-bar": "../../components/video-button-bar"
-  }
-}

+ 0 - 36
components/my-video/scroll-video.wxml

@@ -1,36 +0,0 @@
-<!--components/scroll-video.wxml-->
-<view class='video-container'>
-  <view class='video-scroll-container' animation="{{scrollAnimate}}">
-    <view class='video-scroll-item'
-          bindtouchstart='onTouchStart'
-          bindtouchend='onTouchEnd'
-          wx:for-item="items"
-          wx:for-index="idx"
-          data-videoidx="{{idx}}"
-          wx:key="{{items.typeid}}"
-          wx:for="{{videoList}}"
-    >
-    <block wx:if="{{items.video_is_player}}">
-     <block wx:if="{{playerType==='video'}}">
-     <video-button-bar></video-button-bar>
-      <video class='video-player' 
-              controls='{{false}}'
-              autoplay='{{false}}'
-              poster='{{items.videoimg}}'
-              src="{{items.videourl}}"
-              show-fullscreen-btn="{{false}}"
-              show-play-btn="{{false}}" object-fit="{{fitType}}"></video>
-      </block>
-      <block wx:if="{{playerType==='live'}}">
-        <live-player class='video-player'
-        style="width:{{screenWidth}}px"
-        src="{{items.videourl}}"
-        object-fit="{{fitType}}"
-        autoplay   mode="RTC">
-         <video-button-bar bind:buttonhandle="buttonhandle"></video-button-bar>
-        </live-player>
-      </block>
-    </block>
-    </view>
-    </view>
-</view>

+ 0 - 35
components/my-video/scroll-video.wxss

@@ -1,35 +0,0 @@
-/* components/scroll-video.wxss */
-.video-container{
-  position: relative;
-  height: 100%;
-  width: 100%;
-  background-color: #000;
-  overflow: hidden;
-}
-.video-scroll-container{
-  position: absolute;
-  width: 100%;
-  left: 0;
-  top: 0;
-  height: 100%;
-  z-index: 366;
-}
-.video-scroll-item{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  z-index: 333;
-}
-.video-player{
-  display: inline-block;
-  width: 100%;
-  height: 100%;
-}
-.message-container{
-  width: 100%;
-  height: 100%;
-  position: absolute;
-  left: 0;
-  top: 0;
-  background-color: #000;
-}

+ 0 - 29
components/my-video/video-button-bar.js

@@ -1,29 +0,0 @@
-// components/video-button-bar.js
-Component({
-  options: {
-    multipleSlots: true // 在组件定义时的选项中启用多slot支持
-  },
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    toolBarButton: function (e) {
-      const { buttontype, buttonname, itemid } = e.currentTarget.dataset;
-      this.triggerEvent('buttonhandle', { buttontype, buttonname, itemid });
-    }
-  }
-})

+ 0 - 4
components/my-video/video-button-bar.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 16
components/my-video/video-button-bar.wxml

@@ -1,16 +0,0 @@
-<!--components/video-button-bar.wxml-->
- <cover-view  class="icon-container">
-
-                  <cover-view class="cover-view-item" bindtap='toolBarButton' data-buttontype="1" data-buttonname="收藏" data-itemid="{{items.videoid}}">
-                    <cover-image class="video-icon" src='../images/fav.png'/>
-                  </cover-view>
-                
-                  <cover-view class="cover-view-item"  bindtap='toolBarButton' data-buttontype="2" data-buttonname="消息" data-itemid="{{items.videoid}}">
-                    <cover-image   class="video-icon" src='../images/msg.png'/>
-                  </cover-view>
-
-                  <cover-view class="cover-view-item"  bindtap='toolBarButton' data-buttontype="3" data-buttonname="分享" data-itemid="{{items.videoid}}">
-                    <cover-image   class="video-icon" src='../images/share.png'/>
-                  </cover-view>
-                  
-</cover-view>

+ 0 - 19
components/my-video/video-button-bar.wxss

@@ -1,19 +0,0 @@
-/* components/video-button-bar.wxss */
-.icon-container{
-  height: 100%;
-  position: absolute;
-  right:40rpx;
-  display:flex;
-  flex-direction:column;
-  justify-content:flex-end;
-  z-index:999;
-}
-.cover-view-item{
-  height: 64rpx;width: 64rpx;
-  margin-bottom:100rpx;
-}
-
-.video-icon{
-  width: 64rpx;height: 64rpx;
-  display:inline-block; 
-}

+ 0 - 48
components/region-picker/region-picker.js

@@ -1,48 +0,0 @@
-// components/region-picker/region-picker.js
-Component({
-  /**
-   * 组件的属性列表
-   */
-  options: {
-    addGlobalClass: true,
-  },
-  properties: {
-    label: {
-      type: String,
-      value: '',
-    },
-    formid: {
-      type: String,
-      value: '',
-    },
-    forminfo: {
-      type: Object,
-      value: {}
-    }
-  },
-  behaviors: ['wx://component-export'],
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    input_text: '',
-  },
-  //组件最终对外导出的数据
-  export() {
-    return {
-      input_text: this.data.input_text,
-      force: this.properties.forminfo.force,
-      role: this.properties.forminfo.role }
-  },
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    bindPickerChange: function (e) {
-      console.log(e);
-      this.setData({   //给变量赋值
-        input_text: e.detail.value
-      })
-    }
-  }
-})

+ 0 - 4
components/region-picker/region-picker.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 24
components/region-picker/region-picker.wxml

@@ -1,24 +0,0 @@
-<!--components/region-picker/region-picker.wxml-->
-<view class='reports-form-box form-inner'>
-          <view class='reports-form-input input-all-width'>
-            <view class='form-inputname'>{{forminfo.label}}<text wx:if="{{forminfo.force}}" class="force_text">*</text></view>
-           
-
-            <picker mode="region"
-            class='form-inputtext'
-            bindchange="bindPickerChange" 
-            value="{{input_text}}"
-            custom-item="{{customItem}}">
-            <view class="picker">
-              {{input_text[0]}}-{{input_text[1]}}-{{input_text[2]}}
-            </view>
-          </picker>
-
-      
-
-
-
-
-          </view>
-</view>
-

+ 0 - 1
components/region-picker/region-picker.wxss

@@ -1 +0,0 @@
-/* components/region-picker/region-picker.wxss */

+ 0 - 53
components/text-input/text-input.js

@@ -1,53 +0,0 @@
-// components/my-form/my-input.js
-Component({
-  /**
-   * 组件的初始数据
-   */
-  options:{
-    addGlobalClass: true,
-  },
-  properties:{
-     label:{
-       type:String,
-       value:'',
-     },
-     formid:{
-       type: String,
-       value: '',
-     },
-    forminfo:{
-      type:Object,
-      value:{}
-    },
-    role:{
-       type:Object,
-       value:{}
-    }
-  },
-  data: {
-     input_text:'',
-  },
-  behaviors: ['wx://component-export'],
-  //组件最终对外导出的数据
-  export() {
-    return {
-      input_text: this.data.input_text,
-      force: this.properties.forminfo.force,
-      role: this.properties.forminfo.role
-      }
-  },
-  /**
-   * 组件的方法列表
-   */
-  ready:function(){
-    console.log(this.properties);
-  },
-  methods: {
-    enterValue:function(e){
-       console.log(e.detail.value);
-       this.setData({
-         input_text: e.detail.value
-       });
-    }
-  }
-})

+ 0 - 4
components/text-input/text-input.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 7
components/text-input/text-input.wxml

@@ -1,7 +0,0 @@
-<!--components/my-form/my-input.wxml-->
-<view class='reports-form-box form-inner'>
-          <view class='reports-form-input input-all-width'>
-            <view class='form-inputname'>{{forminfo.label}}<text wx:if="{{forminfo.force}}" class="force_text">*</text></view>
-            <input bindinput='enterValue' class='form-inputtext'></input>
-          </view>
-</view>

+ 0 - 1
components/text-input/text-input.wxss

@@ -1 +0,0 @@
-/* components/my-form/my-input.wxss */

+ 0 - 57
components/text-picker/text-picker.js

@@ -1,57 +0,0 @@
-// components/text-picker/text-picker.js
-Component({
-  /**
-   * 组件的属性列表
-   */
-  options: {
-    addGlobalClass: true,
-  },
-  properties: {
-    label: {
-      type: String,
-      value: '',
-    },
-    formid: {
-      type: String,
-      value: '',
-    },
-    forminfo: {
-      type: Object,
-      value: {}
-    }
-  },
-  behaviors: ['wx://component-export'],
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    input_text:'',
-    hx_index:0,
-  },
-  //组件最终对外导出的数据
-  export() {
-    return {
-      input_text: this.data.input_text,
-      force: this.properties.forminfo.force,
-      role: this.properties.forminfo.role }
-  },
-  ready:function(){
-     let ops=this.properties.forminfo.data;
-     this.setData({
-        input_text:ops[0].name
-     });
-  },
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    bindPickerChange:function(e){
-      let lists=this.properties.forminfo.data;
-      console.log(lists[e.detail.value].name)
-      this.setData({   //给变量赋值
-        hx_index: e.detail.value,
-        input_text: lists[e.detail.value].name
-      })
-    }
-  }
-})

+ 0 - 4
components/text-picker/text-picker.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 17
components/text-picker/text-picker.wxml

@@ -1,17 +0,0 @@
-<!--components/text-picker/text-picker.wxml-->
-<view class='reports-form-box form-inner'>
-          <view class='reports-form-input input-all-width'>
-            <view class='form-inputname'>{{forminfo.label}}<text wx:if="{{forminfo.force}}" class="force_text">*</text></view>
-            <picker class='form-inputtext'
-             bindchange="bindPickerChange"
-             value="{{forminfo.data[hx_index].id}}" 
-             data-selecthx="{{forminfo.data[hx_index].name}}"
-             range-key="{{'name'}}"  
-             value="{{index}}" 
-             range="{{forminfo.data}}">
-              <view class="picker">
-                {{forminfo.data[hx_index].name}}
-              </view>
-            </picker>
-          </view>
-</view>

+ 0 - 1
components/text-picker/text-picker.wxss

@@ -1 +0,0 @@
-/* components/text-picker/text-picker.wxss */

+ 0 - 50
components/text-time/text-time.js

@@ -1,50 +0,0 @@
-// components/my-form/my-input.js
-Component({
-  /**
-   * 组件的初始数据
-   */
-  options: {
-    addGlobalClass: true,
-  },
-  properties: {
-    label: {
-      type: String,
-      value: '',
-    },
-    formid: {
-      type: String,
-      value: '',
-    },
-    forminfo: {
-      type: Object,
-      value: {}
-    }
-  },
-  data: {
-    input_text: '',
-  },
-  behaviors: ['wx://component-export'],
-  //组件最终对外导出的数据
-  export() {
-    return {
-      input_text: this.data.input_text,
-      force: this.properties.forminfo.force,
-      role: this.properties.forminfo.role }
-  },
-  /**
-   * 组件的方法列表
-   */
-  
-  ready: function () {
-   
-    console.log(this.properties.forminfo);
-  },
-  
-  methods: {
-    bindPickerChange: function (e) {
-      this.setData({
-        input_text: e.detail.value
-      });
-    }
-  }
-})

+ 0 - 4
components/text-time/text-time.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 24
components/text-time/text-time.wxml

@@ -1,24 +0,0 @@
-<!--components/text-time/text-time.wxml-->
-<view class='reports-form-box form-inner'>
-          <view class='reports-form-input input-all-width'>
-            <view class='form-inputname'>{{forminfo.label}}<text wx:if="{{forminfo.force}}" class="force_text">*</text></view>
-        
-            <picker class='form-inputtext picker-add'
-             bindchange="bindPickerChange"
-             mode="{{forminfo.timeType}}"
-             start="{{forminfo.startTime}}"
-             end="{{forminfo.endTime}}"
-             value="{{input_text}}">
-              <view class="picker">
-                  {{input_text}}
-              </view>
-            </picker>
-          
-
-             <!-- <picker mode="time" value="{{time}}" start="09:01" end="21:01" bindchange="bindTimeChange">
-    <view class="picker">
-      当前选择: {{time}}
-    </view>
-  </picker> -->
-          </view>
-</view>

+ 0 - 1
components/text-time/text-time.wxss

@@ -1 +0,0 @@
-/* components/text-time/text-time.wxss */

+ 0 - 85
components/trtc-room/common/constants.js

@@ -1,85 +0,0 @@
-export const EVENT = {
-  LOCAL_JOIN: 'LOCAL_JOIN', // 本地进房成功
-  LOCAL_LEAVE: 'LOCAL_LEAVE', // 本地退房
-  REMOTE_USER_JOIN: 'REMOTE_USER_JOIN', // 远端用户进房
-  REMOTE_USER_LEAVE: 'REMOTE_USER_LEAVE', // 远端用户退房
-  REMOTE_VIDEO_ADD: 'REMOTE_VIDEO_ADD', // 远端视频流添加事件,当远端用户取消发布音频流后会收到该通知
-  REMOTE_VIDEO_REMOVE: 'REMOTE_VIDEO_REMOVE', // 远端视频流移出事件,当远端用户取消发布音频流后会收到该通知
-  REMOTE_AUDIO_ADD: 'REMOTE_AUDIO_ADD', // 远端音频流添加事件,当远端用户取消发布音频流后会收到该通知
-  REMOTE_AUDIO_REMOVE: 'REMOTE_AUDIO_REMOVE', // 远端音频流移除事件,当远端用户取消发布音频流后会收到该通知
-  REMOTE_STATE_UPDATE: 'REMOTE_STATE_UPDATE', // 远端用户播放状态变更
-  LOCAL_NET_STATE_UPDATE: 'LOCAL_NET_STATE_UPDATE', // 本地推流网络状态变更
-  REMOTE_NET_STATE_UPDATE: 'REMOTE_NET_STATE_UPDATE', // 远端用户网络状态变更
-  LOCAL_AUDIO_VOLUME_UPDATE: 'LOCAL_AUDIO_VOLUME_UPDATE', // 本地音量变更
-  REMOTE_AUDIO_VOLUME_UPDATE: 'REMOTE_AUDIO_VOLUME_UPDATE', // 远端用户音量变更
-  VIDEO_FULLSCREEN_UPDATE: 'VIDEO_FULLSCREEN_UPDATE', // 调用 player requestFullScreen 或者 exitFullScreen 后触发
-  BGM_PLAY_START: 'BGM_PLAY_START', // 调用 LivePusherContext.playBGM(Object object)
-  BGM_PLAY_FAIL: 'BGM_PLAY_FAIL', //
-  BGM_PLAY_PROGRESS: 'BGM_PLAY_PROGRESS', // bgm 播放时间戳变更
-  BGM_PLAY_COMPLETE: 'BGM_PLAY_COMPLETE', // bgm 播放结束 或者 调用 LivePusherContext.stopBGM() ?
-  ERROR: 'ERROR', // pusher 出现错误
-  IM_READY: 'IM_READY', // IM SDK 可用
-  IM_MESSAGE_RECEIVED: 'IM_MESSAGE_RECEIVED', // 收到IM 消息
-  IM_NOT_READY: 'IM_NOT_READY', // IM SDK 不可用
-  IM_KICKED_OUT: 'IM_KICKED_OUT', // IM SDK 下线
-  IM_ERROR: 'IM_ERROR', // IM SDK 下线
-}
-
-export const DEFAULT_COMPONENT_CONFIG = {
-  sdkAppID: '',
-  userID: '',
-  userSig: '',
-  template: '',
-  debugMode: false, // 是否开启调试模式
-  enableIM: false, // 是否开启 IM
-}
-
-export const DEFAULT_PUSHER_CONFIG = {
-  url: '',
-  mode: 'RTC', // RTC:实时通话(trtc sdk) live:直播模式(liteav sdk)
-  autopush: false, // 自动推送
-  enableCamera: false, // 是否开启摄像头
-  enableMic: false, // 是否开启麦克风
-  enableAgc: false, // 是否开启音频自动增益
-  enableAns: false, // 是否开启音频噪声抑制
-  enableEarMonitor: false, // 是否开启耳返(目前只在iOS平台有效)
-  enableAutoFocus: true, // 是否自动对焦
-  enableZoom: false, // 是否支持调整焦距
-  minBitrate: 600, // 最小码率
-  maxBitrate: 900, // 最大码率
-  videoWidth: 360, // 视频宽(若设置了视频宽高就会忽略aspect)
-  videoHeight: 640, // 视频高(若设置了视频宽高就会忽略aspect)
-  beautyLevel: 0, // 美颜,取值范围 0-9 ,0 表示关闭
-  whitenessLevel: 0, // 美白,取值范围 0-9 ,0 表示关闭
-  videoOrientation: 'vertical', // vertical horizontal
-  videoAspect: '9:16', // 宽高比,可选值有 3:4,9:16
-  frontCamera: 'front', // 前置或后置摄像头,可选值:front,back
-  enableRemoteMirror: false, // 设置推流画面是否镜像,产生的效果会表现在 live-player
-  localMirror: 'auto', // auto:前置摄像头镜像,后置摄像头不镜像(系统相机的表现)enable:前置摄像头和后置摄像头都镜像 disable: 前置摄像头和后置摄像头都不镜像
-  enableBackgroundMute: false, // 进入后台时是否静音
-  audioQuality: 'high', // 高音质(48KHz)或低音质(16KHz),可选值:high,low
-  audioVolumeType: 'voicecall', // 声音类型 可选值: media: 媒体音量,voicecall: 通话音量
-  audioReverbType: 0, // 音频混响类型 0: 关闭 1: KTV 2: 小房间 3:大会堂 4:低沉 5:洪亮 6:金属声 7:磁性
-  // waitingImage: 'https://web-player-1252463788.cos.ap-shanghai.myqcloud.com/demo/1px.png', // 当微信切到后台时的垫片图片 trtc暂不支持
-  waitingImage: 'https://mc.qcloudimg.com/static/img/daeed8616ac5df256c0591c22a65c4d3/pause_publish.jpg', // 当微信切到后台时的垫片图片 trtc暂不支持
-  waitingImageHash: '',
-  beautyStyle: 'smooth', // 美颜类型,取值有:smooth: 光滑 、nature: 自然
-  filter: '', // standard: 标准 pink: 粉嫩 nostalgia: 怀旧 blues: 蓝调 romantic: 浪漫  cool: 清凉 fresher: 清新 solor: 日系 aestheticism: 唯美 whitening:美白 cerisered: 樱红
-}
-
-export const DEFAULT_PLAYER_CONFIG = {
-  src: '',
-  mode: 'RTC',
-  autoplay: true, // 7.0.9 必须设置为true,否则 Android 有概率调用play()失败
-  muteAudio: true, // 默认不拉取音频,需要手动订阅,如果要快速播放,需要设置false
-  muteVideo: true, // 默认不拉取视频,需要手动订阅,如果要快速播放,需要设置false
-  orientation: 'vertical', // 画面方向 vertical horizontal
-  objectFit: 'fillCrop', // 填充模式,可选值有 contain,fillCrop
-  enableBackgroundMute: false, // 进入后台时是否静音(已废弃,默认退台静音)
-  minCache: 1, // 最小缓冲区,单位s(RTC 模式推荐 0.2s)
-  maxCache: 2, // 最大缓冲区,单位s(RTC 模式推荐 0.8s)
-  soundMode: 'speaker', // 声音输出方式 ear speaker
-  enableRecvMessage: 'false', // 是否接收SEI消息
-  autoPauseIfNavigate: true, // 当跳转到其它小程序页面时,是否自动暂停本页面的实时音视频播放
-  autoPauseIfOpenNative: true, // 当跳转到其它微信原生页面时,是否自动暂停本页面的实时音视频播放
-}

+ 0 - 346
components/trtc-room/controller/user-controller.js

@@ -1,346 +0,0 @@
-import Event from '../utils/event.js'
-import User from '../model/user.js'
-import Stream from '../model/stream.js'
-import { EVENT } from '../common/constants.js'
-
-const TAG_NAME = 'UserController'
-/**
- * 通讯成员管理
- */
-class UserController {
-  constructor(componentContext) {
-    // userMap 用于存储完整的数据结构
-    this.userMap = new Map()
-    // userList 用于存储简化的用户数据 Object,包括 {userID hasMainAudio hasMainVideo hasAuxAudio hasAuxVideo}
-    this.userList = []
-    // streamList 存储steam 对象列表,用于 trtc-room 渲染 player
-    this.streamList = []
-    this._emitter = new Event()
-    this.componentContext = componentContext
-    this.isNewVersion = componentContext.isNewVersion
-  }
-  userEventHandler(event) {
-    const code = event.detail.code
-    let data
-    if (event.detail.message && typeof event.detail.message === 'string') {
-      try {
-        data = JSON.parse(event.detail.message)
-      } catch (exception) {
-        console.warn(TAG_NAME, 'userEventHandler 数据格式错误', exception)
-        return false
-      }
-    } else {
-      console.warn(TAG_NAME, 'userEventHandler 数据格式错误')
-      return false
-    }
-    switch (code) {
-      case 1020:
-        // console.log(TAG_NAME, '远端用户全量列表更新:', code)
-        if (!this.isNewVersion) {
-          // TODO 旧版SDK处理逻辑,返回全量的用户列表,需要对userList 进行前后对比,筛选出新增用户,暂不实现
-        }
-        break
-      case 1031:
-        // console.log(TAG_NAME, '远端用户进房通知:', code)
-        // 1031 有新用户
-        // {
-        //   "userlist":[
-        //          {
-        //              "userid":"webrtc11"
-        //          }
-        //      ]
-        // }
-        this.addUser(data)
-        break
-      case 1032:
-        // console.log(TAG_NAME, '远端用户退房通知:', code)
-        // 1032 有用户退出
-        this.removeUser(data)
-        break
-      case 1033:
-        // console.log(TAG_NAME, '远端用户视频状态位变化通知:', code)
-        // 1033 用户视频状态变化,新增stream或者更新stream 状态
-        // {
-        //   "userlist":[
-        //          {
-        //              "userid":"webrtc11",
-        //              "playurl":" room://rtc.tencent.com?userid=xxx&streamtype=main",
-        //              "streamtype":"main",
-        //              "hasvideo":true
-        //          }
-        //      ]
-        // }
-        this.updateUserVideo(data)
-        break
-      case 1034:
-        // console.log(TAG_NAME, '远端用户音频状态位变化通知:', code)
-        // 1034 用户音频状态变化
-        // {
-        //   "userlist":[
-        //          {
-        //              "userid":"webrtc11",
-        //              "playurl":" room://rtc.tencent.com?userid=xxx&streamtype=main",
-        //              "hasaudio":false
-        //          }
-        //      ]
-        // }
-        this.updateUserAudio(data)
-        break
-    }
-  }
-  /**
-   * 处理用户进房事件
-   * @param {Object} data pusher 下发的数据
-   */
-  addUser(data) {
-    // console.log(TAG_NAME, 'addUser', data)
-    const incomingUserList = data.userlist
-    const userMap = this.userMap
-    if (Array.isArray(incomingUserList) && incomingUserList.length > 0) {
-      incomingUserList.forEach((item) => {
-        const userID = item.userid
-        // 已经在 map 中的用户
-        let user = this.getUser(userID)
-        if (!user) {
-          // 新增用户
-          user = new User({ userID: userID })
-          this.userList.push({
-            userID: userID,
-          })
-        }
-        userMap.set(userID, user)
-        this._emitter.emit(EVENT.REMOTE_USER_JOIN, { userID: userID, userList: this.userList })
-        // console.log(TAG_NAME, 'addUser', item, userMap.get(userID), this.userMap)
-      })
-    }
-  }
-  /**
-   * 处理用户退房事件
-   * @param {Object} data pusher 下发的数据 {userlist}
-   */
-  removeUser(data) {
-    // console.log(TAG_NAME, 'removeUser', data)
-    const incomingUserList = data.userlist
-    if (Array.isArray(incomingUserList) && incomingUserList.length > 0) {
-      incomingUserList.forEach((item) => {
-        const userID = item.userid
-        let user = this.getUser(userID)
-        // 偶现SDK触发退房事件前没有触发进房事件
-        if (!user || !user.streams) {
-          return
-        }
-        // 从userList 里删除指定的用户和 stream
-        this._removeUserAndStream(userID)
-        // 重置
-        user.streams['main'] && user.streams['main'].reset()
-        user.streams['aux'] && user.streams['aux'].reset()
-        // 用户退出,释放引用,外部调用该 user 所有stream 的 playerContext.stop() 方法停止播放
-        // TODO 触发时机提前了,方便外部用户做出处理,时机仍需进一步验证
-        this._emitter.emit(EVENT.REMOTE_USER_LEAVE, { userID: userID, userList: this.userList, streamList: this.streamList })
-        user = undefined
-        this.userMap.delete(userID)
-        // console.log(TAG_NAME, 'removeUser', this.userMap)
-      })
-    }
-  }
-  /**
-   * 处理用户视频通知事件
-   * @param {Object} data pusher 下发的数据 {userlist}
-   */
-  updateUserVideo(data) {
-    console.log(TAG_NAME, 'updateUserVideo', data)
-    const incomingUserList = data.userlist
-    if (Array.isArray(incomingUserList) && incomingUserList.length > 0) {
-      incomingUserList.forEach((item) => {
-        const userID = item.userid
-        const streamType = item.streamtype
-        const streamID = userID + '_' + streamType
-        const hasVideo = item.hasvideo
-        const src = item.playurl
-        const user = this.getUser(userID)
-        // 更新指定用户的属性
-        if (user) {
-          // 查找对应的 stream
-          let stream = user.streams[streamType]
-          console.log(TAG_NAME, 'updateUserVideo start', user, streamType, stream)
-          // 常规逻辑
-          // 新来的stream,新增到 user.steams 和 streamList,streamList 包含所有用户(有音频或视频)的 stream
-          if (!stream) {
-            // 不在 user streams 里,需要新建
-            user.streams[streamType] = stream = new Stream({ userID, streamID, hasVideo, src, streamType })
-            this._addStream(stream)
-          } else {
-            // 更新 stream 属性
-            stream.setProperty({ hasVideo })
-            if (!hasVideo && !stream.hasAudio) {
-              this._removeStream(stream)
-            }
-            // or
-            // if (hasVideo) {
-            //   stream.setProperty({ hasVideo })
-            // } else if (!stream.hasAudio) {
-            //   // hasVideo == false && hasAudio == false
-            //   this._removeStream(stream)
-            // }
-          }
-          // 特殊逻辑
-          if (streamType === 'aux') {
-            if (hasVideo) {
-              // 辅流需要修改填充模式
-              stream.objectFit = 'contain'
-              this._addStream(stream)
-            } else {
-              // 如果是辅流要移除该 stream,否则需要移除 player
-              this._removeStream(stream)
-            }
-          }
-          // 更新所属user 的 hasXxx 值
-          this.userList.find((item)=>{
-            if (item.userID === userID) {
-              item[`has${streamType.replace(/^\S/, (s) => s.toUpperCase())}Video`] = hasVideo
-              return true
-            }
-          })
-          console.log(TAG_NAME, 'updateUserVideo end', user, streamType, stream)
-          const eventName = hasVideo ? EVENT.REMOTE_VIDEO_ADD : EVENT.REMOTE_VIDEO_REMOVE
-          this._emitter.emit(eventName, { stream: stream, streamList: this.streamList, userList: this.userList })
-          // console.log(TAG_NAME, 'updateUserVideo', user, stream, this.userMap)
-        }
-      })
-    }
-  }
-  /**
-   * 处理用户音频通知事件
-   * @param {Object} data pusher 下发的数据 {userlist}
-   */
-  updateUserAudio(data) {
-    // console.log(TAG_NAME, 'updateUserAudio', data)
-    const incomingUserList = data.userlist
-    if (Array.isArray(incomingUserList) && incomingUserList.length > 0) {
-      incomingUserList.forEach((item) => {
-        const userID = item.userid
-        // 音频只跟着 stream main ,这里只修改 main
-        const streamType = 'main'
-        const streamID = userID + '_' + streamType
-        const hasAudio = item.hasaudio
-        const src = item.playurl
-        const user = this.getUser(userID)
-        if (user) {
-          let stream = user.streams[streamType]
-          // if (!stream) {
-          //   user.streams[streamType] = stream = new Stream({ streamType: streamType })
-          //   this._addStream(stream)
-          // }
-
-          // 常规逻辑
-          // 新来的stream,新增到 user.steams 和 streamList,streamList 包含所有用户的 stream
-          if (!stream) {
-            // 不在 user streams 里,需要新建
-            user.streams[streamType] = stream = new Stream({ userID, streamID, hasAudio, src, streamType })
-            this._addStream(stream)
-          } else {
-            // 更新 stream 属性
-            stream.setProperty({ hasAudio })
-            if (!hasAudio && !stream.hasVideo) {
-              this._removeStream(stream)
-            }
-            // or
-            // if (hasAudio) {
-            //   stream.setProperty({ hasAudio })
-            // } else if (!stream.hasVideo) {
-            // // hasVideo == false && hasAudio == false
-            //   this._removeStream(stream)
-            // }
-          }
-
-          // stream.userID = userID
-          // stream.streamID = userID + '_' + streamType
-          // stream.hasAudio = hasAudio
-          // stream.src = src
-          // 更新所属 user 的 hasXxx 值
-          this.userList.find((item)=>{
-            if (item.userID === userID) {
-              item[`has${streamType.replace(/^\S/, (s) => s.toUpperCase())}Audio`] = hasAudio
-              return true
-            }
-          })
-          const eventName = hasAudio ? EVENT.REMOTE_AUDIO_ADD : EVENT.REMOTE_AUDIO_REMOVE
-          this._emitter.emit(eventName, { stream: stream, streamList: this.streamList, userList: this.userList })
-          // console.log(TAG_NAME, 'updateUserAudio', user, stream, this.userMap)
-        }
-      })
-    }
-  }
-  /**
-   *
-   * @param {String} userID 用户ID
-   * @returns {Object}
-   */
-  getUser(userID) {
-    return this.userMap.get(userID)
-  }
-  getStream({ userID, streamType }) {
-    const user = this.userMap.get(userID)
-    if (user) {
-      return user.streams[streamType]
-    }
-    return undefined
-  }
-  getUserList() {
-    return this.userList
-  }
-  getStreamList() {
-    return this.streamList
-  }
-  /**
-   * 重置所有user 和 steam
-   * @returns {Object}
-   */
-  reset() {
-    this.streamList.forEach((item)=>{
-      item.reset()
-    })
-    this.streamList = []
-    this.userList = []
-    this.userMap.clear()
-    return {
-      userList: this.userList,
-      streamList: this.streamList,
-    }
-  }
-  on(eventCode, handler, context) {
-    this._emitter.on(eventCode, handler, context)
-  }
-  off(eventCode, handler) {
-    this._emitter.off(eventCode, handler)
-  }
-  /**
-   * 删除用户和所有的 stream
-   * @param {String} userID 用户ID
-   */
-  _removeUserAndStream(userID) {
-    this.streamList = this.streamList.filter((item)=>{
-      return item.userID !== userID && item.userID !== ''
-    })
-    this.userList = this.userList.filter((item)=>{
-      return item.userID !== userID
-    })
-  }
-  _addStream(stream) {
-    if (!this.streamList.includes(stream)) {
-      this.streamList.push(stream)
-    }
-  }
-  _removeStream(stream) {
-    this.streamList = this.streamList.filter((item)=>{
-      if (item.userID === stream.userID && item.streamType === stream.streamType) {
-        return false
-      }
-      return true
-    })
-    const user = this.getUser(stream.userID)
-    user.streams[stream.streamType] = undefined
-  }
-}
-
-export default UserController

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 14
components/trtc-room/libs/mta_analysis.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 1
components/trtc-room/libs/tim-wx.js


+ 0 - 33
components/trtc-room/model/pusher.js

@@ -1,33 +0,0 @@
-import { DEFAULT_PUSHER_CONFIG } from '../common/constants.js'
-
-class Pusher {
-  constructor(options) {
-    Object.assign(this, DEFAULT_PUSHER_CONFIG, {
-      isVisible: true, // 手Q初始化时不能隐藏 puser和player 否则黑屏
-    }, options)
-  }
-  /**
-   * 通过wx.createLivePusherContext 获取<live-pusher> context
-   * @param {Object} context 组件上下文
-   * @returns {Object} livepusher context
-   */
-  getPusherContext(context) {
-    if (!this.pusherContext) {
-      this.pusherContext = wx.createLivePusherContext(context)
-    }
-    return this.pusherContext
-  }
-  reset() {
-    console.log('Pusher reset', this.pusherContext)
-    if (this.pusherContext) {
-      console.log('Pusher pusherContext.stop()')
-      this.pusherContext.stop()
-      this.pusherContext = null
-    }
-    Object.assign(this, DEFAULT_PUSHER_CONFIG, {
-      isVisible: true,
-    })
-  }
-}
-
-export default Pusher

+ 0 - 38
components/trtc-room/model/stream.js

@@ -1,38 +0,0 @@
-// 一个stream 对应一个 player
-import { DEFAULT_PLAYER_CONFIG } from '../common/constants.js'
-
-class Stream {
-  constructor(options) {
-    Object.assign(this, DEFAULT_PLAYER_CONFIG, {
-      userID: '', // 该stream 关联的userID
-      streamType: '', // stream 类型 [main small] aux
-      streamID: '', // userID + '_' + streamType
-      isVisible: true, // 手Q初始化时不能隐藏 puser和player 否则黑屏。iOS 微信初始化时不能隐藏,否则同层渲染失败,player会置顶
-      hasVideo: false,
-      hasAudio: false,
-      volume: 0, // 音量大小 0~100
-      playerContext: undefined, // playerContext 依赖component context来获取,目前只能在渲染后获取
-    }, options)
-  }
-  setProperty(options) {
-    Object.assign(this, options)
-  }
-  reset() {
-    if (this.playerContext) {
-      this.playerContext.stop()
-      this.playerContext = undefined
-    }
-    Object.assign(this, DEFAULT_PLAYER_CONFIG, {
-      userID: '', // 该stream 关联的userID
-      streamType: '', // stream 类型 [main small] aux
-      streamID: '',
-      isVisible: true,
-      hasVideo: false,
-      hasAudio: false,
-      volume: 0, // 音量大小 0~100
-      playerContext: undefined,
-    })
-  }
-}
-
-export default Stream

+ 0 - 17
components/trtc-room/model/user.js

@@ -1,17 +0,0 @@
-class User {
-  constructor(options) {
-    Object.assign(this, {
-      userID: '',
-      // hasMainStream: false, // 触发 1034 且stream type 为 main 即为true
-      // hasAuxStream: false, // 触发 1034 且stream type 为 aux 即为true
-      // hasSmallStream: false, // 触发 1034 且stream type 为 small 即为true
-      streams: {
-        // main: mainStream
-        // aux: auxStream
-      }, // 有0~2个Stream, 进房没有推流,main aux, small 特殊处理,small 和 main 同时只播放一路
-      // stream 是用于渲染 live-player 的数据源
-    }, options)
-  }
-}
-
-export default User

BIN
components/trtc-room/static/audio-active.png


BIN
components/trtc-room/static/audio-false.png


BIN
components/trtc-room/static/audio-true.png


BIN
components/trtc-room/static/back.png


BIN
components/trtc-room/static/beauty-false.png


BIN
components/trtc-room/static/beauty-true.png


BIN
components/trtc-room/static/beauty.png


BIN
components/trtc-room/static/camera-false.png


BIN
components/trtc-room/static/camera-true.png


BIN
components/trtc-room/static/camera.png


BIN
components/trtc-room/static/close-white-big.png


BIN
components/trtc-room/static/close-white.png


BIN
components/trtc-room/static/display-pause-false.png


BIN
components/trtc-room/static/display-pause-true.png


BIN
components/trtc-room/static/display-pause-white.png


BIN
components/trtc-room/static/display-play-false.png


BIN
components/trtc-room/static/display-play-true.png


BIN
components/trtc-room/static/display-play-white.png


BIN
components/trtc-room/static/fullscreen-white.png


BIN
components/trtc-room/static/fullscreen.png


BIN
components/trtc-room/static/hangup-red.png


BIN
components/trtc-room/static/hangup.png


BIN
components/trtc-room/static/im-disable.png


BIN
components/trtc-room/static/im-white.png


BIN
components/trtc-room/static/im.png


BIN
components/trtc-room/static/list-white.png


BIN
components/trtc-room/static/list.png


BIN
components/trtc-room/static/loading.png


BIN
components/trtc-room/static/micro-open.png


BIN
components/trtc-room/static/more-disable.png


BIN
components/trtc-room/static/more-enable.png


BIN
components/trtc-room/static/more-white.png


BIN
components/trtc-room/static/music-white.png


BIN
components/trtc-room/static/mute-camera-gray.png


BIN
components/trtc-room/static/mute-camera-white.png


BIN
components/trtc-room/static/mute-mic-gray.png


BIN
components/trtc-room/static/mute-mic-white.png


BIN
components/trtc-room/static/phone.png


BIN
components/trtc-room/static/setting-white.png


BIN
components/trtc-room/static/setting.png


BIN
components/trtc-room/static/slide-up.png


BIN
components/trtc-room/static/speaker-false.png


BIN
components/trtc-room/static/speaker-true.png


BIN
components/trtc-room/static/speaker-white.png


BIN
components/trtc-room/static/switch.png


+ 0 - 104
components/trtc-room/template/1v1/1v1.wxml

@@ -1,104 +0,0 @@
-<!-- template 1v1 -->
-<template name='1v1'>
-  <view class="template-1v1">
-    <view wx:for="{{streamList}}" wx:key="streamID" wx:if="{{item.src && (item.hasVideo || item.hasAudio)}}" class="view-container player-container {{item.isVisible?'':'none'}}">
-      <live-player
-        class="player"
-        id="{{item.streamID}}"
-        data-userid="{{item.userID}}"
-        data-streamid="{{item.streamID}}"
-        data-streamtype="{{item.streamType}}"
-        src= "{{item.src}}"
-        mode= "RTC"
-        autoplay= "{{item.autoplay}}"
-        mute-audio= "{{item.muteAudio}}"
-        mute-video= "{{item.muteVideo}}"
-        orientation= "{{item.orientation}}"
-        object-fit= "{{item.objectFit}}"
-        background-mute= "{{item.enableBackgroundMute}}"
-        min-cache= "{{item.minCache}}"
-        max-cache= "{{item.maxCache}}"
-        sound-mode= "{{item.soundMode}}"
-        enable-recv-message= "{{item.enableRecvMessage}}"
-        auto-pause-if-navigate= "{{item.autoPauseIfNavigate}}"
-        auto-pause-if-open-native= "{{item.autoPauseIfOpenNative}}"
-        debug="{{debug}}"
-        bindstatechange="_playerStateChange"
-        bindfullscreenchange="_playerFullscreenChange"
-        bindnetstatus="_playerNetStatus"
-        bindaudiovolumenotify  ="_playerAudioVolumeNotify"
-      />
-    </view>
-    <view class="view-container pusher-container {{pusher.isVisible?'':'none'}} {{streamList.length===0? 'fullscreen':''}}">
-      <live-pusher
-        class="pusher"
-        url="{{pusher.url}}"
-        mode="{{pusher.mode}}"
-        autopush="{{pusher.autopush}}"
-        enable-camera="{{pusher.enableCamera}}"
-        enable-mic="{{pusher.enableMic}}"
-        muted="{{!pusher.enableMic}}"
-        enable-agc="{{pusher.enableAgc}}"
-        enable-ans="{{pusher.enableAns}}"
-        enable-ear-monitor="{{pusher.enableEarMonitor}}"
-        auto-focus="{{pusher.enableAutoFocus}}"
-        zoom="{{pusher.enableZoom}}"
-        min-bitrate="{{pusher.minBitrate}}"
-        max-bitrate="{{pusher.maxBitrate}}"
-        video-width="{{pusher.videoWidth}}"
-        video-height="{{pusher.videoHeight}}"
-        beauty="{{pusher.beautyLevel}}"
-        whiteness="{{pusher.whitenessLevel}}"
-        orientation="{{pusher.videoOrientation}}"
-        aspect="{{pusher.videoAspect}}"
-        device-position="{{pusher.frontCamera}}"
-        remote-mirror="{{pusher.enableRemoteMirror}}"
-        local-mirror="{{pusher.localMirror}}"
-        background-mute="{{pusher.enableBackgroundMute}}"
-        audio-quality="{{pusher.audioQuality}}"
-        audio-volume-type="{{pusher.audioVolumeType}}"
-        audio-reverb-type="{{pusher.audioReverbType}}"
-        waiting-image="{{pusher.waitingImage}}"
-        debug="{{debug}}"
-        bindstatechange="_pusherStateChangeHandler"
-        bindnetstatus="_pusherNetStatusHandler"
-        binderror="_pusherErrorHandler"
-        bindbgmstart="_pusherBGMStartHandler"
-        bindbgmprogress="_pusherBGMProgressHandler"
-        bindbgmcomplete="_pusherBGMCompleteHandler"
-        bindaudiovolumenotify="_pusherAudioVolumeNotify"
-      />
-      <view class="loading" wx:if="{{streamList.length === 0}}">
-        <view class="loading-img">
-          <image src="./static/loading.png" class="rotate-img"></image>
-        </view>
-        <view class="loading-text">等待接听中...</view>
-      </view>
-    </view>
-    <view class="handle-btns">
-      <view class="btn-normal" bindtap="_toggleAudio">
-        <image class="btn-image" src="{{pusher.enableMic? './static/audio-true.png': './static/audio-false.png'}} "></image>
-      </view>
-      <view class="btn-normal" bindtap="switchCamera" >
-        <image class="btn-image" src="./static/switch.png"></image>
-      </view>
-      <!-- <view class="btn-normal" bindtap="_toggleVideo">
-        <image class="btn-image" src="{{pusher.enableCamera? './static/camera-true.png': './static/camera-false.png'}} "></image>
-      </view> -->
-      <view class="btn-normal" bindtap="_toggleSoundMode">
-        <image class="btn-image" src="{{streamList[0].soundMode === 'ear' ? './static/phone.png': './static/speaker-true.png'}} "></image>
-      </view>
-    </view>
-    <view class="bottom-btns">
-      <view class="btn-normal" data-key="beautyLevel" data-value="9|0" data-value-type="number" bindtap="_setPuserProperty">
-        <image class="btn-image" src="{{pusher.beautyLevel == 9 ? './static/beauty-true.png': './static/beauty-false.png'}} "></image>
-      </view>
-      <view class="btn-hangup" bindtap="_hangUp">
-        <image class="btn-image" src="./static/hangup.png"></image>
-      </view>
-      <view class="btn-normal" bindtap="_toggleIMPanel">
-        <image class="btn-image" src="{{enableIM? './static/im.png': './static/im-disable.png'}}"></image>
-      </view>
-    </view>
-  </view>
-</template>

+ 0 - 112
components/trtc-room/template/1v1/1v1.wxss

@@ -1,112 +0,0 @@
-/* 1v1 视频电话模式 */
-.template-1v1{
-  width: 100vw;
-  height: 100vh;
-  position: relative;
-}
-.template-1v1 .pusher-container{
-  width: 240rpx;
-  height: 320rpx;
-  position: absolute;
-  right: 20rpx;
-  top: 160rpx;
-  z-index: 2;
-}
-
-.template-1v1 .pusher-container.fullscreen{
-  width: 100vw;
-  height: 100vh;
-  top: 0;
-  right: 0;
-}
-
-.template-1v1 .loading {
-  position: absolute;
-  top: 40vh;
-  left: 50vw;
-  transform: translate(-50%, 0);
-  width: 300rpx;
-  height: 250rpx;
-  border-radius: 12rpx;
-  background: rgba(0,0,0,0.6);
-  color: white;
-  padding: 40rpx;
-  display: flex;
-  flex-direction: column;
-}
-.template-1v1 .loading-img {
-  height: 200rpx;
-  display:flex;
-  justify-content: center;
-  align-items: center;
-  animation: rotate 2s linear infinite;
-}
-.template-1v1 .rotate-img {
-  width:160rpx;
-  height: 160rpx;
-}
-.template-1v1 .loading-text {
-  width: 100%;
-  padding-top: 40rpx;
-  text-align: center;
-}
-@keyframes rotate {
-  0%{ transform: rotate(0deg);}
-  50%{ transform: rotate(180deg);}
-  100%{ transform: rotate(360deg);}
-}
-.template-1v1 .player-container:nth-child(1){
-  width: 100vw;
-  height: 100vh;
-}
-
-.template-1v1 .handle-btns {
-  position: absolute;
-  z-index: 3;
-  bottom: 15vh;
-  width: 100vw;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-around;
-}
-
-.template-1v1 .bottom-btns {
-  position: absolute;
-  z-index: 3;
-  bottom: 3vh;
-  width: 100vw;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-around;
-}
-
-/* .template-1v1 image {
-  width: 4vh;
-  height: 4vh;
-} */
-
-.template-1v1 .btn-normal {
-  width: 8vh;
-  height: 8vh;
-  box-sizing: border-box;
-  display: flex;
-  background: white;
-  justify-content: center;
-  align-items: center;
-  border-radius: 50%;
-}
-.template-1v1 .btn-hangup .btn-image,
-.template-1v1 .btn-normal .btn-image{
-  width: 4vh;
-  height: 4vh;
-}
-.template-1v1 .btn-hangup  {
-  width: 8vh;
-  height: 8vh;
-  background: #f75c45;
-  box-sizing: border-box;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  border-radius: 50%;
-}

+ 0 - 75
components/trtc-room/template/custom/custom.wxml

@@ -1,75 +0,0 @@
-<!-- template custom -->
-<template name='custom'>
-  <view class="template-custom">
-    <view class="players-container">
-      <view wx:for="{{streamList}}" wx:key="streamID" wx:if="{{item.src && (item.hasVideo || item.hasAudio)}}" class="view-container player-container {{item.isVisible?'':'none'}}" style="left:{{item.xAxis}};top:{{item.yAxis}};width:{{item.width}};height:{{item.height}};z-index:{{item.zIndex}};">
-        <live-player
-          class="player" 
-          id="{{item.streamID}}" 
-          data-userid="{{item.userID}}"
-          data-streamid="{{item.streamID}}"
-          data-streamtype="{{item.streamType}}"
-          src= "{{item.src}}"
-          mode= "{{item.mode}}"
-          autoplay= "{{item.autoplay}}"
-          mute-audio= "{{item.muteAudio}}"
-          mute-video= "{{item.muteVideo}}"
-          orientation= "{{item.orientation}}"
-          object-fit= "{{item.objectFit}}"
-          background-mute= "{{item.enableBackgroundMute}}"
-          min-cache= "{{item.minCache}}"
-          max-cache= "{{item.maxCache}}"
-          sound-mode= "{{item.soundMode}}"
-          enable-recv-message= "{{item.enableRecvMessage}}"
-          auto-pause-if-navigate= "{{item.autoPauseIfNavigate}}"
-          auto-pause-if-open-native= "{{item.autoPauseIfOpenNative}}"
-          debug="{{debug}}"
-          bindstatechange="_playerStateChange"
-          bindfullscreenchange="_playerFullscreenChange"
-          bindnetstatus="_playerNetStatus"
-          bindaudiovolumenotify  ="_playerAudioVolumeNotify"
-        />
-      </view>
-    </view>
-    <view class="view-container pusher-container {{pusher.isVisible?'':'none'}}" style="left:{{pusher.xAxis}};top:{{pusher.yAxis}};width:{{pusher.width}};height:{{pusher.height}};z-index:{{pusher.zIndex}};">
-      <live-pusher 
-        class="pusher" 
-        url="{{pusher.url}}" 
-        mode="{{pusher.mode}}"
-        autopush="{{pusher.autopush}}"
-        enable-camera="{{pusher.enableCamera}}"
-        enable-mic="{{pusher.enableMic}}"
-        muted="{{!pusher.enableMic}}"
-        enable-agc="{{pusher.enableAgc}}"
-        enable-ans="{{pusher.enableAns}}"
-        enable-ear-monitor="{{pusher.enableEarMonitor}}"
-        auto-focus="{{pusher.enableAutoFocus}}"
-        zoom="{{pusher.enableZoom}}"
-        min-bitrate="{{pusher.minBitrate}}"
-        max-bitrate="{{pusher.maxBitrate}}"
-        video-width="{{pusher.videoWidth}}"
-        video-height="{{pusher.videoHeight}}"
-        beauty="{{pusher.beautyLevel}}"
-        whiteness="{{pusher.whitenessLevel}}"
-        orientation="{{pusher.videoOrientation}}"
-        aspect="{{pusher.videoAspect}}"
-        device-position="{{pusher.frontCamera}}"
-        remote-mirror="{{pusher.enableRemoteMirror}}"
-        local-mirror="{{pusher.localMirror}}"
-        background-mute="{{pusher.enableBackgroundMute}}"
-        audio-quality="{{pusher.audioQuality}}"
-        audio-volume-type="{{pusher.audioVolumeType}}"
-        audio-reverb-type="{{pusher.audioReverbType}}"
-        waiting-image="{{pusher.waitingImage}}"
-        debug="{{debug}}"
-        bindstatechange="_pusherStateChangeHandler"
-        bindnetstatus="_pusherNetStatusHandler"
-        binderror="_pusherErrorHandler"
-        bindbgmstart="_pusherBGMStartHandler"
-        bindbgmprogress="_pusherBGMProgressHandler"
-        bindbgmcomplete="_pusherBGMCompleteHandler"
-        bindaudiovolumenotify="_pusherAudioVolumeNotify"
-      />
-    </view>
-  </view>
-</template>

+ 0 - 11
components/trtc-room/template/custom/custom.wxss

@@ -1,11 +0,0 @@
-/* 通过方法自定义模式 */
-.template-custom{
-  /* 绝对定位模式 pusher 和 player 都用绝对定位*/
-  width: 100vw;
-  height: 100vh;
-  position: relative;
-}
-.template-custom .pusher-container,
-.template-custom .player-container{
-  position: absolute;
-}

+ 0 - 261
components/trtc-room/template/grid/grid.wxml

@@ -1,261 +0,0 @@
-<!-- template grid -->
-<template name='grid'>
-  <view class="template-grid">
-    <view class="column-layout">
-      <view class="column-1">
-        <view class="grid-scroll-container" bindtouchstart="_handleGridTouchStart" bindtouchend="_handleGridTouchEnd">
-          <!-- <view id="grid-container-id" class="grid-container {{visibleStreamList.length < 4 ? 'stream-' + visibleStreamList.length : visibleStreamList.length%2 == 0? 'stream-odd':'stream-even'}}"> -->
-          <view id="grid-container-id" class="grid-container {{visibleStreamList.length < 4 ? 'stream-' + visibleStreamList.length : 'stream-3'}}">
-            <view class="view-container pusher-container {{pusher.isVisible && ((gridCurrentPage === 1 && gridPlayerPerPage > 3) || gridPlayerPerPage < 4)?'':'none'}}">
-              <live-pusher
-                class="pusher"
-                url="{{pusher.url}}"
-                mode="{{pusher.mode}}"
-                autopush="{{pusher.autopush}}"
-                enable-camera="{{pusher.enableCamera}}"
-                enable-mic="{{pusher.enableMic}}"
-                muted="{{!pusher.enableMic}}"
-                enable-agc="{{pusher.enableAgc}}"
-                enable-ans="{{pusher.enableAns}}"
-                enable-ear-monitor="{{pusher.enableEarMonitor}}"
-                auto-focus="{{pusher.enableAutoFocus}}"
-                zoom="{{pusher.enableZoom}}"
-                min-bitrate="{{pusher.minBitrate}}"
-                max-bitrate="{{pusher.maxBitrate}}"
-                video-width="{{pusher.videoWidth}}"
-                video-height="{{pusher.videoHeight}}"
-                beauty="{{pusher.beautyLevel}}"
-                whiteness="{{pusher.whitenessLevel}}"
-                orientation="{{pusher.videoOrientation}}"
-                aspect="{{pusher.videoAspect}}"
-                device-position="{{pusher.frontCamera}}"
-                remote-mirror="{{pusher.enableRemoteMirror}}"
-                local-mirror="{{pusher.localMirror}}"
-                background-mute="{{pusher.enableBackgroundMute}}"
-                audio-quality="{{pusher.audioQuality}}"
-                audio-volume-type="{{pusher.audioVolumeType}}"
-                audio-reverb-type="{{pusher.audioReverbType}}"
-                waiting-image="{{pusher.waitingImage}}"
-                debug="{{debug}}"
-                beauty-style="{{pusher.beautyStyle}}"
-                filter="{{pusher.filter}}"
-                bindstatechange="_pusherStateChangeHandler"
-                bindnetstatus="_pusherNetStatusHandler"
-                binderror="_pusherErrorHandler"
-                bindbgmstart="_pusherBGMStartHandler"
-                bindbgmprogress="_pusherBGMProgressHandler"
-                bindbgmcomplete="_pusherBGMCompleteHandler"
-                bindaudiovolumenotify="_pusherAudioVolumeNotify"
-              />
-              <view class="no-video" wx:if="{{!pusher.enableCamera}}">
-                <image class="image" src="./static/mute-camera-white.png"></image>
-              </view>
-              <!-- <view class="no-audio" wx:if="{{!pusher.enableMic}}">
-                <image class="image" src="./static/mute-mic-white.png"></image>
-              </view>
-              <view class="audio-volume" wx:if="{{pusher.enableMic}}">
-                <image class="image" src="./static/micro-open.png"></image>
-                <view class="audio-active" style="height:{{pusher.volume}}%">
-                  <image class="image" src="./static/audio-active.png"></image>
-                </view>
-              </view> -->
-            </view>
-            <view wx:for="{{visibleStreamList}}" 
-              wx:key="streamID"
-              class="view-container player-container {{item.isVisible?'':'none'}}" 
-              id="{{'player-'+item.streamID}}"
-              data-userid="{{item.userID}}" 
-              data-streamtype="{{item.streamType}}" 
-              bindtap="_doubleTabToggleFullscreen">
-              <live-player
-                class="player"
-                id="{{item.streamID}}"
-                data-userid="{{item.userID}}"
-                data-streamid="{{item.streamID}}"
-                data-streamtype="{{item.streamType}}"
-                src= "{{item.src}}"
-                mode= "RTC"
-                autoplay= "{{item.autoplay}}"
-                mute-audio= "{{item.muteAudio}}"
-                mute-video= "{{item.muteVideo}}"
-                orientation= "{{item.orientation}}"
-                object-fit= "{{item.objectFit}}"
-                background-mute= "{{item.enableBackgroundMute}}"
-                min-cache= "{{item.minCache}}"
-                max-cache= "{{item.maxCache}}"
-                sound-mode= "{{item.soundMode}}"
-                enable-recv-message= "{{item.enableRecvMessage}}"
-                auto-pause-if-navigate= "{{item.autoPauseIfNavigate}}"
-                auto-pause-if-open-native= "{{item.autoPauseIfOpenNative}}"
-                debug="{{debug}}"
-                bindstatechange="_playerStateChange"
-                bindfullscreenchange="_playerFullscreenChange"
-                bindnetstatus="_playerNetStatus"
-                bindaudiovolumenotify="_playerAudioVolumeNotify"
-              />
-              <view class="no-video" wx:if="{{item.muteVideo}}">
-                <image class="image" src="./static/display-pause-white.png"></image>
-                <view class="text">
-                  <p>{{item.userID}}</p>
-                </view>
-              </view>
-              <view class="no-video" wx:if="{{!item.hasVideo && !item.muteVideo}}">
-                <image class="image" src="./static/mute-camera-white.png"></image>
-                <view class="text">
-                  <p>{{item.userID}}</p>
-                </view>
-                <view class="text">
-                  <p>对方摄像头未打开</p>
-                </view>
-              </view>
-              <view class="no-audio" wx:if="{{!item.hasAudio}}">
-                <image class="image" src="./static/mute-mic-white.png"></image>
-              </view>
-              <view class="audio-volume" wx:if="{{item.hasAudio}}">
-                <image class="image" src="./static/micro-open.png"></image>
-                <view class="audio-active" style="height:{{item.volume}}%">
-                  <image class="image" src="./static/audio-active.png"></image>
-                </view>
-              </view>
-              <view class="operation-bar">
-                <view class="operation-item-container">
-                  <view class="operation-item" catchtap="_handleSubscribeRemoteAudio" data-user-i-d="{{item.userID}}" data-stream-type="{{item.streamType}}">
-                    <image class="item-image" src="{{item.muteAudio? './static/speaker-false.png': './static/speaker-white.png'}}"></image>
-                  </view>
-                  <view class="operation-item" catchtap="_handleSubscribeRemoteVideo" data-user-i-d="{{item.userID}}" data-stream-type="{{item.streamType}}">
-                    <image class="item-image" src="{{item.muteVideo? './static/display-pause-false.png': './static/display-play-white.png'}}"></image>
-                  </view>
-                  <view class="operation-item" bindtap="_toggleFullscreen" data-user-i-d="{{item.userID}}" data-stream-type="{{item.streamType}}">
-                    <image class="item-image" src="./static/fullscreen-white.png"></image>
-                  </view>
-                </view>
-              </view>
-            </view>
-            <view wx:for="{{gridPagePlaceholderStreamList}}" wx:key="id" class="view-container player-container player-placeholder">
-              <image class="image" src="./static/mute-camera-white.png"></image>
-            </view>
-          </view>
-        </view>
-      </view>
-      <!-- <view class="column-2">
-        <view class="menu" wx:if="{{!isShowMoreMenu}}">
-          <view class="menu-item" bindtap="_switchSettingPanel">
-            <image class="image" src="./static/setting-white.png"></image>
-          </view>
-          <view class="menu-item" bindtap="_switchMemberListPanel">
-            <image class="image" src="./static/list-white.png"></image>
-          </view>
-          <view class="menu-item" bindtap="_hangUp">
-            <image class="image" src="./static/hangup-red.png"></image>
-          </view>
-          <view class="menu-item" bindtap="_toggleIMPanel">
-            <image class="image" src="{{enableIM? './static/im-white.png': './static/im-disable.png'}}"></image>
-          </view>
-        </view>
-      </view> -->
-    </view>
-
-    <view class="pages-container" wx:if="{{gridPageCount > 1}}">
-      <view wx:for="{{gridPageCount}}" wx:key="this" class="page-item {{index+1 === gridCurrentPage? 'current':''}}" ></view>
-    </view>
-    <view class="panel memberlist-panel {{panelName === 'memberlist-panel' ? '' : 'none'}}" >
-      <view bindtap="_handleMaskerClick" class='close-btn'>X</view>
-      <view class="panel-header">成员列表</view>
-      <view class="panel-body">
-        <view class="panel-tips" wx:if="{{streamList.length === 0}}">暂无成员</view>
-        <scroll-view class="scroll-container" scroll-y="true">
-          <view class="member-item" wx:for="{{streamList}}" wx:key="streamID" >
-            <view class="member-id">{{item.userID}}</view>
-            <view class="member-btns">
-              <button class="btn" hover-class="btn-hover" data-userid="{{item.userID}}" data-streamtype="{{item.streamType}}" data-key="objectFit" data-value="fillCrop|contain" bindtap="_setPlayerProperty">{{item.objectFit === 'fillCrop'? '填充':'适应'}}</button>
-              <button class="btn" hover-class="btn-hover" data-userid="{{item.userID}}" data-streamtype="{{item.streamType}}" data-key="orientation" data-value="vertical|horizontal" bindtap="_setPlayerProperty">{{item.orientation === 'vertical'? '竖屏':'横屏'}}</button>
-              <button class="btn" hover-class="btn-hover" data-userid="{{item.userID}}" data-streamtype="{{item.streamType}}" bindtap="_switchStreamType" wx:if="{{item.streamType === 'main'}}">{{item._definitionType === 'small'? '小画面':'主画面'}}</button>
-              <button class="btn" hover-class="btn-hover" data-userid="{{item.userID}}" data-streamtype="{{item.streamType}}" bindtap="_handleSnapshotClick">截屏</button>
-            </view>
-          </view>
-        </scroll-view>
-      </view>
-    </view>
-    <view class="panel setting-panel {{panelName === 'setting-panel' ? '' : 'none'}}" >
-      <view bindtap="_handleMaskerClick" class='close-btn'>X</view>
-      <view class="panel-header">推流设置</view>
-      <view class="panel-body">
-        <scroll-view class="scroll-container" scroll-y="true">
-          <view class="setting-option">
-            <view class="label">启用摄像头</view>
-            <view class="btn-normal" bindtap="_toggleVideo">
-              <image class="btn-image" src="{{pusher.enableCamera? './static/camera-true.png': './static/camera-false.png'}}"></image>
-            </view>
-          </view>
-          <view class="setting-option">
-            <view class="label">启用麦克风</view>
-            <view class="btn-normal" bindtap="_toggleAudio">
-              <image class="btn-image" src="{{pusher.enableMic? './static/audio-true.png': './static/audio-false.png'}}"></image>
-            </view>
-          </view>
-          <view class="setting-option">
-            <view class="label">切换摄像头</view>
-            <view class="btn-normal" bindtap="switchCamera" >
-              <image class="btn-image" src="./static/switch.png"></image>
-            </view>
-          </view>
-          <view class='setting-option'>
-            <view class="label">开启美颜</view>
-            <switch class="setting-switch" color="#006eff" checked="{{pusher.beautyLevel == 9 ? true: false}}" data-key="beautyLevel" data-value="9|0" data-value-type="number" bindchange="_setPuserProperty"/>
-          </view>
-          <view class='setting-option'>
-            <view class="label">开启AGC</view>
-            <switch class="setting-switch" color="#006eff" checked="{{pusher.enableAgc}}" data-key="enableAgc" data-value="true" data-value-type="boolean" bindchange="_setPuserProperty"/>
-          </view>
-          <view class='setting-option'>
-            <view class="label">开启ANS</view>
-            <switch class="setting-switch" color="#006eff" checked="{{pusher.enableAns}}" data-key="enableAns" data-value="true" data-value-type="boolean" bindchange="_setPuserProperty"/>
-          </view>
-          <view class='setting-option'>
-            <view class="label">开启横屏推流</view>
-            <switch class="setting-switch" color="#006eff" checked="{{pusher.videoOrientation === 'vertical' ? false: true}}" data-key="videoOrientation"  data-value="horizontal|vertical" data-value-type="string" bindchange="_setPuserProperty"/>
-          </view>
-        </scroll-view>
-      </view>
-    </view>
-    <view class="panel bgm-panel {{panelName === 'bgm-panel' ? '' : 'none'}}" >
-      <view bindtap="_handleMaskerClick" class='close-btn'>X</view>
-      <view class="panel-header">背景音乐</view>
-      <view class="panel-body">
-        <view class="setting-option">
-          <view class="label">MIC音量</view>
-          <view class="slider-content">
-            <slider value="{{MICVolume}}" min="0" max="100" show-value="true" activeColor="#006eff" bindchange="_changeProperty" data-property-name="MICVolume" />
-          </view>
-        </view>
-        <view class="setting-option">
-          <view class="label">BGM音量</view>
-          <view class="slider-content">
-            <slider value="{{BGMVolume}}" min="0" max="100" show-value="true" activeColor="#006eff" bindchange="_changeProperty" data-property-name="BGMVolume" />
-          </view>
-        </view>
-        <view class="setting-option">
-          <view class="label">播放进度</view>
-          <view class="slider-content">
-            <progress activeColor="#006eff" percent="{{BGMProgress}}"></progress>
-          </view>
-        </view>
-        <view class="menu">
-          <view class="menu-item" bindtap="_handleBGMOperation" data-operation-name="playBGM">
-            <view class="label">播放</view>
-          </view>
-          <view class="menu-item" bindtap="_handleBGMOperation" data-operation-name="pauseBGM">
-            <view class="label">暂停</view>
-          </view>
-          <view class="menu-item" bindtap="_handleBGMOperation" data-operation-name="resumeBGM">
-            <view class="label">继续</view>
-          </view>
-          <view class="menu-item" bindtap="_handleBGMOperation" data-operation-name="stopBGM">
-            <view class="label">停止</view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <view class="masker {{panelName =='' ? 'none' : ''}}" bindtap="_handleMaskerClick"></view>
-  </view>
-</template>

+ 0 - 563
components/trtc-room/template/grid/grid.wxss

@@ -1,563 +0,0 @@
-/* 9人 会议模版 */
-.template-grid {
-  width: 750rpx;
-  height: 500rpx;
-}
-
-.column-layout {
-  width: 750rpx;
-  height: 500rpx;
-  /* display: flex;
-  flex-direction: column; */
-  position: relative;
-}
-
-.column-layout .column-1 {
-  flex: 1;
-}
-
-/* .column-layout .column-2 {
-  position: relative;
-  height: 100rpx;
-  background-color: rgb(36, 36, 36);
-} */
-
-.fullscreen-device-fix .column-layout .column-2 {
-  height: 120rpx;
-}
-
-.menu {
-  width: 100%;
-  display: flex;
-  flex-direction: row;
-  justify-content: center;
-  align-items: center;
-}
-
-.menu .menu-item {
-  text-align: center;
-  height: 100rpx;
-  flex-grow: 1;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-}
-
-.menu .menu-item .image {
-  width: 46rpx;
-  height: 46rpx;
-}
-
-.more-menu {
-  position: absolute;
-  top: 0;
-}
-
-.more-menu .scroll-container {
-  width: 100%;
-  height: 100rpx;
-  white-space: nowrap;
-}
-
-.more-menu .menu-item-container {
-  width: 20%;
-  display: inline-block;
-}
-
-.template-grid .grid-container {
-  width: 750rpx;
-  height: 500rpx;
-  display: flex;
-  flex-direction: row;
-  flex-wrap: wrap;
-  position: relative;
-  /* position: absolute;
-  right: 0;
-  bottom: 0; */
-}
-
-.pusher-container {
-  width: 300rpx;
-  height: 300rpx;
-  position: absolute;
-  bottom: 0;
-  right: 0;
-}
-
-.player-container {
-  width: 700rpx;
-  height: 500rpx;
-  position: absolute;
-  top: 0;
-  left: 0;
-}
-
-.template-grid .grid-scroll-container {
-  width: 100%;
-  height: 100%;
-  /* box-sizing: border-box; */
-  /* overflow-y: scroll; */
-  background-color: #000;
-}
-
-.grid-containe.overflow {
-  height: auto;
-}
-
-.template-grid .view-container {
-  position: relative;
-}
-
-.stream-0 .view-container {
-  width: 100%;
-  height: 100%;
-}
-
-.stream-1 .view-container {
-  width: 100%;
-  height: 50%;
-}
-
-.stream-2 .view-container {
-  width: 50%;
-  height: 50%;
-}
-
-.stream-2 .view-container:nth-child(1) {
-  width: 100%;
-  height: 50%;
-}
-
-.stream-3 .view-container {
-  width: 50%;
-  height: 50%;
-}
-
-.stream-4 .view-container {
-  width: 50%;
-  height: 33.3%;
-}
-
-.stream-4 .view-container:nth-child(1) {
-  width: 100%;
-  height: 33.3%;
-}
-
-.stream-5 .view-container {
-  width: 50%;
-  height: 33.3%;
-}
-
-.stream-6 .view-container {
-  width: 33.3%;
-  height: 33.3%;
-}
-
-.stream-6 .view-container:nth-child(1) {
-  width: 100%;
-  height: 33.3%;
-}
-
-.stream-7 .view-container {
-  width: 33.3%;
-  height: 33.3%;
-}
-
-.stream-7 .view-container:nth-child(1) {
-  width: 50%;
-  height: 33.3%;
-}
-
-.stream-7 .view-container:nth-child(2) {
-  width: 50%;
-  height: 33.3%;
-}
-
-.stream-8 .view-container {
-  width: 33.3%;
-  height: 33.3%;
-}
-
-.stream-even .view-container {
-  width: 50%;
-  height: 50%;
-}
-
-.stream-odd .view-container {
-  width: 50%;
-  height: 50%;
-}
-
-.stream-odd .view-container:last-child {
-  width: 100%;
-  height: 50%;
-}
-
-.template-grid .operation-bar {
-  position: absolute;
-  bottom: 6rpx;
-  width: 100%;
-  display: flex;
-  flex-direction: row;
-  justify-content: center;
-}
-
-.operation-bar .operation-item-container {
-  width: auto;
-  display: flex;
-  flex-direction: row;
-  justify-content: center;
-  background: rgb(0, 0, 0, .3);
-  border-radius: 10rpx;
-}
-
-.template-grid .operation-bar .operation-item {
-  width: 64rpx;
-  height: 64rpx;
-  /* flex-grow: 1; */
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  text-align: center;
-}
-
-.operation-item .item-image {
-  width: 36rpx;
-  height: 36rpx;
-}
-
-.template-grid .volume-progress {
-  width: 100%;
-  position: absolute;
-  bottom: 0;
-}
-
-.template-grid .btn-normal {
-  width: 64rpx;
-  height: 64rpx;
-  margin: 0 6rpx;
-  box-sizing: border-box;
-  display: flex;
-  background: rgba(255, 255, 255, 1);
-  justify-content: center;
-  align-items: center;
-  border-radius: 50%;
-}
-
-.template-grid .btn-normal .btn-image {
-  width: 36rpx;
-  height: 36rpx;
-}
-
-.template-grid .btn-hangup {
-  background: #f75c45;
-}
-
-.template-grid .panel {
-  position: absolute;
-  background: rgba(0, 0, 0, 0.8);
-  width: 90vw;
-  height: auto;
-  z-index: 999;
-  top: 50vh;
-  left: 50vw;
-  transform: translate(-50%, -50%);
-  color: white;
-  display: flex;
-  flex-direction: column;
-  padding: 20rpx 0;
-  border-radius: 10rpx;
-  box-sizing: border-box;
-  font-size: 14px;
-}
-
-.panel .close-btn {
-  position: absolute;
-  top: 0;
-  right: 0;
-  padding: 5px 10px;
-}
-
-.panel .panel-header {
-  text-align: center;
-  padding-bottom: 20rpx;
-}
-
-.panel .panel-tips {
-  color: #999;
-  text-align: center;
-}
-
-.panel .panel-body {
-  flex: 1;
-  max-height: 50vh;
-}
-
-.panel .panel-body .scroll-container {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-}
-
-.memberlist-panel .panel-body {
-  height: 50vh;
-}
-
-.memberlist-panel .member-item {
-  display: flex;
-  /* border-bottom: 1px solid #999; */
-  margin: 16rpx 16rpx 16rpx 32rpx;
-}
-
-.memberlist-panel .member-id {
-  width: 30%;
-  font-size: 12px;
-  line-height: 64rpx;
-}
-
-.memberlist-panel .member-btns {
-  width: 70%;
-  display: flex;
-  justify-content: flex-end;
-}
-
-.memberlist-panel .member-btns .btn-normal {
-  margin-left: 0;
-}
-
-.memberlist-panel .member-btns .btn {
-  margin-right: 0;
-}
-
-.setting-panel .panel-body {
-  height: 50vh;
-}
-
-.setting-panel .setting-option {
-  display: flex;
-  justify-content: space-between;
-  margin: 16rpx 16rpx 16rpx 32rpx;
-  /* box-sizing: border-box;
-  padding: 12rpx 16rpx 12rpx 32rpx; */
-}
-
-.setting-panel .setting-option .label {
-  /* line-height: 64rpx; */
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-}
-
-.setting-panel .setting-switch {
-  transform: scale(0.8);
-  margin-right: -12rpx;
-}
-
-.bgm-panel .panel-body {
-  height: auto;
-}
-
-.bgm-panel .setting-option {
-  height: 60rpx;
-  display: flex;
-  flex-direction: row;
-  margin: 16rpx 16rpx 16rpx 32rpx;
-}
-
-.bgm-panel .setting-option .label {
-  width: 140rpx;
-  line-height: 60rpx;
-}
-
-.bgm-panel .setting-option .slider-content {
-  flex: 1;
-  line-height: 60rpx;
-}
-
-.bgm-panel .setting-option .slider-content slider {
-  transform: scale(0.9);
-  margin: 0;
-}
-
-.bgm-panel .setting-option .slider-content progress {
-  transform: scale(0.9);
-  margin-top: 28rpx;
-}
-
-.bgm-panel .menu {
-  padding: 16rpx 32rpx 16rpx 32rpx;
-  box-sizing: border-box;
-}
-
-.bgm-panel .menu .menu-item {
-  height: 80rpx;
-  background-color: #333;
-}
-
-.template-grid .masker {
-  position: absolute;
-  top: 0;
-  width: 100vw;
-  height: 100vh;
-  background: rgba(0, 0, 0, 0.4);
-}
-
-.template-grid .no-stream,
-.template-grid .no-video {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  box-sizing: border-box;
-  color: #fff;
-  background-color: rgba(0, 0, 0, 0.4);
-  font-size: 12px;
-}
-
-.template-grid .audio-volume,
-.template-grid .no-audio {
-  position: absolute;
-  bottom: 20rpx;
-  left: 20rpx;
-  width: 36rpx;
-  height: 36rpx;
-}
-
-.no-stream .image,
-.no-video .image {
-  width: 60rpx;
-  height: 60rpx;
-}
-
-.audio-volume .image,
-.no-audio .image {
-  width: 36rpx;
-  height: 36rpx;
-  position: absolute;
-  /*android 的bug ,image absolute后会向上漂移几个像素,如果要对其必须都设置absolute*/
-}
-
-.audio-active {
-  position: absolute;
-  left: 0;
-  bottom: 0;
-  width: 100%;
-  height: 0;
-  overflow: hidden;
-}
-
-.audio-active .image {
-  bottom: 0;
-}
-
-.slide-up-tips {
-  position: absolute;
-  bottom: -100rpx;
-  left: 50%;
-  transform: translate(-50%, 0);
-  width: 200rpx;
-  height: auto;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  box-sizing: border-box;
-  font-size: 12px;
-  color: #fff;
-  background-color: rgba(0, 0, 0, 0.4);
-  box-sizing: border-box;
-  padding: 20rpx;
-  border-radius: 10rpx;
-  opacity: 0;
-}
-
-.slide-up-tips .image {
-  width: 100rpx;
-  height: 100rpx;
-}
-
-.player-placeholder {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-}
-
-.player-placeholder .image {
-  width: 100rpx;
-  height: 100rpx;
-}
-
-.pages-container {
-  width: auto;
-  left: 50%;
-  transform: translate(-50%, 0);
-  height: 20rpx;
-  position: absolute;
-  bottom: 12%;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  justify-content: center;
-}
-
-.pages-container .page-item {
-  width: 20rpx;
-  height: 20rpx;
-  border-radius: 50%;
-  margin: 0 8rpx;
-  background-color: rgb(99, 99, 99, .5);
-}
-
-.pages-container .page-item.current {
-  background-color: #fff;
-}
-
-.radio-group-no-box {
-  display: inline-block;
-  color: #006eff;
-  background-color: #ffffff;
-  border: 1px solid #006eff;
-  border-radius: 4px;
-  margin-left: 180rpx;
-  font-size: 12px;
-}
-
-.radio-group-no-box .radio-item {
-  padding: 5px 8px;
-  text-align: center;
-  border-right: 1px solid #006eff;
-  display: inline-block;
-}
-
-.radio-group-no-box .radio-item:last-child {
-  border-right: none;
-}
-
-.radio-group-no-box .radio-item.selected {
-  color: #ffffff;
-  background-color: #006eff;
-}
-
-.radio-group-no-box radio {
-  display: none;
-}
-
-.picker-label {
-  display: inline-block;
-  color: #006eff;
-  background-color: #ffffff;
-  border: 1px solid #006eff;
-  border-radius: 4px;
-  padding: 5px 8px;
-  text-align: center;
-  font-size: 12px;
-}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 2407
components/trtc-room/trtc-room.js


+ 0 - 4
components/trtc-room/trtc-room.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 70
components/trtc-room/trtc-room.wxml

@@ -1,70 +0,0 @@
-<import src='./template/1v1/1v1.wxml'/>
-<import src='./template/grid/grid.wxml'/>
-<import src='./template/custom/custom.wxml'/>
-
-<view class="trtc-room-container {{isFullscreenDevice?'fullscreen-device-fix':''}}">
-  <block wx:if="{{template === '1v1'}}">
-    <template is='1v1' data="{{pusher, streamList, debug, enableIM}}"></template>
-  </block>
-  <block wx:if="{{template === 'grid'}}">
-    <template is='grid' data="{{pusher, streamList, visibleStreamList, debug, enableIM, panelName, gridPagePlaceholderStreamList, gridPageCount, gridCurrentPage, gridPlayerPerPage, isShowMoreMenu, MICVolume, BGMVolume, BGMProgress, beautyStyle, beautyStyleArray, filterIndex, filterArray, audioReverbTypeArray}}"></template>
-  </block>
-  <block wx:if="{{template === 'custom'}}">
-    <template is='custom' data="{{pusher, streamList, debug}}"></template>
-  </block>
-
-  <view class="im-panel" wx:if="{{enableIM && showIMPanel}}">
-    <view class="message-panel-body">
-      <scroll-view scroll-y="true" class="message-scroll-container" scroll-into-view="message{{messageList.length-1}}" scroll-with-animation="{{true}}">
-        <view class="message-list">
-          <view class="message-item" wx:for="{{messageList}}" wx:key="index" id="message{{index}}">
-            <span class="user-name {{item.name == config.userID?'mine':''}}">{{item.name}}</span>
-            <span class="message-content">{{item.message}}</span>
-          </view>
-          <view id="message-bottom"></view>
-        </view>
-      </scroll-view>
-        
-    </view>
-    <view class="message-panel-bottom">
-      <view class="message-input-container">
-        <input class="message-input" type="text" value="{{messageContent}}" bindinput='_inputIMMessage' bindconfirm='_sendIMMessage' confirm-type="send" placeholder="请输入消息" maxlength="200" placeholder-style="color:#ffffff;opacity: 0.55;"/>
-      </view>
-      <view class="message-send-btn">
-        <button class="btn" bindtap="_sendIMMessage" hover-class="btn-hover">发送</button>
-      </view>
-    </view>
-    <view bindtap="_toggleIMPanel" class='close-btn'>X</view>
-  </view>
-
-  <view class="debug-info-btn {{debugMode && !debugPanel?'':'none'}}">
-    <button class="debug-btn" bindtap="_debugTogglePanel" hover-class="button-hover">Debug</button>
-  </view>
-  <view class="debug-info {{debugMode && debugPanel?'':'none'}}">
-    <view bindtap="_debugTogglePanel" class='close-btn'>X</view>
-    <view>appVersion: {{appVersion}}</view>
-    <view>libVersion: {{libVersion}}</view>
-    <view>template: {{template}}</view>
-    <view>debug: <button class="{{debug?'':'false'}} debug-btn" bindtap="_debugToggleVideoDebug" hover-class="button-hover">{{debug}}</button></view>
-    <view>userID: {{pusher.userID}}</view>
-    <view>roomID: {{pusher.roomID}}</view>
-    <view>camera: <button class="{{pusher.enableCamera?'':'false'}} debug-btn" bindtap="_toggleVideo" hover-class="button-hover">{{pusher.enableCamera}}</button></view>
-    <view>mic: <button class="{{pusher.enableMic?'':'false'}} debug-btn" bindtap="_toggleAudio" hover-class="button-hover">{{pusher.enableMic}}</button></view>
-    <view>switch camera: <button class="debug-btn" bindtap="switchCamera" hover-class="button-hover">{{cameraPosition||pusher.frontCamera}}</button></view>
-    <view>Room:
-      <button class="debug-btn" bindtap="_debugEnterRoom" hover-class="button-hover">Enter</button>
-      <button class="debug-btn" bindtap="_debugExitRoom" hover-class="button-hover">Exit</button>
-      <button class="debug-btn" bindtap="_debugGoBack" hover-class="button-hover">Go back</button>
-    </view>
-    <view>IM: <button class="debug-btn" bindtap="_debugSendRandomMessage" hover-class="button-hover">send</button></view>
-    <view>user count: {{userList.length}}</view>
-    <view wx:for="{{userList}}" wx:key="userID">{{item.userID}}|
-      mainV:<span class="text {{item.hasMainVideo? 'true' : 'false' }}">{{item.hasMainVideo||false}}</span>|
-      mainA:<span class="text {{item.hasMainAudio? 'true' : 'false' }}">{{item.hasMainAudio||false}}</span>|
-      auxV:<span class="text {{item.hasAuxVideo? 'true' : 'false' }}">{{item.hasAuxVideo||false}}</span></view>
-    <view>stream count: {{streamList.length}}</view>
-    <view wx:for="{{streamList}}" wx:key="streamID">{{item.userID}}|{{item.streamType}}|
-      SubV:<button class="{{!item.muteVideo?'':'false'}} debug-btn" bindtap="_debugToggleRemoteVideo" hover-class="button-hover" data-user-i-d="{{item.userID}}" data-stream-type="{{item.streamType}}">{{!item.muteVideo}}</button>|
-      SubA:<button class="{{!item.muteAudio?'':'false'}} debug-btn" bindtap="_debugToggleRemoteAudio" hover-class="button-hover" data-user-i-d="{{item.userID}}" data-stream-type="{{item.streamType}}">{{!item.muteAudio}}</button></view>
-  </view>
-</view>

+ 0 - 228
components/trtc-room/trtc-room.wxss

@@ -1,228 +0,0 @@
-
-@import "./template/1v1/1v1.wxss";
-@import "./template/grid/grid.wxss";
-@import "./template/custom/custom.wxss";
-
-.pusher {
-  width: 100%;
-  height: 100%;
-}
-
-.player {
-  width: 100%;
-  height: 100%;
-}
-
-.debug-info{
-  max-width: 100vw;
-  max-height: 90vh;
-  box-sizing: border-box;
-  overflow-y: scroll;
-  position: absolute;
-  z-index: 9999;
-  background-color: rgba(0, 0, 0, .5);
-  color: #fff;
-  bottom: 20rpx;
-  left: 0;
-  padding: 10rpx;
-  font-size: 12px;
-}
-.debug-info-btn .debug-btn,
-.debug-info .debug-btn{
-  padding: 0 8px;
-  min-height: 18px;
-  width: auto;
-  font-size: 12px;
-  line-height: 18px;
-  display: inline-block;
-  color: #06ae56;
-  background-color: #f2f2f2;
-}
-.debug-info .debug-btn.false{
-  color: rgb(114, 114, 114);
-}
-.debug-info-btn .debug-btn,
-.debug-info .button-hover {
-  background-color: rgb(219, 219, 219);
-}
-.debug-info .close-btn{
-  position: absolute;
-  top: 0;
-  right: 0;
-  padding: 5px 10px;
-}
-.debug-info .text.true{
-  color: #1fff8b;
-}
-.debug-info .text.false{
-  color: #ff2e2e;
-}
-.debug-info-btn{
-  position: absolute;
-  z-index: 9998;
-  bottom: 160rpx;
-  left: 0;
-}
-
-.trtc-room-container .btn {
-  display: inline-block;
-  width: auto;
-  height: 60rpx;
-  min-height: 60rpx;
-  line-height: 60rpx;
-  font-size: 12px;
-  font-weight: normal;
-  padding: 0 10rpx;
-  color: #006eff;
-  background-color: #f2f2f2;
-  margin: 0 16rpx;
-}
-.trtc-room-container .btn.active{
-  color: #f2f2f2;
-  background-color: #006eff;
-}
-.trtc-room-container .btn-hover{
-  background-color: #d1d1d1;
-}
-
-.im-panel{
-  position: absolute;
-  z-index: 9;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  width: 90vw;
-  height: 320rpx;
-  top: 50vh;
-  left: 50vw;
-  transform: translate(-50%, -50%);
-  padding: 20rpx 0;
-  border-radius: 10rpx;
-  font-size: 12px;
-  /* bottom: 25vh; */
-  color: #fff;
-  background-color: rgba(0, 0, 0, 0.8);
-}
-.im-panel .close-btn {
-  position: absolute;
-  top: 0;
-  right: -3px;
-  padding: 5px 10px;
-  z-index: 99;
-}
-.message-panel-body{
-  width: 100%;
-  height: 80%;
-  overflow-x: hidden;
-  overflow-y: scroll;
-}
-.message-scroll-container{
-  height: 100%;
-  /* box-sizing: border-box;
-  padding: 0 20rpx; */
-}
-.message-list{
-  width: 100%;
-  box-sizing: border-box;
-  padding: 0 20rpx;
-  /* display: flex;
-  flex-direction: column; */
-}
-.message-item{
-  width: 100%;
-  /* height: 36rpx; */
-  /* padding: 0 20rpx; */
-  padding-bottom: 10rpx;
-  display: flex;
-  flex-direction: row;
-}
-.message-item .user-name{
-  width: 20%;
-  color: #2483ff;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-.user-name.mine{
-  color: #ff7424;
-}
-.message-item .separate{
-  padding:0 5px;
-  color: #fff;
-}
-.message-item .message-content{
-  word-wrap:break-word; 
-  word-break:break-all;
-  padding-left: 20rpx;
-  position: relative;
-  max-width: 80%; 
-  box-sizing: border-box;
-}
-.message-content::after{
-  content: ':';
-  position: absolute;
-  left: 0;
-  top: 0;
-}
-.message-panel-bottom{
-  width: 100%;
-  height: 50rpx;
-  box-sizing: border-box;
-  padding: 0 20rpx 0;
-  margin-top: 20rpx;
-  display: flex;
-  flex-direction: row;
-}
-.message-input-container {
-  flex-grow: 1;
-}
-.message-input-container .message-input {
-  font-size: 12px;
-  padding-left: 20rpx;
-  border-radius: 10rpx;
-  height: 100%;
-  background-color: rgba(0,0,0,0.1);
-}
-.message-send-btn .btn{
-  margin-right: 0;
-  height: 50rpx;
-  min-height: 50rpx;
-  line-height: 50rpx;
-}
-
-.volume-animation{
-  position: absolute;
-  width: 80rpx;
-  height: 80rpx;
-  left: 0;
-  top: initial;
-  bottom: 20rpx;
-  z-index: 9;
-  /* transform: translate(-50%, 0); */
-}
-.volume-animation .image{
-  position: absolute;
-  width: 80rpx;
-  height: 80rpx;
-}
-.volume-animation .audio-active{
-  animation: viewlinear 1.5s linear infinite;
-} 
-@keyframes viewlinear {
-  
-  /** 第一种写法**/
-  0% {
-    height: 0;
-  }
-  100% {
-    height: 100%;
-  }
-}
-
-.none,
-.view-container.none,
-.template-grid .view-container.none,
-.template-1v1 .view-container.none{
-  display: none !important;
-}

+ 0 - 21
components/trtc-room/utils/compare-version.js

@@ -1,21 +0,0 @@
-export default function compareVersion(v1, v2) {
-  v1 = v1.split('.')
-  v2 = v2.split('.')
-  const len = Math.max(v1.length, v2.length)
-  while (v1.length < len) {
-    v1.push('0')
-  }
-  while (v2.length < len) {
-    v2.push('0')
-  }
-  for (let i = 0; i < len; i++) {
-    const num1 = parseInt(v1[i])
-    const num2 = parseInt(v2[i])
-    if (num1 > num2) {
-      return 1
-    } if (num1 < num2) {
-      return -1
-    }
-  }
-  return 0
-}

+ 0 - 50
components/trtc-room/utils/environment.js

@@ -1,50 +0,0 @@
-import compareVersion from './compare-version.js'
-const TAG_NAME = 'TRTC-ROOM'
-
-const env = wx ? wx : qq
-if (!env) {
-  console.error(TAG_NAME, '不支持当前小程序环境')
-}
-const systemInfo = env.getSystemInfoSync()
-const safeArea = systemInfo.safeArea
-if (systemInfo.system === 'iOS 13.3' || (systemInfo.model === 'iPhoneX' && systemInfo.system === 'iOS 13.3.1') ) {
-  // audio-volume-type = media
-  console.log('use media audio volume type')
-}
-console.log(TAG_NAME, 'SystemInfo', systemInfo)
-let isNewVersion
-if (typeof qq !== 'undefined') {
-  isNewVersion = true
-} else if (typeof wx !== 'undefined') {
-  if (compareVersion(systemInfo.version, '7.0.8') >= 0 || // mobile pc
-  (compareVersion(systemInfo.version, '2.4.0') >= 0 && compareVersion(systemInfo.version, '6.0.0') < 0) && // mac os
-  compareVersion(systemInfo.SDKVersion, '2.10.0') >= 0) {
-    isNewVersion = true
-  } else {
-    isNewVersion = false
-  }
-}
-
-export const IS_TRTC = isNewVersion
-export const IS_QQ = typeof qq !== 'undefined'
-export const IS_WX = typeof wx !== 'undefined'
-export const IS_IOS = /iOS/i.test(systemInfo.system)
-export const IS_ANDROID = /Android/i.test(systemInfo.system)
-export const IS_MAC = /mac/i.test(systemInfo.system)
-export const APP_VERSION = systemInfo.version
-export const LIB_VERSION = (function() {
-  if (systemInfo.SDKBuild) {
-    return systemInfo.SDKVersion + '-' + systemInfo.SDKBuild
-  }
-  return systemInfo.SDKVersion
-})()
-
-let isFullscreenDevie = false
-if (systemInfo.screenHeight > safeArea.bottom) {
-// if (/iphone\s{0,}x/i.test(systemInfo.model)) {
-  isFullscreenDevie = true
-}
-
-export const IS_FULLSCREEN_DEVICE = isFullscreenDevie
-
-console.log(TAG_NAME, 'APP_VERSION:', APP_VERSION, ' LIB_VERSION:', LIB_VERSION, ' is new version:', IS_TRTC)

+ 0 - 62
components/trtc-room/utils/event.js

@@ -1,62 +0,0 @@
-class Event {
-  on(event, fn, ctx) {
-    if (typeof fn !== 'function') {
-      console.error('listener must be a function')
-      return
-    }
-
-    this._stores = this._stores || {};
-    (this._stores[event] = this._stores[event] || []).push({ cb: fn, ctx: ctx })
-  }
-
-  emit(event) {
-    this._stores = this._stores || {}
-    let store = this._stores[event]
-    let args
-
-    if (store) {
-      store = store.slice(0)
-      args = [].slice.call(arguments, 1),
-      args[0] = {
-        eventCode: event,
-        data: args[0],
-      }
-      for (let i = 0, len = store.length; i < len; i++) {
-        store[i].cb.apply(store[i].ctx, args)
-      }
-    }
-  }
-
-  off(event, fn) {
-    this._stores = this._stores || {}
-
-    // all
-    if (!arguments.length) {
-      this._stores = {}
-      return
-    }
-
-    // specific event
-    const store = this._stores[event]
-    if (!store) return
-
-    // remove all handlers
-    if (arguments.length === 1) {
-      delete this._stores[event]
-      return
-    }
-
-    // remove specific handler
-    let cb
-    for (let i = 0, len = store.length; i < len; i++) {
-      cb = store[i].cb
-      if (cb === fn) {
-        store.splice(i, 1)
-        break
-      }
-    }
-    return
-  }
-}
-
-module.exports = Event

+ 98 - 0
pages/historyClass/historyClass.js

@@ -0,0 +1,98 @@
+const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
+Page({
+  data: {
+    showzs: false,
+    kcArr: [],
+  },
+  lq() {
+    this.setData({
+      showzs: true
+    });
+  },
+  onClose1() {
+    this.setData({
+      showzs: false
+    });
+  },
+  // 跳转直播点播页面
+  goStudy(e) {
+    let id = e.currentTarget.dataset.item.id
+    if (e.currentTarget.dataset.item.isLive == 1) {
+      wx.showModal({
+        showCancel: false,
+        content: "直播已经结束了哦"
+      })
+    } else {
+      wx.navigateTo({
+        url: '../dbDetails/dbDetails?id=' + id
+      })
+    }
+  },
+  getArr(sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/course/selectByClasId',
+      method: "post",
+      data: {
+        sessionKey,
+        clasId: this.data.id
+      },
+      success: (res) => {
+        console.log(res, "kckckc")
+        this.setData({
+          kcArr: res.data.list
+        });
+        // let result = [];
+        // if (res.data.list)
+        //   for (let i = 0; i < res.data.list.length; i++) {
+        //     result.push({
+        //       courseTime: res.data.list[i].courseTime
+        //     });
+        //   }
+        // const timesArr = result.map((item) => {
+        //   return item.courseTime;
+        // });
+        // let sfmArr = [];
+        // for (let i = 0; i < timesArr.length; i++) {
+        //   let value = timesArr[i];
+        //   const resultValue = this.handler(value);
+        //   sfmArr.push({
+        //     courseTime: resultValue
+        //   })
+        //   this.setData({
+        //     sfmArr: sfmArr
+        //   })
+        // }
+      }
+    })
+  },
+  handler(value) {
+    //换算为秒 进制1000
+    const second = Math.floor(value / 1000); //判断是否够1秒
+    if (second < 1) {
+      return "0秒";
+    }
+    const secondValue = second % 60; // 秒
+    const minutes = Math.floor(second / 60); //判断是否够1分钟
+    if (minutes < 1) {
+      return `${secondValue}秒`;
+    }
+    const minutesValue = minutes % 60; //分
+    const hours = Math.floor(minutes / 60); //判断是否够1小时
+    if (hours < 1) {
+      return `${minutesValue}分${secondValue}秒`;
+    }
+    const hoursValue = hours % 60; //小时
+    return `${hoursValue}时${minutesValue}分${secondValue}秒`;
+  },
+  async onShow() {
+    const sessionKey = await tools.checkSessionAndLogin();
+    this.getArr(sessionKey);
+  },
+  onLoad(options) {
+    console.log(options)
+    this.setData({
+      id: options.id
+    })
+  }
+})

+ 3 - 0
pages/historyClass/historyClass.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText":"我的培训-历史班"
+}

+ 41 - 0
pages/historyClass/historyClass.wxml

@@ -0,0 +1,41 @@
+<view class="container">
+	<!-- <van-divider contentPosition="center" customStyle="color: #eb3f33; border-color: #eb3f33; font-size: 30rpx;font-weight:900;position:relative">
+		<image src='{{classInfo.logoImg}}' mode='aspectFill' class="banjihz"></image><text>{{classInfo.clasName}}</text>
+	</van-divider> -->
+		<view class="sp {{idx>2 ? 'none' : ''}}" wx:for="{{kcArr}}" wx:for-index="idx" wx:for-item="item">
+			<image src='{{item.courseImg}}' mode="widthFix" class="spfm"></image>
+			<!-- <image src='{{item.isDone==0||item.isDone==null?"/images/unfinish.png":"/images/finish.png"}}' mode='aspectFill' class="isfinish"></image> -->
+			<view class="sp_text">
+				<view class="fisrt_set">
+					<image src='/images/db.png' mode='aspectFill' class="dbimg" wx:if='{{item.isLive==-1}}'></image>
+					<image src='/images/zb.png' mode='aspectFill' class="dbimg" wx:if='{{item.isLive == 1 && item.isActive==1}}'></image>
+					<image src='/images/dzb.png' mode='aspectFill' class="dbimg" wx:if='{{item.isLive==1 && item.isActive==null}}'></image>
+					<image src='/images/zbjs.png' mode='aspectFill' class="dbimg" wx:if='{{item.isLive==1 && item.isActive==-1}}'></image>
+					<view class="start_text" wx:if='{{item.isLive==1}}'>开始时间:{{item.courseStart}}</view>
+					<view class="start_text" wx:if='{{item.isLive==-1}}'>视频时长: {{sfmArr[idx].courseTime}}</view>
+				</view>
+				<view class="name">{{item.courseName}}</view>
+				<view>
+					<image src='/images/startstudy.png' mode='aspectFill' class="an" data-item="{{item}}" bindtap="goStudy"></image>
+					<!-- <image src='/images/dtxs.png' mode='aspectFill' class="an" bindtap="gokhAnswer"></image>
+					<image src='/images/pjkc.png' mode='aspectFill' class="an" bindtap="gopjClass"></image> -->
+				</view>
+			</view>
+		</view>
+	<view class="layout" style="margin-top:40rpx" bindtap="goWrite2">
+		<image src='/images/zhfk_bj.png' mode='aspectFill' class="bgimg1"></image>
+		<view class="layout_text1">综合反馈表</view>
+		<view class="layout_text3">去填写</view>
+	</view>
+	<view class="lq">
+		<view class="lq_btn" bindtap="lq">领取结业证</view>
+		<view class="pz">注:领取结业证需完成所有课程</view>
+	</view>
+	<van-popup show="{{ showzs }}" bind:close="onClose1">
+		<view style="position:relative">
+			<image src='/images/zsbj.jpg' mode='aspectFill' class="zsbj"></image>
+			<view class="byzc">李欣桐同志于2020年07月08日-2020年07月13日参加学习完成规定培训内容,准予结业,特发此证。</view>
+			<!-- <view class="byzc">{{studentName}}同志于{{classInfo.beginDate}}-{{classInfo.endDate}}参加学习完成规定培训内容,准予结业,特发此证。</view> -->
+		</view>
+	</van-popup>
+</view>

+ 362 - 0
pages/historyClass/historyClass.wxss

@@ -0,0 +1,362 @@
+.nr_box {
+  width: 670rpx;
+  height: 90vh;
+  background-color: #fff;
+  text-align: left;
+  position: relative;
+}
+
+.title {
+  margin-left: 245rpx;
+  padding-top: 60rpx;
+  font-size: 35rpx;
+  font-weight: 900;
+  margin-bottom: 80rpx;
+
+}
+
+.banjihz {
+  width: 57rpx;
+  height: 57rpx;
+  margin-right: 30rpx;
+}
+
+.zw {
+  padding-left: 50rpx;
+  padding-right: 50rpx;
+  text-indent: 60rpx;
+  font-size: 30rpx;
+  line-height: 50rpx;
+  height: 50vh;
+}
+
+/* .cloudimg{
+  width: 733rpx;
+  height: 220rpx; 
+  border: 1px solid red;
+} */
+.layout {
+  width: 693rpx;
+  margin-left: 28rpx;
+  position: relative;
+}
+
+.notice {
+  background-color: rgba(255, 247, 231);
+  color: rgba(233, 109, 21);
+  font-size: 25rpx;
+  border-radius: 10rpx;
+  padding: 20rpx;
+  width: 670rpx;
+  margin-left: 20rpx;
+}
+
+.ding {
+  width: 24rpx;
+  height: 29rpx;
+}
+
+.bgimg1 {
+  width: 693rpx;
+  height: 74rpx;
+  /* float: left; */
+}
+
+.layout_text1 {
+  position: absolute;
+  color: #fff;
+  font-size: 30rpx;
+  font-weight: 900;
+  top: 20rpx;
+  left: 50rpx;
+}
+
+.layout_text2 {
+  position: absolute;
+  color: #df7e33;
+  font-size: 25rpx;
+  line-height: 40rpx;
+  font-weight: 900;
+  top: 20rpx;
+  right: 50rpx;
+  background-color: #fff;
+  text-align: center;
+  width: 140rpx;
+  border-radius: 20rpx;
+  height: 40rpx;
+}
+
+.layout_text3 {
+  position: absolute;
+  color: #3a7dcd;
+  font-size: 25rpx;
+  line-height: 40rpx;
+  font-weight: 900;
+  top: 20rpx;
+  right: 50rpx;
+  background-color: #fff;
+  text-align: center;
+  width: 140rpx;
+  border-radius: 20rpx;
+  height: 40rpx;
+}
+
+.bg {
+  margin-top: 10rpx;
+}
+
+.sp {
+  width: 680rpx;
+  margin-left: 35rpx;
+  /* border: 1px solid red; */
+  height: 200rpx;
+  margin-top: 20rpx;
+  position: relative;
+  margin-bottom: 20rpx;
+  background-color: #fff;
+  box-shadow: rgba(0, 0, 0, .3) 0px 0px 10rpx;
+  border-radius: 5rpx;
+}
+
+.hiddenmore .none {
+  display: none !important;
+}
+
+.spfm {
+  width: 128rpx;
+  height: auto;
+  /* margin-top: 20rpx; */
+  float: left;
+  margin-top: 35rpx;
+  margin-left: 20rpx;
+  border-radius: 10rpx;
+}
+
+.isfinish {
+  width: 163rpx;
+  height: 36rpx;
+  position: absolute;
+  top: 0;
+  right: 0;
+}
+
+.sp_text {
+  width: 520rpx;
+  height: 100%;
+  /* border: 1px solid red; */
+  float: right;
+  /* margin-left: rpx; */
+}
+
+.dbimg {
+  width: 144rpx;
+  height: 35rpx;
+  /* margin-top: 10rpx; */
+  /* margin-left: 10rpx; */
+  margin-right: 20rpx;
+  margin-top: 40rpx;
+  border-radius: 5rpx;
+}
+
+.an {
+  width: 146rpx;
+  height: 36rpx;
+  margin-right: 20rpx;
+  margin-top: 15rpx;
+}
+
+.fisrt_set {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: left;
+}
+
+.name {
+  font-size: 25rpx;
+  margin-top: 15rpx;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.start_text {
+  font-size: 23rpx;
+  color: #999999;
+  margin-top: 35rpx;
+}
+
+.time {
+  color: #eb3f33;
+}
+
+.openall {
+  width: 100%;
+  text-align: center;
+  color: #999999;
+  font-size: 25rpx;
+  margin-top: 20rpx;
+}
+
+.openallimg {
+  width: 21rpx;
+  height: 20rpx;
+}
+
+.qy_title {
+  width: 670rpx;
+  margin-left: 40rpx;
+  font-size: 27rpx;
+  display: flex;
+  /* border: 1px solid red; */
+  display: block;
+  margin-top: 30rpx;
+  font-weight: 900;
+}
+
+.redk {
+  height: 33rpx;
+  width: 8rpx;
+  background-color: #eb3f33;
+  border-radius: 5rpx;
+  margin-right: 10rpx;
+  float: left;
+}
+
+.more {
+  font-size: 25rpx;
+  font-weight: 900;
+  color: #eb3f33;
+  float: right;
+}
+
+.redpoint {
+  width: 21rpx;
+  height: 21rpx;
+  margin-right: 20rpx;
+}
+
+.myactive_box {
+  width: 660rpx;
+  margin-left: 35rpx;
+  height: 100rpx;
+  /* border: 1px solid red; */
+  margin-top: 20rpx;
+}
+
+.myactive_name {
+  font-size: 24rpx;
+}
+
+.cysj {
+  float: left;
+  margin-left: 41rpx;
+  font-size: 24rpx;
+  color: #999999;
+  margin-top: 15rpx;
+}
+
+.cysj_num {
+  color: #eb3f33;
+}
+
+.cyry_num {
+  color: #eb3f33;
+}
+
+.cyry {
+  font-size: 24rpx;
+  color: #999999;
+  float: right;
+  margin-top: 15rpx;
+}
+
+.lq {
+  text-align: center;
+  margin-top: 50rpx;
+}
+
+.lq_btn {
+  width: 559rpx;
+  height: 77rpx;
+  line-height: 77rpx;
+  margin-left: 95rpx;
+  border-radius: 40rpx;
+  font-size: 29rpx;
+  font-weight: 600;
+  color: #fff;
+  background: -webkit-linear-gradient(left, #d7301d, #f99c30);
+  box-shadow: 5px 5px 5px #eea390;
+  margin-bottom: 20rpx;
+}
+
+.pz {
+  font-size: 24rpx;
+  color: #999999;
+  margin-bottom: 50rpx;
+}
+
+.agree_text {
+  color: #000;
+  margin-left: 120rpx;
+  font-size: 24rpx;
+}
+
+.agree_btn {
+  text-align: center;
+  /* border: 1px solid red; */
+  width: 80%;
+  margin-left: 10%;
+  line-height: 80rpx;
+  font-size: 28rpx;
+  margin-top: 30rpx;
+  border-radius: 30rpx;
+  background-color: #eb3f33;
+  color: #fff;
+}
+
+.thinking {
+  color: #999999;
+  text-align: center;
+  font-size: 24rpx;
+  margin-top: 30rpx;
+}
+
+.zsbj {
+  width: 600rpx;
+  height: 830rpx;
+}
+
+.byzc {
+  width: 480rpx;
+  font-size: 30rpx;
+  color: #000;
+  font-weight: 900;
+  position: absolute;
+  top: 260rpx;
+  left: 60rpx;
+  text-indent: 60rpx;
+  letter-spacing: 5rpx;
+  line-height: 70rpx;
+}
+
+.zsdw_text {
+  width: 500rpx;
+  /* border: 1px solid red; */
+  font-size: 30rpx;
+  color: #000;
+  font-weight: 900;
+  position: absolute;
+  top: 680rpx;
+  left: 80rpx;
+  /* text-indent: 60rpx; */
+  /* letter-spacing: 5rpx; */
+  /* line-height: 70rpx; */
+}
+
+/* .van-divider--center: after,
+.van-divider--left: after,
+.van-divider--right: after {
+  margin-left: 0;
+  margin-left: var(--divider-content-padding, 0px);
+} */

+ 65 - 10
pages/index/index.js

@@ -8,17 +8,21 @@ Page({
     // 课程轮播
     "bnrUrl": [],
     gridArr: [{
-      "url": "/images/icon1.png",
-      "name": "在线直播",
+      url: "/images/icon1.png",
+      name: "在线直播",
+      isread: true
     }, {
-      "url": "/images/icon2.png",
-      "name": "在线录播",
+      url: "/images/icon2.png",
+      name: "在线录播",
+      isread: true
     }, {
-      "url": "/images/icon3.png",
-      "name": "互动答疑",
+      url: "/images/icon3.png",
+      name: "互动答疑",
+      isread: true
     }, {
-      "url": "/images/icon4.png",
-      "name": "测试答卷",
+      url: "/images/icon4.png",
+      name: "测试答卷",
+      isread: true
     }],
     xczsArr: []
   },
@@ -162,12 +166,61 @@ Page({
       url: app.globalData.publicUrl + '/wx/course/listCategory',
       method: "post",
       success: (res) => {
+        this.setData({
+          xczsArr: res.data.list
+        })
+      },
+      fail(res) {
+        console.log(res, "调取请求公开课失败")
+      }
+    })
+  },
+  getRedPoint1(sessionKey) {
+    let completeStatus1 = `gridArr[${0}].isread`;
+    let completeStatus2 = `gridArr[${1}].isread`;
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/course/undoneLogo',
+      method: "post",
+      data: {
+        sessionKey
+      },
+      success: (res) => {
+        console.log(res, "我是调取第一个小红点的结果")
+        if (res.data.code == 0 && res.data.isLive == true) {
+          this.setData({
+            [completeStatus1]: false
+          })
+        }
+        if (res.data.code == 0 && res.data.isRecord == true) {
           this.setData({
-            xczsArr: res.data.list
+            [completeStatus2]: false
           })
+        }
       },
       fail(res) {
-        console.log(res, "调取请求公开课失败")
+        console.log(res, "调取第1/2个小红点失败")
+      }
+    })
+  },
+  getRedPoint4(sessionKey) {
+    let completeStatus = `gridArr[${3}].isread`;
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/list',
+      method: "post",
+      data: {
+        sessionKey,
+        status: 0
+      },
+      success: (res) => {
+        console.log(res, "我是调取第四个小红点的结果")
+        if (res.data.code == 0 && res.data.list.length > 0) {
+          this.setData({
+            [completeStatus]: false
+          })
+        }
+      },
+      fail(res) {
+        console.log(res, "调取第四个小红点失败")
       }
     })
   },
@@ -179,5 +232,7 @@ Page({
     this.getjjLength(sessionKey);
     this.getwqLength(sessionKey);
     this.getfour();
+    this.getRedPoint1(sessionKey)
+    this.getRedPoint4(sessionKey)
   },
 })

+ 2 - 1
pages/index/index.wxml

@@ -27,9 +27,10 @@
 	</view>
 	<view style="height:15rpx;width:750rpx;background-color:#F2F2F2"></view>
 	<van-grid class="gridbox">
-		<van-grid-item use-slot wx:for="{{gridArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goGrid" data-id="{{idx}}">
+		<van-grid-item use-slot wx:for="{{gridArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goGrid" data-id="{{idx}}" style="position:relative">
 			<image style="width: 103rpx; height: 94rpx;" src="{{item.url}}" />
 			<text class="grid_text">{{item.name}}</text>
+			<view wx:if='{{item.isread==false}}' style="width:10rpx;height:10rpx;background-color:red;border-radius:30rpx;border:1rpx solid red;position:absolute;top:30rpx;right:30rpx"></view>
 		</van-grid-item>
 	</van-grid>
 	<view style="height:15rpx;width:750rpx;background-color:#F2F2F2"></view>

+ 0 - 0
pages/myInteractions/myInteractions.js


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor