微信小程序 云开发 聊天功能

小程序实现即时语音聊天功能 1、用户在小程序咨询客服,有时候文字沟通不太清楚,如果能发语音沟通,就好了。 2、用户在公众号发了语音,客服能在手机上收听,以及能用语音去回复吗? 3、我没有小程序,也没有公众号,做了一个H5咨询链接,用户和客服都能用语音吗?毕竟很多时候用户不想关注,添加好友,透露自己的手机号码,不打字也能即时语音交流吗? 语音实现效果如下 一、小程序发语音 目前小程序不支持用户发... 阅读详情

项目背景

。功能要求为:一对一聊天,可以发送文字,图片,语音,文件,视频,含消息列表页。 暑假没事干来写篇博客复盘一下。框架和样式部分就是采用了colorUI 的组件,没啥好说的,这方面我也不会

聊天室

成品展示

  

 这是聊天内容部分

<scroll-view class="cu-chat" scroll-y="true"  scroll-into-view="{{scrollId}}"
style="height:{{systemInfo.windowHeight - 50}}px;"enable-flex="true">
  <block wx:for="{{msgList}}" wx:key="index" wx:if="{{msgList!=[]}}">
    <view class="cu-chat">
    
      <!-- 我的部分 -->

      <!-- 文字 -->
      <block wx:if="{{item.creator == myOpenid && item.type == 'text'}}">
        <view class="cu-item self">
            <!-- 我的发送消息 -->
            <view class="main">
              <view class="content bg-green shadow" id="msg-{{index}}">
                <text>{{item.content}}</text>
              </view>
            </view>
            <!--我的头像  -->
            <view class="cu-avatar radius" style="background-image:url({{myUserInfo.avaUrl}});"></view>
        </view> 
      </block>
      <!-- 图片 -->
      <block wx:if="{{item.creator == myOpenid && item.type == 'image'}}">
        <view class="cu-item self"  id="msg-{{index}}">
          <view class="main" bindtap="viewImage" data-url="{{item.content}}">
            <image src="{{item.content}}" class="radius" mode="widthFix"></image>
          </view>
          <view class="cu-avatar radius" style="background-image:url({{myUserInfo.avaUrl}});"></view>
        </view>
      </block>
      <!-- 视频 -->
      <block wx:if="{{item.creator == myOpenid && item.type == 'video'}}">
        <view class="cu-item self"  id="msg-{{index}}">
          <view class="main" bindtap="viewvideo" data-url="{{item.content}}">
            <video src="{{item.content}}" class="radius" mode="widthFix"></video>
          </view>
          <view class="cu-avatar radius" style="background-image:url({{myUserInfo.avaUrl}});"></view>
        </view>
      </block>
      <!-- 文件 -->
      <block wx:if="{{item.creator == myOpenid && item.type == 'file'}}">
        <view class="cu-item self"  id="msg-{{index}}">
          <view class="main" bindtap="viewFile" data-fileid="{{item.content.fileID}}">
            <view class="content" style="width: 500rpx;height: 200rpx;display: flex;justify-content: space-around;padding-left:30rpx;padding-right:40rpx;padding-top:0rpx">
              <view class="fileName" style="margin-right: 30rpx;">
                <view class="view" style="font-size: 30rpx; font-weight: 20rpx;">{{item.content.fileName}}</view>
              </view>
              <!-- 文件图标 -->
              <view class="image" >
                <image class="cu-avatar radius" style="background-image:url({{fileImg}});width:70rpx;height: 80rpx;"></image>
              </view>
            </view> 
          </view>
          <view class="cu-avatar radius" style="background-image:url({{myUserInfo.avaUrl}});"></view>
        </view>
      </block>
      <!-- 语音 -->
      <block wx:if="{{item.creator == myOpenid && item.type == 'voice'}}">
        <view class="cu-item self"  id="msg-{{index}}">
          <view class="main" bindtap="voicePlay" data-voiceID="{{item.content.fileID}}">
            <view class="action text-bold text-grey">{{item.content.duration}}"</view>
            <view class="content bg-green shadow">
              <text class="cuIcon-sound text-xxl padding-right-xl" > </text>
            </view>
          </view>
          <!-- 头像 -->
          <view class="cu-avatar radius" style="background-image:url({{myUserInfo.avaUrl}});"></view>
        </view>
      </block>

      <!-- 他的部分 -->

      <!-- 文字 -->
      <block wx:if="{{item.creator !== myOpenid && item.type == 'text'}}">
        <view class="cu-item">
          <!-- 他的头像 -->
          <view class="cu-avatar radius" style="background-image:url({{hisUserInfo}});"></view>
          <!-- 他的消息 -->
          <view class="main">
            <view class="content shadow" id="msg-{{index}}">
              <text>{{item.content}}</text>
            </view>
          </view>
        </view>
      </block>
      <!-- 图片 -->
      <block wx:if="{{item.creator !== myOpenid && item.type == 'image'}}">
        <view class="cu-item"  id="msg-{{index}}">
          <!-- 他的头像 -->
          <view class="cu-avatar radius" style="background-image:url({{hisUserInfo}});"></view>
          <!-- 他的图片 -->
          <view class="main" bindtap="viewImage" data-url="{{item.content}}">
            <image src="{{item.content}}" class="radius" mode="widthFix"></image>
          </view>
        </view>
      </block>
      <!-- 视频 -->
      <block wx:if="{{item.creator !== myOpenid && item.type == 'video'}}">
        <view class="cu-item "  id="msg-{{index}}">
          <!-- 他的头像 -->
          <view class="cu-avatar radius" style="background-image:url({{hisUserInfo}});"></view>
          <view class="main" bindtap="viewvideo" data-url="{{item.content}}">
            <video src="{{item.content}}" class="radius" mode="widthFix"></video>
          </view>
          
        </view>
      </block>
      <!-- 文件 -->
      <block wx:if="{{item.creator !== myOpenid && item.type == 'file'}}">
        <view class="cu-item "  id="msg-{{index}}">
          <!-- 他的头像 -->
          <view class="cu-avatar radius" style="background-image:url({{hisUserInfo}});"></view>
          <!-- 他的文件 -->
          <view class="main"bindtap="viewFile" data-fileid="{{item.content.fileID}}">
            <view class="content" style="width: 500rpx;height: 200rpx;display: flex;justify-content: space-around;padding-left:30rpx;padding-right:40rpx;padding-top:0rpx">
              <view class="fileName" style="margin-right: 30rpx;">
                <view class="view" style="font-size: 30rpx; font-weight: 20rpx;">{{item.content.fileName}}</view>
              </view>
              <!-- 文件图标 -->
              <view class="image" >
                <image class="cu-avatar radius" style="background-image:url({{fileImg}});width:70rpx;height: 80rpx;"></image>
              </view>
            </view> 
          </view>
        </view>
      </block>
      <!-- 语音 -->
      <block wx:if="{{item.creator !== myOpenid && item.type == 'voice'}}">
        <view class="cu-item" id="msg-{{index}}">
          <!-- 他的头像 -->
          <view class="cu-avatar radius" style="background-image:url({{hisUserInfo}});"></view>
          <!-- 他的消息 -->
          <view class="main"bindtap="voicePlay" data-voiceID="{{item.content.fileID}}">
            <view class="content shadow" >
              <text class="cuIcon-sound text-xxl padding-right-xl"></text>
            </view>
            <view class="action text-bold text-grey">{{item.content.duration}}"</view>
          </view>
        </view>
      </block>
    </view>
  </block>
</scroll-view>

浅浅地小讲一下

<scroll-view class="cu-chat" scroll-y="true"  scroll-into-view="{{scrollId}}"
style="height:{{systemInfo.windowHeight - 50}}px;"enable-flex="true">

</scroll-view>
scroll-into-viewstring值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素

scrollId的值会在聊天内容发生变化时,变更为最后一条消息元素的id

msgList 是消息数组

 集合chat_msg储存了聊天数据(部分),其中一条记录保存一个会话房间的数据,下面为一条记录的示例

_id自动生成
session_id代码中用了唯一确定会话房间的字段, 志愿者用户首次联系负责人时将在chat_msg创建会话房间记录,生成session_id字段,session_id由负责人和志愿者的_openid连接而成)
msg_set会话房间的消息数组,数组成员为对象类型,按消息类型分类消息对象属性&消息类型文字图片视频文件语音
typetextimage

video

file

voice

content文字消息云ID
creator消息创建者的_openid
createTimeStamp消息发送时的时间戳

下面是图片、文件、语音消息的点击事件

  //点击图片预览
  viewImage(e){
    var urls = [e.currentTarget.dataset.url]
    wx.previewImage({
      current: '', // 当前显示图片的http链接
      urls: urls, // 需要预览的图片http链接列表
      showmenu : true
    })
  },
  //打开文件
  viewFile(e){
    var fileid = e.currentTarget.dataset.fileid;//云文件fileID
    var that = this;
    wx.cloud.downloadFile({
      fileID: fileid,
    })
    .then((res)=>{
      console.log('res',res.tempFilePath);
      wx.openDocument({
        filePath: res.tempFilePath,
        showMenu: true,
      })
      .then(()=>{})
      .catch((err)=>{console.log('文件预览失败',err);})
    })
  },

  //播放录音(该页面的js文件中全局变量  有const innerAudioContext   =wx.createInnerAudioContext();//播放语音)
  voicePlay(e){
    innerAudioContext.stop();
    innerAudioContext.src = '';
    console.log(e.currentTarget.dataset.voiceid)
    let id = e.currentTarget.dataset.voiceid;
    innerAudioContext.src = id;
    innerAudioContext.onPlay(()=>{console.log('语音播放')});
    innerAudioContext.onError((res)=>{
      console.log(res.errMsg) 
      console.log(res.errCode)
    })
    innerAudioContext.play();
  },

底部消息编辑区

  <!-- 发送部分 -->
<view class="cu-bar foot input {{InputBottom!=0?'cur':''}}" style="bottom:{{InputBottom}}px">
  <!-- +更多 -->
  <view class="action" bindtap="showModal">
    <text class="cuIcon-roundadd lg text-gray"></text>
  </view>
  <!-- text&voice -->
  <view class="action" wx:if="{{inputMode == 'voice'}}" bindtap="switchInputMode">
    <text class="cuIcon-keyboard lg text-grey"></text>
  </view>
  <view class="action" wx:if="{{inputMode=='text'}}"bindtap="switchInputMode">
    <text class="cuIcon-sound text-grey"></text>
  </view> 
  <!-- 文字输入框 -->
  <input 
  hidden="{{inputMode=='voice'}}"
  class="solid-bottom" 
  bindfocus="InputFocus" 
  bindblur="InputBlur" 
  adjust-position="{{false}}" 
  focus="{{false}}" 
  maxlength="300" 
  cursor-spacing="10" 
  value="{{inputContent}}" 
  bindinput="onInputContent"></input>
    <!-- 语音按住区 -->
  <view 
  hidden="{{inputMode=='text'}}"
  class="middle-view" 
  bindtouchstart="RecordStart" 
  catch:touchmove="RecordMove" 
  bindtouchend="RecordEnd">{{voiceTip}}</view>
  <!-- 发送按钮 -->
  <button hidden="{{inputMode=='voice'}}"class="cu-btn bg-green shadow" bindtap="sendContent">发送</button>
</view>

<!-- 底部多选功能窗口 -->
<view class="cu-modal bottom-modal {{modalName=='bottomModal'?'show':''}}">
  <view class="cu-dialog">
    <view class="cu-bar bg-white">
      <view class="action text-blue" bindtap="hideModal">取消</view>
    </view>
    <view class="padding-xl">
      <view class="cu-list grid col-3">

        <view class="cu-item" bindtap="sendPic">
          <text class="cuIcon-pic lg text-gray"></text>
          <text>图片</text>
        </view>

        <view class="cu-item" bindtap="sendVideo">
          <text class="cuIcon-video lg text-gray"></text>
          <text>视频</text>
        </view>

        <view class="cu-item" bindtap="sendFile">
          <text class="cuIcon-send lg text-gray"></text>
          <text>文件</text>
        </view>

      </view>
    </view>
  </view>
</view>
<!-- 录音中的图样 -->
<view class="voice-tip" hidden="{{!recording}}">
    <view><image src="{{recordimg}}"></image></view>
    <view>{{showtip}}</view>
</view>

浅浅地小讲一下

inputMode这个变量用来表示当前的输入形式,如果是text显示文字输入框,如果是voice则显示语音输入框。bindtap="switchInputMode"这个点击事件用来切换输入方式。

发送的消息都会包装成msg对象作为对应云函数(lyc_consult  --  sendMsg )的参数,经由云函数处理,写入数据库集合的对应记录中,其中文字和图片消息还会经过合法性检验。通过监听对应会话记录达到实时聊天。

实时聊天实现

  onLoad:async function (e) {
    loading=true;
    if(msgWatcher) await msgWatcher.close();
    console.log('进入会话页,携带会话号',e.session_id);
    console.log("hisUserInfo",e.hisUserInfo);
    this.data.sid = e.session_id;
    this.setData({
      hisUserInfo: e.hisUserInfo,
      myUserInfo:App.globalData.userInfo.userInfo,
    })
    var that=this;
    //获取系统信息,得到可用窗口高度
    wx.getSystemInfo({
      success: function (res) {
        that.setData({
          systemInfo: res,
        })
      }
    })
    //开启集合chat_msg.session_id的消息监听
    setTimeout(this.initWatcher,1000)
    //初始化录音器
    this.initRecord();
  },
  //消息监听器开启
  async initWatcher(){
    wx.showLoading({
      title: '加载中...',
      mask: true,
    })
    console.log('initWatcher函数执行,消息监听器开启'); 
    msgWatcher = await db.collection('chat_msg')
    .where({
      session_id : this.data.sid,
    })
    .watch({
      onChange:this.onChange.bind(this),
      onError:function(err){
        console.log("onError",err);
        wx.showModal({
          title: '提示',
          content: '数据监听失败',
          showCancel:false,
          confirmText:'重新加载',
          success (res) {
            if (res.confirm) {
              that.onLoad();
            } 
          }
        })
      }
    })
  },
  //消息监听回调函数
  onChange(snapshot){
    console.log('onChange监听回调函数的snapshot',snapshot)
    //即时聊天
    this.sortRenderMsg(snapshot.docs[0].msg_set)
  },
  //对消息对象数组进行时间排序并渲染
  async sortRenderMsg(e){
    console.log('排序渲染函数执行');
    var list=e.sort(function(a,b){return a.createTimeStamp-b.createTimeStamp});
    await this.setData({
      msgList : list,
      scrollId: 'msg-'+(list.length-1)
    });
    if(loading==true){
      wx.hideLoading({
        complete: () => {loading=false},
      })
    }
  },

消息列表页

 当会话房间有为读消息时,会有红点提示,且红点内数字即为未读消息条数。

由于只能志愿者主动去联系负责人,从而达到新开会话房间的行为,所以不必考虑有新的会话进来这种情况,只用监听已有的会话记录,负责人端则既需要考虑监听已有的会话房间,还要考虑监听负责人的会话房间数组的更新情况,及时显示首次来联系的志愿者消息。

  //监听我的所有项目会话(是否有项目负责人发来新消息)
    watch() {
    console.log('开启消息列表页的会话监听');
    var arr = sids;
    var that = this;
    watcher = 
      db.collection('chat_msg')
        .where({
          session_id: _.in(arr),
        })
        .watch({
          onChange: this.onChange.bind(this),
          onError: function (err) {
            console.log("onError", err);
            if(loading==false){
              wx.hideLoading({
                complete: () => {loading=true},
              })
              }
            wx.showModal({
              title: '提示',
              content: '数据监听失败',
              showCancel:false,
              confirmText:'重新加载',
              success (res) {
                if (res.confirm) {
                  that.onShow();
                } 
              }
            })
          }
        })

  },
  //监听回调函数
  onChange(snapshot) {
    console.log('消息列表页监听回调函数的snapshot', snapshot);
    const sessions = this.data.sessions;
    snapshot.docChanges.forEach(update);//对发生改变的会话记录进行了遍历
    function update(e) {
      const sid = e.doc.session_id;
      const index = sids.indexOf(sid);
      const msg_set = e.doc.msg_set;
      const len = msg_set.length;
      //如果该会话无任何消息,则跳出
      if (len == 0) return;
      const lastMsgTime = msg_set[len - 1].createTimeStamp;
      const leaveTimeStamp = sessions[index].leaveTimeST;
      let unReadNum = 0;
      if ((lastMsgTime > leaveTimeStamp) || (lastMsgTime == leaveTimeStamp)) {
        if (lastMsgTime == leaveTimeStamp) { unReadNum = 1; }
        if (lastMsgTime > leaveTimeStamp) {
          unReadNum = function () {
            let sum = 0;
            for (let x = len - 1 ; (msg_set[x].createTimeStamp > leaveTimeStamp) || (msg_set[x].createTimeStamp == leaveTimeStamp); --x) {
              ++sum;
            }
            console.log('sum',sum)
            return sum;
          }();
        }
        db.collection('all_user')
        .where({
          _openid: myOpenid,
          'mySession_ids.session_id': sid
        })
        .update({
          data: {
            'mySession_ids.$.unReadNum': parseInt(unReadNum)
          }
        })
        console.log('unReadNum',unReadNum)
      }
      else {
        console.log('会话' + sid + '无新消息');
      }
    }
    let that = this;
    setTimeout(f, 100)
    async function f() {
      await db.collection('all_user')
        .where({
          _openid: myOpenid
        })
        .get()
        .then((res) => {
          if (res.data.length) {
            that.setData({
              sessions: res.data[0].mySession_ids,
            });
            console.log('列表页渲染完成');
          }
        })
      
      if(loading==false){
      wx.hideLoading({
        complete: () => {loading=true},
      })
      }
    }
  },

开摆   这里是源码   https://gitee.com/YYCCbigbig/applet-chat-function.git

有用的话,点个赞吧

【uni-app】模仿微信实现简易发送/取发语音功能 记录学习小程序开发聊天应用语音录制功能 阅读详情

相关推荐

微信小程序聊天室(云开发)

在写聊天是之前我们可以先看一需要建四个云数据表,user(用户列表),qunList (群列表),qunUserList(群用户列表),news(消息列表)接下来就是页面布局,这个布局看个人其需求我这里就讲讲大概逻辑,数据的增删改查我上篇文章已经讲过了,今天我就不详细写了 一.登录 1.必须有个授权按钮,授权之后将用户基本信息跟opinId存入缓...

qq_41241504的博客 7639

微信小程序云开发实现一对一即时聊天,发送语音、文件、图片、朋友圈、添加好友等功能

利用云开发的即时通信demo做的仿照微信好友聊天。群聊、私聊、订阅消息、添加好友等

欢迎光临 1万+

微信小程序云开发watch实现用户一对一实时聊天

首先看一下具体实现效果

weixin_47597807的博客 5894

【微信开发】微信小程序实现实时聊天功能

你可以拿去实现一下它的实例代码,看看打印,感受一下。1.说到底,聊天界面就是循环一个数组,每一行为一个单位(item),循环(wx.for)我们设置的装聊天记录的数组。3.我们在很多的带有聊天功能的系统中都知道,进入页面和发送信息我们的需要将视角放置到我们刚更新的那条信息,则就有。②在循环体中加上id="item{{index}}",意为:设置当前循环体的id为当前item对应下标;wx:if="{{item.id == 1}}"和wx:if="{{item.id == 0}}"2.如何实现实时更新;

weixin_57788079的博客 2万+

微信小程序用云开发实现多人聊天2020/05/21

微信小程序用云开发实现多人聊天室微信小程序用云开发实现多人聊天2020/05/21效果图片jswxmlwxss 微信小程序用云开发实现多人聊天2020/05/21 用微信云开发实现聊天室 无需后台 新手也能开发直接的聊天室,话不多说直接上效果图和代码(也可以私信我一对一教学哦) 效果图片 js //index.js const db = wx.cloud.database() const chatroomCollection = db.collection("chatroom") var util = r

mygame668的博客 2666

微信小程序|基于小程序实现发送语音消息及转文字

此文主要在小程序内聊天的基础上实现语音发送及文字转换。

商务合作 / 项目定制 / 学习交流。个人vx:lovely_wml 1万+

微信小程序利用云开发实现聊天室功能

相比传统的websoket,提供一种简单的利用腾讯云环境的开发思路 1.配置云开发环境,新建小程序项目的时候后端服务选择云开发,如下图 进入项目后创建云开发环境并将cloudfunctions文件绑定在该环境下(参考https://blog.csdn.net/qq_39635610/article/details/84256636),具体配置步骤见该链接, https://www.jia...

Robin思源的博客 8723

微信小程序开发中的实时聊天和即时通讯

实时聊天和即时通讯是微信小程序中常见的功能之一。在本文中,我们将使用微信小程序云开发和腾讯云的即时通讯服务(TIM)来实现一个简单的实时聊天功能。在开始之前,我们需要先创建一个微信小程序并开通云开发功能。我们还需要在腾讯云上创建一个即时通讯服务,并获取到相关配置信息。一、创建微信小程序云开发环境。三、配置微信小程序云开发环境。二、创建腾讯云即时通讯服务。四、编写前端页面代码。

吃不胖. 1670

微信小程序云开发解析excel表,小程序评论留言功能,调用api显示商户距离及导航,小程序仿微信聊天,模糊搜索查询,懒加载模式,仿微信朋友圈

文末附源码下载方式,具体配置,请参考我往期的三篇文章 最近在家无聊,就再网上接了两个几百块钱的微信小程序,用的都是云开发, 云函数路由的相关知识,再简单调用一些api的接口。 文章中的源码主要实现以下功能: 1 全是云开发,并且借助云函数路由实现 2 仿微信好友聊天,借助云开发即时通信demo实现了一对一聊天,群聊等功能 3 仿微信朋友圈,只能看到好友的动态,非好友动态无法查看 4 ...

欢迎光临 1258

如何为微信小程序添加客服和在线聊天功能

二、创建云函数 1.在微信开发者工具中创建一个云函数,命名为"addCustomerService"。三、创建页面 1.在微信开发者工具中创建一个页面,命名为"customerService"。要为微信小程序添加客服和在线聊天功能,首先你需要了解如何使用微信小程序的云开发能力和客服能力。下面是一个详细的代码案例,包括了如何实现客服功能和在线聊天功能。四、创建聊天页面 1.在微信开发者工具中创建一个页面,命名为"chat"。2.在微信开发者工具中预览小程序,测试添加客服和在线聊天功能。

吃不胖. 1710

云开发微信小程序聊天群(可聊天,发送图片、语音等)

先看一下效果图: 实现代码: 可以帮忙制作,手机号 、wx:17610241271 wxml <view class="bo"> <view class="top_bo"> <view bindtap="number">群成员({{userNumber}})</view> <view bindtap="upLo...

刺心的博客 1373

微信小程序云开发实现一对一聊天

微信小程序云开发实现一对一聊天 有的时候小程序可以会涉及到聊天,评论的等功能,像博客,外卖平台等。这篇文章就先介绍的怎样借助云开发实现即时一对一,不同场景的聊天的功能。 首先要创建创建一个新的云开发的小程序。我们可以借助云开发的即时通信模板来实现我们自己的功能。如果你不知道云开发怎么使用,可以去查看开发文档。 会看到控制台出现了开始监听等信息,这是利用的 Collection.watch。具体.........

欢迎光临 2万+

微信小程序二手交易源码(云开发版,含发布、搜索、下单、即时聊天功能)

一套基于微信云开发的闲置物品交易小程序源码,零服务器依赖,开箱即用。用户注册登录后,卖家可在发布页上传多图、填写标题、价格、描述等信息快速上架商品;买家通过首页分类导航或搜索框精准查找目标物品,进入详情页查看图文详情并一键下单;所有订单集中管理在个人中心,支持取消未支付订单、确认收货完成履约流程;买卖双方可在商品详情页直接触发聊天窗口,实现实时沟通。全部数据——包括用户资料、商品信息、订单状态、图片资源——均由微信云数据库与云存储自动托管,无需额外运维。项目结构清晰:包含完整页面路由(app.)、云函数目录

e4f5g6h的博客 364

uniapp使用微信小程序云开发实时聊天

效果: 步骤一:对微信小程序 (1)创建微信云开发项目(2)创建云环境(后续将用到云环境ID) (3)将云函数上传部署 (后续会用到云函数openid等) (4)创建集合(示例counters集合) 步骤二:对uniapp 预实现操作微信云数据库 (1)创建uniapp项目 (2)并复制微信云开发项目的APPID到uniapp项目 (3)初始化云环境(在app.vue填写微信小程序创建云环境使用的云环境ID) 创建一个vue文件,尝试连接数据库 template代码 <button

qq_42453562的博客 2272

Ansys 19 Mechanical 流体密封分析

start point是一个特殊的概念,在仿真中ansys将从start point开始搜索会发生流体渗漏的点,可以简单理解为从start point开始,向四周逐个节点比较节点上的接触压紧力与流体压力,如果流体压力大于压紧力,则发生渗漏。事实上此处的最后一个参数是指定start point类型的,为1代表这是一个“open”的start point。在通常情况下,如果不人为指定start point,程序会自动寻找指定流体压力面的“边界”,对于二维情况,就是曲线的两个端点,对于三维情况就是曲面的边线。

Dio980的博客 1538

记录一次PowerJob使用达梦数据库的配置

记录一次PowerJob使用达梦数据库的配置

早晨阳光一般暖的博客 2163

微信小程序社交功能实现教程

微信小程序社交功能实现教程 【下载地址】微信小程序社交功能实现教程 本教程全面解析微信小程序社交功能开发,涵盖添加好友、实时聊天、发布朋友圈、评论点赞及图片上传等核心功能。采用微信云开发模式,简化后端流程,提升开发效率。通过详细的步骤指导,帮助开发者快速掌握从登录注册到社交互动的完整实现过程。无论您是初学者还是经验丰富的...

gitblog_06727的博客 524

2025年全国青少年信息素养大赛初赛真题(算法创意实践挑战赛C++初中组:文末附答案)

2025年全国青少年信息素养大赛初赛真题(算法创意实践挑战赛C++初中组:文末附答案)

王老师青少年编程 3401

微信小程序社交功能实现教程:实现社交互动新体验

微信小程序社交功能实现教程:实现社交互动新体验 【下载地址】微信小程序社交功能实现教程 本教程全面解析微信小程序社交功能开发,涵盖添加好友、实时聊天、发布朋友圈、评论点赞及图片上传等核心功能。采用微信云开发模式,简化后端流程,提升开发效率。通过详细的步骤指导,帮助开发者快速掌握从登录注册到社交互动的完整实现过程。无论您是...

gitblog_06704的博客 558

【25届数字IC秋招总结】面试经验13——豪威科技面试

25届数字ic面试记录———豪威科技

lalala0635的博客 366

YOLOv10改进策略【注意力机制篇】| 2024 蒙特卡罗注意力(MCAttn)模块,提高小目标的关注度

本文记录的是基于蒙特卡罗注意力(MCAttn)模块的YOLOv10目标检测改进方法研究。利用提高的跨尺度特征提取能力,使模型能够更好地传递和融合提取的多尺度特征,提高对小目标的关注度。Exploiting Scale-Variant Attention for Segmenting Small Medical Objects使用一种基于随机采样的池化操作来生成尺度无关的注意力图。它从三个不同尺度(3×33×33×3、2×22×22×2和1×11×11×1,即池化张量)中随机选择一个1×11×11×1注意力图

Limiiiing的博客 2190

借助云开发,利用订阅消息,云函数路由实现小程序好友一对一聊天,添加好友等仿微信功能

借助微信小程序云开发,利用订阅消息,云函数路由实现小程序好友一对一聊天,添加好友等仿微信功能

欢迎光临 6164

Docker:快速部署 Temporal 工作流引擎的技术指南

Temporal是一个开源的分布式工作流引擎,适用于复杂业务流程(如订单处理、支付流程等),提供状态持久化、自动重试、多语言SDK支持等特性。部署简单,支持Docker Compose,包含核心服务、Web UI及数据库。以TypeScript为例,开发者可快速编写工作流(如订单处理)和Worker,通过CLI或SDK启动和管理。Temporal简化了分布式系统的可靠性设计,适合电商、自动化任务等场景。

木头 647
下一篇: 五级地址选择器 微信小程序 四级五级各类地址数据文件
迪山嘲宫花
博客等级 码龄5年 20粉丝 3原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值