Fix some issues
This commit is contained in:
parent
90ec845a93
commit
cf3ed9355c
@ -8,7 +8,7 @@
|
||||
<text class="dt">{{item.dt}}</text>
|
||||
<view class="content bg-white" bindlongpress="copyContent" data-index="{{index}}">
|
||||
<view class="{{item.blink ? 'blinking': ''}}">
|
||||
<wemark md="{{item.originContent}}" link="{{false}}" highlight type="wemark" wx:if="{{tools.indexOf(item.originContent, '```') || tools.indexOf(item.originContent, '**')}}">
|
||||
<wemark md="{{item.originContent}}" link="{{false}}" highlight type="wemark" wx:if="{{tools.indexOf(item.originContent, '`') || tools.indexOf(item.originContent, '**')}}">
|
||||
</wemark>
|
||||
<text user-select decode space wx:else>{{item.originContent}}</text>
|
||||
</view>
|
||||
|
||||
@ -79,4 +79,5 @@
|
||||
|
||||
.suggest-item-hover {
|
||||
color: #ff502c;
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -49,7 +49,8 @@ Page({
|
||||
data: {
|
||||
InputBottom: initHeight,
|
||||
content: "",
|
||||
systemInfo: systemInfo
|
||||
systemInfo: systemInfo,
|
||||
textareaFocus: false,
|
||||
},
|
||||
InputFocus(e) {
|
||||
if (inputPop()) {
|
||||
@ -233,5 +234,11 @@ Page({
|
||||
onSuggestSubmit: function (e) {
|
||||
var suggest = e.detail.suggest;
|
||||
this.submitContent(suggest);
|
||||
},
|
||||
},
|
||||
focus: function(e){
|
||||
console.log(e)
|
||||
this.setData({
|
||||
textareaFocus: true
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<chat-box bindsuggestSubmit="onSuggestSubmit"></chat-box>
|
||||
<view style="bottom:{{InputBottom}}px; border-radius: 20rpx;margin-left: 1.5%;width: 97%;min-height: 100rpx;position: fixed;background-color: #f4f6f8;display: flex;align-items:flex-start;">
|
||||
<textarea bindfocus="InputFocus" bindblur="InputBlur" model:value="{{content}}" adjust-position="{{false}}" focus="{{false}}" auto-focus="{{!(systemInfo.platform == 'ios' || systemInfo.platform == 'android')}}" maxlength="2000" auto-height="{{true}}" cursor-spacing="10" bindconfirm="submit" fixed="{{true}}" show-confirm-bar="{{false}}" confirm-type="send" placeholder="请输入问题..." style="padding: 10rpx;flex: 8;" disable-default-padding="{{true}}" placeholder-style="color: #b4bbc4"></textarea>
|
||||
<textarea bindfocus="InputFocus" bindblur="InputBlur" model:value="{{content}}" adjust-position="{{false}}" focus="{{textareaFocus}}" maxlength="2000" auto-height="{{true}}" cursor-spacing="10" bindconfirm="submit" fixed="{{true}}" show-confirm-bar="{{false}}" confirm-type="send" placeholder="请输入问题..." style="padding: 10rpx;flex: 8;" placeholder-style="color: #b4bbc4" bindtap="focus"></textarea>
|
||||
<button style="flex: 1;background-color: #f4f6f8;color: {{content ? black : '#b4bbc4'}};border-left: 1px dashed #b4bbc4;border-radius: 0 20rpx 20rpx 0;" bindtap="submit" wx:if="{{systemInfo.platform != 'ios'}}">发送</button>
|
||||
</view>
|
||||
@ -3,4 +3,5 @@ build:
|
||||
docker push yy194131/new-bing:$(version)
|
||||
|
||||
release:build
|
||||
scp ./{cookie,cookie1,cookie2}.json roselle:/home/linghaihui/bingchat/cookies
|
||||
ssh roselle 'bash /home/linghaihui/bingchat/start.sh $(version)'
|
||||
|
||||
@ -58,7 +58,7 @@ func Completions(msg string, nickName string) (string, error) {
|
||||
requestBody := ChatGPTRequestBody{
|
||||
Model: "gpt-3.5-turbo",
|
||||
MaxTokens: 2048,
|
||||
Temperature: 0.2,
|
||||
Temperature: 1.2,
|
||||
Messages: messageCache,
|
||||
}
|
||||
requestData, err := json.Marshal(requestBody)
|
||||
|
||||
@ -37,7 +37,6 @@ func Handler(msg *openwechat.Message) {
|
||||
handlers[GroupHandler].handle(msg)
|
||||
return
|
||||
}
|
||||
|
||||
// 好友申请
|
||||
if msg.IsFriendAdd() {
|
||||
if config.LoadConfig().AutoPass {
|
||||
@ -48,7 +47,6 @@ func Handler(msg *openwechat.Message) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 私聊
|
||||
handlers[UserHandler].handle(msg)
|
||||
}
|
||||
|
||||
@ -20,10 +20,11 @@ func (g *UserMessageHandler) handle(msg *openwechat.Message) error {
|
||||
return g.ReplyText(msg)
|
||||
}
|
||||
if msg.IsSendByFriend() {
|
||||
msg.ReplyText("目前我只支持文字哦~")
|
||||
}
|
||||
if msg.IsPaiYiPai() {
|
||||
msg.ReplyText("我是机器人🤖️,会拍坏的哦~")
|
||||
if msg.IsPaiYiPai() {
|
||||
msg.ReplyText("我是机器人🤖️,会拍坏的哦~")
|
||||
} else {
|
||||
msg.ReplyText("目前我只支持文字哦~")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user