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.
108 lines
4.3 KiB
Plaintext
108 lines
4.3 KiB
Plaintext
<view class="p-home-chat g_h_all g_flex_column_between">
|
|
<scroll-view scroll-y
|
|
class="chat-content g_flex_column_end g_flex_1"
|
|
style="height:{{screenHeight}}"
|
|
>
|
|
<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="{{!item.loading ? 'bg-obj' : ''}} g_flex_row_start min80"
|
|
>
|
|
<text-panel message="{{item.content}}" color="cblack" wx:if="{{item.type == 'text' && !item.loading}}" />
|
|
<html-panel message="{{item.content}}" color="cblack" wx:if="{{item.type == 'html' && !item.loading}}" />
|
|
<loading-panel wx:if="{{item.loading}}" />
|
|
</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 && !item.loading}}">
|
|
<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 {{voiceSpeed == 0 || voiceSpeed == 1 || voiceSpeed == 5 ? 'voice-click' : ''}}"
|
|
data-speed="{{voiceSpeed}}"
|
|
>
|
|
<!-- 左 -->
|
|
<view class="g_flex_none g_flex_column_center event-icon"
|
|
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'}}"
|
|
bindtouchstart="handleTouchStart"
|
|
bindtouchmove="handleTouchMove"
|
|
bindtouchend="handleTouchEnd"
|
|
bindlongpress="handleLongPress"
|
|
>
|
|
{{ voiceBtnText }}
|
|
</view>
|
|
</view>
|
|
<!-- 右 -->
|
|
<view class="g_flex_none g_flex_column_center right-box send-icon g_text_l"
|
|
bindtap="handleSend"
|
|
>
|
|
<i class="iconfont icon-fasong1 icon {{sendText ? 'icon-active' : ''}} "></i>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view> |