明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
D
deepseek_wechat_chat
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengfanpei
deepseek_wechat_chat
Commits
f421ec49
Commit
f421ec49
authored
Feb 26, 2025
by
yangyajing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加发送按钮
parent
5d7b9c51
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
124 additions
and
116 deletions
+124
-116
index.css
public/publicAccount/css/index.css
+14
-4
index.html
public/publicAccount/index.html
+1
-0
index.js
public/publicAccount/js/index.js
+109
-112
No files found.
public/publicAccount/css/index.css
View file @
f421ec49
...
@@ -50,17 +50,27 @@ body, html{
...
@@ -50,17 +50,27 @@ body, html{
}
}
.container
.input-wrap
{
.container
.input-wrap
{
margin-top
:
0.625rem
;
margin-top
:
0.625rem
;
display
:
flex
;
align-items
:
center
;
}
}
.container
.input-wrap
input
{
.container
.input-wrap
input
{
width
:
100%
;
flex
:
1
;
width
:
0
;
border
:
1px
solid
#aaa
;
border
:
1px
solid
#aaa
;
height
:
1.87
5rem
;
height
:
2.
5rem
;
line-height
:
1.87
5rem
;
line-height
:
2.
5rem
;
border-radius
:
0.
2
5rem
;
border-radius
:
0.5rem
;
padding
:
0
0.75rem
;
padding
:
0
0.75rem
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
outline
:
none
;
outline
:
none
;
}
}
.container
.input-wrap
.send-button
{
padding
:
5px
15px
;
background-color
:
#1FC67E
;
color
:
#fff
;
border-radius
:
6px
;
margin-left
:
15px
;
}
.mask-container
{
.mask-container
{
position
:
fixed
;
position
:
fixed
;
width
:
100%
;
width
:
100%
;
...
...
public/publicAccount/index.html
View file @
f421ec49
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
</div>
</div>
<div
class=
"input-wrap"
>
<div
class=
"input-wrap"
>
<input
type=
"text"
id=
"question-input"
placeholder=
"给deepseek发送消息"
>
<input
type=
"text"
id=
"question-input"
placeholder=
"给deepseek发送消息"
>
<div
class=
"send-button"
>
发送
</div>
</div>
</div>
</div>
</div>
<div
class=
"mask-container"
>
<div
class=
"mask-container"
>
...
...
public/publicAccount/js/index.js
View file @
f421ec49
...
@@ -78,10 +78,8 @@ $(function () {
...
@@ -78,10 +78,8 @@ $(function () {
})
})
}
}
// 提交问答
// 提交问答
$
(
"#question-input"
).
keypress
(
function
(
event
)
{
$
(
".send-button"
).
on
(
"click"
,
function
()
{
if
(
event
.
key
===
"Enter"
||
event
.
keyCode
===
13
)
{
question
=
$
(
"#question-input"
).
val
();
event
.
preventDefault
();
question
=
$
(
this
).
val
();
if
(
question
)
{
if
(
question
)
{
async
function
handleAsk
()
{
async
function
handleAsk
()
{
try
{
try
{
...
@@ -160,7 +158,7 @@ $(function () {
...
@@ -160,7 +158,7 @@ $(function () {
</div>`
;
</div>`
;
$
(
'.conversation-wrap'
)[
0
].
insertBefore
(
div
,
$
(
'.conversation-loading'
)[
0
]);
$
(
'.conversation-wrap'
)[
0
].
insertBefore
(
div
,
$
(
'.conversation-loading'
)[
0
]);
$
(
'.conversation-loading'
).
show
();
$
(
'.conversation-loading'
).
show
();
$
(
this
).
attr
(
"disabled"
,
true
);
$
(
"#question-input"
).
attr
(
"disabled"
,
true
);
handleAsk
();
handleAsk
();
// $.ajax({
// $.ajax({
// url: "https://dashscope.aliyuncs.com/api/v1/apps/6de1065c75074ee1a11238ab90c1aa34/completion",
// url: "https://dashscope.aliyuncs.com/api/v1/apps/6de1065c75074ee1a11238ab90c1aa34/completion",
...
@@ -200,7 +198,6 @@ $(function () {
...
@@ -200,7 +198,6 @@ $(function () {
// }
// }
// })
// })
}
}
}
});
});
// 保存当前问答
// 保存当前问答
function
saveConversation
()
{
function
saveConversation
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment