chat.wxml 2.4 KB
<!--pages/main/smartchat/chat.wxml-->
<view hidden='{{showModal}}'>
  <scroll-view style='background:#fff;margin-bottom:150rpx'>
    <view wx:for="{{chatlist}}" wx:for-item="item" style='display:flex;flex-direction:column'>
      <view style='margin:50rpx 60rpx 0 36rpx;display:flex;flex-direction:row' wx:if="{{item.type=='0'}}">
        <image style='width:102rpx;height:92rpx' src="/images/icon_robot.png"></image>
        <view class='receive_bg'>
          <text class='text_receive_wrap'>{{item.text}}</text>
        </view>
      </view>
      <view style='margin:50rpx 36rpx 0 60rpx;display:flex;justify-content:flex-end;' wx:if="{{item.type=='1'}}">
        <view class='send_bg'>
          <text class='text_send_wrap'>{{item.text}}</text>
        </view>
        <view style='width:92rpx;height:92rpx;'>
          <open-data type="userAvatarUrl"></open-data>
        </view>
      </view>
    </view>
  </scroll-view>
  <view class='bottom_wrap'>
    <input class='input_wrap' placeholder-class='input_placeholder_wrap' confirm-type="send" bindinput="bindKeyInput" placeholder='请输入您要咨询的问题' value='{{inputValue}}'></input>
    <view class='btn_send_wrap' bindtap='sendMsg'>发送</view>
  </view>
</view>

<!-- 自定义弹窗 -->
<view class="mask" catchtouchmove="preventTouchMove" hidden="{{!showModal}}"></view>
<view class='modal_lg' hidden="{{!showModal}}">
  <text class="text_title">您在多个单位有任职信息,请选择您要在哪家单位咨询问题。</text>
  <view class='divide_line_f5f5f5'></view>
  <view style='width:100%;display:flex;flex-direction:column;align-items:center;max-height:450rpx'>
    <block wx:for="{{comlist}}" wx:for-index="idx">
      <view wx:if="{{idx==choosed_index}}" bindtap='goselect' id="{{idx}}">
        <text class='text_item_blue float_left'>{{item.name}}</text>
        <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
      </view>
      <view wx:else bindtap='goselect' id="{{idx}}">
        <text class='text_item_black float_left' >{{item.name}}</text>
      </view>
      <view class='divide_line_f5f5f5'></view>
    </block>
  </view>

  <view class='divide_line_f5f5f5'></view>
  <view style='width:100%;display: flex;'>
    <text class='text_cancel' bindtap='cancelhandle'>取消</text>
    <view style='width:1px;background:#F5F5F5;margin:20rpx 0'></view>
    <text class='text_confirm' bindtap='confirmhandle'>确定</text>
  </view>
</view>