|
@@ -3,18 +3,30 @@
|
|
|
<view class="submit">
|
|
|
<view class="submit-chat">
|
|
|
<!-- 文本框 -->
|
|
|
- <textarea confirm-type="send" cursor-spacing='20' class="chat-send btn" :show-confirm-bar="false"
|
|
|
- disable-default-padding="true" auto-height="true" @confirm="inputs" @focus="focus"
|
|
|
- v-model="msg"></textarea>
|
|
|
+ <textarea cursor-spacing='20' class="chat-send btn" :show-confirm-bar="false"
|
|
|
+ disable-default-padding="true" auto-height="true" @focus="focus" v-model="msg"></textarea>
|
|
|
<view class="bt-img" @tap="more">
|
|
|
<text class="iconfont icon-gengduoneirong"></text>
|
|
|
</view>
|
|
|
+ <view class="bt-img" v-if="msg">
|
|
|
+ <button @tap="inputs" type="primary" size="mini">发送</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- 更多 -->
|
|
|
<view class="more" :class="{displaynone:!ismore}">
|
|
|
- <view class="more-list" @tap="sendImg('album')">
|
|
|
- <text class="iconfont icon-tupian"></text>
|
|
|
- <view class="more-list-title">图片</view>
|
|
|
+ <view class="more_1">
|
|
|
+ <view class="more-list" @tap="sendImg('album')">
|
|
|
+ <text class="iconfont icon-tupian"></text>
|
|
|
+ <view class="more-list-title">图片</view>
|
|
|
+ </view>
|
|
|
+ <view class="more-list" @tap="sendGoods">
|
|
|
+ <text class="iconfont icon-shangpin"></text>
|
|
|
+ <view class="more-list-title">商品</view>
|
|
|
+ </view>
|
|
|
+ <view class="more-list" @tap="sendOrder">
|
|
|
+ <text class="iconfont icon-quanbudingdan"></text>
|
|
|
+ <view class="more-list-title">订单</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -38,9 +50,8 @@
|
|
|
}).exec();
|
|
|
},
|
|
|
//文字发送
|
|
|
- inputs(e) {
|
|
|
- var chat = e.detail.value;
|
|
|
- if (chat.length > 0) {
|
|
|
+ inputs() {
|
|
|
+ if (this.msg.length > 0) {
|
|
|
// 0为表情和文字
|
|
|
let msg = this.msg.replace(/[\r\n]/g, "");
|
|
|
this.send(msg, '0')
|
|
@@ -84,6 +95,14 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 发送商品
|
|
|
+ sendGoods() {
|
|
|
+ console.log('发送商品');
|
|
|
+ },
|
|
|
+ // 发送订单
|
|
|
+ sendOrder() {
|
|
|
+ console.log('发送订单');
|
|
|
+ },
|
|
|
//发送
|
|
|
send(msg, type) {
|
|
|
let data = {
|
|
@@ -112,6 +131,8 @@
|
|
|
padding: 14rpx 14rpx;
|
|
|
|
|
|
.bt-img {
|
|
|
+ margin: 0 0 0 10rpx;
|
|
|
+
|
|
|
.iconfont {
|
|
|
font-size: 65rpx;
|
|
|
}
|
|
@@ -128,6 +149,7 @@
|
|
|
|
|
|
.chat-send {
|
|
|
line-height: 44rpx;
|
|
|
+ width: 300rpx;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -135,29 +157,34 @@
|
|
|
.more {
|
|
|
width: 100%;
|
|
|
height: 450rpx;
|
|
|
- background: rgba(236, 237, 238, 1);
|
|
|
+ background: #ecedee;
|
|
|
box-shadow: 0px 11rpx 0px 0px rgba(0, 0, 0, 0.1);
|
|
|
bottom: env(safe-area-inset-bottom);
|
|
|
- padding: 8rpx 20rpx;
|
|
|
+ padding: 8rpx;
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
- .more-list {
|
|
|
- width: 25%;
|
|
|
- text-align: center;
|
|
|
- float: left;
|
|
|
- padding-top: 32rpx;
|
|
|
- background-color: #ffffff;
|
|
|
- border-radius: 20rpx;
|
|
|
+ .more_1 {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
|
- .iconfont {
|
|
|
- font-size: 65rpx;
|
|
|
- }
|
|
|
+ .more-list {
|
|
|
+ width: 18%;
|
|
|
+ text-align: center;
|
|
|
+ margin: 10rpx;
|
|
|
+ padding: 20rpx 15rpx 15rpx 15rpx;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 20rpx;
|
|
|
|
|
|
- .more-list-title {
|
|
|
- margin: 10rpx 0;
|
|
|
- font-size: 30rpx;
|
|
|
- color: rgba(39, 40, 50, 0.5);
|
|
|
- line-height: 34rpx;
|
|
|
+ .iconfont {
|
|
|
+ font-size: 65rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .more-list-title {
|
|
|
+ margin: 10rpx 0;
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: rgba(39, 40, 50, 0.5);
|
|
|
+ line-height: 34rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|