zs 2 tahun lalu
induk
melakukan
f215b9f55b

+ 11 - 7
common/css/font-icon.css

@@ -2,9 +2,9 @@
   font-family: "iconfont"; /* Project id 3674157 */
   /* Color fonts */
   src: 
-       url('https://at.alicdn.com/t/c/font_3674157_xuqydsn4nd.woff2?t=1673515464181') format('woff2'),
-       url('https://at.alicdn.com/t/c/font_3674157_xuqydsn4nd.woff?t=1673515464181') format('woff'),
-       url('https://at.alicdn.com/t/c/font_3674157_xuqydsn4nd.ttf?t=1673515464181') format('truetype');
+       url('https://at.alicdn.com/t/c/font_3674157_sy9qf8dv88i.woff2?t=1674029757910') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_3674157_sy9qf8dv88i.woff?t=1674029757910') format('woff'),
+       url('https://at.alicdn.com/t/c/font_3674157_sy9qf8dv88i.ttf?t=1674029757910') format('truetype');
 }
 
 .iconfont {
@@ -15,6 +15,14 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-quanbudingdan:before {
+  content: "\e600";
+}
+
+.icon-shangpin:before {
+  content: "\e64f";
+}
+
 .icon-tupian:before {
   content: "\e67f";
 }
@@ -39,10 +47,6 @@
   content: "\e619";
 }
 
-.icon-cantuan:before {
-  content: "\ec43";
-}
-
 .icon-liebiaoxingshi:before {
   content: "\e742";
 }

+ 53 - 26
pagesMessage/message/components/submit_1.vue

@@ -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;
+				}
 			}
 		}
 	}

+ 9 - 9
store/websocketStore.js

@@ -20,13 +20,13 @@ const store = new Vuex.Store({
 			state.socketTask = uni.connectSocket({
 				url, // url是websocket连接ip
 				success: () => {
-					console.log('WebSocket连接成功!')
+					// console.log('WebSocket连接成功!')
 				},
 				fail: e => {
 					setTimeout(() => {
 						dispatch('websocketInit', url)
 					}, 3000)
-					console.log('连接失败' + e)
+					// console.log('连接失败' + e)
 				}
 			})
 			state.socketTask.onOpen(() => dispatch('websocketOnOpen'))
@@ -37,7 +37,7 @@ const store = new Vuex.Store({
 		websocketOnOpen({
 			commit
 		}) {
-			console.log('WebSocket连接正常打开中...!')
+			// console.log('WebSocket连接正常打开中...!')
 		},
 		// 收到数据
 		websocketOnMessage({
@@ -61,13 +61,13 @@ const store = new Vuex.Store({
 			setTimeout(() => {
 				dispatch('websocketInit', url)
 			}, 3000)
-			console.log('WebSocket连接关闭')
+			// console.log('WebSocket连接关闭')
 		},
 		websocketOnError({
 			commit,
 			dispatch
 		}) {
-			console.log('WebSocket连接错误')
+			// console.log('WebSocket连接错误')
 		},
 		websocketClose({
 			state
@@ -75,10 +75,10 @@ const store = new Vuex.Store({
 			if (!state.socketTask) return
 			state.socketTast.close({
 				success(res) {
-					console.log('关闭成功', res)
+					// console.log('关闭成功', res)
 				},
 				fail(err) {
-					console.log('关闭失败', err)
+					// console.log('关闭失败', err)
 				}
 			})
 		},
@@ -89,10 +89,10 @@ const store = new Vuex.Store({
 			uni.sendSocketMessage({
 				data,
 				success: res => {
-					console.log('发送成功', res)
+					// console.log('发送成功', res)
 				},
 				fail: e => {
-					console.log('发送失败', e)
+					// console.log('发送失败', e)
 				}
 			})
 		}