From 579cbf7412e44465d4a601653909a6eebe8ae5fd Mon Sep 17 00:00:00 2001
From: jscyl13849007907 <13849007907@163.com>
Date: Wed, 12 Mar 2025 09:34:54 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E7=BB=86=E8=8A=82=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
subPage/chat/index.js | 8 +++++++-
subPage/chat/index.wxml | 8 ++++++--
subPage/chat/index.wxss | 11 ++++++++---
3 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/subPage/chat/index.js b/subPage/chat/index.js
index 8bfb273..e2301fa 100644
--- a/subPage/chat/index.js
+++ b/subPage/chat/index.js
@@ -6,6 +6,7 @@ Page({
*/
data: {
eventType:'input',// 底部事件类型 input 键盘输入,voice 语音输入
+ sendText:'',// 发送的输入框内容
list:[
{
id:-1,
@@ -152,7 +153,12 @@ Page({
let that = this;
that.animate();
},
-
+ handleInput(e){
+ let that = this;
+ that.setData({
+ sendText:e.detail.value
+ });
+ },
animate($type='light') {
wx.vibrateShort({
diff --git a/subPage/chat/index.wxml b/subPage/chat/index.wxml
index 93b1efb..12d8e70 100644
--- a/subPage/chat/index.wxml
+++ b/subPage/chat/index.wxml
@@ -74,7 +74,11 @@
-
+
按住 说话
@@ -82,7 +86,7 @@
-
+
diff --git a/subPage/chat/index.wxss b/subPage/chat/index.wxss
index dcdcde1..adca825 100644
--- a/subPage/chat/index.wxss
+++ b/subPage/chat/index.wxss
@@ -203,7 +203,12 @@ textarea {
.chat-card{
padding: 0 10px;
- margin-bottom: 10px;
+}
+.chat-card:nth-child(2n+1){
+ margin-bottom: 2px;
+}
+.chat-card:nth-child(2n){
+ margin-bottom: 12px;
}
.chat-card:last-child{
margin-bottom: 24px;
@@ -233,13 +238,13 @@ textarea {
margin-right: 12px;
}
.icon-active{
- color: #3578f6;
+ color: #3578f6 !important;
}
.g_w_all{
width: 100%;
}
.min80{
- min-width: 80vw;
+ min-width: calc(100vw - 44px);
}
.max80{
max-width: 80vw;
From 403ac0ad12f0293710d5afe66de5a19df8d2d0c7 Mon Sep 17 00:00:00 2001
From: jscyl13849007907 <13849007907@163.com>
Date: Wed, 12 Mar 2025 09:40:11 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/chat/hello.wxss | 9 ++++++---
components/chat/text.wxss | 4 ++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/components/chat/hello.wxss b/components/chat/hello.wxss
index d4547e0..f902168 100644
--- a/components/chat/hello.wxss
+++ b/components/chat/hello.wxss
@@ -1,10 +1,13 @@
/* components/chat/hello.wxss */
-.g_fw_600{
+.g-components-chat-gree .g_fw_600{
font-weight: 600;
}
-.g_ml_4{
+.g-components-chat-gree .g_ml_4{
margin-left: 4px;
}
-.g_mr_4{
+.g-components-chat-gree .g_mr_4{
margin-right: 4px;
}
+.g-components-chat-gree view{
+ font-size: 16px;
+}
\ No newline at end of file
diff --git a/components/chat/text.wxss b/components/chat/text.wxss
index ee8a91e..9f1f270 100644
--- a/components/chat/text.wxss
+++ b/components/chat/text.wxss
@@ -4,4 +4,8 @@
}
.cwhite{
color: #fff;
+}
+
+.panel-text{
+ font-size: 16px;
}
\ No newline at end of file
From 5fd62daf162704a7fc9abdf562d4033a25afa85a Mon Sep 17 00:00:00 2001
From: jscyl13849007907 <13849007907@163.com>
Date: Wed, 12 Mar 2025 09:47:42 +0800
Subject: [PATCH 3/5] no message
---
subPage/chat/index.js | 50 ++++++++++++++++++++++++++++---------------------
subPage/chat/index.wxml | 4 +++-
2 files changed, 32 insertions(+), 22 deletions(-)
diff --git a/subPage/chat/index.js b/subPage/chat/index.js
index e2301fa..22ca0c8 100644
--- a/subPage/chat/index.js
+++ b/subPage/chat/index.js
@@ -14,27 +14,6 @@ Page({
isUp:false,
isDown:false,
},
- {
- id:-1,
- type:'text',
- isUp:false,
- isDown:false,
- content:'测试输入框发送测试输入框发送测试输入框发送测试输入框发送'
- },
- {
- id:0,
- type:'text',
- isUp:false,
- isDown:false,
- content:'我是AI回复,自定义回复'
- },
- {
- id:1,
- type:'text',
- isUp:false,
- isDown:false,
- content:'再次发送再次发送再次发送'
- },
]
},
@@ -165,4 +144,33 @@ Page({
type:$type
});
},
+
+
+
+
+ // 文本消息发送
+ handleSend(){
+ let that = this;
+ if(that.data.sendText == ''){
+ wx.showToast({
+ title: '请输入内容',
+ icon: 'none',
+ });
+ return false;
+ }
+ that.animate();
+ that.setData({
+ list:[
+ ...that.data.list,
+ {
+ id:that.data.list.length,
+ type:'text',
+ isUp:false,
+ isDown:false,
+ content:that.data.sendText
+ }
+ ],
+ sendText:''
+ });
+ }
})
\ No newline at end of file
diff --git a/subPage/chat/index.wxml b/subPage/chat/index.wxml
index 12d8e70..daeaf83 100644
--- a/subPage/chat/index.wxml
+++ b/subPage/chat/index.wxml
@@ -85,7 +85,9 @@
-
+
From fe811a8152f21e17c785d9b1cce97e4b5395dfcc Mon Sep 17 00:00:00 2001
From: jscyl13849007907 <13849007907@163.com>
Date: Wed, 12 Mar 2025 10:04:08 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 3 +-
components/chat/html.js | 76 +++++++++++++++++++++++++++++++++++++++++++++++
components/chat/html.json | 3 ++
components/chat/html.wxml | 3 ++
components/chat/html.wxss | 11 +++++++
subPage/chat/index.js | 9 +++++-
subPage/chat/index.json | 3 +-
subPage/chat/index.wxml | 4 ++-
8 files changed, 108 insertions(+), 4 deletions(-)
create mode 100644 components/chat/html.js
create mode 100644 components/chat/html.json
create mode 100644 components/chat/html.wxml
create mode 100644 components/chat/html.wxss
diff --git a/app.json b/app.json
index 126b57a..1709046 100644
--- a/app.json
+++ b/app.json
@@ -84,7 +84,8 @@
"pages/sendCreatorCode/index",
"pages/creatorSelectPage/index",
"components/chat/text",
- "components/chat/hello"
+ "components/chat/hello",
+ "components/chat/html"
],
"permission": {
"scope.userLocation": {
diff --git a/components/chat/html.js b/components/chat/html.js
new file mode 100644
index 0000000..4fa6bdf
--- /dev/null
+++ b/components/chat/html.js
@@ -0,0 +1,76 @@
+// components/chat/text.js
+Component({
+ properties: {
+ message: {
+ type: String,
+ value: ''
+ },
+ color: {
+ type: String,
+ value: ''
+ },
+ },
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/components/chat/html.json b/components/chat/html.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/components/chat/html.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/chat/html.wxml b/components/chat/html.wxml
new file mode 100644
index 0000000..d27a61f
--- /dev/null
+++ b/components/chat/html.wxml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/components/chat/html.wxss b/components/chat/html.wxss
new file mode 100644
index 0000000..4ecc916
--- /dev/null
+++ b/components/chat/html.wxss
@@ -0,0 +1,11 @@
+/* components/chat/html.wxss */
+.cblack{
+ color: #000;
+}
+.cwhite{
+ color: #fff;
+}
+
+.panel-text{
+ font-size: 16px;
+}
\ No newline at end of file
diff --git a/subPage/chat/index.js b/subPage/chat/index.js
index 22ca0c8..22eb28f 100644
--- a/subPage/chat/index.js
+++ b/subPage/chat/index.js
@@ -168,7 +168,14 @@ Page({
isUp:false,
isDown:false,
content:that.data.sendText
- }
+ },
+ {
+ id:that.data.list.length + 1,
+ type:'html',
+ isUp:false,
+ isDown:false,
+ content:`【北京奔驰连接器日结工】
🚻 男女 18-48, 18-48周岁, 男女不限, 要求26个英文字母, 纹身烟疤拍照确认, 黑户,明显纹身,临时身份证不予接收,两班倒,站班
💰 员工250元/天,支付60天;60天以后员工220元/天;每月10号发薪。培训工资100元/天,员工 16 元/时以上部分含税6个点的,打卡不满七天无工资;60天以后员工缴纳社保`
+ },
],
sendText:''
});
diff --git a/subPage/chat/index.json b/subPage/chat/index.json
index 68d7397..a4fd187 100644
--- a/subPage/chat/index.json
+++ b/subPage/chat/index.json
@@ -1,6 +1,7 @@
{
"usingComponents": {
"hello-panel": "../../components/chat/hello",
- "text-panel": "../../components/chat/text"
+ "text-panel": "../../components/chat/text",
+ "html-panel": "../../components/chat/html"
}
}
\ No newline at end of file
diff --git a/subPage/chat/index.wxml b/subPage/chat/index.wxml
index daeaf83..8b801db 100644
--- a/subPage/chat/index.wxml
+++ b/subPage/chat/index.wxml
@@ -18,7 +18,8 @@
-
+
+
From 871e642553e445f1c648d7d8431bfcd193392ad6 Mon Sep 17 00:00:00 2001
From: jscyl13849007907 <13849007907@163.com>
Date: Wed, 12 Mar 2025 10:08:20 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E5=90=8C=E6=AD=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
subPage/chat/index.wxml | 6 ++++--
subPage/chat/index.wxss | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/subPage/chat/index.wxml b/subPage/chat/index.wxml
index 8b801db..c0a1edd 100644
--- a/subPage/chat/index.wxml
+++ b/subPage/chat/index.wxml
@@ -1,5 +1,7 @@
-
+
-
+
diff --git a/subPage/chat/index.wxss b/subPage/chat/index.wxss
index adca825..ce1c425 100644
--- a/subPage/chat/index.wxss
+++ b/subPage/chat/index.wxss
@@ -213,6 +213,9 @@ textarea {
.chat-card:last-child{
margin-bottom: 24px;
}
+.chat-card:first-child{
+ margin-top: 12px;
+}
.bg-obj{
background-color: #fff;
border-radius: 12px;