<view class="msg flex-box" v-for="(item2,index2) in item.data" :class="[item2.send_user_id==receive_user_id ? '' : 'flex-row-reserve']" :key="index2">
<image :src="item2.send_user_id==receive_user_id?item2.senduser.avatar:item2.senduser.avatar" mode="aspectFill" class="xilu_avatar"></image>
<view class="msg-warp" @longpress.native="showMenu(index,index2)" v-if="item2.chat_type==3">商品咨询</view>
** <view class="msg-warp" @longpress.native="showMenu(index,index2)" v-else-if="item2.chat_type==2">
<image :src="item2.content" class="msg-img" mode="widthFix" @click="dowon(item2.content)"></image>
</view>**
<block v-else-if="item2.chat_type==1">
<view class="msg-warp" @longpress.native="showMenu(index,index2)">
<block v-for="v in item2.content">
<image :src="v.value" v-if="v.value.indexOf('https://') != -1" class="emoji"></image>
<text v-if="v.value != '' && v.value.indexOf('https://') == -1">{{v.value}}</text>
</block>
</view>
</block>
</view>
@click="dowon(item2.content)" 这个事件为什么不能把item2.content这个传到方法里?一点击就报错VM22 WAService.js:1 TypeError: Cannot read property 'id' of undefined
1 个回复
8***@qq.com (作者)
哪个大神给解答一下