You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bocai_supplyChain/subPage/chat/index.wxml

100 lines
3.9 KiB
Plaintext

<view class="p-home-chat g_h_all g_flex_column_between">
<scroll-view scroll-y="{{true}}"
class="chat-content g_flex_column_end g_flex_1"
style="height:calc(100vh - 92px);overflow:auto;"
>
<view class="chat-card"
wx:for="{{list}}"
wx:for-item="item"
wx:for-index="index"
wx:key="{{item.id}}"
>
<view class="fill-box {{index % 2 == 0 ? 'g_flex_row_start' : 'g_flex_row_end'}}">
<view class="g_w_all {{index % 2 == 0 ? 'g_flex_row_start' : 'g_flex_row_end'}}">
<view class="">
<view class="{{index % 2 == 0 ? 'g_flex_row_start' : 'g_flex_row_end'}}">
<view wx:if="{{index % 2 == 0 && index == 0}}"
class="bg-obj g_flex_row_start"
>
<hello-panel />
</view>
<view wx:if="{{index % 2 == 0 && index != 0}}"
class="bg-obj g_flex_row_start min80"
>
<text-panel message="{{item.content}}" color="cblack" wx:if="{{item.type == 'text'}}" />
<html-panel message="{{item.content}}" color="cblack" wx:if="{{item.type == 'html'}}" />
</view>
<view wx:if="{{index % 2 == 1}}"
class="main-obj g_flex_row_end max80"
>
<text-panel message="{{item.content}}" color="cwhite" />
</view>
</view>
<view class="item-opera g_flex_row_between" wx:if="{{index % 2 == 0}}">
<view class="g_flex_row_start">
<i class="iconfont icon-useful era-icon g_mr_12 {{item.isUp ? 'icon-active' : ''}}"
data-up="{{item.isUp}}"
data-index="{{index}}"
bindtap="handleUp"
></i>
<i class="iconfont icon-un_useful era-icon {{item.isDown ? 'icon-active' : ''}}"
data-down="{{item.isDown}}"
data-index="{{index}}"
bindtap="handleDown"
></i>
</view>
<view class="g_flex_row_end">
<i class="iconfont icon-fuzhi11 era-icon g_mr_12"
data-copy="{{item.content}}"
data-index="{{index}}"
bindtap="handleCopy"
></i>
<i class="iconfont icon-fenxiangfenxiangshare era-icon"
bindtap="handleShare"
></i>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="chat-operate g_flex_none">
<view class="m-input g_flex_row_between">
<!-- 左 -->
<view class="g_flex_none g_flex_column_center"
data-type="{{eventType}}"
bindtap="handleEvent"
>
<view class="i-box g_flex_row_end" wx:if="{{eventType == 'input'}}">
<i class="iconfont icon-huatongyuyin icon"></i>
</view>
<view class="i-box g_flex_row_end" wx:if="{{eventType == 'voice'}}">
<i class="iconfont icon-weixinjianpan2 icon"
style="font-size:28px;"
></i>
</view>
</view>
<!-- 中 -->
<view class="g_flex_1 g_flex_column_center">
<view class="input-box" wx:if="{{eventType == 'input'}}">
<input type="text"
placeholder="请输入内容"
style="width: 100%;"
bindinput="handleInput"
value="{{sendText}}"
/>
</view>
<view class="voice-box" wx:if="{{eventType == 'voice'}}">
按住 说话
</view>
</view>
<!-- 右 -->
<view class="g_flex_none g_flex_column_center right-box g_text_l"
bindtap="handleSend"
>
<i class="iconfont icon-fasong1 icon {{sendText ? 'icon-active' : ''}} "></i>
</view>
</view>
</view>
</view>