收藏
回答

云开发聊天页面,但是输入文字以后点击发送按钮,页面没有任何变化,请问是哪里的问题?

<!-- scroll-view来实现页面拖动 -->
<scroll-view id='page' scroll-into-view="{{toView}}" upper-threshold="100"
  scroll-y="true" enable-back-to-top="true" class="message-list">
  <!-- 每一条消息 -->
  <view class="cu-chat" wx:for="{{1}}" wx:key="index" id="row_{{index}}">
    <!-- 自己发出的消息 -->
    <block wx:if="{{item.openid==openid}}">
      <block wx:if="{{item.showTime}}">
        <view class="datetime" style="width:100%">{{item.sendTime}}</view>
      </block>
      <view class="cu-item self"
        style="width: 750rpx; height: 120rpx; display: flex; box-sizing: border-box; left: 0rpx; top: 0rpx">
        <view class="main">
          <view class="content bg-green shadow" style="position: relative; left: 0rpx; top: 22rpx;border-radius: 10rpx">
            <text style="font-size:33rpx">{{item.textContent}}</text>
          </view>
        </view>
        <view class="cu-avatar radius center"
          style="background-image: url({{useravatar}}); width: 71rpx; height: 71rpx; display: flex; box-sizing: border-box; left: 0rpx; top: 0rpx"
          bindtap="go_myinfo"></view>
      </view>
    </block>
     <!-- 对方发出的消息 -->
     <block wx:else>
      <block wx:if="{{item.showTime}}">
        <view class="datetime" style="width:100%">{{item.sendTime}}</view>
      </block>
      <view class="cu-item"
        style="width: 750rpx; height: 120rpx; display: flex; box-sizing: border-box; left: 0rpx; top: 0rpx">
          <view class="cu-avatar radius center"
            style="background-image: url({{match_avatar}}); width: 71rpx; height: 71rpx; display: flex; box-sizing: border-box; left: 0rpx; top: 0rpx">
          </view>
        <view class="main">
          <view class="content bg-white shadow" style="position: relative; left: 0rpx; top: 22rpx;border-radius: 10rpx">
            <text style="font-size:33rpx">对面消息</text>
          </view> 
        </view>
      </view>
    </block>
  </view>
</scroll-view>



<!-- 回复框 -->
<view class="reply cu-bar">
  <!-- 输入框 -->
  <view class="opration-area">
    <input type="text" bindinput="getContent" value="{{textInputValue}}" maxlength="300" cursor-spacing="10"
      style="width: 544rpx; height: 64rpx; display: block; box-sizing: border-box;"></input>
  </view>
  <!-- 发送按钮 -->
  <button class="cu-btn bg-green shadow" bindtap='sendMsg'
    style="width: 150rpx; height: 64rpx; display: flex; box-sizing: border-box; left: -22rpx; top: 0rpx; position: relative">发送</button>
</view>
回答关注问题邀请回答
收藏
登录 后发表内容