From 155c89547b6caffa8a1157b21a16bcd48af77358 Mon Sep 17 00:00:00 2001 From: jscyl13849007907 <13849007907@163.com> Date: Tue, 11 Mar 2025 13:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 4 ++- components/chat/hello.js | 66 ++++++++++++++++++++++++++++++++++++++++++++++ components/chat/hello.json | 3 +++ components/chat/hello.wxml | 15 +++++++++++ components/chat/hello.wxss | 10 +++++++ components/chat/text.js | 66 ++++++++++++++++++++++++++++++++++++++++++++++ components/chat/text.json | 3 +++ components/chat/text.wxml | 3 +++ components/chat/text.wxss | 1 + subPage/chat/index.js | 6 +++++ subPage/chat/index.json | 5 +++- subPage/chat/index.wxml | 37 +++++++++++++++++++++++++- subPage/chat/index.wxss | 21 +++++++++++++++ 13 files changed, 237 insertions(+), 3 deletions(-) create mode 100644 components/chat/hello.js create mode 100644 components/chat/hello.json create mode 100644 components/chat/hello.wxml create mode 100644 components/chat/hello.wxss create mode 100644 components/chat/text.js create mode 100644 components/chat/text.json create mode 100644 components/chat/text.wxml create mode 100644 components/chat/text.wxss diff --git a/app.json b/app.json index 0e98aaa..126b57a 100644 --- a/app.json +++ b/app.json @@ -82,7 +82,9 @@ "pages/mineJob/index", "pages/memberGroupList/index", "pages/sendCreatorCode/index", - "pages/creatorSelectPage/index" + "pages/creatorSelectPage/index", + "components/chat/text", + "components/chat/hello" ], "permission": { "scope.userLocation": { diff --git a/components/chat/hello.js b/components/chat/hello.js new file mode 100644 index 0000000..c487b98 --- /dev/null +++ b/components/chat/hello.js @@ -0,0 +1,66 @@ +// components/chat/hello.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/components/chat/hello.json b/components/chat/hello.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/components/chat/hello.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/components/chat/hello.wxml b/components/chat/hello.wxml new file mode 100644 index 0000000..560319c --- /dev/null +++ b/components/chat/hello.wxml @@ -0,0 +1,15 @@ + + + Hi,我是 + 大鹏 + ,你的智能工作助理。 + + + 以后找工作不用跟老板谈了,直接来跟 + 大鹏 + 谈。 + + + 来说说你的要求,我们开始吧… + + \ No newline at end of file diff --git a/components/chat/hello.wxss b/components/chat/hello.wxss new file mode 100644 index 0000000..d4547e0 --- /dev/null +++ b/components/chat/hello.wxss @@ -0,0 +1,10 @@ +/* components/chat/hello.wxss */ +.g_fw_600{ + font-weight: 600; +} +.g_ml_4{ + margin-left: 4px; +} +.g_mr_4{ + margin-right: 4px; +} diff --git a/components/chat/text.js b/components/chat/text.js new file mode 100644 index 0000000..d0e9935 --- /dev/null +++ b/components/chat/text.js @@ -0,0 +1,66 @@ +// components/chat/text.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/components/chat/text.json b/components/chat/text.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/components/chat/text.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/components/chat/text.wxml b/components/chat/text.wxml new file mode 100644 index 0000000..75f7497 --- /dev/null +++ b/components/chat/text.wxml @@ -0,0 +1,3 @@ + + 模拟返回纯文本内容 + \ No newline at end of file diff --git a/components/chat/text.wxss b/components/chat/text.wxss new file mode 100644 index 0000000..cd51670 --- /dev/null +++ b/components/chat/text.wxss @@ -0,0 +1 @@ +/* components/chat/text.wxss */ \ No newline at end of file diff --git a/subPage/chat/index.js b/subPage/chat/index.js index 062f8fa..447f6ea 100644 --- a/subPage/chat/index.js +++ b/subPage/chat/index.js @@ -6,6 +6,12 @@ Page({ */ data: { eventType:'input',// 底部事件类型 input 键盘输入,voice 语音输入 + list:[ + { + id:-1, + type:'text' + } + ] }, /** diff --git a/subPage/chat/index.json b/subPage/chat/index.json index 8835af0..68d7397 100644 --- a/subPage/chat/index.json +++ b/subPage/chat/index.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": { + "hello-panel": "../../components/chat/hello", + "text-panel": "../../components/chat/text" + } } \ No newline at end of file diff --git a/subPage/chat/index.wxml b/subPage/chat/index.wxml index 82de06e..48430c9 100644 --- a/subPage/chat/index.wxml +++ b/subPage/chat/index.wxml @@ -1,6 +1,41 @@ - 具体内容 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/subPage/chat/index.wxss b/subPage/chat/index.wxss index e29bafd..f1910e1 100644 --- a/subPage/chat/index.wxss +++ b/subPage/chat/index.wxss @@ -199,4 +199,25 @@ textarea { top: 50%; z-index: 99; transform: translate(-50%, -50%); +} + +.chat-card{ + padding: 0 10px; +} +.item-obj{ + background-color: #fff; + border-radius: 12px; + line-height: 1.5; + word-break: break-all; + padding: 10px; +} +.item-opera{ + margin-top: 10px; +} +.era-icon{ + font-size: 20px; + color: #888888; +} +.g_mr_12{ + margin-right: 12px; } \ No newline at end of file